[gst-devel] [gst-cvs] ensonic gst-plugins-good: gst-plugins-good/ gst-plugins-good/tests/examples/spectrum/

Stefan Kost ensonic at hora-obscura.de
Tue Jan 27 22:20:10 CET 2009


Sebastian Dröge schrieb:
> Am Sonntag, den 10.08.2008, 12:35 -0700 schrieb
> ensonic at kemper.freedesktop.org:
>> CVS Root:       /cvs/gstreamer
>> Module:         gst-plugins-good
>> Changes by:     ensonic
>> Date:           Sun Aug 10 2008  19:35:19 UTC
>>
>> Log message:
>> 	* tests/examples/spectrum/demo-audiotest.c:
>> 	* tests/examples/spectrum/demo-osssrc.c:
>> 	  Demo how to draw analyzer results synced to the clock.
> 
> This is not a good idea as the drawing callback will be called
> from some random thread. On X11 you can put all the drawing
> code inside the Gdk lock but on Windows the application
> will simply die as it's simply not allowed there to do GUI
> stuff from outside the thread that runs the main loop.
> 
> I'll add the Gdk locking for now to make it work on X11 at
> least but maybe this change should be reverted :)
> 
> (On X11 it will sometimes kill the application with assertion
> failures inside libX11)


I actually recently fixed this in buzztard and now also fixed this in the
examples. Thanks for pointing out. I also added a comment to the API docs.
Honestly speaking we should come up with a saner API for this.
- a main loop source that syncs message delivery with the clock?
- just a utillity function for delaying the message, but preserving the context?

Stefan




More information about the gstreamer-devel mailing list