[gst-devel] speed element

cristiurban cristianurban86 at gmail.com
Thu Nov 4 10:02:25 CET 2010


In my application I want to use the "speed" element, it works just fine, I
set the playback speed time with :  g_object_set (G_OBJECT (speed), "speed",
speedFactor, NULL); // where speedFactor is 1.0 or anyspeed I set from my
keyboard. After that when I initiate the speed that I want to play I do have
a thread that always display my current time :
while(enableTime == TRUE)
	{
		gst_element_query_position(pipeline, &fmt, &pos);
		g_print("Current time of stream is --->[%" GST_TIME_FORMAT
"]\n",GST_TIME_ARGS (pos));
		if (speedFactor == 1.0) sleep(1); else
		if (speedFactor == 2.0) usleep(500000); else
		if (speedFactor == 4.0) usleep(250000); else
		if (speedFactor == 6.0) usleep(170000);
	}
It is very simple what I have done, when I have the 2x speed set I want to
display time more faster to correspond to my real time. My problem is that
the current time is not extracted correctly, at 4x speed my current time is
displayed 4 times the same every 250ms. Is this a bug? Or am I doing
something wrong?

Thanks, Cristi.


-- 
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/speed-element-tp3026694p3026694.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list