is there a way to serialize the "sync-message::stream-status" GstBus callback?

Tim Müller tim at centricular.com
Sun Sep 4 19:16:10 UTC 2016


On Fri, 2016-09-02 at 12:02 -0700, Andres Gonzalez wrote:

Hi Andres,

> I am using the "sync-message::stream-status" signal callback for the
> GstBus of a pipeline to get access to the pthread stuff. I have
> noticed that with a pipeline with several elements that create
> threads, this callback can be called several times. I have also
> noticed that these calls, which are coming from different element
> threads, is not serialized.
> 
> Question: is there a way to serialize this callback to ensure that a
> given invocation will complete before another element thread is
> allowed to call it?

Maybe just use a lock inside your callback function, so that things get
serialized there? (e.g. with G_LOCK_DEFINE_STATIC + G_LOCK)

Cheers
 -Tim

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

Join us at the GStreamer Conference: 10-11 October 2016 in Berlin,
Germany


More information about the gstreamer-devel mailing list