GNOME Bugzilla – Bug 635760
basesink: Current playback position is not updated after framestepping
Last modified: 2013-07-24 09:50:06 UTC
Created attachment 175226 [details] [review] query playback position in seek example I perform framestepping in paused playbin2 pipeline. During processing GST_MESSAGE_STEP_DONE I query position of the pipeline using gst_element_query_position. Is remains the same during all successive step operations. Attached patch contains the code for querying position.
audiosink's segment for some reason is not updated in stop_stepping() function.
Moving to core because the stepping code is in basesink. Does this still happen with latest GIT, the code in stop_stepping() does adjust the segment
Yes, it does. I also have seen this code and was wondering why the position returned by gst_element_query_position doesn't change. I tried this both in my application and in the seek example ($GST_PLUGINS_BASE/test/examples/seek/seek.c) BTW, there's no unit-tests, regarding framestepping, at all. I wanted to write one but haven't found any example.
This happens on MPEG2-PS files. FLV, MP4 and avi are stepped back with correct position updating.
One more bug. 1. I create playbin2 instance, make it load a MPEG-2 PS file and set the pipeline to the paused state. 2. I seek in paused state at some moment in the timeline. Seeking seems to be OK. Segment rate is positive, the stepping direction is forward. 3. I send new-step event. Pipeline shows the next frame, it is really a next frame, but stepped amount of time in the step-done message is much more than 40 msec, about 1 second.
Further investigation has shown that the source of this bug in the MPEG-2 demuxer. It doesn't report right positions to the downstream elements. It also doesn't seek to the keyframes before the requested frame, so the frame, displayed in paused state after a seeking, is most likely the key frame after the requested position, not the requested B- or P-frame. Also, there is no any mention of the SEEK_KEYFRAME or SEEK_ACCURATE flags - mpegpsdemux simply ignores them.
Comment on attachment 175226 [details] [review] query playback position in seek example [Setting "patch" flag and correcting mime type so this can actually be queried for.]
Vladimir, is this still a problem with 1.0? Quite some things changed since back then.
I cannot check it, unfortunately.
Then let's close this until someone can reproduce it in 1.0. Might also be related to bug #701101