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:
Wim Taymans 2023-07-26 11:51:48 +02:00
parent ae4042e7a2
commit 39a1887a0b
5 changed files with 18 additions and 9 deletions

View file

@ -112,6 +112,7 @@ bool pw_manager_object_is_sink(struct pw_manager_object *o);
bool pw_manager_object_is_source(struct pw_manager_object *o);
bool pw_manager_object_is_monitor(struct pw_manager_object *o);
bool pw_manager_object_is_virtual(struct pw_manager_object *o);
bool pw_manager_object_is_network(struct pw_manager_object *o);
bool pw_manager_object_is_source_or_monitor(struct pw_manager_object *o);
bool pw_manager_object_is_sink_input(struct pw_manager_object *o);
bool pw_manager_object_is_source_output(struct pw_manager_object *o);