mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-09 13:30:06 -05:00
Make media type and subtype properties
This is easier to debug and we only want properties in objects in the future.
This commit is contained in:
parent
514528f2c7
commit
ff6a244d8f
45 changed files with 151 additions and 124 deletions
|
|
@ -124,7 +124,7 @@ static struct monitor_item *add_item(struct pw_spa_monitor *this,
|
|||
}
|
||||
|
||||
flags = PW_SPA_NODE_FLAG_ACTIVATE;
|
||||
flags |= (state == SPA_MONITOR_ITEM_STATE_AVAILABLE) ? 0 : PW_SPA_NODE_FLAG_DISABLE;
|
||||
flags |= (state == SPA_MONITOR_ITEM_STATE_Available) ? 0 : PW_SPA_NODE_FLAG_DISABLE;
|
||||
|
||||
mitem = calloc(1, sizeof(struct monitor_item));
|
||||
mitem->id = strdup(id);
|
||||
|
|
@ -197,13 +197,15 @@ static void change_item(struct pw_spa_monitor *this, struct spa_pod *item, uint6
|
|||
return;
|
||||
|
||||
switch (state) {
|
||||
case SPA_MONITOR_ITEM_STATE_AVAILABLE:
|
||||
case SPA_MONITOR_ITEM_STATE_Available:
|
||||
pw_node_set_enabled(mitem->node, true);
|
||||
break;
|
||||
case SPA_MONITOR_ITEM_STATE_DISABLED:
|
||||
case SPA_MONITOR_ITEM_STATE_UNAVAILABLE:
|
||||
case SPA_MONITOR_ITEM_STATE_Disabled:
|
||||
case SPA_MONITOR_ITEM_STATE_Unavailable:
|
||||
pw_node_set_enabled(mitem->node, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue