[gst-devel] Looping playback of a streamed file.

Baldur Gislason baldur at medizza.com
Fri Nov 5 17:32:24 CET 2010


I have an application in which I read mpeg2 transport stream from a file and
send it out on UDP.
I'm trying to make it loop the file, so start over from the beginning of the
file when the end is reached.
So far I have not been successful in doing this, any suggestions?

Pipeline currently looks like this: filesrc ! mpegtsdemux ! mpegtsmux !
bufresize ! udpsink

I've tried sending seek events to every element in the pipeline and they all
either ignore the seek or break.
        if (!gst_element_seek (tp->sink, 1.0, GST_FORMAT_TIME,
GST_SEEK_FLAG_FLUSH,
                         GST_SEEK_TYPE_SET, 0,
                         GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)) {
          l_debug("Seek failed!\n");
If I do this from the signal handler on an "end of stream" event, it will be
too late as some of the elements will have received the EOS and shut down,
but even if I send the seeks well before the end is reached I've not managed
to make it do what I want.

There has to be a way to do this that is cleaner than shutting down,
deleting everything and creating a new pipeline!

Baldur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20101105/c43bf76c/attachment.htm>


More information about the gstreamer-devel mailing list