mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
bluez5: tell the codec whether endpoint is sink or source
Add a flag A2DP_CODEC_FLAG_SINK to incidate a sink endpoint. Also enum_config and caps_preference_cmp may need to know whether the codec is being configured for SRC or SNK. Also add the flags argument to init_props. Bump codec API version.
This commit is contained in:
parent
8d66b2b2f7
commit
a8eb146d39
10 changed files with 63 additions and 34 deletions
|
|
@ -910,7 +910,8 @@ static int do_start(struct impl *this)
|
|||
for (i = 0; i < size; i++)
|
||||
spa_log_debug(this->log, " %d: %02x", i, conf[i]);
|
||||
|
||||
this->codec_data = this->codec->init(this->codec, 0,
|
||||
this->codec_data = this->codec->init(this->codec,
|
||||
this->is_duplex ? A2DP_CODEC_FLAG_SINK : 0,
|
||||
this->transport->configuration,
|
||||
this->transport->configuration_len,
|
||||
&port->current_format,
|
||||
|
|
@ -1197,6 +1198,7 @@ impl_node_port_enum_params(void *object, int seq,
|
|||
return -EIO;
|
||||
|
||||
if ((res = this->codec->enum_config(this->codec,
|
||||
this->is_duplex ? A2DP_CODEC_FLAG_SINK : 0,
|
||||
this->transport->configuration,
|
||||
this->transport->configuration_len,
|
||||
id, result.index, &b, ¶m)) != 1)
|
||||
|
|
@ -1726,6 +1728,7 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
|
||||
if (this->codec->init_props != NULL)
|
||||
this->codec_props = this->codec->init_props(this->codec,
|
||||
this->is_duplex ? A2DP_CODEC_FLAG_SINK : 0,
|
||||
this->transport->device->settings);
|
||||
|
||||
reset_props(this, &this->props);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue