I. the position, returned by gst_element_query_position always remains the same after frame steps in MPEG-2 files.
Since playbin2 responds with the same value to the _query_position, I've tried to develop a workaround by calculating the position by myself from the duration in the step-done message.
Here the second problem has come.
II. Suppose the following scenario.
1. I create playbin2.
2. load a mpeg2-PS file into it.
3. set the pipeline to PAUSED state (the previous was NULL)
4. seek to any position, say 6.96 sec (the pipeline is still in paused mode).
5. issue a new-step event.
I observe that the new frame displayed is the next frame.
However the 'duration' field in the step-done message contains the value of about 1 second
of the time passed.
I've switched on the debug output and have found that when I issue new-step event, mpegpsdemux sends new segment, beginning from the next SCR in the video file, which appears, say 7.58 sec.
videosink catches this new segment and takes its start position into account when calculates step-done fields.
Therefore I'm getting abnormally large amount of passed time.
How can I fix these?
I know that mpegpsdemux lacks the support, therefore I'm going to fix it by myself.