gst_element_query_position is stuck at end position in reverse playback

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

gst_element_query_position is stuck at end position in reverse playback

Grégoire Gentil
Hello,

I'm using this tutorial:

https://gstreamer.freedesktop.org/documentation/tutorials/basic/playback-speed.html?gi-language=c

If I add the action advance_frame with the following code:

case 'a': gst_element_send_event(data->pipeline,
gst_event_new_step(GST_FORMAT_BUFFERS, 1, 1.0, TRUE, FALSE));
gint64 position;
gst_element_query_position(data->pipeline, GST_FORMAT_TIME, &position);
fprintf(stderr, "position:%ld", position);
break;

It's working properly, one frame is advanced and the position is
incremented.

If I do 'd' to backward the rate and I do the same action advance_frame,
the previous frame is shown on screen but the position remains the same.
I can go back as many frames as I want, the display is correctly updated
but the position remains stuck at the position when the rate was inverted.

This is happening with multiple containers such as: webm, ps, ts, matroska

To reproduce the issue:

wget http://gentil.com/tmp/a.zip
unzip a.zip
gcc a.c `pkg-config --cflags --libs gstreamer-1.0` && ./a.out

Then press:
P
a
a
a
D
a
a
a
q

That gives the following output:

P
Setting state to PAUSE
a
position:10557831391
a
position:10582000000
a
position:10603000000
D
Current rate: -1
a
position:10625000000
a
position:10625000000
a
position:10625000000
q


Is this a known issue?

Grégoire

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel