![]() |
![]() |
![]() |
GStreamer VA-API Plugins 0.10 Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
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);
GObject +----GstVaapiObject +----GstVaapiWindow +----GstVaapiWindowX11 +----GstVaapiWindowGLX
typedef struct _GstVaapiWindowGLX GstVaapiWindowGLX;
An X11 Window suitable for GLX rendering.
typedef struct { } GstVaapiWindowGLXClass;
An X11 Window suitable for GLX rendering.
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.
|
a GstVaapiDisplay |
|
the requested window width, in pixels |
|
the requested windo height, in pixels |
Returns : |
the newly allocated GstVaapiWindow object |
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.
|
a GstVaapiDisplay |
|
an X11 Window id |
Returns : |
the newly allocated GstVaapiWindow object |
GLXContext gst_vaapi_window_glx_get_context (GstVaapiWindowGLX *window);
Returns the GLXContext bound to the window
.
|
a GstVaapiWindowGLX |
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.
|
a GstVaapiWindowGLX |
|
a GLX context |
Returns : |
TRUE on success
|
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.
|
a GstVaapiWindowGLX |
Returns : |
TRUE on success
|
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()
.
|
a GstVaapiWindowGLX |
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.
|
a GstVaapiWindowGLX |
|
a GstVaapiTexture |
|
the sub-rectangle of the source texture to
extract and process. If NULL , the entire texture will be used.
|
|
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
|