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
|
|
@ -83,7 +83,8 @@ static int codec_fill_caps(const struct media_codec *codec, uint32_t flags,
|
|||
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_lc3plus_hr_t conf;
|
||||
|
||||
|
|
@ -137,8 +138,8 @@ static int codec_caps_preference_cmp(const struct media_codec *codec, uint32_t f
|
|||
int a, b;
|
||||
|
||||
/* Order selected configurations by preference */
|
||||
res1 = codec->select_config(codec, 0, caps1, caps1_size, info, NULL, (uint8_t *)&conf1);
|
||||
res2 = codec->select_config(codec, 0, caps2, caps2_size, info , NULL, (uint8_t *)&conf2);
|
||||
res1 = codec->select_config(codec, 0, caps1, caps1_size, info, NULL, (uint8_t *)&conf1, NULL);
|
||||
res2 = codec->select_config(codec, 0, caps2, caps2_size, info , NULL, (uint8_t *)&conf2, NULL);
|
||||
|
||||
#define PREFER_EXPR(expr) \
|
||||
do { \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue