<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>Attached here are :<br><br>recordtwice.2.py : slightly different from the initial one you provide. It blocks tee src pad, send eos and release tee request pad.<br>It also has a timeoverlay on video.<br>With patch http://bugzilla.gnome.org/show_bug.cgi?id=474016 (relaying newsegment for new tee src pad), it works fine.<br><br>The only problem is that first buffer timestamp is running timestamp. <br>totem just play the to recorded files fine.<br>mplayer also, though when printing elapsed time, it start with running timestamp recorded, not 0<br>xine plays it ok too, but waits for initial timestamp (3secs, 10 secs) with frozen video before playing.<br><br>gst-launch -v filesrc location=output1.ogg ! decodebin ! fakesink sync=TRUE<br>Définition du pipeline à
 PAUSED...<br>/pipeline0/decodebin0/typefind.src: caps = application/ogg<br>Le pipeline est en phase de PREROLL...<br>/pipeline0/decodebin0/queue0.sink: caps = video/x-theora<br>/pipeline0/decodebin0/queue0.src: caps = video/x-theora<br>/pipeline0/decodebin0/theoradec1.sink: caps = video/x-theora<br>/pipeline0/decodebin0/theoradec1.src: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)10/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/fakesink1.sink: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)10/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/decodebin0.src0: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)10/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/decodebin0.src0.proxypad1: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)10/1, pixel-aspect-ratio=(fraction)1/1,
 width=(int)320, height=(int)240<br>/pipeline0/fakesink1: last-message = "preroll&nbsp;&nbsp; ******* "<br>Le pipeline a terminé la phase PREROLL...<br>Passage du pipeline à la phase PLAYING...<br>/pipeline0/fakesink1: last-message = "event&nbsp;&nbsp; ******* E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, applied_rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, start=(gint64)0, stop=(gint64)9000000000, position=(gint64)0;) 0x86edd18"<br>/pipeline0/fakesink1: last-message = "event&nbsp;&nbsp; ******* E (type: 118, taglist, encoder=(string)\"Xiph.Org\\ libTheora\\ I\\ 20070915\\ 3\\ 2\\ 1\", encoder-version=(guint)3, video-codec=(string)Theora;) 0x8861f40"<br>New clock: GstSystemClock<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:00.000000000, duration: 0:00:00.100000000, offset: -1, offset_end: -1, flags: 32) 0x87eec50"<br>/pipeline0/fakesink1: last-message =
 "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:04.000000000, duration: 0:00:00.100000000, offset: -1, offset_end: -1, flags: 32) 0x87eecf0"<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:04.100000000, duration: 0:00:00.100000000, offset: -1, offset_end: -1, flags: 0) 0x87eeca0"<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:04.200000000, duration: 0:00:00.100000000, offset: -1, offset_end: -1, flags: 0) 0x87eeaa0"<br><br>When you get rid of timeoverlay, behavior changes.<br>The first buffer timestamp is now 0, but the second one is the timestamp of record start.<br>This makes :<br>totem, mplayer and xine waits for second timestamp with frozen video.<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>gst-launch -v filesrc location=output1.ogg ! decodebin ! fakesink
 sync=TRUE<br>Définition du pipeline à PAUSED...<br>/pipeline0/decodebin0/typefind.src: caps = application/ogg<br>Le pipeline est en phase de PREROLL...<br>/pipeline0/decodebin0/queue0.sink: caps = video/x-theora<br>/pipeline0/decodebin0/queue0.src: caps = video/x-theora<br>/pipeline0/decodebin0/theoradec1.sink: caps = video/x-theora<br>/pipeline0/decodebin0/theoradec1.src: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)10/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/fakesink1.sink: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)10/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/decodebin0.src0: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)10/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/decodebin0.src0.proxypad1: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)10/1,
 pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/fakesink1: last-message = "preroll&nbsp;&nbsp; ******* "<br>Le pipeline a terminé la phase PREROLL...<br>Passage du pipeline à la phase PLAYING...<br>/pipeline0/fakesink1: last-message = "event&nbsp;&nbsp; ******* E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, applied_rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, start=(gint64)3900000000, stop=(gint64)8900000000, position=(gint64)0;) 0x9965d18"<br>/pipeline0/fakesink1: last-message = "event&nbsp;&nbsp; ******* E (type: 118, taglist, encoder=(string)\"Xiph.Org\\ libTheora\\ I\\ 20070915\\ 3\\ 2\\ 1\", encoder-version=(guint)3, video-codec=(string)Theora;) 0x9ad9f40"<br>New clock: GstSystemClock<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:03.900000000, duration: 0:00:00.100000000, offset: -1, offset_end: -1, flags: 32)
 0x9a66b90"<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:04.000000000, duration: 0:00:00.100000000, offset: -1, offset_end: -1, flags: 0) 0x9a66c00"<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:04.100000000, duration: 0:00:00.100000000, offset: -1, offset_end: -1, flags: 0) 0x9a66c50"<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:04.200000000, duration: 0:00:00.100000000, offset: -1, offset_end: -1<br><br>gst-record.cc is recordtwice.2.py written in C++, without pad block or clockoverlay.<br>It works the same as py with clockoverlay (fine but first timestamp is not 0)<br><br>gst-launch -v filesrc location=output1.ogg ! decodebin ! fakesink sync=TRUE<br>Définition du pipeline à PAUSED...<br>/pipeline0/decodebin0/typefind.src: caps = application/ogg<br>Le pipeline est en phase de
 PREROLL...<br>/pipeline0/decodebin0/queue0.sink: caps = video/x-theora<br>/pipeline0/decodebin0/queue0.src: caps = video/x-theora<br>/pipeline0/decodebin0/theoradec1.sink: caps = video/x-theora<br>/pipeline0/decodebin0/theoradec1.src: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/fakesink1.sink: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/decodebin0.src0: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/decodebin0.src0.proxypad1: caps = video/x-raw-yuv, format=(fourcc)I420, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, width=(int)320, height=(int)240<br>/pipeline0/fakesink1: last-message = "preroll&nbsp;&nbsp; ******* "<br>Le
 pipeline a terminé la phase PREROLL...<br>Passage du pipeline à la phase PLAYING...<br>/pipeline0/fakesink1: last-message = "event&nbsp;&nbsp; ******* E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, applied_rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, start=(gint64)3933333333, stop=(gint64)8933333333, position=(gint64)0;) 0x8ad7d40"<br>/pipeline0/fakesink1: last-message = "event&nbsp;&nbsp; ******* E (type: 118, taglist, encoder=(string)\"Xiph.Org\\ libTheora\\ I\\ 20070915\\ 3\\ 2\\ 1\", encoder-version=(guint)3, video-codec=(string)Theora;) 0x8ad7d68"<br>New clock: GstSystemClock<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:03.933333333, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 32) 0x8a64c50"<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:03.966666666, duration: 0:00:00.033333334,
 offset: -1, offset_end: -1, flags: 0) 0x8a64cf0"<br>/pipeline0/fakesink1: last-message = "chain&nbsp;&nbsp; ******* &lt; (115200 bytes, timestamp: 0:00:04.000000000, duration: 0:00:00.033333333, offset: -1, offset_end: -1, flags: 0) 0x8a64ca0"<br><br><br>Why the initial timestamp&nbsp; difference with timeoverlay ?<br>What is in python binding which makes its behavior change from C ?<br>Something with freeing gstreamer elements (such as ghost pads or request pads) ?<br>I noticed you have to be extra careful with request pads when working with dynamic pipeline.<br>You have to release them when you do not use them anymore.<br><br>Aurelien<br><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Message d'origine ----<br>De : Daniel Drake &lt;dsd@laptop.org&gt;<br>À : Tim-Philipp Müller &lt;t.i.m@zen.co.uk&gt;<br>Cc : gstreamer-devel@lists.sourceforge.net<br>Envoyé le : Lundi, 11 Août 2008, 17h27mn 08s<br>Objet&nbsp;: Re:
 [gst-devel] gstoggmux EOS handling issue<br><br>On Fri, 2008-08-08 at 14:11 +0100, Tim-Philipp Müller wrote:<br>&gt; (Btw, not sure what exactly you were trying to fix, and I only had a<br>&gt; very quick look at your code, but at first glance the shutdown sequence<br>&gt; doesn't seem ideal: as far as I can see it won't shut down cleanly with<br>&gt; an EOS making it through the recording bin; for ogg this just means that<br>&gt; in the worst case you're losing a few frames at the end; with other<br>&gt; muxers you might get slightly broken and/or indexless files).<br><br>Tim explained this on IRC. Cleanly shutting down the recording stream<br>works around the bug I found (if it is indeed a bug).<br><br>In case it helps others, the process for cleanly stopping a live capture<br>is as follows:<br> - send an EOS on the live capture element(s) using<br>&nbsp;  gst_element_send_event(gst_event_new_eos())<br> - connect a watch handler to the bus of the
 pipeline and wait for<br>&nbsp;  GST_MESSAGE_EOS<br> - when EOS arrives, set the pipeline state to NULL<br><br>Working code here:<br><a href="http://dev.laptop.org/%7Edsd/20080811/recordtwice.txt" target="_blank">http://dev.laptop.org/~dsd/20080811/recordtwice.txt</a><br><br>Daniel<br><br><br><br>-------------------------------------------------------------------------<br>This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>Build the coolest Linux based applications with Moblin SDK &amp; win great prizes<br>Grand prize is a trip for two to an Open Source event anywhere in the world<br><a href="http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/</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><br>


      <hr size="1"> 
Envoyé avec <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52423/*http://fr.docs.yahoo.com/mail/overview/index.html">Yahoo! Mail</a>.<br>Une boite mail plus intelligente. </a></body></html>