Unexpected exact position on segmented seek

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Unexpected exact position on segmented seek

marc lievens-2


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


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected exact position on segmented seek

Baby Octopus
Administrator
Have you tried GST_SEEK_FLAG_ACCURATE?
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected exact position on segmented seek

marc lievens-2
Yes Is also used GST_SEEK_FLAG_ACCURATE, with the same result.s

2017-07-25 19:01 GMT+02:00 Baby Octopus <[hidden email]>:
Have you tried GST_SEEK_FLAG_ACCURATE?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Unexpected-exact-position-on-segmented-seek-tp4683942p4683947.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Unexpected exact position on segmented seek

marc lievens-2
Hi,

Problem occured due fact that seek was done on other element then command gst_element_seek end position

   

2017-07-27 9:49 GMT+02:00 marc lievens <[hidden email]>:
Yes Is also used GST_SEEK_FLAG_ACCURATE, with the same result.s

2017-07-25 19:01 GMT+02:00 Baby Octopus <[hidden email]>:
Have you tried GST_SEEK_FLAG_ACCURATE?



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Unexpected-exact-position-on-segmented-seek-tp4683942p4683947.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



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