mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	bluez5: use lc3plus.h instead of lc3.h
The file name "lc3.h" in the ETSI LC3plus package may conflict with the actual LC3 codec, so try to find a file "lc3plus.h" instead. Also try to find a pkg-config dependency for it first (in which case use lc3.h, assuming it's in different directory). This can be fine tuned, if something starts to package that library.
This commit is contained in:
		
							parent
							
								
									7f67dedac6
								
							
						
					
					
						commit
						6ccb939267
					
				
					 3 changed files with 12 additions and 2 deletions
				
			
		|  | @ -54,7 +54,13 @@ if get_option('spa-plugins').allowed() | ||||||
|     summary({'aptX': aptx_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') |     summary({'aptX': aptx_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') | ||||||
|     fdk_aac_dep = dependency('fdk-aac', required : get_option('bluez5-codec-aac')) |     fdk_aac_dep = dependency('fdk-aac', required : get_option('bluez5-codec-aac')) | ||||||
|     summary({'AAC': fdk_aac_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') |     summary({'AAC': fdk_aac_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') | ||||||
|     lc3plus_dep = cc.find_library('LC3plus', has_headers: ['lc3.h'], required : get_option('bluez5-codec-lc3plus')) |     lc3plus_dep = dependency('lc3plus', required : false) | ||||||
|  |     if not lc3plus_dep.found() | ||||||
|  |       lc3plus_lc3plus_h_dep = cc.find_library('LC3plus', has_headers: ['lc3plus.h'], required : get_option('bluez5-codec-lc3plus')) | ||||||
|  |       if lc3plus_lc3plus_h_dep.found() | ||||||
|  |         lc3plus_dep = declare_dependency(compile_args : '-DHAVE_LC3PLUS_H', dependencies : [ lc3plus_lc3plus_h_dep ]) | ||||||
|  |       endif | ||||||
|  |     endif | ||||||
|     summary({'LC3plus': lc3plus_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') |     summary({'LC3plus': lc3plus_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs') | ||||||
|   endif |   endif | ||||||
|   avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg')) |   avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg')) | ||||||
|  |  | ||||||
|  | @ -34,7 +34,11 @@ | ||||||
| #include <spa/param/audio/format.h> | #include <spa/param/audio/format.h> | ||||||
| #include <spa/param/audio/format-utils.h> | #include <spa/param/audio/format-utils.h> | ||||||
| 
 | 
 | ||||||
|  | #ifdef HAVE_LC3PLUS_H | ||||||
|  | #include <lc3plus.h> | ||||||
|  | #else | ||||||
| #include <lc3.h> | #include <lc3.h> | ||||||
|  | #endif | ||||||
| 
 | 
 | ||||||
| #include "rtp.h" | #include "rtp.h" | ||||||
| #include "a2dp-codecs.h" | #include "a2dp-codecs.h" | ||||||
|  |  | ||||||
|  | @ -110,7 +110,7 @@ if ldac_dep.found() | ||||||
|     install_dir : spa_plugindir / 'bluez5') |     install_dir : spa_plugindir / 'bluez5') | ||||||
| endif | endif | ||||||
| 
 | 
 | ||||||
| if lc3plus_dep.found() | if get_option('bluez5-codec-lc3plus').allowed() and lc3plus_dep.found() | ||||||
|   lc3plus_args = codec_args |   lc3plus_args = codec_args | ||||||
|   lc3plus_dep = [ lc3plus_dep ] |   lc3plus_dep = [ lc3plus_dep ] | ||||||
|   bluez_codec_lc3plus = shared_library('spa-codec-bluez5-lc3plus', |   bluez_codec_lc3plus = shared_library('spa-codec-bluez5-lc3plus', | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Pauli Virtanen
						Pauli Virtanen