mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
bluez5: pass global setting dict to codec select_config / preference_cmp
The device is not know at SelectConfiguration time, so the settings argument in select_config is currently unused. Pass on a global settings dict instead, so that codec parameters can be configured. Also add settings argument to caps_preference_cmp. Bump codec API version.
This commit is contained in:
parent
a8eb146d39
commit
92b2b44954
5 changed files with 49 additions and 12 deletions
|
|
@ -62,7 +62,8 @@ int a2dp_codec_select_config(const struct a2dp_codec_config configs[], size_t n,
|
|||
|
||||
bool a2dp_codec_check_caps(const struct a2dp_codec *codec, unsigned int codec_id,
|
||||
const void *caps, size_t caps_size,
|
||||
const struct a2dp_codec_audio_info *info)
|
||||
const struct a2dp_codec_audio_info *info,
|
||||
const struct spa_dict *global_settings)
|
||||
{
|
||||
uint8_t config[A2DP_MAX_CAPS_SIZE];
|
||||
int res;
|
||||
|
|
@ -73,7 +74,7 @@ bool a2dp_codec_check_caps(const struct a2dp_codec *codec, unsigned int codec_id
|
|||
if (caps == NULL)
|
||||
return false;
|
||||
|
||||
res = codec->select_config(codec, 0, caps, caps_size, info, NULL, config);
|
||||
res = codec->select_config(codec, 0, caps, caps_size, info, global_settings, config);
|
||||
if (res < 0)
|
||||
return false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue