[gst-devel] how to make gstreamer run in separate thread

Alexey Chernov 4ernov at gmail.com
Mon Apr 19 22:15:40 CEST 2010


Thank you.

I've read some of those articles about Qt vs. Glib main loop, too. With the 
main loop everything is ok. The question is how QThread and GLib's context and 
threads are connected to each other and how different QThread's event loop 
interacts with Glib stuff.

I said about all the message dispatching in GStreamer, but of course the main 
problem is concerning my callback call by bus.

Also, thanks for info about gst_bus_set_sync_handler, I'll try it, too.

В сообщении от Понедельник 19 апреля 2010 15:42:54 вы написали:
> Bugzilla from 4ernov at gmail.com wrote:
> > Could you please detect which thread your callbacks run in? Maybe friend
> > functions is the solution...
> 
> Bus watch, set with gst_bus_add_watch, is called from the Glib main loop.
> Sync signal handler, set with gst_bus_set_sync_handler, is called from the
> elements' thread contexts.
> There is no difference, how functions are defined.
> A callback function anyway won't be a C++ class member (except static class
> members), because you have to pass its address to the registration routine,
> and you can't determine the address of a C++ class member if its not
> static.
> 
> You can also be interested in the queue elements
> (http://www.gstreamer.net/data/doc/gstreamer/head/manual/html/chapter-threa
> ds.html).




More information about the gstreamer-devel mailing list