GST_EVENT_FLUSH_START raised twice in single seek

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

GST_EVENT_FLUSH_START raised twice in single seek

naseeb_panghal
I have player created using gstreamer.
Source Element: filesrc(pull-mode)

when i perform seek then GST_EVENT_FLUSH_START is created twice. I confirmed it with gdb breakpoint.

I don't understand why it is raised twice. I have read almost all the documentation related to SEEK and FLUSH start event but not found any explanation.

As per documentation, i think single FLUSH_START should be able to discard old data.
Reply | Threaded
Open this post in threaded view
|

Re: GST_EVENT_FLUSH_START raised twice in single seek

Baby Octopus
Administrator
Firstly, is your seek working fine? Are you doing a seek with the seek_flag set to FLUSH?
Reply | Threaded
Open this post in threaded view
|

Re: GST_EVENT_FLUSH_START raised twice in single seek

Tim Müller
In reply to this post by naseeb_panghal
On Thu, 2017-06-15 at 04:44 -0700, naseeb_panghal wrote:

Hi,

> I have player created using gstreamer. 
> Source Element: filesrc(pull-mode)
>
> when i perform seek then GST_EVENT_FLUSH_START is created twice. I
> confirmed it with gdb breakpoint.
>
> I don't understand why it is raised twice. I have read almost all the
> documentation related to SEEK and FLUSH start event but not found any
> explanation.

The parser or demuxer's seek handler (called from the application
thread that pushed the seek event into the pipeline) will send a flush-
start event downstream and one upstream, as the parser/demuxer
streaming thread might currently be doing or preparing to do a pull()
or a push(). This way the streaming thread will bail out and stop
itself at the next possible opportunity, and the parser/demuxer can be
reconfigured to start from the new position.

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: GST_EVENT_FLUSH_START raised twice in single seek

naseeb_panghal
In reply to this post by Baby Octopus
Yes seek is working fine...and below is code snippet for seek api.

gst_element_seek_simple (data->gstpipeline->pipeline, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT, (gint64)(value * GST_SECOND));