mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -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
|
|
@ -630,7 +630,8 @@ static int transport_start(struct impl *this)
|
|||
|
||||
this->transport_acquired = true;
|
||||
|
||||
this->codec_data = this->codec->init(this->codec, 0,
|
||||
this->codec_data = this->codec->init(this->codec,
|
||||
this->is_duplex ? 0 : A2DP_CODEC_FLAG_SINK,
|
||||
this->transport->configuration,
|
||||
this->transport->configuration_len,
|
||||
&port->current_format,
|
||||
|
|
@ -967,6 +968,7 @@ impl_node_port_enum_params(void *object, int seq,
|
|||
return -EIO;
|
||||
|
||||
if ((res = this->codec->enum_config(this->codec,
|
||||
this->is_duplex ? 0 : A2DP_CODEC_FLAG_SINK,
|
||||
this->transport->configuration,
|
||||
this->transport->configuration_len,
|
||||
id, result.index, &b, ¶m)) != 1)
|
||||
|
|
@ -1581,6 +1583,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 ? 0 : A2DP_CODEC_FLAG_SINK,
|
||||
this->transport->device->settings);
|
||||
|
||||
spa_bt_transport_add_listener(this->transport,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue