VLC 4.0.0-dev
Loading...
Searching...
No Matches
vlc_gl_interop_ops Struct Reference

#include <vlc_opengl_interop.h>

Data Fields

int(* allocate_textures )(const struct vlc_gl_interop *interop, uint32_t textures[], const int32_t tex_width[], const int32_t tex_height[])
 Callback to allocate data for bound textures.
 
void(* deallocate_textures )(const struct vlc_gl_interop *interop, uint32_t textures[])
 Callback to deallocate data for bound texture.
 
int(* update_textures )(const struct vlc_gl_interop *interop, uint32_t textures[], const int32_t tex_width[], const int32_t tex_height[], picture_t *pic, const size_t plane_offsets[])
 Callback to update a picture.
 
const float *(* get_transform_matrix )(const struct vlc_gl_interop *interop)
 Callback to retrieve the transform matrix to apply to texture coordinates.
 
void(* close )(struct vlc_gl_interop *interop)
 Called before the interop is destroyed.
 

Field Documentation

◆ allocate_textures

int(* vlc_gl_interop_ops::allocate_textures) (const struct vlc_gl_interop *interop, uint32_t textures[], const int32_t tex_width[], const int32_t tex_height[])

Callback to allocate data for bound textures.

This function pointer can be NULL. Software converters should call glTexImage2D() to allocate textures data (it will be deallocated by the caller when calling glDeleteTextures()). Won't be called if handle_texs_gen is true.

Parameters
interopthe OpenGL interop
texturesarray of textures to bind (one per plane)
tex_widtharray of tex width (one per plane)
tex_heightarray of tex height (one per plane)
Returns
VLC_SUCCESS or a VLC error

◆ close

void(* vlc_gl_interop_ops::close) (struct vlc_gl_interop *interop)

Called before the interop is destroyed.

This function pointer can be NULL.

Parameters
interopthe OpenGL interop

◆ deallocate_textures

void(* vlc_gl_interop_ops::deallocate_textures) (const struct vlc_gl_interop *interop, uint32_t textures[])

Callback to deallocate data for bound texture.

This function pointer can be NULL. it will be called before calling glDeleteTextures

Parameters
interopthe OpenGL interop
texturesarray of textures to bind (one per plane)

◆ get_transform_matrix

const float *(* vlc_gl_interop_ops::get_transform_matrix) (const struct vlc_gl_interop *interop)

Callback to retrieve the transform matrix to apply to texture coordinates.

This function pointer can be NULL. If it is set, it may return NULL.

Otherwise, it must return a 2x3 matrix, as an array of 6 floats in column-major order.

This transform matrix maps 2D homogeneous texture coordinates of the form (s, t, 1) with s and t in the inclusive range [0, 1] to the texture coordinate that should be used to sample that location from the texture.

The returned pointer is owned by the converter module, and must not be freed before the module is closed.

Parameters
interopthe OpenGL interop
Returns
a 2x3 transformation matrix (possibly NULL)

◆ update_textures

int(* vlc_gl_interop_ops::update_textures) (const struct vlc_gl_interop *interop, uint32_t textures[], const int32_t tex_width[], const int32_t tex_height[], picture_t *pic, const size_t plane_offsets[])

Callback to update a picture.

This function pointer cannot be NULL. The implementation should upload every planes of the picture.

Parameters
interopthe OpenGL interop
texturesarray of textures to bind (one per plane)
tex_widtharray of tex width (one per plane)
tex_heightarray of tex height (one per plane)
picpicture to update
plane_offsetoffsets of each picture planes to read data from (one per plane, can be NULL)
Returns
VLC_SUCCESS or a VLC error

The documentation for this struct was generated from the following file: