Top | ![]() |
![]() |
![]() |
![]() |
GstVaapiWindow * | gst_vaapi_window_glx_new () |
GstVaapiWindow * | gst_vaapi_window_glx_new_with_xid () |
GLXContext | gst_vaapi_window_glx_get_context () |
gboolean | gst_vaapi_window_glx_set_context () |
gboolean | gst_vaapi_window_glx_make_current () |
void | gst_vaapi_window_glx_swap_buffers () |
gboolean | gst_vaapi_window_glx_put_texture () |
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.
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.
GLXContext
gst_vaapi_window_glx_get_context (GstVaapiWindowGLX *window
);
Returns the GLXContext bound to the window
.
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.
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.
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()
.
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.