Position does not reflect currently displayed video frame
andy.devar at gmail.com
Sat Nov 7 18:01:39 UTC 2020
filesrc location=Video.mkv ! matroskademux name=src ! h264parse !
d3d11h264dec ! d3d11convert ! d3d11videosink name=overlay
If this pipeline is paused, and you get the current position, this position
does not reflect the video frame currently displayed by the video sink.
gst_element_query_position(pipeline_, GST_FORMAT_TIME, &pos))
If you then do an accurate seek to this position, the next frame displayed
won't be the same as before doing the seek, but a few frames before.
gst_element_seek(pipeline_, 1.0, GST_FORMAT_TIME,
(GstSeekFlags)(GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH),
GST_SEEK_TYPE_SET, pos, GST_SEEK_TYPE_NONE, 0);
I suspect that the sink stops rendering frames later than the time stops
I've also observed that whenever you change the pipeline's state from
playing to paused, the next video frame is immediately output - no matter
how much time has elapsed since displaying the previous frame. This is
easily reproducible if the playback rate is low (let's say 0.02) and you
pause the pipeline just after a new frame has been displayed.
So, how can I get a time which reflects exactly the video frame currently
And how can I prevent that future frames are output when pausing the
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel