[gst-devel] handling seeking in audio decoder plugin

Tim-Philipp Müller t.i.m at zen.co.uk
Thu Dec 3 23:51:39 CET 2009


On Mon, 2009-11-30 at 22:32 +0530, Sameer Naik wrote:

> According to events design doc, the plugin is supposed to discard any
> input data it receives after the GST_EVENT_FLUSH_START event. This
> call is not serialized. Which means the chain function would have to
> be sprinkled with the is_flushing check, which is not very desirable.

That's not how it works. The flush-start would be pushed out of band
from a thread other than the streaming threads (and your sink event
handler would/should pass it downstream). Pads will set themselves
automatically to flushing when they receive flush-start. In your chain
function you will then receive a wrong-state flow return when you do
gst_pad_push() or gst_pad_alloc_buffer(), at which point you'd stop or
skip the processing/decoding and bail out by returning wrong-state
upstream. You won't receive data after the flush-start automatically,
you just have to make sure you bail out quickly if needed. 

Cheers
 -Tim






More information about the gstreamer-devel mailing list