After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703445 - GstGLWindow's send_message is not reentrant
GstGLWindow's send_message is not reentrant
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-gl
git master
Other Linux
: Normal enhancement
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-07-02 07:30 UTC by Matthew Waters (ystreet00)
Modified: 2013-07-02 20:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: make reentrant (1008 bytes, patch)
2013-07-02 08:35 UTC, Matthew Waters (ystreet00)
committed Details | Review
x11: use GMainContext to be reentrant (17.60 KB, patch)
2013-07-02 12:09 UTC, Matthew Waters (ystreet00)
committed Details | Review
don't call NULL pointers (1.43 KB, patch)
2013-07-02 12:54 UTC, Matthew Waters (ystreet00)
committed Details | Review

Description Matthew Waters (ystreet00) 2013-07-02 07:30:36 UTC
Being reentrant allows us to send messages from the GL thread and allows us to remove the _thread () variants of the API.  Using GMainContext for the window loop would allow us to do this. See g_main_context_invoke.
Comment 1 Sebastian Dröge (slomo) 2013-07-02 08:03:35 UTC
Using a GMainContext/GMainLoop for all the loops would also simplify a lot of code probably.

Why exactly is send_message not reentrant current?
Comment 2 Matthew Waters (ystreet00) 2013-07-02 08:34:23 UTC
(In reply to comment #1)
> Using a GMainContext/GMainLoop for all the loops would also simplify a lot of
> code probably.
> 
> Why exactly is send_message not reentrant current?

No idea.  I got it like that :).
Comment 3 Matthew Waters (ystreet00) 2013-07-02 08:35:13 UTC
Created attachment 248206 [details] [review]
wayland: make reentrant
Comment 4 Sebastian Dröge (slomo) 2013-07-02 08:39:33 UTC
Ah the question was what exactly the problem is... the patch answers that :)

commit b40b78ccb57bc29e72ac739114ca5256d12e57ff
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Tue Jul 2 18:33:42 2013 +1000

    wayland: make reentrant
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703445
Comment 5 Matthew Waters (ystreet00) 2013-07-02 08:42:33 UTC
There are still the other backends to consider (x11, win32, cocoa). At the moment I'm working on the x11 one.
Comment 6 Matthew Waters (ystreet00) 2013-07-02 12:09:11 UTC
Created attachment 248213 [details] [review]
x11: use GMainContext to be reentrant
Comment 7 Matthew Waters (ystreet00) 2013-07-02 12:54:09 UTC
Created attachment 248217 [details] [review]
don't call NULL pointers

Side Note:
The Cocoa and Win32 backends are already reentrant but do not use GMainContext/GMainLoop.
Comment 8 Sebastian Dröge (slomo) 2013-07-02 20:35:20 UTC
Also makes the code *much* more readable and simpler :)

commit 47b5ff7b35decdd54194994b35927aebcb74882f
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Tue Jul 2 22:45:08 2013 +1000

    window: don't call a NULL destroy function

commit 9c4cd9abcfdaf75c8b223af8169e1a97aad47b01
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Tue Jul 2 22:06:03 2013 +1000

    x11: use GMainContext/GMainLoop
    
    allows us to be reentrant
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703445