GstVaapiTextureGLX: GStreamer VA-API Plugins 1.4 Library Reference Manual

## GstVaapiTextureGLX GstVaapiTextureGLX — VA/GLX texture abstraction |

## Functions

GstVaapiTexture * | gst_vaapi_texture_glx_new ()
GstVaapiTexture * | gst_vaapi_texture_glx_new_wrapped ()

## Description

## Functions

### gst_vaapi_texture_glx_new ()

    GstVaapiTexture *
    gst_vaapi_texture_glx_new (GstVaapiDisplay *display,
                               guint target,
                               guint format,
                               guint width,
                               guint height);

Creates a texture with the specified dimensions, `target` and `format` . Note that only GL_TEXTURE_2D `target` and GL_RGBA or GL_BGRA formats are supported at this time.

The application shall maintain the live GL context itself. That is, `gst_vaapi_window_glx_make_current()` must be called beforehand, or any other function like `glXMakeCurrent()` if the context is managed outside of this library.

#### Parameters

display | a GstVaapiDisplay |
target | the target to which the texture is bound |
format | the format of the pixel data |
width | the requested width, in pixels |
height | the requested height, in pixels |

#### Returns

the newly created GstVaapiTexture object

### gst_vaapi_texture_glx_new_wrapped ()

    GstVaapiTexture *
    gst_vaapi_texture_glx_new_wrapped (GstVaapiDisplay *display,
                                       guint id,
                                       guint target,
                                       guint format);

Creates a texture from an existing GL texture, with the specified `target` and `format` . Note that only GL_TEXTURE_2D `target` and GL_RGBA or GL_BGRA formats are supported at this time. The dimensions will be retrieved from the `texture_id` .

The application shall maintain the live GL context itself. That is, `gst_vaapi_window_glx_make_current()` must be called beforehand, or any other function like `glXMakeCurrent()` if the context is managed outside of this library.

#### Parameters

display | a GstVaapiDisplay |
target | the target to which the texture is bound |
format | the format of the pixel data |

#### Returns

the newly created GstVaapiTexture object

## Types and Values