mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
handle Duplex media class
Audio/Duplex is both a source and a sink. Name the ports as input/output and make sure we list them in the source and sink lists in pulse-server.
This commit is contained in:
parent
b0a717c95e
commit
d6127a4745
4 changed files with 18 additions and 7 deletions
|
|
@ -49,7 +49,7 @@ static bool object_is_sink(struct pw_manager_object *o)
|
|||
strcmp(o->type, PW_TYPE_INTERFACE_Node) == 0 &&
|
||||
o->props != NULL &&
|
||||
(str = pw_properties_get(o->props, PW_KEY_MEDIA_CLASS)) != NULL &&
|
||||
(strcmp(str, "Audio/Sink") == 0 || strcmp(str, "Audio/Sink/Virtual") == 0);
|
||||
(strcmp(str, "Audio/Sink") == 0 || strcmp(str, "Audio/Duplex") == 0);
|
||||
}
|
||||
|
||||
static bool object_is_source(struct pw_manager_object *o)
|
||||
|
|
@ -59,12 +59,21 @@ static bool object_is_source(struct pw_manager_object *o)
|
|||
strcmp(o->type, PW_TYPE_INTERFACE_Node) == 0 &&
|
||||
o->props != NULL &&
|
||||
(str = pw_properties_get(o->props, PW_KEY_MEDIA_CLASS)) != NULL &&
|
||||
strcmp(str, "Audio/Source") == 0;
|
||||
(strcmp(str, "Audio/Source") == 0 || strcmp(str, "Audio/Duplex") == 0);
|
||||
}
|
||||
|
||||
static bool object_is_monitor(struct pw_manager_object *o)
|
||||
{
|
||||
const char *str;
|
||||
return strcmp(o->type, PW_TYPE_INTERFACE_Node) == 0 &&
|
||||
o->props != NULL &&
|
||||
(str = pw_properties_get(o->props, PW_KEY_MEDIA_CLASS)) != NULL &&
|
||||
(strcmp(str, "Audio/Sink") == 0);
|
||||
}
|
||||
|
||||
static bool object_is_source_or_monitor(struct pw_manager_object *o)
|
||||
{
|
||||
return object_is_source(o) || object_is_sink(o);
|
||||
return object_is_source(o) || object_is_monitor(o);
|
||||
}
|
||||
|
||||
static bool object_is_sink_input(struct pw_manager_object *o)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue