Hi,<br><br><div class="gmail_quote">On Fri, Nov 5, 2010 at 6:32 PM, Baldur Gislason <span dir="ltr"><<a href="mailto:baldur@medizza.com">baldur@medizza.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I have an application in which I read mpeg2 transport stream from a file and send it out on UDP.<br>I'm trying to make it loop the file, so start over from the beginning of the file when the end is reached.<br>So far I have not been successful in doing this, any suggestions?<br>
<br>Pipeline currently looks like this: filesrc ! mpegtsdemux ! mpegtsmux ! bufresize ! udpsink<br><br>I've tried sending seek events to every element in the pipeline and they all either ignore the seek or break.<br>
if (!gst_element_seek (tp->sink, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,<br>
GST_SEEK_TYPE_SET, 0,<br> GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE)) {<br> l_debug("Seek failed!\n");<br>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.<br>
<br></blockquote><div><br>Is it out of your scope to wait for the EOS, state change to NULL and then set again the pipeline to PLAYING?<br><br> Alternatively, you could wait for the clip to be played, say, at 95% and then send the seek event. If the clip is longer than 1s this should avoid the EOS from being propagated.<br>
<br>Regards<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">There has to be a way to do this that is cleaner than shutting down, deleting everything and creating a new pipeline!<br>
<font color="#888888"><br>Baldur<br>
</font><br>------------------------------------------------------------------------------<br>
The Next 800 Companies to Lead America's Growth: New Video Whitepaper<br>
David G. Thomson, author of the best-selling book "Blueprint to a<br>
Billion" shares his insights and actions to help propel your<br>
business during the next growth cycle. Listen Now!<br>
<a href="http://p.sf.net/sfu/SAP-dev2dev" target="_blank">http://p.sf.net/sfu/SAP-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br>