libgpac
Documentation of the core library of GPAC
MPEG-4 LASER

MPEG-4 LASeR encoding and decoding. More...

+ Collaboration diagram for MPEG-4 LASER:

Typedefs

typedef struct __tag_laser_codec GF_LASeRCodec
 

Functions

GF_LASeRCodecgf_laser_decoder_new (GF_SceneGraph *scenegraph)
 
void gf_laser_decoder_del (GF_LASeRCodec *codec)
 
void gf_laser_decoder_set_clock (GF_LASeRCodec *codec, Double(*GetSceneTime)(void *st_cbk), void *st_cbk)
 
GF_Err gf_laser_decoder_configure_stream (GF_LASeRCodec *codec, u16 ESID, u8 *DecoderSpecificInfo, u32 DecoderSpecificInfoLength)
 
GF_Err gf_laser_decoder_remove_stream (GF_LASeRCodec *codec, u16 ESID)
 
GF_Err gf_laser_decode_au (GF_LASeRCodec *codec, u16 ESID, const u8 *data, u32 data_length)
 
GF_Err gf_laser_decode_command_list (GF_LASeRCodec *codec, u16 ESID, u8 *data, u32 data_length, GF_List *com_list)
 
Bool gf_laser_decode_has_conditionnals (GF_LASeRCodec *codec)
 
GF_LASeRCodecgf_laser_encoder_new (GF_SceneGraph *scenegraph)
 
void gf_laser_encoder_del (GF_LASeRCodec *codec)
 
GF_Err gf_laser_encoder_new_stream (GF_LASeRCodec *codec, u16 ESID, GF_LASERConfig *cfg)
 
GF_Err gf_laser_encode_au (GF_LASeRCodec *codec, u16 ESID, GF_List *command_list, Bool reset_encoding_context, u8 **out_data, u32 *out_data_length)
 
GF_Err gf_laser_encoder_get_config (GF_LASeRCodec *codec, u16 ESID, u8 **out_data, u32 *out_data_length)
 
GF_Err gf_laser_encoder_get_rap (GF_LASeRCodec *codec, u8 **out_data, u32 *out_data_length)
 

Detailed Description

This section documents the LASeR encoding and decoding functions of the GPAC framework. For scene graph documentation, check scenegraph.h

Typedef Documentation

◆ GF_LASeRCodec

typedef struct __tag_laser_codec GF_LASeRCodec

a LASeR codec

Function Documentation

◆ gf_laser_decoder_new()

GF_LASeRCodec* gf_laser_decoder_new ( GF_SceneGraph scenegraph)

creates a new LASeR decoder

Parameters
scenegraphthe scenegraph on which the decoder operates
Returns
a newly allocated LASeR decoder

◆ gf_laser_decoder_del()

void gf_laser_decoder_del ( GF_LASeRCodec codec)

destroys a LASeR decoder

Parameters
codecthe target LASeR decoder

◆ gf_laser_decoder_set_clock()

void gf_laser_decoder_set_clock ( GF_LASeRCodec codec,
Double(*)(void *st_cbk)  GetSceneTime,
void *  st_cbk 
)

sets the scene time. Scene time is the real clock of the bifs stream in secs

Parameters
codecthe target LASeR decoder
GetSceneTimethe scene clock query callback function
st_cbkopaque data for the callback function

◆ gf_laser_decoder_configure_stream()

GF_Err gf_laser_decoder_configure_stream ( GF_LASeRCodec codec,
u16  ESID,
u8 DecoderSpecificInfo,
u32  DecoderSpecificInfoLength 
)

sets up a stream

Parameters
codecthe target LASeR decoder
ESIDthe ESID of the stream
DecoderSpecificInfothe decoder configuration data of the LASeR stream
DecoderSpecificInfoLengththe size in bytes of the decoder configuration data
Returns
error if any

◆ gf_laser_decoder_remove_stream()

