libgpac
Documentation of the core library of GPAC
LASeR SAF creation

LASeR SAF multiplexing. More...

+ Collaboration diagram for LASeR SAF creation:

Functions

GF_SAFMuxer * gf_saf_mux_new ()
 
void gf_saf_mux_del (GF_SAFMuxer *mux)
 
GF_Err gf_saf_mux_stream_add (GF_SAFMuxer *mux, u32 stream_id, u32 ts_res, u32 buffersize_db, u8 stream_type, u8 object_type, char *mime_type, char *dsi, u32 dsi_len, char *remote_url)
 
GF_Err gf_saf_mux_add_au (GF_SAFMuxer *mux, u32 stream_id, u32 CTS, char *data, u32 data_len, Bool is_rap)
 
GF_Err gf_saf_mux_for_time (GF_SAFMuxer *mux, u32 time_ms, Bool force_end_of_session, u8 **out_data, u32 *out_size)
 
void gf_media_get_video_timing (Double fps, u32 *timescale, u32 *ts_inc)
 
u32 gf_dolby_vision_level (u32 width, u32 height, u64 fps_num, u64 fps_den, u32 codecid)
 

Detailed Description

This section documents functions for LASeR SAF multiplexing.

Function Documentation

◆ gf_saf_mux_new()

GF_SAFMuxer* gf_saf_mux_new ( )
    Creates a new SAF Multiplexer
Returns
the SAF multiplexer object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_saf_mux_del()

void gf_saf_mux_del ( GF_SAFMuxer *  mux)
    SAF Multiplexer destructor
Parameters
muxthe SAF multiplexer object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_saf_mux_stream_add()

GF_Err gf_saf_mux_stream_add ( GF_SAFMuxer *  mux,
u32  stream_id,
u32  ts_res,
u32  buffersize_db,
u8  stream_type,
u8  object_type,
char *  mime_type,
char *  dsi,
u32  dsi_len,
char *  remote_url 
)

Adds a new stream in the SAF multiplex

Parameters
muxthe SAF multiplexer object
stream_idID of the SAF stream to create
ts_restimestamp resolution for AUs in this stream
buffersize_dbsize of decoding buffer in bytes
stream_typeMPEG-4 systems stream type of this stream
object_typeMPEG-4 systems object type indication of this stream
mime_typeMIME type for this stream, NULL if unknown
dsiDecoder specific info for this stream
dsi_lenspecific info size for this stream
remote_urlURL of the SAF stream if not embedded in the multiplex
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_saf_mux_add_au()

GF_Err gf_saf_mux_add_au ( GF_SAFMuxer *  mux,
u32  stream_id,
u32  CTS,
char *  data,
u32  data_len,
Bool  is_rap 
)

adds an AU to the given Warning, AU data will be freed by the multiplexer. AUs are NOT re-sorted by CTS, in order to enable audio interleaving.

Parameters
muxthe SAF multiplexer object
stream_idID of the SAF stream to remove
CTScomposition timestamp of the AU
datapayload of the AU
data_lenpayload size of the AU
is_rapset to GF_TRUE to signal a random access point
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_saf_mux_for_time()

GF_Err gf_saf_mux_for_time ( GF_SAFMuxer *  mux,
u32  time_ms,
Bool  force_end_of_session,
u8 **  out_data,
u32 out_size 
)

Gets the content of the multiplexer for the given time.

Parameters
muxthe SAF multiplexer object
time_mstarget mux time in ms
force_end_of_sessionif set to GF_TRUE, this flushes the SAF Session - no more operations will be allowed on the muxer
out_dataoutput SAF data
out_sizeoutput SAF data size
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_media_get_video_timing()

void gf_media_get_video_timing ( Double  fps,
u32 timescale,
u32 ts_inc 
)

Gets timescale and TS increment from double FPS value.

Parameters
fpsthe target fps
timescaleoutput timescale value
ts_incoutput timestamp increment value
+ Here is the caller graph for this function:

◆ gf_dolby_vision_level()

u32 gf_dolby_vision_level ( u32  width,
u32  height,
u64  fps_num,
u64  fps_den,
u32  codecid 
)

gets dolby vision level

Parameters
widthwidth in pixels of video
heightheight in pixels of video
fps_numframerate numerator
fps_denframerate denominator
codecidGPAC codec ID
Returns
dv level
+ Here is the caller graph for this function: