mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-23 06:59:58 -05:00
bluez5: add codec_data for codec-private configuration data
With BAP codec configuration selection goes via multiple functions, which will need to maintain some private state. Adjust media_codec to allow for that. Use it for get_qos().
This commit is contained in:
parent
914e8c6c7a
commit
ff6db3e08e
12 changed files with 95 additions and 44 deletions
|
|
@ -110,7 +110,8 @@ aptx_frequencies[] = {
|
|||
static int codec_select_config(const struct media_codec *codec, uint32_t flags,
|
||||
const void *caps, size_t caps_size,
|
||||
const struct media_codec_audio_info *info,
|
||||
const struct spa_dict *settings, uint8_t config[A2DP_MAX_CAPS_SIZE])
|
||||
const struct spa_dict *settings, uint8_t config[A2DP_MAX_CAPS_SIZE],
|
||||
void **config_data)
|
||||
{
|
||||
a2dp_aptx_t conf;
|
||||
int i;
|
||||
|
|
@ -146,7 +147,8 @@ static int codec_select_config(const struct media_codec *codec, uint32_t flags,
|
|||
static int codec_select_config_ll(const struct media_codec *codec, uint32_t flags,
|
||||
const void *caps, size_t caps_size,
|
||||
const struct media_codec_audio_info *info,
|
||||
const struct spa_dict *settings, uint8_t config[A2DP_MAX_CAPS_SIZE])
|
||||
const struct spa_dict *settings, uint8_t config[A2DP_MAX_CAPS_SIZE],
|
||||
void **config_data)
|
||||
{
|
||||
a2dp_aptx_ll_ext_t conf = { 0 };
|
||||
size_t actual_conf_size;
|
||||
|
|
@ -166,7 +168,7 @@ static int codec_select_config_ll(const struct media_codec *codec, uint32_t flag
|
|||
if (codec->duplex_codec && !conf.base.bidirect_link)
|
||||
return -ENOTSUP;
|
||||
|
||||
if ((res = codec_select_config(codec, flags, caps, caps_size, info, settings, config)) < 0)
|
||||
if ((res = codec_select_config(codec, flags, caps, caps_size, info, settings, config, NULL)) < 0)
|
||||
return res;
|
||||
|
||||
memcpy(&conf.base.aptx, config, sizeof(conf.base.aptx));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue