Commit 6ccb9392 authored by P V's avatar P V
Browse files

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.
parent 7f67deda
Pipeline #575722 passed with stages
in 3 minutes and 43 seconds
......@@ -54,7 +54,13 @@ if get_option('spa-plugins').allowed()
summary({'aptX': aptx_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
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')
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 ])
summary({'LC3plus': lc3plus_dep.found()}, bool_yn: true, section: 'Bluetooth audio codecs')
avcodec_dep = dependency('libavcodec', required: get_option('ffmpeg'))
......@@ -34,7 +34,11 @@
#include <spa/param/audio/format.h>
#include <spa/param/audio/format-utils.h>
#include <lc3plus.h>
#include <lc3.h>
#include "rtp.h"
#include "a2dp-codecs.h"
......@@ -110,7 +110,7 @@ if ldac_dep.found()
install_dir : spa_plugindir / 'bluez5')
if lc3plus_dep.found()
if get_option('bluez5-codec-lc3plus').allowed() and lc3plus_dep.found()
lc3plus_args = codec_args
lc3plus_dep = [ lc3plus_dep ]
bluez_codec_lc3plus = shared_library('spa-codec-bluez5-lc3plus',
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment