GstVaapiTexture

GstVaapiTexture — VA/GLX texture abstraction

Functions

Types and Values

Description

Functions

gst_vaapi_texture_new ()

GstVaapiTexture *
gst_vaapi_texture_new (GstVaapiDisplay *display,
                       GLenum target,
                       GLenum 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_new_with_texture ()

GstVaapiTexture *
gst_vaapi_texture_new_with_texture (GstVaapiDisplay *display,
                                    GLuint texture_id,
                                    GLenum target,
                                    GLenum 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

 

texture_id

the foreign GL texture name to use

 

target

the target to which the texture is bound

 

format

the format of the pixel data

 

Returns

the newly created GstVaapiTexture object


gst_vaapi_texture_get_id ()

GLuint
gst_vaapi_texture_get_id (GstVaapiTexture *texture);

Returns the underlying texture id of the texture .

Parameters

texture

a GstVaapiTexture

 

Returns

the underlying texture id of the texture


gst_vaapi_texture_get_target ()

GLenum
gst_vaapi_texture_get_target (GstVaapiTexture *texture);

Returns the texture target type

Parameters

texture

a GstVaapiTexture

 

Returns

the texture target


gst_vaapi_texture_get_format ()

GLenum
gst_vaapi_texture_get_format (GstVaapiTexture *texture);

Returns the texture format

Parameters

texture

a GstVaapiTexture

 

Returns

the texture format


gst_vaapi_texture_get_width ()

guint
gst_vaapi_texture_get_width (GstVaapiTexture *texture);

Returns the texture width.

Parameters

texture

a GstVaapiTexture

 

Returns

the texture width, in pixels


gst_vaapi_texture_get_height ()

guint
gst_vaapi_texture_get_height (GstVaapiTexture *texture);

Returns the texture height.

Parameters

texture

a GstVaapiTexture

 

Returns

the texture height, in pixels.


gst_vaapi_texture_get_size ()

void
gst_vaapi_texture_get_size (GstVaapiTexture *texture,
                            guint *pwidth,
                            guint *pheight);

Retrieves the dimensions of a GstVaapiTexture.

Parameters

texture

a GstVaapiTexture

 

pwidth

return location for the width, or NULL

 

pheight

return location for the height, or NULL

 

gst_vaapi_texture_put_surface ()

gboolean
gst_vaapi_texture_put_surface (GstVaapiTexture *texture,
                               GstVaapiSurface *surface,
                               guint flags);

Renders the surface into the àtexture. The flags specify how de-interlacing (if needed), color space conversion, scaling and other postprocessing transformations are performed.

Parameters

texture

a GstVaapiTexture

 

surface

a GstVaapiSurface

 

flags

postprocessing flags. See GstVaapiTextureRenderFlags

 

Returns

TRUE on success

Types and Values

GstVaapiTexture

typedef struct _GstVaapiTexture GstVaapiTexture;

Base object for system-dependent textures.