<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>Hi,</div><div>thanks a lot to all people, this works fine!&nbsp;</div><div>Now my only concern left is to be able to reset the timestamps (start again at 0) when changing the file. Currently when I apply this solution, timestamps continue to increase (for example 0 to 2 seconds in first file, then 2 to 4 seconds in the second file when I change it).&nbsp;</div><div>I've tried to put a homemade plugin that offsets the timestamps back to 0 when I change the file (changing my branch to tee0. ! queue ! offsetplugin ! ffenc ! mpgtsmux ! filesink). But it seems it doen't work well: even doing that, dumping the timestamps of the second file starts at 2 seconds (with this example).</div><div>Regards,</div><div>Al</div><div style="font-family:times new roman, new york, times,
 serif;font-size:12pt"><br><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">De :</span></b> Edward Hervey &lt;bilboed@gmail.com&gt;<br><b><span style="font-weight: bold;">À :</span></b> Discussion of the development of GStreamer &lt;gstreamer-devel@lists.sourceforge.net&gt;<br><b><span style="font-weight: bold;">Envoyé le :</span></b> Jeu 17 juin 2010, 8h 36min 15s<br><b><span style="font-weight: bold;">Objet&nbsp;:</span></b> Re: [gst-devel] Changing file location during recording<br></font><br>On Wed, 2010-06-16 at 16:27 +0000, Albert Costa wrote:<br>&gt; Hi,<br>&gt; I have a pipeline that can be reducted to:<br>&gt; <br>&gt; <br>&gt; gst-launch dshowvideosrc ! tee ! queue ! ffmpegcolorspace !<br>&gt; ffenc_mpeg2video ! mpegtsmux ! filesink tee0. ! queue !<br>&gt; ffmpegcolorspace ! directdrawsink<br>&gt; <br>&gt; <br>&gt; All this is created/handled in
 a c application where I can start and<br>&gt; stop the pipeline. I now have a requirement to change the location of<br>&gt; the file after a given size (for example) is reached. I've started to<br>&gt; test following sequence on user request for the moment:<br>&gt; -set pipeline to paused<br>&gt; -change filesink location<br>&gt; -set back pipeline to playing<br>&gt; But it seems it does not handle the change of location in the<br>&gt; filesink. I've also tried to unlink/relink the filesink branch in<br>&gt; combination with the state change, with no success.<br>&gt; Is there a way to change dynamically the filesink location, either by<br>&gt; external commands (like I tried) or even better automatically with a<br>&gt; plugin I am maybe not aware of?<br><br> You want to, when no data is flowing : set the filesink to the NULL<br>state, change the location, bring back the filesink to the PLAYING<br>state. To ensure no data is flowing, use the
 gst_pad_set_blocked_async()<br>method on the pad feeding data to your filesink.<br><br> * Grab the mpegtsmux source pad and<br>gst_pad_set_blocked_async(sourcepad, TRUE, my_blocked_callback,<br>filesink);<br> * In your my_blocked_callback:<br> ** WHEN blocked is TRUE:<br> *** set filesink to NULL,<br> *** change the location property of filesink,<br> *** set filesink to PLAYING,<br> *** and finally call gst_pad_set_blocked_async(sourcepad, FALSE,<br>my_blocked_callback, NULL);<br><br>&nbsp; Edward<br><br>P.S. You can only do this with container formats that don't have headers<br>(like mpeg-ts). There might also be quirks about the PMT/PAT not being<br>present at the beginning of the second file.<br><br><br>&gt; Thanks for help,<br>&gt; Regards,<br>&gt; Al<br>&gt; <br>&gt; <br>&gt; ------------------------------------------------------------------------------<br>&gt; ThinkGeek and WIRED's GeekDad team up for the Ultimate <br>&gt; GeekDad Father's Day
 Giveaway. ONE MASSIVE PRIZE to the <br>&gt; lucky parental unit.&nbsp; See the prize list and enter to win: <br>&gt; <a href="http://p.sf.net/sfu/thinkgeek-promo" target="_blank">http://p.sf.net/sfu/thinkgeek-promo</a><br>&gt; _______________________________________________ gstreamer-devel mailing list <a ymailto="mailto:gstreamer-devel@lists.sourceforge.net" href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br><br><br><br>------------------------------------------------------------------------------<br>ThinkGeek and WIRED's GeekDad team up for the Ultimate <br>GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the <br>lucky parental unit.&nbsp; See the prize list and enter to win: <br><a href="http://p.sf.net/sfu/thinkgeek-promo"
 target="_blank">http://p.sf.net/sfu/thinkgeek-promo</a><br>_______________________________________________<br>gstreamer-devel mailing list<br><a ymailto="mailto:gstreamer-devel@lists.sourceforge.net" 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></div></div><div style="position:fixed"></div>


</div><br>




      </body></html>