Seeking in pull based model where the plugin is driving the pipeline

krupa krupa.gopal at gmail.com
Thu Mar 6 04:36:00 PST 2014


Hi,

I'm trying to SEEK in my plugin which is pull based(a parser). Right now I
have implemented just the 'loop' function and 'src_event' function. I have
an application calling seek as below.
gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME,GST_SEEK_FLAG_FLUSH,
				GST_SEEK_TYPE_SET, time_nanoseconds,
				GST_SEEK_TYPE_NONE,GST_CLOCK_TIME_NONE)

*time_nanoseconds will be current playing time + 1ns

In the seek switch of the src_event I have implemented the seek as follows.
1) gst_pad_push_event (myplugin->sinkpad, gst_event_new_flush_start ());
2) gst_pad_push_event (myplugin->srcpad, gst_event_new_flush_start ());
3) GST_PAD_STREAM_LOCK (myplugin->sinkpad);
4) Call library function to do the seek.
5) gst_pad_push_event (myplugin->sinkpad, gst_event_new_flush_stop ());
6) gst_pad_push_event (myplugin->srcpad, gst_event_new_flush_stop ());
7) GST_PAD_STREAM_UNLOCK (myplugin->sinkpad);

After the seek event comes, my pipeline freezes. From what I understand
GST_PAD_STREAM_LOCK (myplugin->sinkpad) is not able to get a lock.
Statements after this statement aren't getting executed. Even if I remove
it, the pipeline freezes. I wanted to know what GST_PAD_STREAM_LOCK does and
also how to implement seeking in a plugin driving the pipeline and what
happens when seek is called.

Thanks,
Krupa





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Seeking-in-pull-based-model-where-the-plugin-is-driving-the-pipeline-tp4665788.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list