<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! </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). </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 <bilboed@gmail.com><br><b><span style="font-weight: bold;">À :</span></b> Discussion of the development of GStreamer <gstreamer-devel@lists.sourceforge.net><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 :</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>> Hi,<br>> I have a pipeline that can be reducted to:<br>> <br>> <br>> gst-launch dshowvideosrc ! tee ! queue ! ffmpegcolorspace !<br>> ffenc_mpeg2video ! mpegtsmux ! filesink tee0. ! queue !<br>> ffmpegcolorspace ! directdrawsink<br>> <br>> <br>> All this is created/handled in
a c application where I can start and<br>> stop the pipeline. I now have a requirement to change the location of<br>> the file after a given size (for example) is reached. I've started to<br>> test following sequence on user request for the moment:<br>> -set pipeline to paused<br>> -change filesink location<br>> -set back pipeline to playing<br>> But it seems it does not handle the change of location in the<br>> filesink. I've also tried to unlink/relink the filesink branch in<br>> combination with the state change, with no success.<br>> Is there a way to change dynamically the filesink location, either by<br>> external commands (like I tried) or even better automatically with a<br>> 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> 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>> Thanks for help,<br>> Regards,<br>> Al<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. 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>> _______________________________________________ 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. 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>