GF_Err gf_laser_decoder_remove_stream ( GF_LASeRCodec codec,
u16  ESID 
)

removes a stream

Parameters
codecthe target LASeR decoder
ESIDthe ESID of the stream
Returns
error if any

◆ gf_laser_decode_au()

GF_Err gf_laser_decode_au ( GF_LASeRCodec codec,
u16  ESID,
const u8 data,
u32  data_length 
)

decodes a LASeR AU and applies it to the graph (non-memory mode only)

Parameters
codecthe target LASeR decoder
ESIDthe ESID of the stream
datathe access unit payload
data_lengththe access unit size in bytes
Returns
error if any

◆ gf_laser_decode_command_list()

GF_Err gf_laser_decode_command_list ( GF_LASeRCodec codec,
u16  ESID,
u8 data,
u32  data_length,
GF_List com_list 
)

decodes a LASeR AU in memory - fills the command list with the content of the AU - cf scenegraph_vrml.h for commands usage

Parameters
codecthe target LASeR decoder
ESIDthe ESID of the stream
datathe access unit payload
data_lengththe access unit size in bytes
com_lista list to be filled with decoded commands
Returns
error if any

◆ gf_laser_decode_has_conditionnals()

Bool gf_laser_decode_has_conditionnals ( GF_LASeRCodec codec)

checks if a LASeR decoder has associated conditionnals

Parameters
codecthe target LASeR decoder
Returns
GF_TRUE if conditionnals are attached to this decoder

◆ gf_laser_encoder_new()

GF_LASeRCodec* gf_laser_encoder_new ( GF_SceneGraph scenegraph)

creates a new LASeR encoder

Parameters
scenegraphthe scenegraph on which the encoder operates
Returns
a newly allocated LASeR encoder

◆ gf_laser_encoder_del()

void gf_laser_encoder_del ( GF_LASeRCodec codec)

destroys a LASeR encoder

Parameters
codecthe target LASeR encoder

◆ gf_laser_encoder_new_stream()

GF_Err gf_laser_encoder_new_stream ( GF_LASeRCodec codec,
u16  ESID,
GF_LASERConfig cfg 
)

sets up a destination stream

Parameters
codecthe target LASeR encoder
ESIDthe ID of the stream
cfgthe LASeR configuration descriptor
Returns
error if any

◆ gf_laser_encode_au()

GF_Err gf_laser_encode_au ( GF_LASeRCodec codec,
u16  ESID,
GF_List command_list,
Bool  reset_encoding_context,
u8 **  out_data,
u32 out_data_length 
)

encodes a list of commands for the given stream in the output buffer - data is dynamically allocated for output

Parameters
codecthe target LASeR encoder
ESIDthe ID of the stream
command_lista list of commands to encode
reset_encoding_contextif GF_TRUE, resets all color and font tables of LASeR streams (used for clean RAPs)
out_dataset to an allocated buffer containing the encoded AU - shall be destroyed by caller
out_data_lengthset to the size of the encoded AU
Returns
error if any

◆ gf_laser_encoder_get_config()

GF_Err gf_laser_encoder_get_config ( GF_LASeRCodec codec,
u16  ESID,
u8 **  out_data,
u32 out_data_length 
)

gets a stream encoded config description

Parameters
codecthe target LASeR encoder
ESIDthe ID of the stream
out_dataset to an allocated buffer containing the encoded configuration - shall be destroyed by caller
out_data_lengthset to the size of the encoded configuration
Returns
error if any

◆ gf_laser_encoder_get_rap()

GF_Err gf_laser_encoder_get_rap ( GF_LASeRCodec codec,
u8 **  out_data,
u32 out_data_length 
)

encodes current graph as a scene replace

Parameters
codecthe target LASeR encoder
out_dataset to an allocated buffer containing the encoded scene replace AU - shall be destroyed by caller
out_data_lengthset to the size of the encoded AU
Returns
error if any