mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-17 07:00:03 -05:00
bluez5: read errqueue also from media-source handler
Flush errqueue for iso-io also from the media-source handler, to avoid dropping packet tx reports. This applies to bidirectional streams. The sink/source handlers poll on different fd, one being dup'd, and epoll does not trigger them in any specific interleaved order.
This commit is contained in:
parent
878dd7a0c9
commit
8df58db415
2 changed files with 15 additions and 0 deletions
|
|
@ -626,6 +626,17 @@ int spa_bt_iso_io_recv_errqueue(struct spa_bt_iso_io *this)
|
|||
struct stream *stream = SPA_CONTAINER_OF(this, struct stream, this);
|
||||
struct group *group = stream->group;
|
||||
|
||||
if (!stream->sink) {
|
||||
struct stream *s;
|
||||
|
||||
spa_list_for_each(s, &group->streams, link) {
|
||||
if (s->sink && s->fd == stream->fd) {
|
||||
stream = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return spa_bt_latency_recv_errqueue(&stream->tx_latency, stream->fd, group->log);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -613,6 +613,10 @@ static void handle_errqueue(struct impl *this)
|
|||
{
|
||||
int res;
|
||||
|
||||
if (this->transport && this->transport->iso_io)
|
||||
if (spa_bt_iso_io_recv_errqueue(this->transport->iso_io) == 0)
|
||||
return;
|
||||
|
||||
/* iso-io/media-sink use these for TX latency.
|
||||
* Someone else should be reading them, so drop
|
||||
* only after yielding.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue