libgpac
Documentation of the core library of GPAC
Media Hinting

ISOBMFF file hinting. More...

+ Collaboration diagram for Media Hinting:

Enumerations

enum  GF_SDP_IODProfile { GF_SDP_IOD_NONE = 0 , GF_SDP_IOD_REGULAR , GF_SDP_IOD_ISMA , GF_SDP_IOD_ISMA_STRICT }
 

Functions

GF_RTPHinter * gf_hinter_track_new (GF_ISOFile *isom_file, u32 trackNumber, u32 Path_MTU, u32 max_ptime, u32 default_rtp_rate, u32 hint_flags, u8 PayloadID, Bool copy_media, u32 InterleaveGroupID, u8 InterleaveGroupPriority, GF_Err *e)
 
void gf_hinter_track_del (GF_RTPHinter *tkHinter)
 
GF_Err gf_hinter_track_process (GF_RTPHinter *tkHinter)
 
u32 gf_hinter_track_get_bandwidth (GF_RTPHinter *tkHinter)
 
GF_Err gf_hinter_track_force_no_offsets (GF_RTPHinter *tkHinter)
 
u32 gf_hinter_track_get_flags (GF_RTPHinter *tkHinter)
 
void gf_hinter_track_get_payload_name (GF_RTPHinter *tkHinter, char *payloadName)
 
GF_Err gf_hinter_track_finalize (GF_RTPHinter *tkHinter, Bool AddSystemInfo)
 
GF_Err gf_hinter_finalize (GF_ISOFile *isom_file, GF_SDP_IODProfile IOD_Profile, u32 bandwidth)
 
Bool gf_hinter_can_embbed_data (u8 *data, u32 data_size, u32 streamType)
 

Detailed Description

This section documents functions for ISOBMFF file hinting.

Enumeration Type Documentation

◆ GF_SDP_IODProfile

SDP IOD Profile

Enumerator
GF_SDP_IOD_NONE 

no IOD included

GF_SDP_IOD_REGULAR 

base64 encoding of the regular MPEG-4 IOD

GF_SDP_IOD_ISMA 

base64 encoding of IOD containing BIFS and OD tracks (one AU only) - this is used for ISMA 1.0 profiles note that the "hinted" file will loose all systems info

GF_SDP_IOD_ISMA_STRICT 

same as ISMA but removes all clock references from IOD

Function Documentation

◆ gf_hinter_track_new()

GF_RTPHinter* gf_hinter_track_new ( GF_ISOFile *  isom_file,
u32  trackNumber,
u32  Path_MTU,
u32  max_ptime,
u32  default_rtp_rate,
u32  hint_flags,
u8  PayloadID,
Bool  copy_media,
u32  InterleaveGroupID,
u8  InterleaveGroupPriority,
GF_Err e 
)

Creates a new track hinter object

Parameters
isom_filethe target ISOBMF file
trackNumberthe track to hint
Path_MTUmax RTP packet size (excluding IP/UDP/IP headers)
max_ptimemax packet duration in RTP timescale, can be set to 0 for auto compute
default_rtp_rateRTP rate for the track, can be set to 0 for auto compute
hint_flagsRTP flags as defined in <gpac/ietf.h>
PayloadIDRTP payload ID, can be set to 0 for auto compute
copy_mediaif set, media is copied inside the hint samples, otherwise only referenced from the media track
InterleaveGroupIDsets the group ID of this track for interleaving - same semantics as in gf_isom_set_track_interleaving_group
InterleaveGroupPrioritysets the group priority of this track for interleaving - same semantics as in gf_isom_set_track_priority_in_group
eoutput error code if any
Returns
the hinter object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_hinter_track_del()

void gf_hinter_track_del ( GF_RTPHinter *  tkHinter)

Delete the track hinter

Parameters
tkHintertrack hinter object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_hinter_track_process()

GF_Err gf_hinter_track_process ( GF_RTPHinter *  tkHinter)

hints all samples in the media track

Parameters
tkHintertrack hinter object
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_hinter_track_get_bandwidth()

u32 gf_hinter_track_get_bandwidth ( GF_RTPHinter *  tkHinter)

Gets media bandwidth in kbps

Parameters
tkHintertrack hinter object
Returns
media bandwidth in kbps
+ Here is the caller graph for this function:

◆ gf_hinter_track_force_no_offsets()

GF_Err gf_hinter_track_force_no_offsets ( GF_RTPHinter *  tkHinter)

Force file to use no random offsets for sequence number and time, if supported by server

Parameters
tkHintertrack hinter object
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_hinter_track_get_flags()

u32 gf_hinter_track_get_flags ( GF_RTPHinter *  tkHinter)

Gets track hinter flags

Parameters
tkHintertrack hinter object
Returns
hint flags for this object
+ Here is the caller graph for this function:

◆ gf_hinter_track_get_payload_name()

void gf_hinter_track_get_payload_name ( GF_RTPHinter *  tkHinter,
char *  payloadName 
)

Gets rtp payload name

Parameters
tkHintertrack hinter object
payloadNamestatic buffer for retrieval, minimum 30 bytes
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_hinter_track_finalize()

GF_Err gf_hinter_track_finalize ( GF_RTPHinter *  tkHinter,
Bool  AddSystemInfo 
)

Finalizes hinting process for the track (setup flags, write SDP for RTP, ...)

Parameters
tkHintertrack hinter object
AddSystemInfoif true, systems info are duplicated in the SDP (decoder cfg, PL IDs ..)
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_hinter_finalize()

GF_Err gf_hinter_finalize ( GF_ISOFile *  isom_file,
GF_SDP_IODProfile  IOD_Profile,
u32  bandwidth 
)

Finalizes hinting process for the file (setup flags, write SDP for RTP, ...)

Parameters
isom_filetarget ISOBMF file
IOD_Profilethe IOD profile to use for SDP
bandwidthtotal bandwidth in kbps of all hinted tracks, 0 means no bandwidth info at session level
Returns
error if any
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_hinter_can_embbed_data()

Bool gf_hinter_can_embbed_data ( u8 data,
u32  data_size,
u32  streamType 
)

Check if the given data fits in an ESD url

Parameters
datadata to be encoded
data_sizesize of data to be encoded
streamTypesystems stream type needed to signal data mime-type (OD, BIFS or any)
Returns
GF_TRUE if the encoded data fits in an ESD url
+ Here is the call graph for this function:
+ Here is the caller graph for this function: