[gst-devel] gst_element_seek problem

bounce bounce bouncebounce at caramail.com
Wed Jul 4 10:45:25 CEST 2007


Thanks for your reply.

But I've a precision to give.
I don't succeed to use "direcdrawsink" to output the video. But now, I'm developping temporarily on Cygwin and I'm using "ximagesrc" like sink and it's right. I will comeback with the directdrawsink later when I will have an update of Hummingbird Exceed.

Next to begin with, I'm initializing the GStreamer's library with "gst_init_check".
Next, I'm using "g_main_loop_new" to create a temporarily loop that I'm stopping when I detect a change of state on the bus to GST_STATE_PLAYING. I'm doing that because as I'm developping with Xwindow (which is not based on glib), and if the loop is keeping, it will block my GUI and I will not be able to manipulate the video. So, when I detect this change of state, I stop the loop and I use "XtAppAddTimeOut" to repeat some action on GUI like the update of a scalebar.
That's the only way I found to allow the update of the scalebar ...

I've another problem when I put the video on GST_STATE_PAUSED only. It's paused but when I do later a GSt_STATE_PLAYING,  it's not playing but stays at pause.
And the value returns by "gst_element_set_state" is "GST_STATE_CHANGE_ASYNC".
Thus the problem will be perhaps caused by the pause of the video which happens asynchroneously in the background.

Also when I do a change of state to GST_STATE_PAUSED, the result of the "gst_element_set_state" function  is "GST_STATE_CHANGE_NO_PREROLL".
I had seen what does it mean, but I'm not sure to understand it. In the GStreamer's documentation, that's written : 
GST_STATE_CHANGE_NO_PREROLL 	   the state change succeeded but the element cannot produce data in PAUSED. This typically happens with live sources.

What does it mean more precisely ?
My video seems to be paused but actually she is played in background. And if I want to playback to put it a GST_STATE_PLAYING, it's seems always paused.

An other precision, the use of "gst_element_seek(playbin, ...)" rather than "gst_element_seek(vsink, ...) " doesn't arrange the problem. And the use of "gst_element_seek_simple ()" rather than "gst_element_seek()" doesn't change the problem.


Can the problem be corrected with a flush ?
Do yiou have ideas about these problems ?

Thanks.


More information about the gstreamer-devel mailing list