Flushing the data in partial pipeline

Nicolas Dufresne nicolas at ndufresne.ca
Thu Feb 16 02:26:54 UTC 2017


Le mercredi 15 février 2017 à 07:26 -0800, Baby Octopus a écrit :
> I need to stream files one after. My pipeline looks like this
> 
> filesrc1 ! decodebin1 ! ----
>                                     |
>                                      -----> input-selector ! x264enc
> !
> udpsink 
>                                     |
> filesrc2 ! decodebin2 ! ----
> 
> filesrc + decodebin combo is created based on playlist size
> 
> The problem that filesrc2 should not be played from the beginning. It
> should
> playback somewhere from the middle. I can not handle seek on filesrc2
> unless
> I set it to paused/playing. The moment I set it to playing, I'll have
> content from both the sources getting mixed in the pipeline and
> flushing
> becomes harder
> 
> Is there a way to flush something like only one part of segment,
> i.e., only
> initial data of filesrc2 which is prerolled?

Yes, this is what is being done in GES/nlesource. nlesource is a GstBin
that wraps uridecodebin and that run has a seek thread. It installs
blocking probe on the internal change, on it's callback, it will
operate a seek in it's thread (cannot be done on the streaming thread).
The rest of the code has the purpose of making sure the playback
position is correct even though there was a seek and some other stuff.
It's in general very complex. I suggest to install GES for that. You
can then use it directly, or if you need more pipeline control, you
could use NLE elements, I believe they are installed.

https://cgit.freedesktop.org/gstreamer/gst-editing-services/tree/plugin
s/nle/nlesource.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170215/1a0b1442/attachment.sig>


More information about the gstreamer-devel mailing list