[gst-devel] "threadsafe" signals

Benjamin Otte in7y118 at public.uni-hamburg.de
Sat Jan 10 08:15:01 CET 2004


On Sat, 10 Jan 2004, Ronald Bultje wrote:

> Well, since every GstThread has a thread object, you can simply check
> whether we (emission thread) is the same as the parent thread and handle
> it, no?
>
No, because we don't know which thread will handle the signal. Unless
you'd make the signal connection explicitly set it, but I wanted to get
around changing the prototype of g_signal_connect.

> I'd think that you would want hooks in bin and scheduler for this, and
> simply call these hooks to let that handle what thread to emit the
> signal too. From thread, send to parent bin thread (or, if no parent,
> main thread). From pipeline/bin, send out directly. From element, send
> to scheduler (which sends it from correct context for the (co)thread
> this element runs in to its parent).
>
Doesn't work. Threads aren't in a tree outside of gst. At least not a
tree that we could query and/or block. And we're pushing the signal that
way.

Benjamin





More information about the gstreamer-devel mailing list