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"><<a href="mailto:yogeshm.007@gmail.com">yogeshm.007@gmail.com</a>></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>
> Hi,<br>
><br>
> On Sun, Feb 20, 2011 at 4:46 PM, Yogesh Marwaha <<a href="mailto:yogeshm.007@gmail.com">yogeshm.007@gmail.com</a>><br>
wrote:<br>
> > Hi,<br>
> ><br>
> > I'm coding a transcoding application (not using encodebin).<br>
> ><br>
> > Upto now I had been using following code to get time for which the<br>
> > pipeline has been in Playing state (To show user information like xx<br>
> > minutes/seconds the operation has run for or to calcutate averate speed<br>
> > and estimate remaining time etc.): -<br>
> > GstClockTime elapsedTime = GST_CLOCK_TIME_NONE;<br>
> > GstClock *clock = gst_element_get_clock(m_pPipeline);<br>
> > if(clock)<br>
> > elapsedTime = (gst_clock_get_time(clock) -<br>
> > gst_element_get_base_time(m_pPipeline)) / GST_SECOND;<br>
> ><br>
> > Pipeline is like this: -<br>
> > gst_bin_add_many(GST_BIN(m_pPipeline), source, queue,<br>
> > audioConvert, audioEncoder, container, sink, NULL);<br>
> ><br>
> > But then I added code to allow pausing the operation like this: -<br>
> > gst_element_set_state(m_pPipeline, GST_STATE_PAUSED);<br>
> ><br>
> > Now pipeline is paused but the clock is not. It is running always.<br>
> ><br>
> > What should I do achieve my target?<br>
><br>
> You should read this:<br>
><br>
> <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>
> ronisation.txt<br>
><br>
> and, of course, use the running time instead of the absolute time. By<br>
> heart, it should be something like:<br>
><br>
> gst_clock_get_time(gst_element_get_clock(...)) - gst_element_get_base_time<br>
> (...)<br>
><br>
> Regards<br>
><br>
> > Regards,<br>
> ><br>
> > Yogesh Marwaha<br>
> > <a href="http://sparklemedia.sourceforge.net/" target="_blank">http://sparklemedia.sourceforge.net/</a><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>
> _______________________________________________<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>
</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'm doing the same; may be I'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>