mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
link: add link state and error to info
Notify when state changes
This commit is contained in:
parent
0358e8b480
commit
f3dfe61aa0
6 changed files with 68 additions and 42 deletions
|
|
@ -426,12 +426,17 @@ static void link_event_info(void *object, struct pw_link_info *info)
|
|||
printf("%c\toutput-port-id: %u\n", MARK_CHANGE(0), info->output_port_id);
|
||||
printf("%c\tinput-node-id: %u\n", MARK_CHANGE(1), info->input_node_id);
|
||||
printf("%c\tinput-port-id: %u\n", MARK_CHANGE(1), info->input_port_id);
|
||||
printf("%c\tformat:\n", MARK_CHANGE(2));
|
||||
printf("%c\tstate: \"%s\"", MARK_CHANGE(2), pw_link_state_as_string(info->state));
|
||||
if (info->state == PW_LINK_STATE_ERROR && info->error)
|
||||
printf(" \"%s\"\n", info->error);
|
||||
else
|
||||
printf("\n");
|
||||
printf("%c\tformat:\n", MARK_CHANGE(3));
|
||||
if (info->format)
|
||||
spa_debug_format(2, NULL, info->format);
|
||||
else
|
||||
printf("\t\tnone\n");
|
||||
print_properties(info->props, MARK_CHANGE(3));
|
||||
print_properties(info->props, MARK_CHANGE(4));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue