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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Sebastian Dröge-7
Am Sonntag, den 10.08.2008, 12:35 -0700 schrieb
[hidden email]:
> 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)

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Sebastian Dröge-7
Am Dienstag, den 27.01.2009, 20:34 +0100 schrieb Sebastian Dröge:

> Am Sonntag, den 10.08.2008, 12:35 -0700 schrieb
> [hidden email]:
> > 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)
Actually taking the Gdk lock (gdk_threads_{enter,leave}()) won't
help much here:

(demo-audiotest:11717): Gdk-WARNING **: /tmp/buildd/gtk
+2.0-2.14.7/gdk/gdkwindow.c:1200: no preceding call to
gdk_window_begin_paint_region(), see documentation
demo-audiotest: ../../src/xcb_lock.c:33: _XCBUnlockDisplay: Zusicherung
»xcb_get_request_sent(dpy->xcb->connection) == dpy->request« nicht
erfüllt.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Stefan Sauer
In reply to this post by Sebastian Dröge-7
Sebastian Dröge schrieb:

> Am Sonntag, den 10.08.2008, 12:35 -0700 schrieb
> [hidden email]:
>> 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

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel