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 642526 - gdppay: live pipelines stall if seek/newsegment position is nonzero
gdppay: live pipelines stall if seek/newsegment position is nonzero
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-17 02:26 UTC by Leo Singer
Modified: 2018-05-12 10:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
script to reproduce (855 bytes, text/x-python-script)
2011-02-17 02:26 UTC, Leo Singer
  Details
proposed patch for gdppay in gst-plugins-base (2.26 KB, patch)
2011-02-17 02:27 UTC, Leo Singer
needs-work Details | Review

Description Leo Singer 2011-02-17 02:26:37 UTC
Created attachment 181096 [details]
script to reproduce

Live pipelines containing gdppay will not begin playing immediately if the initial newsegment event has a nonzero position.  For example, consider the following pipeline:

  audiotestsrc ! gdppay ! progressreport update-freq=1 ! fakesink sync=true

Progress reports should start appearing almost immediately after setting the pipeline to the PLAYING state:

progressreport0 (00:00:01): 0 seconds
progressreport0 (00:00:02): 1 seconds
progressreport0 (00:00:03): 2 seconds
...

Now, tell the source element, audiotestsrc, to seek to a position like 900000000 * GST_SECOND.  If you do this, then you will have to wait 900000000 seconds until the first progress report appears:

progressreport0 (00:00:01): 900000000 seconds
progressreport0 (00:00:02): 900000001 seconds
progressreport0 (00:00:03): 900000003 seconds
...

(See the attached gst-python script, doesntwork.py, to reproduce.)

On the other hand, if you take out the gdppay element, like this:

  audiotestsrc ! progressreport update-freq=1 ! fakesink sync=true

then progress reports will start appearing immediately either way.


The issue seems to be that regardless of what newsegment event gdppay receives on its sink pad, it will always push the same newsegment event in BYTES format on its src pad.  This makes it so that the ultimate sink element in the pipeline never gets the segment information it needs.

A possible fix, implemented in the attached patch, is for gdppay to save any newsegment event that it receives on its sink pad, and later forward it on its src pad.

Since gdppay preserves buffer timestamps, if the original stream had a TIME-formatted newsegment, the original newsegment event should make sense even in the context of the gdp buffers that are flowing downstream.

A possible refinement of this patch would be to only forward the original newsegment event if it is in the TIME format.
Comment 1 Leo Singer 2011-02-17 02:27:29 UTC
Created attachment 181097 [details] [review]
proposed patch for gdppay in gst-plugins-base
Comment 2 Sebastian Dröge (slomo) 2011-05-09 09:45:11 UTC
Comment on attachment 181097 [details] [review]
proposed patch for gdppay in gst-plugins-base

I don't think this is correct, gdppay will always output a single, open-ended BYTES segment. Inside the gdp stream it should however place the newsegment event information and the depayloader should use it to prevent problems like the one you noticed

Does it?
Comment 3 Tim-Philipp Müller 2012-11-29 12:46:03 UTC
gdp now lives in -bad, moving bug there.
Comment 4 Edward Hervey 2018-05-12 10:57:36 UTC
This is using seek in ready (which isn't supported) and against 0.10.

If you can reproduce this bug with current GStreamer, please re-open.