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

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

+ Collaboration diagram for MPEG-4 BIFS:

Functions

GF_BifsDecoder * gf_bifs_decoder_new (GF_SceneGraph *scenegraph, Bool command_dec)
 
void gf_bifs_decoder_del (GF_BifsDecoder *codec)
 
GF_Err gf_bifs_decoder_configure_stream (GF_BifsDecoder *codec, u16 ESID, u8 *DecoderSpecificInfo, u32 DecoderSpecificInfoLength, u32 objectTypeIndication)
 
GF_Err gf_bifs_decode_au (GF_BifsDecoder *codec, u16 ESID, const u8 *data, u32 data_length, Double ts_offset)
 
GF_Err gf_bifs_decode_command_list (GF_BifsDecoder *codec, u16 ESID, u8 *data, u32 data_length, GF_List *com_list)
 
Bool gf_bifs_decode_has_conditionnals (GF_BifsDecoder *codec)
 
GF_BifsEncoder * gf_bifs_encoder_new (GF_SceneGraph *graph)
 
void gf_bifs_encoder_del (GF_BifsEncoder *codec)
 
GF_Err gf_bifs_encoder_new_stream (GF_BifsEncoder *codec, u16 ESID, GF_BIFSConfig *cfg, Bool encodeNames, Bool has_predictive)
 
GF_Err gf_bifs_encode_au (GF_BifsEncoder *codec, u16 ESID, GF_List *command_list, u8 **out_data, u32 *out_data_length)
 
GF_Err gf_bifs_encoder_get_config (GF_BifsEncoder *codec, u16 ESID, u8 **out_data, u32 *out_data_length)
 
u8 gf_bifs_encoder_get_version (GF_BifsEncoder *codec, u16 ESID)
 
GF_Err gf_bifs_encoder_get_rap (GF_BifsEncoder *codec, u8 **out_data, u32 *out_data_length)
 
GF_Err gf_bifs_encoder_set_source_url (GF_BifsEncoder *codec, const char *src_url)
 

Detailed Description

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

Function Documentation

◆ gf_bifs_decoder_new()

GF_BifsDecoder* gf_bifs_decoder_new ( GF_SceneGraph *  scenegraph,
Bool  command_dec 
)

creates a new BIFS decoder

Parameters
scenegraphthe scene graph on which the decoder operates
command_decif set, the decoder will only work in memory mode (creating commands for the graph) otherwise the decoder will always apply commands while decoding them
Returns
a new BIFS decoder, NULL if error
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_decoder_del()

void gf_bifs_decoder_del ( GF_BifsDecoder *  codec)

destroys a BIFS decoder

Parameters
codecthe decoder to destroy
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_decoder_configure_stream()

GF_Err gf_bifs_decoder_configure_stream ( GF_BifsDecoder *  codec,
u16  ESID,
u8 DecoderSpecificInfo,
u32  DecoderSpecificInfoLength,
u32  objectTypeIndication 
)

sets up a new BIFS stream

Parameters
codecthe BIFS decoder to use
ESIDthe ESID of the stream
DecoderSpecificInfothe decoder config of the stream
DecoderSpecificInfoLengththe size of the decoder config of the stream
objectTypeIndicationthe object type indication for this stream
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_decode_au()

GF_Err gf_bifs_decode_au ( GF_BifsDecoder *  codec,
u16  ESID,
const u8 data,
u32  data_length,
Double  ts_offset 
)

decodes a BIFS access unit and applies it to the graph (non-memory mode only)

Parameters
codecthe BIFS decoder to use
ESIDthe ESID of the stream
datathe compressed BIFS access unit
data_lengththe size of the compressed BIFS access unit
ts_offsetthe time in seconds of the access unit since the start of the scene
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_decode_command_list()

GF_Err gf_bifs_decode_command_list ( GF_BifsDecoder *  codec,
u16  ESID,
u8 data,
u32  data_length,
GF_List *  com_list 
)

decodes a BIFS access unit in memory - cf scenegraph_vrml.h for commands usage

Parameters
codecthe BIFS decoder to use
ESIDthe ESID of the stream
datathe compressed BIFS access unit
data_lengththe size of the compressed BIFS access unit
com_listlist object to retrieve the list of decoded commands
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_decode_has_conditionnals()

Bool gf_bifs_decode_has_conditionnals ( GF_BifsDecoder *  codec)

checks if conditionnals have been defined for the decoder

Parameters
codecthe BIFS decoder to check
Returns
GF_TRUE if the decoder has conditionnal nodes attached
+ Here is the caller graph for this function:

◆ gf_bifs_encoder_new()

GF_BifsEncoder* gf_bifs_encoder_new ( GF_SceneGraph *  graph)

creates a new BIFS encoder

Parameters
graphthe scene graph being encoded
Returns
a new BIFS encoder, NULL if error
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_encoder_del()

void gf_bifs_encoder_del ( GF_BifsEncoder *  codec)

destroys a BIFS encoder

Parameters
codecthe BIFS encoder
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_encoder_new_stream()

GF_Err gf_bifs_encoder_new_stream ( GF_BifsEncoder *  codec,
u16  ESID,
GF_BIFSConfig cfg,
Bool  encodeNames,
Bool  has_predictive 
)

configures a new destination stream

Parameters
codecthe BIFS encoder to use
ESIDthe ESID of the created stream
cfgobject describing the configuration of the stream
encodeNamesif set, names of nodes with IDs will be encoded (as strings)
has_predictiveset to GF_TRUE if the stream uses predictive field coding
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_encode_au()

GF_Err gf_bifs_encode_au ( GF_BifsEncoder *  codec,
u16  ESID,
GF_List *  command_list,
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 the scenegraph used is the one described in SceneReplace command, hence scalable streams shall be encoded in time order

Parameters
codecthe BIFS encoder to use
ESIDthe ESID of the stream owning the command list
command_listthe list of commands to encode
out_dataset to the allocated output buffer, to be freed by the caller
out_data_lengthset to the size of the allocated output buffer
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_encoder_get_config()

GF_Err gf_bifs_encoder_get_config ( GF_BifsEncoder *  codec,
u16  ESID,
u8 **  out_data,
u32 out_data_length 
)

returns the encoded decoder configuration of a given stream

Parameters
codecthe BIFS encoder to use
ESIDthe ESID of the stream
out_dataset to the allocated output buffer, to be freed by the caller
out_data_lengthset to the size of the allocated output buffer
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_encoder_get_version()

u8 gf_bifs_encoder_get_version ( GF_BifsEncoder *  codec,
u16  ESID 
)

returns the BIFS version used by the encoder for a given stream

Parameters
codecthe BIFS encoder to use
ESIDthe ESID of the stream
Returns
BIFS version used
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_encoder_get_rap()

GF_Err gf_bifs_encoder_get_rap ( GF_BifsEncoder *  codec,
u8 **  out_data,
u32 out_data_length 
)

encodes current graph as a scene replacement command

Parameters
codecthe BIFS encoder to use
out_dataset to the allocated output buffer, to be freed by the caller
out_data_lengthset to the size of the allocated output buffer
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bifs_encoder_set_source_url()

GF_Err gf_bifs_encoder_set_source_url ( GF_BifsEncoder *  codec,
const char *  src_url 
)

sets the URL of the source content being encoded, used for opening relative path files in some nodes attributes

Parameters
codecthe BIFS encoder to use
src_urlURL (parent directory or source file) of content being encoded
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function: