Unexpected exact position on segmented seek
marc lievens
mark.lievens at gmail.com
Tue Jul 25 13:36:25 UTC 2017
Hi,
On specified pipeline I'm executing a lot of seeks by gst_element_seek and
on event GST_MESSAGE_SEGMENT_DONE I want to know the exact position.
When GST_MESSAGE_SEGMENT_DONE is recieved the position is retrieved by
command gst_element_query_position.
But it seems that this position is about 2 seconds before the end time used
in the gst_element_seek command.
Since the file src has 3 I-frames/sec this should not be possible, since
the difference could be max 1/3 of a second.
At the same time I'm also retreiving the position via
gst_message_parse_segment_done for verification.
It seems that this time is totally different from the other positions.
used gst_element_seek end position = 207806002686
reply gst_element_query_position = 205968000000
reply gst_message_parse_segment_done = 3566703002686
Has anyone am Idea what I'm doing wrong? Do I have to flush the pipeline
somehow before the gst_element_query_position?
What kind os position is gst_message_parse_segment_done returning? The
gstreamer doc is not quit clear to me. How can I calculate the position
from this one?
Used pipeline : filesrc ! matroskademux ! queue2 ! appsink ! appsrc!
h264parse! queue2 ! matroskamux ! filesink
Used seek : gst_element_seek with flags
GstSeekFlags(GST_SEEK_FLAG_FLUSH |GST_SEEK_FLAG_SEGMENT |
GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE) .
The GST_SEEK_FLAG_FLUSH is only used with the first
gst_element_seek command.
Any help is appreciated.
marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170725/21b457a7/attachment.html>
More information about the gstreamer-devel
mailing list