[Bug 750308] New: Extract GstGLSurface and GstGLMessageLoop from GstGLWindow

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jun 2 15:53:19 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=750308

            Bug ID: 750308
           Summary: Extract GstGLSurface and GstGLMessageLoop from
                    GstGLWindow
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: julien.isorce at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

I would like to start discussion about refactoring GstGLWindow.

Currently our offscreen surface support is handled through a GstGLWindow. For
example when an upstream element (or the app) provides a gl context (i.e.:
->other_context) then the GstGLWindowX11 is "->open" but not created
(http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/gst-libs/gst/gl/egl/gstglcontext_egl.c#n392).
It is confusing.

We could have GstGLWindow and a new GstGLOffScreenSurface deriving from a new
GstGLSurface.

Except for egl we currently do not have implementation for offscreen surface
with glx or cgl (It could be done through PBufferSurface) So currently these
surfaces are hidden windows.

So either we implement these 2 missing bits or we can also simply have a
GstGLSurface being offscreen in its default implementation. Then
GstGLWindow_X11 will override "->is_offscreen()" and "->create".

Also for the current GstGLWindow's GMainContext/GMainLoop (for gl thread) we
should probably have a new object GstGLMessageLoop. A GstGLContext will own a
GstGLMessageLoop (or name it as GstGLThread).
This change will allow us to handle offscreen surface properly.

(Note that
http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c5f8c789a3b87c01529b9298c1940e2b08fe4c66
can be done for all other backend: win32, wayland, dispmanx, cocoa)

GstGLWindow will own the navigation_GThread/_GMainContext/_GMainLoop.

GstGLWindow_X11/_Win32/_Cocoa/.. will create the window, attach a GSource, qnd
implement GstVideoOverlay (i.e. set_window_handle / navigation)

In glimagesink, the call to gst_gl_window_draw will be replaced by a new
function gst_gl_surface_draw.

gst_gl_context_thread_add will be replaced by a new gst_gl_message_loop_invoke.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list