mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
bluez5: add Opus as a (Pipewire-specific) A2DP vendor codec
Support Opus as A2DP vendor codec. The specification for vendor A2DP codec is our Pipewire-specific one, so it is compatible only with devices running Pipewire.
This commit is contained in:
parent
bf52b2acff
commit
434cc6a90b
7 changed files with 1397 additions and 1 deletions
1362
spa/plugins/bluez5/a2dp-codec-opus.c
Normal file
1362
spa/plugins/bluez5/a2dp-codec-opus.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -63,6 +63,11 @@ static int codec_order(const struct a2dp_codec *c)
|
|||
SPA_BLUETOOTH_AUDIO_CODEC_APTX_LL_DUPLEX,
|
||||
SPA_BLUETOOTH_AUDIO_CODEC_FASTSTREAM,
|
||||
SPA_BLUETOOTH_AUDIO_CODEC_FASTSTREAM_DUPLEX,
|
||||
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05,
|
||||
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05_51,
|
||||
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05_71,
|
||||
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05_DUPLEX,
|
||||
SPA_BLUETOOTH_AUDIO_CODEC_OPUS_05_PRO,
|
||||
};
|
||||
size_t i;
|
||||
for (i = 0; i < SPA_N_ELEMENTS(order); ++i)
|
||||
|
|
@ -174,7 +179,8 @@ const struct a2dp_codec * const *load_a2dp_codecs(struct spa_plugin_loader *load
|
|||
A2DP_CODEC_FACTORY_LIB("faststream"),
|
||||
A2DP_CODEC_FACTORY_LIB("ldac"),
|
||||
A2DP_CODEC_FACTORY_LIB("sbc"),
|
||||
A2DP_CODEC_FACTORY_LIB("lc3plus")
|
||||
A2DP_CODEC_FACTORY_LIB("lc3plus"),
|
||||
A2DP_CODEC_FACTORY_LIB("opus")
|
||||
#undef A2DP_CODEC_FACTORY_LIB
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -121,3 +121,15 @@ if get_option('bluez5-codec-lc3plus').allowed() and lc3plus_dep.found()
|
|||
install : true,
|
||||
install_dir : spa_plugindir / 'bluez5')
|
||||
endif
|
||||
|
||||
if get_option('bluez5-codec-opus').allowed() and opus_dep.found()
|
||||
opus_args = codec_args
|
||||
opus_dep = [ opus_dep ]
|
||||
bluez_codec_opus = shared_library('spa-codec-bluez5-opus',
|
||||
[ 'a2dp-codec-opus.c', 'a2dp-codecs.c' ],
|
||||
include_directories : [ configinc ],
|
||||
c_args : opus_args,
|
||||
dependencies : [ spa_dep, opus_dep, mathlib ],
|
||||
install : true,
|
||||
install_dir : spa_plugindir / 'bluez5')
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue