[gst-devel] glimagesink and mutexes

Alexandre Quessy alexandre at quessy.net
Thu Jun 3 20:09:15 CEST 2010


Hello,
I have an application that uses the glimagesink and gdkpixufsink
elements to display the live input from a camera, and to record and
dispay the images to and from a list of file names.

It appears that allocating and freeing memory from different threads
causes crashes. Of course! I need to protect that with mutexes.

How can I do so? Anyone has an working example?

The source code of my project can be found at
http://bitbucket.org/aalex/toonloop1/src/4269867d1598
(it's in the Mercurial branch "2.0")
The files that are the culprits are src/gui.cpp and src/pipeline.cpp.
Right now, the threads are:
 * glimagesink's drawCallback thread
 * the GTK+ mainloop (in which I catch keyboard events)
 * some other threads.

Any help will be much apreciated!

Thanks a lot.
Alexandre

-- 
Alexandre Quessy
http://alexandre.quessy.net/




More information about the gstreamer-devel mailing list