After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795444 - aggregator: Add a property to allow more queuing without increasing the latency
aggregator: Add a property to allow more queuing without increasing the latency
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-21 19:58 UTC by Nicolas Dufresne (ndufresne)
Modified: 2018-11-03 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Dufresne (ndufresne) 2018-04-21 19:58:29 UTC
As many will notice, GStreamer requires a lot of thread (hence others doing research in thread sharing). Recently, I've been using the fact the aggregator based element implement queueing to avoid creating yet another thread per branch. The problem I had, is that there was no way other then increasing the latency to get my aggregator to just queue, without blocking.

The situation is a special, I'm doing synchronized playback, local and remote in the following pattern (simplified, each sink have different latency settings).

  alsasrc ! tee name=tt1
      t1. ! audiointerleave ! alsasink (300ms latency)
      t1. ! queue ! opusenc ! rtpopuspay ! udpsink (60ms latency)

So basically this node is playing it's own mic to speaker, and sending it over the network, to a similar node. The interleaver is used to aggregate all stream to this single 8 channels codec (each channel is wired to a different speaker). The idea is that what this node is playing locally should play at the same time on the remove node, so for that, I need to transmit the stream a bit earlier.

In this situation though, we quickly block on the audiointerleave queue, as we have limited it's size to avoid uselessly adding more latency. To be honest, in our usecase, this latency property does not seems to provide any benifit, if we drop the latency part and just use it a queue size, we can increase it enough and then the interleaver can accumulate a large enough backlog so that the data sent over udp isn't delayed.

The latency property is not in stable API, so it will stay, I would suggest to add a new property that would let users select a queue size. It could be a queue size, where the queue size become max(latency, queue-size), or if we prefer total-size = latency + queue-size. Note that latency is already a bit confusing because the total latency of an audioaggregator is in fact latency + output-buffer-duration.
Comment 1 GStreamer system administrator 2018-11-03 12:45:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/285.