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 719575 - multiqueue: improve for adaptive scenario
multiqueue: improve for adaptive scenario
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal enhancement
: 1.2.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 711849
 
 
Reported: 2013-11-29 18:42 UTC by Thiago Sousa Santos
Modified: 2013-12-26 08:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
multiqueue: post 100% buffering if single queue is not linked (1.88 KB, patch)
2013-11-29 18:42 UTC, Thiago Sousa Santos
committed Details | Review
multiqueue: reactivate sq on reconfigure (1.51 KB, patch)
2013-11-29 18:43 UTC, Thiago Sousa Santos
rejected Details | Review

Description Thiago Sousa Santos 2013-11-29 18:42:53 UTC
On adaptive scenario, there can be different multiqueues on the same
pipeline, and those can have a single input/output.

In those scenarios the multiqueue shouldn't have actions relying on having
multiple internal single queues.

For buffering, the multiqueue should post a 100% buffering message
whenever a single queue gets a NOT_LINKED return, just like it does
for EOS, so the pipeline can be unblocked if it is waiting for
buffering to finish.

During stream switching with input selector, the multiqueue will get
a reconfigure event and should awake the single queue for that stream.
Currently it waits for a NOT_LINKED return from the stream that was
deactivated. This can never happen in adaptive as there might be only
one stream on that multiqueue.

For reference, an example of a adaptive pipeline for a stream with
2 audios (different languages) can be:

<httpsrc> ! mssdemux name=d d. ! multiqueue name=m ! qtdemux ! multiqueue ! \
  <decoder> ! ... ! input-selector name=is ! ... ! sink \
  d. ! m. ! qtdemux ! multiqueue ! <decoder> ! ... ! is.
Comment 1 Thiago Sousa Santos 2013-11-29 18:42:56 UTC
Created attachment 263155 [details] [review]
multiqueue: post 100% buffering if single queue is not linked

This makes buffering stop in case a stream switch happens. This is
important for adaptive streams that can disable not-linked streams
to avoid consuming the network bandwidth.

https://bugzilla.gnome.org/show_bug.cgi?id=707636
Comment 2 Thiago Sousa Santos 2013-11-29 18:43:00 UTC
Created attachment 263156 [details] [review]
multiqueue: reactivate sq on reconfigure

Reconfigure is sent by input selector when a new pad is selected
as active. This should make the multiqueue's single queue active
again. Currently it relies on getting a not-linked from another
of the single queues to activate this newly selected stream.

The problem happens when the stream is switched near the EOS,
that means that no more buffers might be pushed from the old active
pad. And then no new not-linked flow return will cause single queues
activation, leading to deadlock.
Comment 3 Olivier Crête 2013-12-03 20:41:59 UTC
Comment on attachment 263156 [details] [review]
multiqueue: reactivate sq on reconfigure

Ooops, I wrote/pushed the exact same patch to fix bug #708200
Comment 4 Thiago Sousa Santos 2013-12-03 20:44:33 UTC
Comment on attachment 263156 [details] [review]
multiqueue: reactivate sq on reconfigure

Patch was pushed from a different bug, marking this as obsolete:

http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=a90ce304c823ac47f8a31b33a61db826c548d217
Comment 5 Thiago Sousa Santos 2013-12-20 04:19:31 UTC
ommit 1f71f191bec611541623545eee4adb7774e2b671
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Mon Nov 18 10:46:00 2013 -0300

    multiqueue: post 100% buffering if single queue is not linked
    
    This makes buffering stop in case a stream switch happens. This is
    important for adaptive streams that can disable not-linked streams
    to avoid consuming the network bandwidth.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=719575