mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-11 04:27:56 -05:00
pulse-server: improve network and virtual node checks
Tag the sink/source as HARDWARE when it's not virtual, the presence of a DEVICE_API property is not a good check. Make a method to check if a node is a NETWORK sink/source to make it use the same logic everywhere.
This commit is contained in:
parent
ae4042e7a2
commit
39a1887a0b
5 changed files with 18 additions and 9 deletions
|
|
@ -3715,9 +3715,9 @@ static int fill_sink_info(struct client *client, struct message *m,
|
|||
}
|
||||
|
||||
flags = SINK_LATENCY | SINK_DYNAMIC_LATENCY | SINK_DECIBEL_VOLUME;
|
||||
if ((str = spa_dict_lookup(info->props, PW_KEY_DEVICE_API)) != NULL)
|
||||
if (!pw_manager_object_is_virtual(o))
|
||||
flags |= SINK_HARDWARE;
|
||||
if ((str = spa_dict_lookup(info->props, PW_KEY_NODE_NETWORK)) != NULL)
|
||||
if (pw_manager_object_is_network(o))
|
||||
flags |= SINK_NETWORK;
|
||||
if (SPA_FLAG_IS_SET(dev_info.volume_info.flags, VOLUME_HW_VOLUME))
|
||||
flags |= SINK_HW_VOLUME_CTRL;
|
||||
|
|
@ -3927,9 +3927,9 @@ static int fill_source_info(struct client *client, struct message *m,
|
|||
}
|
||||
|
||||
flags = SOURCE_LATENCY | SOURCE_DYNAMIC_LATENCY | SOURCE_DECIBEL_VOLUME;
|
||||
if ((str = spa_dict_lookup(info->props, PW_KEY_DEVICE_API)) != NULL)
|
||||
if (!pw_manager_object_is_virtual(o))
|
||||
flags |= SOURCE_HARDWARE;
|
||||
if ((str = spa_dict_lookup(info->props, PW_KEY_NODE_NETWORK)) != NULL)
|
||||
if (pw_manager_object_is_network(o))
|
||||
flags |= SOURCE_NETWORK;
|
||||
if (SPA_FLAG_IS_SET(dev_info.volume_info.flags, VOLUME_HW_VOLUME))
|
||||
flags |= SOURCE_HW_VOLUME_CTRL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue