<div dir="ltr"><div>This is my first project in gstreamer, so please pardon my newbie question.</div><div><br></div><div>I'm trying to make a combination of playbin example[1], and playback speed example[2]. I want a video to loop indefinitely (using about-to-finish signal), but I would like to be able to control the speed as well. Here[3]'s my experiment so far. It works, but I do have quite a few problems:</div>
<div><br></div><div>1) when the video is finished and it goes at the beginning, the playback speed reverts to the original one. Only after I send a send_seek_event by pressing a key it goes back to what is supposed to be.</div>
<div>2) when the video is finished playing and it needs to start again, sometimes, it gets stuck for a few seconds and only then starts playing again. Again, calling send_seek_event unfreezes it.</div><div><br></div><div>
The whole day I tried to:</div><div>a) send_seek_event in 'about-to-finish' callback, it appears to fix #2, but not #1</div><div>b) listen on the bus for STREAM_START message and call send_seek_event then, doesn't work because it can't query the position in at line 28.</div>
<div>c) listen on the bus for STATE_CHANGED message and try to call send_seek_event on different combinations of old state and new state, but I always ended up in crashing the program</div><div>d) listen on the bus of ASYNC_DONE message and combined it with STREAM_START, still no luck.</div>
<div><br></div><div>I'm assuming now that somehow the state of the playbin is important when to call that send_seek_event so that playbin can restore the playback speed, but I'm out of ideas where to try it. I've read on playbin's documentation page that it should have no problem in taking gst_element_send_event.</div>
<div><br></div><div>Oh, and I'm in 1.x branch. I know that the examples are 0.1, but I've taken the modified versions.</div><div><br></div><div>If you've read so far, thank you, I really appreciate it,</div><div>
Alex</div><div><br></div>[1] <a href="http://docs.gstreamer.com/display/GstSDK/Playback+tutorial+1%3A+Playbin2+usage">http://docs.gstreamer.com/display/GstSDK/Playback+tutorial+1%3A+Playbin2+usage</a><br><div>[2] <a href="http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+13%3A+Playback+speed">http://docs.gstreamer.com/display/GstSDK/Basic+tutorial+13%3A+Playback+speed</a></div>
<div>[3] <a href="http://pastebin.com/ACWzwBxe">http://pastebin.com/ACWzwBxe</a></div></div>