GstVaapiWindowGLX

GstVaapiWindowGLX — VA/GLX window abstraction

Synopsis

                    GstVaapiWindowGLX;
                    GstVaapiWindowGLXClass;
GstVaapiWindow *    gst_vaapi_window_glx_new            (GstVaapiDisplay *display,
                                                         guint width,
                                                         guint height);
GstVaapiWindow *    gst_vaapi_window_glx_new_with_xid   (GstVaapiDisplay *display,
                                                         Window xid);
GLXContext          gst_vaapi_window_glx_get_context    (GstVaapiWindowGLX *window);
gboolean            gst_vaapi_window_glx_set_context    (GstVaapiWindowGLX *window,
                                                         GLXContext ctx);
gboolean            gst_vaapi_window_glx_make_current   (GstVaapiWindowGLX *window);
void                gst_vaapi_window_glx_swap_buffers   (GstVaapiWindowGLX *window);
gboolean            gst_vaapi_window_glx_put_texture    (GstVaapiWindowGLX *window,
                                                         GstVaapiTexture *texture,
                                                         const GstVaapiRectangle *src_rect,
                                                         const GstVaapiRectangle *dst_rect);

Object Hierarchy

  GObject
   +----GstVaapiObject
         +----GstVaapiWindow
               +----GstVaapiWindowX11
                     +----GstVaapiWindowGLX

Properties

  "glx-context"              gpointer              : Read / Write

Description

Details

GstVaapiWindowGLX

typedef struct _GstVaapiWindowGLX GstVaapiWindowGLX;

An X11 Window suitable for GLX rendering.


GstVaapiWindowGLXClass

typedef struct {
} GstVaapiWindowGLXClass;

An X11 Window suitable for GLX rendering.


gst_vaapi_window_glx_new ()

GstVaapiWindow *    gst_vaapi_window_glx_new            (GstVaapiDisplay *display,
                                                         guint width,
                                                         guint height);

Creates a window with the specified width and height. The window will be attached to the display and remains invisible to the user until gst_vaapi_window_show() is called.

display :

a GstVaapiDisplay

width :

the requested window width, in pixels

height :

the requested windo height, in pixels

Returns :

the newly allocated GstVaapiWindow object

gst_vaapi_window_glx_new_with_xid ()

GstVaapiWindow *    gst_vaapi_window_glx_new_with_xid   (GstVaapiDisplay *display,
                                                         Window xid);

Creates a GstVaapiWindow using the X11 Window xid. The caller still owns the window and must call XDestroyWindow() when all GstVaapiWindow references are released. Doing so too early can yield undefined behaviour.

display :

a GstVaapiDisplay

xid :

an X11 Window id

Returns :

the newly allocated GstVaapiWindow object

gst_vaapi_window_glx_get_context ()

GLXContext          gst_vaapi_window_glx_get_context    (GstVaapiWindowGLX *window);

Returns the GLXContext bound to the window.

window :

a GstVaapiWindowGLX

Returns :

the GLXContext bound to the window

gst_vaapi_window_glx_set_context ()

gboolean            gst_vaapi_window_glx_set_context    (GstVaapiWindowGLX *window,
                                                         GLXContext ctx);

Binds GLX context ctx to window. If ctx is non NULL, the caller is responsible to making sure it has compatible visual with that of the underlying X window. If ctx is NULL, a new context is created and the window owns it.

window :

a GstVaapiWindowGLX

ctx :

a GLX context

Returns :

TRUE on success

gst_vaapi_window_glx_make_current ()

gboolean            gst_vaapi_window_glx_make_current   (GstVaapiWindowGLX *window);

Makes the window GLX context the current GLX rendering context of the calling thread, replacing the previously current context if there was one.

window :

a GstVaapiWindowGLX

Returns :

TRUE on success

gst_vaapi_window_glx_swap_buffers ()

void                gst_vaapi_window_glx_swap_buffers   (GstVaapiWindowGLX *window);

Promotes the contents of the back buffer of window to become the contents of the front buffer of window. This simply is wrapper around glXSwapBuffers().

window :

a GstVaapiWindowGLX

gst_vaapi_window_glx_put_texture ()

gboolean            gst_vaapi_window_glx_put_texture    (GstVaapiWindowGLX *window,
                                                         GstVaapiTexture *texture,
                                                         const GstVaapiRectangle *src_rect,
                                                         const GstVaapiRectangle *dst_rect);

Renders the texture region specified by src_rect into the window region specified by dst_rect.

NOTE: only GL_TEXTURE_2D textures are supported at this time.

window :

a GstVaapiWindowGLX

texture :

a GstVaapiTexture

src_rect :

the sub-rectangle of the source texture to extract and process. If NULL, the entire texture will be used.

dst_rect :

the sub-rectangle of the destination window into which the texture is rendered. If NULL, the entire window will be used.

Returns :

TRUE on success

Property Details

The "glx-context" property

  "glx-context"              gpointer              : Read / Write

GLX context.