[gst-devel] Is Gstreamer thread safe

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Aug 6 10:15:19 CEST 2010


On Thu, 2010-08-05 at 21:31 -0700, pavithra wrote:

> Can i call seek from one thread and delete the pipeline from another
> thread? 

Yes, as long as

 1) you gst_element_set_state (pipeline, GST_STATE_NULL)
    before deleting/unreffing the pipeline (this will also
    cancel/interrupt any pending seeks).

 2) your seek and _set_state() are done from threads that
    are not GStreamer streaming threads (ie. you can't do
    either of those things from a pad-added callback, a
    pad probe, a sync message handler, a notify::caps
    signal callback, etc.). You can do these things from
    any of your application threads though.

Cheers
 -Tim






More information about the gstreamer-devel mailing list