Live scene encoding engine with RAP generation support.
More...
|
GF_SceneEngine * | gf_seng_init (void *calling_object, char *inputContext, u32 load_type, char *dump_path, Bool embed_resources) |
|
u32 | gf_seng_get_stream_count (GF_SceneEngine *seng) |
|
GF_Err | gf_seng_get_stream_carousel_info (GF_SceneEngine *seng, u16 ESID, u32 *carousel_period, u16 *aggregate_on_es_id) |
|
GF_Err | gf_seng_get_stream_config (GF_SceneEngine *seng, u32 idx, u16 *ESID, const u8 **config, u32 *config_len, u32 *streamType, u32 *objectType, u32 *timeScale) |
|
GF_Err | gf_seng_encode_context (GF_SceneEngine *seng, gf_seng_callback callback) |
|
GF_Err | gf_seng_encode_from_file (GF_SceneEngine *seng, u16 ESID, Bool disable_aggregation, char *auFile, gf_seng_callback callback) |
|
GF_Err | gf_seng_encode_from_string (GF_SceneEngine *seng, u16 ESID, Bool disable_aggregation, char *auString, gf_seng_callback callback) |
|
GF_Err | gf_seng_save_context (GF_SceneEngine *seng, char *ctxFileName) |
|
GF_Err | gf_seng_enable_aggregation (GF_SceneEngine *seng, u16 ESID, u16 onESID) |
|
GF_Err | gf_seng_aggregate_context (GF_SceneEngine *seng, u16 ESID) |
|
void | gf_seng_terminate (GF_SceneEngine *seng) |
|
char * | gf_seng_get_base64_iod (GF_SceneEngine *seng) |
|
GF_Descriptor * | gf_seng_get_iod (GF_SceneEngine *seng) |
|
This section documents the live scene encoding tools of GPAC.
◆ GF_SceneEngine
scene encoding engine object
◆ gf_seng_callback
typedef void(* gf_seng_callback) (void *udta, u16 ESID, u8 *data, u32 size, u64 ts) |
callback function prototype for scene engine
◆ gf_seng_init()
GF_SceneEngine* gf_seng_init |
( |
void * |
calling_object, |
|
|
char * |
inputContext, |
|
|
u32 |
load_type, |
|
|
char * |
dump_path, |
|
|
Bool |
embed_resources |
|
) |
| |
creates a scene engine
- Parameters
-
calling_object | is the calling object on which call back will be called |
inputContext | is the name of a scene file (bt, xmt or mp4) to initialize the coding context |
load_type | is the preferred loader type for the content (e.g. SVG vs DIMS) |
dump_path | is the path where scenes are dumped |
embed_resources | indicates if images and scripts should be encoded inline with the content |
- Returns
- e scene engine object
◆ gf_seng_get_stream_count()
get the number of streams in the scene
- Parameters
-
seng | the target scene engine |
- Returns
- the number of streams
◆ gf_seng_get_stream_carousel_info()
gets carousel nformation for a stream
- Parameters
-
seng | the target scene engine |
ESID | ID of the stream to query |
carousel_period | set to the carousel_period in millisenconds |
aggregate_on_es_id | set to the target carousel stream ID |
- Returns
- error if any
◆ gf_seng_get_stream_config()
gets the stream decoder configuration
- Parameters
-
seng | the target scene engine |
idx | stream index |
ESID | set to the stream ID |
config | set to the encoded BIFS config (memory is not allocated) |
config_len | length of the buffer |
streamType | pointer to get stream type |
objectType | pointer to get object type |
timeScale | pointer to get time scale |
- Returns
- error if any
◆ gf_seng_encode_context()
Encodes the AU context which is not encoded when calling BENC_EncodeAUFromString/File. This should be called after Aggregate.
- Parameters
-
seng | the target scene engine |
callback | pointer on a callback function to get the result of the coding the AU using the current context |
- Returns
- error if any
◆ gf_seng_encode_from_file()
Encodes an AU from file
- Parameters
-
seng | the target scene engine |
ESID | target streams when no indication is present in the file (eg, no atES_ID ) |
disable_aggregation | do not aggregate the access unit on its target stream |
auFile | name of a file containing a description for an access unit (BT or XMT) |
callback | pointer on a callback function to get the result of the coding the AU using the current context |
- Returns
- error if any
◆ gf_seng_encode_from_string()
Encodes an AU from string
- Parameters
-
seng | the target scene engine |
ESID | target streams when no indication is present in the file (eg, no atES_ID ) |
disable_aggregation | do not aggregate the access unit on its target stream |
auString | a char string to encode (must one or several complete nodes in BT |
callback | pointer on a callback function to get the result of the coding the AU using the current context |
- Returns
- error if any
◆ gf_seng_save_context()
saves the live context to a file. Use BENC_AggregateCurrentContext before to save an aggregated context.
- Parameters
-
seng | the target scene engine |
ctxFileName | name of the file to save the current state of the BIFS scene to |
- Returns
- error if any
◆ gf_seng_enable_aggregation()
marks the stream as carrying its own "rap" in the first AU of the stream
- Parameters
-
seng | the target scene engine |
ESID | stream ID |
onESID | set stream aggragation on to the specified stream, or off if onESID is 0 |
- Returns
- error if any
◆ gf_seng_aggregate_context()
aggregates the current context of the seng, creates a scene replace
- Parameters
-
seng | the target scene engine |
ESID | stream ID. If not 0, only aggregate commands for this stream; otherwise aggregates for the all streams |
- Returns
- error if any
◆ gf_seng_terminate()
destroys the scene engine
- Parameters
-
seng | the target scene engine |
◆ gf_seng_get_base64_iod()
encodes the IOD for this scene engine into Base64
- Parameters
-
seng | the target scene engine |
- Returns
- the base64 encoded IOD, shall be freed by the caller
◆ gf_seng_get_iod()
returns the IOD for a scene engine
- Parameters
-
seng | the target scene engine |
- Returns
- the IOD object - shall be destroyed by caller