After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 635760 - basesink: Current playback position is not updated after framestepping
basesink: Current playback position is not updated after framestepping
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-25 09:04 UTC by Vladimir Eremeev
Modified: 2013-07-24 09:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
query playback position in seek example (1.75 KB, patch)
2010-11-25 09:04 UTC, Vladimir Eremeev
reviewed Details | Review

Description Vladimir Eremeev 2010-11-25 09:04:34 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.
Comment 1 Vladimir Eremeev 2010-11-26 09:52:22 UTC
audiosink's segment for some reason is not updated in stop_stepping() function.
Comment 2 Sebastian Dröge (slomo) 2010-12-12 16:01:07 UTC
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
Comment 3 Vladimir Eremeev 2010-12-13 08:12:12 UTC
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.
Comment 4 Vladimir Eremeev 2010-12-13 08:19:22 UTC
This happens on MPEG2-PS files.
FLV, MP4 and avi are stepped back with correct position updating.
Comment 5 Vladimir Eremeev 2010-12-13 17:36:33 UTC
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.
Comment 6 Vladimir Eremeev 2011-04-04 11:23:47 UTC
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 7 André Klapper 2012-02-03 13:44:11 UTC
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.]
Comment 8 Sebastian Dröge (slomo) 2013-07-24 08:34:32 UTC
Vladimir, is this still a problem with 1.0? Quite some things changed since back then.
Comment 9 Vladimir Eremeev 2013-07-24 08:39:08 UTC
I cannot check it, unfortunately.
Comment 10 Sebastian Dröge (slomo) 2013-07-24 09:50:06 UTC
Then let's close this until someone can reproduce it in 1.0. Might also be related to bug #701101