GNOME Bugzilla – Bug 784448
multiqueue: Don't increase size too much when use-interleave is enabled
Last modified: 2017-07-19 16:14:24 UTC
Although in case that incoming buffers were not suitably interleaved, don't increase max size time too much, if multiqueue has enough buffers which does not cause underrun of any single queue. For adaptive streaming use cases, mostly each stream's incoming buffer timestamp might be very different which results to continuous increasing multiqueue size. That situation breaks buffering management of upstream element (e.g, queue2).
Created attachment 354795 [details] [review] multiqueue: Don't increase size too much when use-interleave is enabled
If my understanding is correct, one of the purpose of "use-interleaved" is to keep adjusting multi queue size to reasonable amount. Currently, however, it seems to refer to only incoming buffer timestamp without consideration of queued buffer time in multiqueue. I think multiqueue does not need to increase max size time if it has enough queued buffers regardless of interleave. One reason of abnormal buffering in playbin3 adaptive streaming is too large multiqueue size.
The problem is that multiqueue should detect which incoming streaming thread each single queue belongs too and should calculate the interleave *within* each thread. If each incoming streaming thread is different, we should end up with the smallest interleave (200ms iirc).
(In reply to Edward Hervey from comment #3) That seems to be optimal way I think. I found defined but unused *thread* member variable in single queue, which seems to be for interleaving calculation. Is it under implementation?
Created attachment 354818 [details] [review] multiqueue: Calculate interleave only within each streaming thread ... and use the biggest interleave value among streaming threads. This is to optimize multiqueue size adaptation on adaptive streaming use case with "use-interleave" property.
commit 1b0059e0c5ae4de4c02d8b849e1d440431f60cb5 (HEAD -> master, origin/master, origin/HEAD) Author: Seungha Yang <sh.yang@lge.com> Date: Mon Jul 3 15:17:33 2017 +0900 multiqueue: Calculate interleave only within each streaming thread ... and use the biggest interleave value among streaming threads. This is to optimize multiqueue size adaptation on adaptive streaming use case with "use-interleave" property. https://bugzilla.gnome.org/show_bug.cgi?id=784448