GstGLDisplay

GstGLDisplay — window system display connection abstraction

Synopsis

#define             GST_GL_DISPLAY_CONTEXT_TYPE
enum                GstGLDisplayType;
                    GstGLDisplay;
GstGLDisplay *      gst_gl_display_new                  (void);
GstGLDisplayType    gst_gl_display_get_handle_type      (GstGLDisplay *display);
gboolean            gst_context_get_gl_display          (GstContext *context,
                                                         GstGLDisplay **display);
void                gst_context_set_gl_display          (GstContext *context,
                                                         GstGLDisplay *display);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstGLDisplay

Description

GstGLDisplay represents a connection to the underlying windowing system. Elements are required to make use of GstContext to share and propogate a GstGLDisplay.

There are a number of environment variables that influence the choice of platform and window system specific functionality.

  • GST_GL_WINDOW influences the window system to use. Common values are 'x11', 'wayland', 'win32' or 'cocoa'.

  • GST_GL_PLATFORM influences the OpenGL platform to use. Common values are 'egl', 'glx', 'wgl' or 'cgl'.

  • GST_GL_API influences the OpenGL API requested by the OpenGL platform. Common values are 'opengl' and 'gles2'.

Note

Certain window systems require a special function to be called to initialize threading support. As this GStreamer GL library does not preclude concurrent access to the windowing system, it is strongly advised that applications ensure that threading support has been initialized before any other toolkit/library functionality is accessed. Failure to do so could result in sudden application abortion during execution. The most notably example of such a function is X11's XInitThreads().

Details

GST_GL_DISPLAY_CONTEXT_TYPE

#define GST_GL_DISPLAY_CONTEXT_TYPE "gst.gl.GLDisplay"

enum GstGLDisplayType

typedef enum {
  GST_GL_DISPLAY_TYPE_NONE = 0,
  GST_GL_DISPLAY_TYPE_X11 = (1 << 0),
  GST_GL_DISPLAY_TYPE_WAYLAND = (1 << 1),
  GST_GL_DISPLAY_TYPE_COCOA = (1 << 2),
  GST_GL_DISPLAY_TYPE_WIN32 = (1 << 3),
  GST_GL_DISPLAY_TYPE_DISPMANX = (1 << 4),
  GST_GL_DISPLAY_TYPE_EGL = (1 << 5),

  GST_GL_DISPLAY_TYPE_ANY = G_MAXUINT32
} GstGLDisplayType;

GST_GL_DISPLAY_TYPE_NONE

GST_GL_DISPLAY_TYPE_X11

GST_GL_DISPLAY_TYPE_WAYLAND

GST_GL_DISPLAY_TYPE_COCOA

GST_GL_DISPLAY_TYPE_WIN32

GST_GL_DISPLAY_TYPE_DISPMANX

GST_GL_DISPLAY_TYPE_EGL

GST_GL_DISPLAY_TYPE_ANY


GstGLDisplay

typedef struct _GstGLDisplay GstGLDisplay;

The contents of a GstGLDisplay are private and should only be accessed through the provided API


gst_gl_display_new ()

GstGLDisplay *      gst_gl_display_new                  (void);

Returns :

a new GstGLDisplay. [transfer full]

Since 1.4


gst_gl_display_get_handle_type ()

GstGLDisplayType    gst_gl_display_get_handle_type      (GstGLDisplay *display);

display :

a GstGLDisplay

Returns :

the GstGLDisplayType of display

Since 1.4


gst_context_get_gl_display ()

gboolean            gst_context_get_gl_display          (GstContext *context,
                                                         GstGLDisplay **display);

context :

a GstContext

display :

resulting GstGLDisplay

Returns :

Whether display was in context

Since 1.4


gst_context_set_gl_display ()

void                gst_context_set_gl_display          (GstContext *context,
                                                         GstGLDisplay *display);

Sets display on context

context :

a GstContext

display :

resulting GstGLDisplay

Since 1.4

See Also

GstContext, GstGLContext, GstGLWindow