mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	spa: libcamera: device: adapt to libcamera change
The interface of string typed controls has recently been changed in
libcamera[0], which affects `properties::Model`, so adapt to that change
in such a way that is compatible with both the new and old versions.
[0]: f84522d7cd
			
			
This commit is contained in:
		
							parent
							
								
									96b4fdec0a
								
							
						
					
					
						commit
						3bdc84aadb
					
				
					 1 changed files with 1 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -60,10 +60,7 @@ const libcamera::Span<const int64_t> cameraDevice(const Camera& camera)
 | 
			
		|||
 | 
			
		||||
std::string cameraModel(const Camera& camera)
 | 
			
		||||
{
 | 
			
		||||
	if (auto model = camera.properties().get(properties::Model))
 | 
			
		||||
		return std::move(model.value());
 | 
			
		||||
 | 
			
		||||
	return camera.id();
 | 
			
		||||
	return std::string(camera.properties().get(properties::Model).value_or(camera.id()));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char *cameraLoc(const Camera& camera)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue