mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
a2dp: mark a2dp-source as stream and autoconnect
This commit is contained in:
parent
6cc3224031
commit
77b91823f3
2 changed files with 11 additions and 4 deletions
|
|
@ -620,7 +620,7 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
||||||
|
|
||||||
static const struct spa_dict_item node_info_items[] = {
|
static const struct spa_dict_item node_info_items[] = {
|
||||||
{ SPA_KEY_DEVICE_API, "bluez5" },
|
{ SPA_KEY_DEVICE_API, "bluez5" },
|
||||||
{ SPA_KEY_MEDIA_CLASS, "Audio/Source" },
|
{ SPA_KEY_MEDIA_CLASS, "Stream/Output/Audio" },
|
||||||
{ SPA_KEY_NODE_DRIVER, "true" },
|
{ SPA_KEY_NODE_DRIVER, "true" },
|
||||||
{ SPA_KEY_NODE_LATENCY, "512/48000" },
|
{ SPA_KEY_NODE_LATENCY, "512/48000" },
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -546,7 +546,7 @@ static int rescan_node(struct impl *impl, struct node *n)
|
||||||
{
|
{
|
||||||
struct spa_dict *props;
|
struct spa_dict *props;
|
||||||
const char *str;
|
const char *str;
|
||||||
bool exclusive, reconnect;
|
bool exclusive, reconnect, autoconnect;
|
||||||
struct find_data find;
|
struct find_data find;
|
||||||
struct pw_node_info *info;
|
struct pw_node_info *info;
|
||||||
struct node *peer;
|
struct node *peer;
|
||||||
|
|
@ -582,8 +582,15 @@ static int rescan_node(struct impl *impl, struct node *n)
|
||||||
if ((str = spa_dict_lookup(props, PW_KEY_STREAM_MONITOR)) != NULL)
|
if ((str = spa_dict_lookup(props, PW_KEY_STREAM_MONITOR)) != NULL)
|
||||||
n->monitor = pw_properties_parse_bool(str);
|
n->monitor = pw_properties_parse_bool(str);
|
||||||
|
|
||||||
str = spa_dict_lookup(props, PW_KEY_NODE_AUTOCONNECT);
|
autoconnect = false;
|
||||||
if (str == NULL || !pw_properties_parse_bool(str)) {
|
if ((str = spa_dict_lookup(props, PW_KEY_NODE_AUTOCONNECT)) != NULL)
|
||||||
|
autoconnect = pw_properties_parse_bool(str);
|
||||||
|
|
||||||
|
if ((str = spa_dict_lookup(props, PW_KEY_DEVICE_API)) != NULL &&
|
||||||
|
strcmp(str, "bluez5") == 0)
|
||||||
|
autoconnect = true;
|
||||||
|
|
||||||
|
if (!autoconnect) {
|
||||||
pw_log_debug(NAME" %p: node %d does not need autoconnect", impl, n->id);
|
pw_log_debug(NAME" %p: node %d does not need autoconnect", impl, n->id);
|
||||||
configure_node(n, NULL, false);
|
configure_node(n, NULL, false);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue