Seeking a pipeline with live streams

Sebastian Dröge sebastian at centricular.com
Sun Oct 27 20:51:18 CET 2013


On Sa, 2013-10-26 at 23:49 -0200, Adrian Pardini wrote:
> On 25 October 2013 06:44, Andrei Melnikov <andy.melnikov at gmail.com> wrote:
> > I load the pipeline using gst_parse_launch(), set it to PLAYING and seek by
> > passing the pipeline bin to gst_element_seek_simple(). The code works fine
> > with simple pipelines playing a file, but the pipeline above refuses to
> > seek. It sort of seeks, but with glitches and gst_element_seek_simple()
> > returns FALSE.
> 
> Hi Andrei, after a while trying to achieve the same I've resorted to
> have a main pipeline for the live sources and a second one for the
> file content linking both with a pair of interaudio and intervideo
> sink and src's.
> 
> Hope that helps but I'd also like to hear the opinion of more
> knowledgeable people.

I think that's a valid approach for this. The main question here is how
you want everything to behave, basically you want to seek on the file
based pipeline while letting the live pipeline continue running, right?
So you should only send a seek to the file based part of the pipeline.

As videomixer mixes both streams according to their running times, you
need to make sure that those still align after the seek. A flushing seek
would ensure that the running time of the file based pipeline would
start again at 0, which is not what you want. You would need to adapt
the segment event coming from the file based pipeline into videomixer to
make sure that the buffers after the seek would have a running time that
is just a continuation of the previous buffers.


By using the inter elements you make the file based pipeline a live
stream too, which solves all these problems for you. It is not the
optimal solution though and has some downsides, but if it works fine for
you just keep it ;)

-- 
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131027/95bf5d21/attachment.pgp>


More information about the gstreamer-devel mailing list