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 769802 - queue2: Post buffering messages earlier in ringbuffer mode
queue2: Post buffering messages earlier in ringbuffer mode
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
unspecified
Other All
: Normal normal
: 1.8.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-08-12 14:26 UTC by Edward Hervey
Modified: 2016-08-16 13:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
queue2: Post buffering messages earlier in ringbuffer mode (3.29 KB, patch)
2016-08-12 14:26 UTC, Edward Hervey
committed Details | Review

Description Edward Hervey 2016-08-12 14:26:37 UTC
See commit message
Comment 1 Edward Hervey 2016-08-12 14:26:43 UTC
Created attachment 333182 [details] [review]
queue2: Post buffering messages earlier in ringbuffer mode

In ringbuffer mode we need to make sure we post buffering messages *before*
blocking to wait for data to be drained.

Without this, we would end up in situations like this:
* pipeline is pre-rolling
* Downstream demuxer/decoder has pushed data to all sinks, and demuxer thread
  is blocking downstream (i.e. not pulling from upstream/queue2).
* Therefore pipeline has pre-rolled ...
* ... but queue2 hasn't filled up yet, therefore the application waits for
  the buffering 100% messages before setting the pipeline to PLAYING
* But queue2 can't post that message, since the 100% message will be posted
  *after* there is room available for that last buffer.
Comment 2 Edward Hervey 2016-08-12 15:47:38 UTC
commit 5154dcfbdc582e7491a14fbfa98cc79c222a0a81
Author: Edward Hervey <edward@centricular.com>
Date:   Fri Aug 12 16:15:25 2016 +0200

    queue2: Post buffering messages earlier in ringbuffer mode
    
    In ringbuffer mode we need to make sure we post buffering messages *before*
    blocking to wait for data to be drained.
    
    Without this, we would end up in situations like this:
    * pipeline is pre-rolling
    * Downstream demuxer/decoder has pushed data to all sinks, and demuxer thread
      is blocking downstream (i.e. not pulling from upstream/queue2).
    * Therefore pipeline has pre-rolled ...
    * ... but queue2 hasn't filled up yet, therefore the application waits for
      the buffering 100% messages before setting the pipeline to PLAYING
    * But queue2 can't post that message, since the 100% message will be posted
      *after* there is room available for that last buffer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769802