seek event in a pipeline with multiple source bins

Sebastian Dröge sebastian at centricular.com
Fri Jul 8 06:52:27 UTC 2016


On Do, 2016-07-07 at 18:07 -0600, Natanael Mojica wrote:
> 
> for seeking I do the follow:
> 
> 1. add a probe in a src pad of a filesrc bin (the ghos pad connected
> to a input-selector) the probe is the type downstream 
> 2. in the callback function, if there a eos event then perform the
> seek of type segment

If you do a SEGMENT seek after EOS, that's not going to work. A flush
is needed to get rid of the EOS flag.


The easiest will probably be to just do flushing seeks on the srcpad of
your filesrc/demuxer/decoder bin, and to update the pad-offset on that
srcpad accordingly.

Alternatively you could set an initial correct pad-offset (to the
running time of the pipeline when it starts), and then only do SEGMENT
seeks. You need to ensure that the first data you receive from there is
already based on a SEGMENT seek, i.e. preroll that input and throw away
all data, do a SEGMENT/FLUSH seek and only use the data that comes from
that seek. At the end you will get a SEGMENT_DONE message (no EOS!) and
could then do another SEGMENT/non-FLUSH seek back.

Take a look at this example:
https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/icles/test-segment-seeks.c
It shows how to use SEGMENT seeks in general.

-- 

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160708/66adea9b/attachment.sig>


More information about the gstreamer-devel mailing list