mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	spa: libcamera: add libcamera version check for properties::SystemDevices
This commit is contained in:
		
							parent
							
								
									6cd29aed05
								
							
						
					
					
						commit
						5bac089229
					
				
					 3 changed files with 6 additions and 0 deletions
				
			
		|  | @ -94,6 +94,7 @@ if get_option('spa-plugins').allowed() | |||
| 
 | ||||
|   libcamera_dep = dependency('libcamera', required: get_option('libcamera')) | ||||
|   summary({'libcamera': libcamera_dep.found()}, bool_yn: true, section: 'Backend') | ||||
|   cdata.set('HAVE_LIBCAMERA_SYSTEM_DEVICES', libcamera_dep.version().version_compare('>= 0.1.0')) | ||||
| 
 | ||||
|   compress_offload_option = get_option('compress-offload') | ||||
|   summary({'Compress-Offload': compress_offload_option.allowed()}, bool_yn: true, section: 'Backend') | ||||
|  |  | |||
|  | @ -4,6 +4,8 @@ | |||
| /* SPDX-FileCopyrightText: Copyright © 2021 Wim Taymans <wim.taymans@gmail.com> */ | ||||
| /* SPDX-License-Identifier: MIT */ | ||||
| 
 | ||||
| #include "config.h" | ||||
| 
 | ||||
| #include <stddef.h> | ||||
| #include <sys/types.h> | ||||
| #include <sys/stat.h> | ||||
|  | @ -59,10 +61,12 @@ struct impl { | |||
| static const libcamera::Span<const int64_t> cameraDevice( | ||||
| 			const Camera *camera) | ||||
| { | ||||
| #ifdef HAVE_LIBCAMERA_SYSTEM_DEVICES | ||||
| 	const ControlList &props = camera->properties(); | ||||
| 
 | ||||
| 	if (auto devices = props.get(properties::SystemDevices)) | ||||
| 		return devices.value(); | ||||
| #endif | ||||
| 
 | ||||
| 	return {}; | ||||
| } | ||||
|  |  | |||
|  | @ -7,6 +7,7 @@ libcamera_sources = [ | |||
| 
 | ||||
| libcameralib = shared_library('spa-libcamera', | ||||
|   libcamera_sources, | ||||
|   include_directories : [ configinc ], | ||||
|   dependencies : [ spa_dep, libudev_dep, libcamera_dep, pthread_lib  ], | ||||
|   install : true, | ||||
|   install_dir : spa_plugindir / 'libcamera') | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Robert Mader
						Robert Mader