Hi,<div><br></div><div>I am still unable to crack a solution. Can anyone provide some help?</div><div><br></div><div>Regards,</div><div><br><br><div class="gmail_quote">On 20 February 2011 22:56, Yogesh Marwaha <span dir="ltr">&lt;<a href="mailto:yogeshm.007@gmail.com">yogeshm.007@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Sunday 20 Feb 2011 22:01:21 Marco Ballesio wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; On Sun, Feb 20, 2011 at 4:46 PM, Yogesh Marwaha &lt;<a href="mailto:yogeshm.007@gmail.com">yogeshm.007@gmail.com</a>&gt;<br>
wrote:<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m coding a transcoding application (not using encodebin).<br>
&gt; &gt;<br>
&gt; &gt; Upto now I had been using following code to get time for which the<br>
&gt; &gt; pipeline has been in Playing state (To show user information like xx<br>
&gt; &gt; minutes/seconds the operation has run for or to calcutate averate speed<br>
&gt; &gt; and estimate remaining time etc.): -<br>
&gt; &gt;        GstClockTime elapsedTime = GST_CLOCK_TIME_NONE;<br>
&gt; &gt;        GstClock *clock = gst_element_get_clock(m_pPipeline);<br>
&gt; &gt;        if(clock)<br>
&gt; &gt;            elapsedTime = (gst_clock_get_time(clock) -<br>
&gt; &gt; gst_element_get_base_time(m_pPipeline)) / GST_SECOND;<br>
&gt; &gt;<br>
&gt; &gt; Pipeline is like this: -<br>
&gt; &gt;        gst_bin_add_many(GST_BIN(m_pPipeline), source, queue,<br>
&gt; &gt; audioConvert, audioEncoder, container, sink, NULL);<br>
&gt; &gt;<br>
&gt; &gt; But then I added code to allow pausing the operation like this: -<br>
&gt; &gt;    gst_element_set_state(m_pPipeline, GST_STATE_PAUSED);<br>
&gt; &gt;<br>
&gt; &gt; Now pipeline is paused but the clock is not. It is running always.<br>
&gt; &gt;<br>
&gt; &gt; What should I do achieve my target?<br>
&gt;<br>
&gt; You should read this:<br>
&gt;<br>
&gt; <a href="http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-synch" target="_blank">http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-synch</a><br>
&gt; ronisation.txt<br>
&gt;<br>
&gt; and, of course, use the running time instead of the absolute time. By<br>
&gt; heart, it should be something like:<br>
&gt;<br>
&gt; gst_clock_get_time(gst_element_get_clock(...)) - gst_element_get_base_time<br>
&gt; (...)<br>
&gt;<br>
&gt; Regards<br>
&gt;<br>
&gt; &gt; Regards,<br>
&gt; &gt;<br>
&gt; &gt; Yogesh Marwaha<br>
&gt; &gt; <a href="http://sparklemedia.sourceforge.net/" target="_blank">http://sparklemedia.sourceforge.net/</a><br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; gstreamer-devel mailing list<br>
&gt; &gt; <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
&gt; &gt; <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; gstreamer-devel mailing list<br>
&gt; <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
&gt; <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
</div></div>I fail to understand how is your suggestion different than mine?<br>
<br>
I have read 2nd and 3rd sections of document you pointed to and it seems  that<br>
I&#39;m doing the same; may be I&#39;m understanding something in a wrong way. Can you<br>
help me understand?<br>
<br>
Regards,<br>
<font color="#888888"><br>
Yogesh Marwaha<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Yogesh M<br><a href="http://sparklemedia.sourceforge.net/">http://sparklemedia.sourceforge.net/</a><br><a href="http://mazedaar.wordpress.com/">http://mazedaar.wordpress.com/</a><br>
<a href="http://snakeeyes.wordpress.com/">http://snakeeyes.wordpress.com/</a><br>
</div>