mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
impl-port: handle tags like latency
No links on the port will result in a NULL tag and >0 links will always result in a non-NULL tag (that could be empty). This makes it easier to see when a port is linked or not.
This commit is contained in:
parent
ffb7663f4d
commit
fc55ceb2f4
1 changed files with 4 additions and 6 deletions
|
|
@ -1874,25 +1874,23 @@ int pw_impl_port_recalc_tag(struct pw_impl_port *port)
|
|||
tag = other->tag[other->direction];
|
||||
if (tag) {
|
||||
void *state = NULL;
|
||||
while (spa_tag_parse(tag, &info, &state) == 1) {
|
||||
while (spa_tag_parse(tag, &info, &state) == 1)
|
||||
spa_tag_build_add_info(&b.b, info.info);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
spa_list_for_each(l, &port->links, input_link) {
|
||||
other = l->output;
|
||||
tag = other->tag[other->direction];
|
||||
if (tag) {
|
||||
void *state = NULL;
|
||||
while (spa_tag_parse(tag, &info, &state) == 1) {
|
||||
while (spa_tag_parse(tag, &info, &state) == 1)
|
||||
spa_tag_build_add_info(&b.b, info.info);
|
||||
}
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
param = count == 0 ? NULL : spa_tag_build_end(&b.b, &f);
|
||||
|
||||
old = port->tag[direction];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue