MPEG-4 BIFS encoding and decoding.
More...
|
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) |
|
This section documents the BIFS encoding and decoding of the GPAC framework. For scene graph documentation, check scenegraph.h
◆ gf_bifs_decoder_new()
GF_BifsDecoder* gf_bifs_decoder_new |
( |
GF_SceneGraph * |
scenegraph, |
|
|
Bool |
command_dec |
|
) |
| |
creates a new BIFS decoder
- Parameters
-
scenegraph | the scene graph on which the decoder operates |
command_dec | if 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
◆ gf_bifs_decoder_del()
void gf_bifs_decoder_del |
( |
GF_BifsDecoder * |
codec | ) |
|
destroys a BIFS decoder
- Parameters
-
codec | the decoder to destroy |
◆ 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
-
codec | the BIFS decoder to use |
ESID | the ESID of the stream |
DecoderSpecificInfo | the decoder config of the stream |
DecoderSpecificInfoLength | the size of the decoder config of the stream |
objectTypeIndication | the object type indication for this stream |
- Returns
- error if any
◆ 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
-
codec | the BIFS decoder to use |
ESID | the ESID of the stream |
data | the compressed BIFS access unit |
data_length | the size of the compressed BIFS access unit |
ts_offset | the time in seconds of the access unit since the start of the scene |
- Returns
- error if any
◆ 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
-
codec | the BIFS decoder to use |
ESID | the ESID of the stream |
data | the compressed BIFS access unit |
data_length | the size of the compressed BIFS access unit |
com_list | list object to retrieve the list of decoded commands |
- Returns
- error if any
◆ gf_bifs_decode_has_conditionnals()
Bool gf_bifs_decode_has_conditionnals |
( |
GF_BifsDecoder * |
codec | ) |
|
checks if conditionnals have been defined for the decoder
- Parameters
-
codec | the BIFS decoder to check |
- Returns
- GF_TRUE if the decoder has conditionnal nodes attached
◆ gf_bifs_encoder_new()
GF_BifsEncoder* gf_bifs_encoder_new |
( |
GF_SceneGraph * |
graph | ) |
|
creates a new BIFS encoder
- Parameters
-
graph | the scene graph being encoded |
- Returns
- a new BIFS encoder, NULL if error
◆ gf_bifs_encoder_del()
void gf_bifs_encoder_del |
( |
GF_BifsEncoder * |
codec | ) |
|
destroys a BIFS encoder
- Parameters
-
◆ gf_bifs_encoder_new_stream()
configures a new destination stream
- Parameters
-
codec | the BIFS encoder to use |
ESID | the ESID of the created stream |
cfg | object describing the configuration of the stream |
encodeNames | if set, names of nodes with IDs will be encoded (as strings) |
has_predictive | set to GF_TRUE if the stream uses predictive field coding |
- Returns
- error if any
◆ 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
-
codec | the BIFS encoder to use |
ESID | the ESID of the stream owning the command list |
command_list | the list of commands to encode |
out_data | set to the allocated output buffer, to be freed by the caller |
out_data_length | set to the size of the allocated output buffer |
- Returns
- error if any
◆ 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
-
codec | the BIFS encoder to use |
ESID | the ESID of the stream |
out_data | set to the allocated output buffer, to be freed by the caller |
out_data_length | set to the size of the allocated output buffer |
- Returns
- error if any
◆ 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
-
codec | the BIFS encoder to use |
ESID | the ESID of the stream |
- Returns
- BIFS version used
◆ 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
-
codec | the BIFS encoder to use |
out_data | set to the allocated output buffer, to be freed by the caller |
out_data_length | set to the size of the allocated output buffer |
- Returns
- error if any
◆ 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
-
codec | the BIFS encoder to use |
src_url | URL (parent directory or source file) of content being encoded |
- Returns
- error if any