mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-19 08:57:14 -05:00
media-session: fix port direction
This commit is contained in:
parent
c5ee45044d
commit
fcb0031f7c
1 changed files with 3 additions and 2 deletions
|
|
@ -467,12 +467,13 @@ registry_global(void *data,uint32_t id,
|
||||||
|
|
||||||
if (props) {
|
if (props) {
|
||||||
if ((str = spa_dict_lookup(props, PW_KEY_PORT_DIRECTION)) != NULL)
|
if ((str = spa_dict_lookup(props, PW_KEY_PORT_DIRECTION)) != NULL)
|
||||||
port->direction = strcmp(str, "out") ?
|
port->direction = strcmp(str, "out") == 0 ?
|
||||||
PW_DIRECTION_OUTPUT : PW_DIRECTION_INPUT;
|
PW_DIRECTION_OUTPUT : PW_DIRECTION_INPUT;
|
||||||
if ((str = spa_dict_lookup(props, PW_KEY_NODE_ID)) != NULL)
|
if ((str = spa_dict_lookup(props, PW_KEY_NODE_ID)) != NULL)
|
||||||
port->node = find_object(impl, atoi(str));
|
port->node = find_object(impl, atoi(str));
|
||||||
|
|
||||||
pw_log_debug(NAME" %p: port %d parent node %s", impl, id, str);
|
pw_log_debug(NAME" %p: port %d parent node %s direction:%d", impl, id, str,
|
||||||
|
port->direction);
|
||||||
if (port->node) {
|
if (port->node) {
|
||||||
spa_list_append(&port->node->port_list, &port->link);
|
spa_list_append(&port->node->port_list, &port->link);
|
||||||
port->node->changed |= SM_NODE_CHANGE_MASK_PORTS;
|
port->node->changed |= SM_NODE_CHANGE_MASK_PORTS;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue