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,11 +1874,10 @@ int pw_impl_port_recalc_tag(struct pw_impl_port *port)
|
||||||
tag = other->tag[other->direction];
|
tag = other->tag[other->direction];
|
||||||
if (tag) {
|
if (tag) {
|
||||||
void *state = NULL;
|
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);
|
spa_tag_build_add_info(&b.b, info.info);
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
spa_list_for_each(l, &port->links, input_link) {
|
spa_list_for_each(l, &port->links, input_link) {
|
||||||
|
|
@ -1886,11 +1885,10 @@ int pw_impl_port_recalc_tag(struct pw_impl_port *port)
|
||||||
tag = other->tag[other->direction];
|
tag = other->tag[other->direction];
|
||||||
if (tag) {
|
if (tag) {
|
||||||
void *state = NULL;
|
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);
|
spa_tag_build_add_info(&b.b, info.info);
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
param = count == 0 ? NULL : spa_tag_build_end(&b.b, &f);
|
param = count == 0 ? NULL : spa_tag_build_end(&b.b, &f);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue