I just discovered gstdebugutils, which has a great function for dumping out a graph of the entire pipeline. I call it and have it output to chrome directly:<div><br></div><div><div>void display_pipeline_in_chrome() {</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>const char* temp_filename = "gst_bin_graph_tmp";</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>char dot_command[1024];</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>char chrome_command[1024];</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>const char* DIR = getenv("GST_DEBUG_DUMP_DOT_DIR");</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>GstDebugGraphDetails output_flags = GstDebugGraphDetails(GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE | GST_DEBUG_GRAPH_SHOW_STATES | GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS);</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>GST_DEBUG_BIN_TO_DOT_FILE(GST_BIN(PIPELINE), output_flags, temp_filename);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>snprintf(dot_command, sizeof(dot_command), "dot -Tpng %s/%s.dot -o %s/%s.png", DIR, temp_filename, DIR, temp_filename);</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>snprintf(chrome_command, sizeof(chrome_command), "google-chrome %s/%s.png", DIR, temp_filename);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>system(dot_command);</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>system(chrome_command);</div><div>}</div><div><br></div><div>The mode of the pads will be marked with one of "-><" to represent none, push, or pull.</div>
<br><div class="gmail_quote">On Sat, Jul 28, 2012 at 2:14 PM, Demeyer Jonathan <span dir="ltr"><<a href="mailto:Jonathan.Demeyer@macq.eu" target="_blank">Jonathan.Demeyer@macq.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">It works !<br>
<br>
Thanks a lot.<br>
<br>
However, it leaves me with a misunderstanding.<br>
Is this pipeline pull-based ?<br>
I thought that normal pipelines were push-based.<br>
How can we know (even after launch).<br>
<br>
Jonathan<br>
<br>
<div style="font-size:16px;font-family:Times New Roman">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>De :</b> gstreamer-devel-bounces+jonathan.demeyer=<a href="mailto:macq.eu@lists.freedesktop.org" target="_blank">macq.eu@lists.freedesktop.org</a> [gstreamer-devel-bounces+jonathan.demeyer=<a href="mailto:macq.eu@lists.freedesktop.org" target="_blank">macq.eu@lists.freedesktop.org</a>] de la part
de Matt Pekar [<a href="mailto:mpekar@raineyelectronics.com" target="_blank">mpekar@raineyelectronics.com</a>]<br>
<b>Date d'envoi :</b> vendredi 27 juillet 2012 18:09<br>
<b>Ŕ :</b> Discussion of the development of and with GStreamer<br>
<b>Objet :</b> Re: constant framerate<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>Try adding sync=true to the fakesink element:
<div><br>
</div>
<div>gst-launch -v videotestsrc num-buffers=10 ! videorate force-fps="1/1" ! "video/x-raw-yuv,framerate=1/1" ! fakesink sync=true<br>
<br>
<div class="gmail_quote">On Fri, Jul 27, 2012 at 11:04 AM, Demeyer Jonathan <span dir="ltr">
<<a href="mailto:Jonathan.Demeyer@macq.eu" target="_blank">Jonathan.Demeyer@macq.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div>
<div dir="ltr" align="left"><font face="Arial"><span>Tanks Matt for the reply.</span></font></div>
<div dir="ltr" align="left"><font face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font face="Arial"><span>This didn't work for me as you can see :</span></font></div>
<div dir="ltr" align="left"><font face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font face="Arial"><span>$ date; gst-launch -v videotestsrc num-buffers=10 ! videorate force-fps="1/1" ! "video/x-raw-yuv,framerate=1/1" ! fakesink; date<br>
Fri Jul 27 17:55:42 CEST 2012<br>
Setting pipeline to PAUSED ...<br>
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320, height=(int)240<br>
Pipeline is PREROLLING ...<br>
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:src: caps = video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320, height=(int)240<br>
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:sink: caps = video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320, height=(int)240<br>
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320, height=(int)240<br>
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320, height=(int)240<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw-yuv, framerate=(fraction)1/1, format=(fourcc)YUY2, color-matrix=(string)sdtv, chroma-site=(string)mpeg2, width=(int)320, height=(int)240<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "preroll ******* "<br>
Pipeline is PREROLLED ...<br>
Setting pipeline to PLAYING ...<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event ******* (fakesink0:sink) E (type: 102, GstEventNewsegment, update=(boolean)false, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, start=(gint64)0, stop=(gint64)-1,
position=(gint64)0;) 0x9173750"<br>
New clock: GstSystemClock<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:00.000000000, duration: 0:00:01.000000000, offset: 0, offset_end: 1, flags: 33 ro discont ) 0x9180760"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:01.000000000, duration: 0:00:01.000000000, offset: 1, offset_end: 2, flags: 1 ro ) 0xb6c01870"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:02.000000000, duration: 0:00:01.000000000, offset: 2, offset_end: 3, flags: 1 ro ) 0xb6c01930"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:03.000000000, duration: 0:00:01.000000000, offset: 3, offset_end: 4, flags: 1 ro ) 0xb6c019f0"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:04.000000000, duration: 0:00:01.000000000, offset: 4, offset_end: 5, flags: 1 ro ) 0xb6c01ab0"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:05.000000000, duration: 0:00:01.000000000, offset: 5, offset_end: 6, flags: 1 ro ) 0xb6c01b70"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:06.000000000, duration: 0:00:01.000000000, offset: 6, offset_end: 7, flags: 1 ro ) 0xb6c01c78"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:07.000000000, duration: 0:00:01.000000000, offset: 7, offset_end: 8, flags: 1 ro ) 0xb6c01d38"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:08.000000000, duration: 0:00:01.000000000, offset: 8, offset_end: 9, flags: 1 ro ) 0xb6c01b10"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "chain ******* (fakesink0:sink) (153600 bytes, timestamp: 0:00:09.000000000, duration: 0:00:01.000000000, offset: 9, offset_end: 10, flags: 1 ro ) 0xb6c01b70"<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0: last-message = "event ******* (fakesink0:sink) E (type: 86, ) 0x9173750"<br>
Got EOS from element "pipeline0".<br>
Execution ended after 12853781 ns.<br>
Setting pipeline to PAUSED ...<br>
Setting pipeline to READY ...<br>
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = NULL<br>
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = NULL<br>
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = NULL<br>
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:src: caps = NULL<br>
/GstPipeline:pipeline0/GstVideoRate:videorate0.GstPad:sink: caps = NULL<br>
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = NULL<br>
Setting pipeline to NULL ...<br>
Freeing pipeline ...<br>
Fri Jul 27 17:55:42 CEST 2012</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>While :</span></font></div>
<div><font face="Arial"><span>$ gst-inspect --gst-version<br>
GStreamer Core Library version 0.10.36</span></font></div>
<div dir="ltr" align="left"><br>
</div>
<div dir="ltr" align="left"><font face="Arial"><span>Any idea ?</span></font></div>
<div dir="ltr" align="left"><font face="Arial"><span></span></font> </div>
<div dir="ltr" align="left"><font face="Arial"><span>Thanks,</span></font></div>
<div> </div>
<div align="left">
<div align="left"><font face="Arial">Jonathan DEMEYER</font></div>
</div>
<div> </div>
<br>
<blockquote dir="ltr" style="border-left:#000000 2px solid;padding-left:5px;margin-left:5px;margin-right:0px">
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma"><b>From:</b> gstreamer-devel-bounces+jonathan.demeyer=<a href="mailto:macq.eu@lists.freedesktop.org" target="_blank">macq.eu@lists.freedesktop.org</a> [mailto:<a href="mailto:gstreamer-devel-bounces%2Bjonathan.demeyer" target="_blank">gstreamer-devel-bounces+jonathan.demeyer</a>=<a href="mailto:macq.eu@lists.freedesktop.org" target="_blank">macq.eu@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Matt Pekar<br>
<b>Sent:</b> mercredi 25 juillet 2012 15:08<br>
<b>To:</b> Discussion of the development of and with GStreamer<br>
<b>Subject:</b> Re: constant framerate<br>
</font><br>
</div>
<div>
<div>
<div></div>
videorate has a "force-fps" attribute:
<div><br>
</div>
<div>videorate force-fps=1<br>
<div><br>
</div>
<div><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videorate.html" target="_blank">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videorate.html</a><br>
<br>
<div class="gmail_quote">On Wed, Jul 25, 2012 at 5:00 AM, Demeyer Jonathan <span dir="ltr">
<<a href="mailto:Jonathan.Demeyer@macq.eu" target="_blank">Jonathan.Demeyer@macq.eu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left:#ccc 1px solid;margin:0px 0px 0px 0.8ex;padding-left:1ex">
<u></u>
<div>
<div><font face="Arial"><span>Hello,</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>I'm trying to test a pipeline (test performance of an element) and for this I want to have a constant image flow.</span></font></div>
<div><font face="Arial"><span>I've try the videorate element like this :</span></font></div>
<div><font face="Arial"><span>gst-launch -v filesrc location="Pictures/image.jpg" ! jpegdec ! imagefreeze ! videorate ! "video/x-raw-yuv,framerate=1/1" ! fakesink</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>But logs tells me that images come when the system is ready instead of each second (but timestamps are OK). Actually I see no difference between using videorate or not.</span></font></div>
<div><font face="Arial"><span>Do I need to use another element or is it a flag that i've missing ?</span></font></div>
<div><font face="Arial"><span></span></font> </div>
<div><font face="Arial"><span>Thanks in advance,</span></font></div>
<div><font face="Arial"></font> </div>
<div align="left">
<div align="left"><b><font face="Arial">Jonathan DEMEYER</font></b></div>
</div>
<div> </div>
</div>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>
</div>
</div>
<br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br></div>