Add suport for braodcast sink

This commit is contained in:
Silviu Florian Barbulescu 2023-08-17 18:52:48 +03:00 committed by Wim Taymans
parent c6760105df
commit 8660066af6
3 changed files with 59 additions and 20 deletions

View file

@ -1062,6 +1062,18 @@ static int emit_nodes(struct impl *this)
emit_device_set_node(this, DEVICE_ID_SINK_SET);
}
if (this->bt_dev->connected_profiles & (SPA_BT_PROFILE_BAP_BROADCAST_SOURCE)) {
t = find_transport(this, SPA_BT_PROFILE_BAP_BROADCAST_SOURCE, this->props.codec);
if (t) {
this->props.codec = t->media_codec->id;
emit_dynamic_node(&this->dyn_media_source, this, t,
DEVICE_ID_SOURCE, SPA_NAME_API_BLUEZ5_MEDIA_SOURCE, false);
}
if (this->device_set.leader && this->device_set.sources > 0)
emit_device_set_node(this, DEVICE_ID_SOURCE_SET);
}
if (get_supported_media_codec(this, this->props.codec, NULL) == NULL)
this->props.codec = 0;
break;