mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
suspend-node: only suspend devices
This commit is contained in:
parent
a3ddc6b744
commit
92c26fa124
1 changed files with 9 additions and 0 deletions
|
|
@ -158,6 +158,15 @@ static int
|
||||||
handle_node(struct impl *impl, struct sm_object *object)
|
handle_node(struct impl *impl, struct sm_object *object)
|
||||||
{
|
{
|
||||||
struct node *node;
|
struct node *node;
|
||||||
|
const char *media_class;
|
||||||
|
|
||||||
|
media_class = object->props ? pw_properties_get(object->props, PW_KEY_MEDIA_CLASS) : NULL;
|
||||||
|
if (media_class == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (strstr(media_class, "Audio/") != media_class &&
|
||||||
|
(strstr(media_class, "Video/") != media_class))
|
||||||
|
return 0;
|
||||||
|
|
||||||
node = sm_object_add_data(object, SESSION_KEY, sizeof(struct node));
|
node = sm_object_add_data(object, SESSION_KEY, sizeof(struct node));
|
||||||
node->obj = (struct sm_node*)object;
|
node->obj = (struct sm_node*)object;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue