VLC 4.0.0-dev
|
#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. | |
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.
interop | the OpenGL interop |
textures | array of textures to bind (one per plane) |
tex_width | array of tex width (one per plane) |
tex_height | array of tex height (one per plane) |
void(* vlc_gl_interop_ops::close) (struct vlc_gl_interop *interop) |
Called before the interop is destroyed.
This function pointer can be NULL.
interop | the OpenGL interop |
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
interop | the OpenGL interop |
textures | array of textures to bind (one per plane) |
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.
interop | the OpenGL interop |
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.
interop | the OpenGL interop |
textures | array of textures to bind (one per plane) |
tex_width | array of tex width (one per plane) |
tex_height | array of tex height (one per plane) |
pic | picture to update |
plane_offset | offsets of each picture planes to read data from (one per plane, can be NULL) |