libgpac
Documentation of the core library of GPAC
GF_FilterFrameInterface Struct Reference

#include <filters.h>

Data Fields

GF_Err(* get_plane )(struct _gf_filter_frame_interface *frame, u32 plane_idx, const u8 **outPlane, u32 *outStride)
 
GF_Err(* get_gl_texture )(struct _gf_filter_frame_interface *frame, u32 plane_idx, u32 *gl_tex_format, u32 *gl_tex_id, GF_Matrix_unexposed *texcoordmatrix)
 
u32 flags
 
void * user_data
 

Detailed Description

Frame interface object

The frame interface object can be used to expose an interface between the packet generated by a filter and its consumers, when dispatching a regular data block is not possible. This is typically used by decoders exposing the output image planes or by OpenGL filters outputing textures. Currently only video frames use this interface object.

Field Documentation

◆ get_plane

GF_Err(* GF_FilterFrameInterface::get_plane) (struct _gf_filter_frame_interface *frame, u32 plane_idx, const u8 **outPlane, u32 *outStride)

get video frame plane

Parameters
frameinterface object for the video frame
plane_idxplane index, 0: Y or full plane, 1: U or UV plane, 2: V plane
outPlaneaddress of target color plane
outStridestride in bytes of target color plane
Returns
error code if any

◆ get_gl_texture

GF_Err(* GF_FilterFrameInterface::get_gl_texture) (struct _gf_filter_frame_interface *frame, u32 plane_idx, u32 *gl_tex_format, u32 *gl_tex_id, GF_Matrix_unexposed *texcoordmatrix)

get video frame plane texture

Parameters
frameinterface object for the video frame
plane_idxplane index, 0: Y or full plane, 1: U or UV plane, 2: V plane
gl_tex_formatGL texture format used
gl_tex_idGL texture ID used
texcoordmatrixtexture transform to fill. The texture is expected to be layed out as an image (first pixel is top-first). If not the case, add a vertical flip (eg dispatching an OpenGL FBO).
Returns
error code if any

◆ flags

u32 GF_FilterFrameInterface::flags

Flags for this frame interface.

◆ user_data

void* GF_FilterFrameInterface::user_data

private space for the emitting filter, consumers shall not modify this