libgpac
Documentation of the core library of GPAC
Fragmented ISOBMFF Writing
+ Collaboration diagram for Fragmented ISOBMFF Writing:

Macros

#define GF_ISOM_FRAG_DEF_IS_SYNC   1
 
#define GF_ISOM_FRAG_USE_SYNC_TABLE   (1<<1)
 

Enumerations

enum  GF_ISOStartFragmentFlags { GF_ISOM_FRAG_MOOF_FIRST = 1 }
 
enum  GF_ISOTrackFragmentOption {
  GF_ISOM_TRAF_EMPTY , GF_ISOM_TRAF_RANDOM_ACCESS , GF_ISOM_TRAF_DATA_CACHE , GF_ISOM_TFHD_FORCE_MOOF_BASE_OFFSET ,
  GF_ISOM_TRAF_USE_SAMPLE_DEPS_BOX , GF_ISOM_TRUN_FORCE , GF_ISOM_TRUN_SET_INTERLEAVE_ID , GF_ISOM_TRAF_TRUNS_FIRST ,
  GF_ISOM_TRAF_TRUN_V1 , GF_ISOM_TRAF_USE_LARGE_TFDT
}
 

Functions

GF_Err gf_isom_setup_track_fragment (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, u32 DefaultSampleDescriptionIndex, u32 DefaultSampleDuration, u32 DefaultSampleSize, u8 DefaultSampleSyncFlags, u8 DefaultSamplePadding, u16 DefaultDegradationPriority, Bool force_traf_flags)
 
GF_Err gf_isom_change_track_fragment_defaults (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, u32 DefaultSampleDescriptionIndex, u32 DefaultSampleDuration, u32 DefaultSampleSize, u8 DefaultSampleIsSync, u8 DefaultSamplePadding, u16 DefaultDegradationPriority, u8 force_traf_flags)
 
GF_Err gf_isom_finalize_for_fragment (GF_ISOFile *isom_file, u32 media_segment_type, Bool mvex_after_tracks)
 
GF_Err gf_isom_set_movie_duration (GF_ISOFile *isom_file, u64 duration, Bool remove_mehd)
 
GF_Err gf_isom_start_fragment (GF_ISOFile *isom_file, GF_ISOStartFragmentFlags moof_first)
 
GF_Err gf_isom_start_segment (GF_ISOFile *isom_file, const char *SegName, Bool memory_mode)
 
GF_Err gf_isom_set_traf_base_media_decode_time (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, u64 decode_time)
 
GF_Err gf_isom_enable_mfra (GF_ISOFile *isom_file)
 
GF_Err gf_isom_set_traf_mss_timeext (GF_ISOFile *isom_file, GF_ISOTrackID reference_track_ID, u64 decode_traf_time, u64 traf_duration)
 
GF_Err gf_isom_close_segment (GF_ISOFile *isom_file, s32 subsegs_per_sidx, GF_ISOTrackID referenceTrackID, u64 ref_track_decode_time, s32 timestamp_shift, u64 ref_track_next_cts, Bool daisy_chain_sidx, Bool use_ssix, Bool last_segment, Bool close_segment_handle, u32 segment_marker_4cc, u64 *index_start_range, u64 *index_end_range, u64 *out_seg_size)
 
GF_Err gf_isom_flush_fragments (GF_ISOFile *isom_file, Bool last_segment)
 
GF_Err gf_isom_set_fragment_reference_time (GF_ISOFile *isom_file, GF_ISOTrackID reference_track_ID, u64 ntp, u64 timestamp)
 
GF_Err gf_isom_allocate_sidx (GF_ISOFile *isom_file, s32 subsegs_per_sidx, Bool daisy_chain_sidx, u32 nb_segs, u32 *frags_per_segment, u32 *start_range, u32 *end_range, Bool use_ssix)
 
GF_Err gf_isom_setup_track_fragment_template (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, u8 *boxes, u32 boxes_size, u8 force_traf_flags)
 
GF_Err gf_isom_set_fragment_original_duration (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, u32 orig_dur, u32 elapsed_dur)
 
GF_Err gf_isom_set_fragment_option (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, GF_ISOTrackFragmentOption Code, u32 param)
 
GF_Err gf_isom_fragment_add_sample (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, const GF_ISOSample *sample, u32 sampleDescriptionIndex, u32 Duration, u8 PaddingBits, u16 DegradationPriority, Bool redundantCoding)
 
GF_Err gf_isom_fragment_append_data (GF_ISOFile *isom_file, GF_ISOTrackID TrackID, u8 *data, u32 data_size, u8 PaddingBits)
 
GF_Err gf_isom_fragment_set_cenc_sai (GF_ISOFile *isom_file, GF_ISOTrackID trackID, u8 *sai_b, u32 sai_b_size, Bool use_subsample, Bool use_saio_32bit, Bool use_multikey)
 
GF_Err gf_isom_clone_pssh (GF_ISOFile *dst_file, GF_ISOFile *src_file, Bool in_moof)
 
GF_Err gf_isom_fragment_set_sample_roll_group (GF_ISOFile *isom_file, GF_ISOTrackID trackID, u32 sample_number, GF_ISOSampleRollType roll_type, s16 roll_distance)
 
GF_Err gf_isom_fragment_set_sample_rap_group (GF_ISOFile *isom_file, GF_ISOTrackID trackID, u32 sample_number_in_frag, Bool is_rap, u32 num_leading_samples)
 
GF_Err gf_isom_fragment_set_sample_flags (GF_ISOFile *isom_file, GF_ISOTrackID trackID, u32 is_leading, u32 dependsOn, u32 dependedOn, u32 redundant)
 
GF_Err gf_isom_fragment_set_sample_aux_info (GF_ISOFile *isom_file, u32 trackID, u32 sample_number_in_frag, u32 aux_type, u32 aux_info, u8 *data, u32 size)
 
void gf_isom_set_next_moof_number (GF_ISOFile *isom_file, u32 value)
 

Detailed Description

                    Movie Fragments Writing API
            Movie Fragments is a feature of ISO media files for fragmentation
    of a presentation meta-data and interleaving with its media data.
    This enables faster http fast start for big movies, and also reduces the risk
    of data loss in case of a recording crash, because meta data and media data
    can be written to disk at regular times
            This API provides simple function calls to setup such a movie and write it
    The process implies:
            1- creating a movie in the usual way (track, stream descriptions, (IOD setup
    copyright, ...)
            2- possibly add some samples in the regular fashion
            3- setup track fragments for all track that will be written in a fragmented way
    (note that you can create/write a track that has no fragmentation at all)
            4- finalize the movie for fragmentation (this will flush all meta-data and
    any media-data added to disk, ensuring all vital information for the presentation
    is stored on file and not lost in case of crash/poweroff)

      then 5-6 as often as desired
            5- start a new movie fragment
            6- add samples to each setup track

IMPORTANT NOTES: Movie Fragments can only be used in GF_ISOM_OPEN_WRITE mode (capturing) and no editing functionalities can be used the fragmented movie API uses TrackID and not TrackNumber

Macro Definition Documentation

◆ GF_ISOM_FRAG_DEF_IS_SYNC

#define GF_ISOM_FRAG_DEF_IS_SYNC   1

flag indicating default samples are sync

◆ GF_ISOM_FRAG_USE_SYNC_TABLE

#define GF_ISOM_FRAG_USE_SYNC_TABLE   (1<<1)

flag indicating a sync sample table shall be added in the track - cf CMAF rules

Enumeration Type Documentation

◆ GF_ISOStartFragmentFlags

fragment creatio option

Enumerator
GF_ISOM_FRAG_MOOF_FIRST 

moof is stored before mdat - will require temporary storage of data in memory

◆ GF_ISOTrackFragmentOption

Track fragment options

Enumerator
GF_ISOM_TRAF_EMPTY 

indicates that the track fragment has no samples but still has a duration (silence-detection in audio codecs, ...). param: indicates duration

GF_ISOM_TRAF_RANDOM_ACCESS 

I-Frame detection: this can reduce file size by detecting I-frames and optimizing sample flags (padding, priority, ..) param: on/off (0/1)

GF_ISOM_TRAF_DATA_CACHE 

activate data cache on track fragment. This is useful when writing interleaved media from a live source (typically audio-video), and greatly reduces file size param: Number of samples (> 1) to cache before disk flushing. You shouldn't try to cache too many samples since this will load your memory. base that on FPS/SR

GF_ISOM_TFHD_FORCE_MOOF_BASE_OFFSET 

forces moof base offsets when traf based offsets would be chosen param: on/off (0/1)

GF_ISOM_TRAF_USE_SAMPLE_DEPS_BOX 

use sdtp box in traf rather than storing sample deps in trun entry. param values are: 0: disables sdtp 1: enables sdtp and disables sample dependency flags in trun 2: enables sdtp and also use sample dependency flags in trun

GF_ISOM_TRUN_FORCE 

forces new trun at next sample add param: ignored

GF_ISOM_TRUN_SET_INTERLEAVE_ID 

sets interleave group ID of the next sample add. Samples with lower interleave ID will be stored first, creating new trun whenever a new group is detected This will enable data cache param: interleave ID

GF_ISOM_TRAF_TRUNS_FIRST 

store truns before sample encryption and sample groups info param: 1 to store before and follow CMAF (recommended?) order, 0, to store after

GF_ISOM_TRAF_TRUN_V1 

forces trun v1 param: on/off (0/1)

Function Documentation

◆ gf_isom_setup_track_fragment()

GF_Err gf_isom_setup_track_fragment ( GF_ISOFile isom_file,
GF_ISOTrackID  TrackID,
u32  DefaultSampleDescriptionIndex,
u32  DefaultSampleDuration,
u32  DefaultSampleSize,
u8  DefaultSampleSyncFlags,
u8  DefaultSamplePadding,
u16  DefaultDegradationPriority,
Bool  force_traf_flags 
)

sets up a track for fragmentation by specifying some default values for storage efficiency

Note
If all the defaults are 0, traf flags will always be used to signal them.
Parameters
isom_filethe target ISO file
TrackIDID of the target track
DefaultSampleDescriptionIndexthe default description used by samples in this track
DefaultSampleDurationdefault duration of samples in this track
DefaultSampleSizedefault size of samples in this track (0 if unknown)
DefaultSampleSyncFlagscombination of GF_ISOM_FRAG_* flags
DefaultSamplePaddingdefault padding bits for samples in this track
DefaultDegradationPrioritydefault degradation priority for samples in this track
force_traf_flagsif GF_TRUE, will ignore these default in each traf but will still write them in moov
Returns
error if any

◆ gf_isom_change_track_fragment_defaults()

GF_Err gf_isom_change_track_fragment_defaults ( GF_ISOFile isom_file,
GF_ISOTrackID  TrackID,
u32  DefaultSampleDescriptionIndex,
u32  DefaultSampleDuration,
u32  DefaultSampleSize,
u8  DefaultSampleIsSync,
u8  DefaultSamplePadding,
u16  DefaultDegradationPriority,
u8  force_traf_flags 
)

changes the default parameters of an existing trak fragment

Warning
This should not be used if samples have already been added
Parameters
isom_filethe target ISO file
TrackIDID of the target track
DefaultSampleDescriptionIndexthe default description used by samples in this track
DefaultSampleDurationdefault duration of samples in this track
DefaultSampleSizedefault size of samples in this track (0 if unknown)
DefaultSampleIsSyncdefault key-flag (RAP) of samples in this track
DefaultSamplePaddingdefault padding bits for samples in this track
DefaultDegradationPrioritydefault degradation priority for samples in this track
force_traf_flagsif GF_TRUE, will ignore these default in each traf but will still write them in moov
Returns
error if any

◆ gf_isom_finalize_for_fragment()

GF_Err gf_isom_finalize_for_fragment ( GF_ISOFile isom_file,
u32  media_segment_type,
Bool  mvex_after_tracks 
)

flushes data to disk and prepare movie fragmentation

Parameters
isom_filethe target ISO file
media_segment_type0 if no segments, 1 if regular segment, 2 if single segment
mvex_after_tracksforces writing mvex box after track boxes
Returns
error if any

◆ gf_isom_set_movie_duration()

GF_Err gf_isom_set_movie_duration ( GF_ISOFile isom_file,
u64  duration,
Bool  remove_mehd 
)

sets the duration of the movie in case of movie fragments

Parameters
isom_filethe target ISO file
durationthe complete duration (movie and all fragments) in movie timescale
remove_mehdforce removal of mehd box, only setting mvhd.duration to 0
Returns
error if any

◆ gf_isom_start_fragment()

GF_Err gf_isom_start_fragment ( GF_ISOFile isom_file,
GF_ISOStartFragmentFlags  moof_first 
)

starts a new movie fragment

Parameters
isom_filethe target ISO file
moof_firstif GF_TRUE, the moof will be written before the mdat
Returns
error if any

◆ gf_isom_start_segment()

GF_Err gf_isom_start_segment ( GF_ISOFile isom_file,
const char *  SegName,
Bool  memory_mode 
)

starts a new segment in the file

Parameters
isom_filethe target ISO file
SegNameif not NULL, the output will be written in the SegName file. If NULL, segment will be created in same file as movie. The special name "_gpac_isobmff_redirect" is used to indicate that segment shall be written to a memory buffer passed to callback function set through gf_isom_set_write_callback
memory_modeif set, all samples writing is done in memory rather than on disk. Ignored in callback mode
Returns
error if any

◆ gf_isom_set_traf_base_media_decode_time()

GF_Err gf_isom_set_traf_base_media_decode_time ( GF_ISOFile isom_file,
GF_ISOTrackID  TrackID,
u64  decode_time 
)

sets the baseMediaDecodeTime of the first sample of the given track

Parameters
isom_filethe target ISO file
TrackIDID of the target track
decode_timethe decode time in media timescale
Returns
error if any

◆ gf_isom_enable_mfra()

GF_Err gf_isom_enable_mfra ( GF_ISOFile isom_file)

enables mfra (movie fragment random access computing) when writing movie fragments

Note
this should only be used when generating segments in a single file
Parameters
isom_filethe target ISO file
Returns
error if any

◆ gf_isom_set_traf_mss_timeext()

GF_Err gf_isom_set_traf_mss_timeext ( GF_ISOFile isom_file,
GF_ISOTrackID  reference_track_ID,
u64  decode_traf_time,
u64  traf_duration 
)

sets Microsoft Smooth Streaming traf 'tfxd' box info, written at the end of each traf

Parameters
isom_filethe target ISO file
reference_track_IDID of the reference track giving the media timescale
decode_traf_timedecode time of the first sample in the segment in media timescale (hardcoded to 10MHz in Smooth)
traf_durationduration of all samples in the traf in media timescale (hardcoded to 10MHz in Smooth)
Returns
error if any

◆ gf_isom_close_segment()

GF_Err gf_isom_close_segment ( GF_ISOFile isom_file,
s32  subsegs_per_sidx,
GF_ISOTrackID  referenceTrackID,
u64  ref_track_decode_time,
s32  timestamp_shift,
u64  ref_track_next_cts,
Bool  daisy_chain_sidx,
Bool  use_ssix,
Bool  last_segment,
Bool  close_segment_handle,
u32  segment_marker_4cc,
u64 index_start_range,
u64 index_end_range,
u64 out_seg_size 
)

closes current segment, producing a segment index box if desired

Parameters
isom_filethe target ISO file
subsegs_per_sidxnumber of subsegments per sidx box; a negative value disables sidx, 0 forces a single sidx for the segment (or subsegment)
referenceTrackIDthe ID of the track used as a reference for the segment index box
ref_track_decode_timethe decode time fo the first sample in the reference track for this segment
timestamp_shiftthe constant difference between media time and presentation time (derived from edit list)
ref_track_next_ctsthe CTS of the first sample in the reference track in the next segment
daisy_chain_sidxif GF_TRUE, indicates chained sidx shall be used. Otherwise, an array of indexes is used
use_ssixif GF_TRUE, produces an ssix box using I-frames as first level and all other frames as second level
last_segmentindicates if this is the last segment of the session
close_segment_handleif set to GF_TRUE, the associated file if any will be closed
segment_marker_4cca four character code used to insert an empty box at the end of the saegment with the given type. If 0, no such box is inserted
index_start_rangeset to the start offset in bytes of the segment in the media file
index_end_rangeset to the end offset in bytes of the segment in the media file
out_seg_sizeset to the segment size in bytes (optional, can be NULL)
Returns
error if any

◆ gf_isom_flush_fragments()

GF_Err gf_isom_flush_fragments ( GF_ISOFile isom_file,
Bool  last_segment 
)

writes any pending fragment to file for low-latency output.

Warning
This shall only be used if no SIDX is used: subsegs_per_sidx<0 or flushing all fragments before calling gf_isom_close_segment
Parameters
isom_filethe target ISO file
last_segmentindicates if this is the last segment of the session
Returns
error if any

◆ gf_isom_set_fragment_reference_time()

GF_Err gf_isom_set_fragment_reference_time ( GF_ISOFile isom_file,
GF_ISOTrackID  reference_track_ID,
u64  ntp,
u64  timestamp 
)

sets fragment prft box info, written just before the moof

Parameters
isom_filethe target ISO file
reference_track_IDthe ID of the track used as a reference for media timestamps
ntpabsolute NTP time
timestampmedia time corresponding to the NTP time, in reference track media timescale
Returns
error if any

◆ gf_isom_allocate_sidx()

GF_Err gf_isom_allocate_sidx ( GF_ISOFile isom_file,
s32  subsegs_per_sidx,
Bool  daisy_chain_sidx,
u32  nb_segs,
u32 frags_per_segment,
u32 start_range,
u32 end_range,
Bool  use_ssix 
)

writes an empty sidx in the current movie.

The SIDX will be forced to have nb_segs entries, and nb_segs shall match the number of calls to gf_isom_close_segment that will follow. This avoids wasting time and disk space moving data around. Once gf_isom_close_segment has then been called nb_segs times, the pre-allocated SIDX is destroyed and successive calls to gf_isom_close_segment will create their own sidx, unless gf_isom_allocate_sidx is called again.

Parameters
isom_filethe target ISO file
subsegs_per_sidxreserved to 0, currently ignored
daisy_chain_sidxreserved to 0, currently ignored
nb_segsnumber of entries in the segment index
frags_per_segmentreserved, currently ignored
start_rangeset to the start offset in bytes of the segment index box
end_rangeset to the end offset in bytes of the segment index box
use_ssixif GF_TRUE, produces an ssix box using I-frames as first level and all other frames as second level
Returns
error if any

◆ gf_isom_setup_track_fragment_template()

GF_Err gf_isom_setup_track_fragment_template ( GF_ISOFile isom_file,
GF_ISOTrackID  TrackID,
u8 boxes,
u32  boxes_size,
u8  force_traf_flags 
)

sets up track fragment defaults using the given template. The template shall be a serialized array of one or more trex boxes

Parameters
isom_filethe target ISO file
TrackIDID of the target track
boxesserialized array of trex boxes
boxes_sizesize of the serialized array
force_traf_flagsif GF_TRUE, will ignore these default in each traf but will still write them in moov
Returns
error if any

◆ gf_isom_set_fragment_original_duration()

GF_Err gf_isom_set_fragment_original_duration ( GF_ISOFile isom_file,
GF_ISOTrackID  TrackID,
u32  orig_dur,
u32  elapsed_dur 
)

sets up track fragment defaults using the given template. The template shall be a serialized array of one or more trex boxes

Parameters
isom_filethe target ISO file
TrackIDID of the target track
orig_durlast sample original duration
elapsed_durfirst sample elapsed duration
Returns
error if any

◆ gf_isom_set_fragment_option()

GF_Err gf_isom_set_fragment_option ( GF_ISOFile isom_file,
GF_ISOTrackID  TrackID,
GF_ISOTrackFragmentOption  Code,
u32  param 
)

sets a track fragment option. Options can be set at the beginning of each new fragment only, and for the lifetime of the fragment

Parameters
isom_filethe target ISO file
TrackIDID of the target track
Codethe option type to set
paramthe option value
Returns
error if any

◆ gf_isom_fragment_add_sample()

GF_Err gf_isom_fragment_add_sample ( GF_ISOFile isom_file,
GF_ISOTrackID  TrackID,
const GF_ISOSample sample,
u32  sampleDescriptionIndex,
u32  Duration,
u8  PaddingBits,
u16  DegradationPriority,
Bool  redundantCoding 
)

adds a sample to a fragmented track

Parameters
isom_filethe target ISO file
TrackIDdestination track
samplesample to add
sampleDescriptionIndexsample description for this sample. If 0, the default one is used
Durationsample duration; the sample duration MUST be provided at least for the last sample (for intermediate samples, it is recomputed internally by the lib)
PaddingBitspadding bits for the sample, or 0
DegradationPriorityfor the sample, or 0
redundantCodingindicates this is samples acts as a sync shadow point
Returns
error if any

◆ gf_isom_fragment_append_data()

GF_Err gf_isom_fragment_append_data ( GF_ISOFile isom_file,
GF_ISOTrackID  TrackID,
u8 data,
u32  data_size,
u8  PaddingBits 
)

appends data into last sample of track for video fragments/other media

Warning
This shall not be used with OD tracks
Parameters
isom_filethe target ISO file
TrackIDdestination track
datathe data to append
data_sizethe size of the data to append
PaddingBitspadding bits for the sample, or 0
Returns
error if any

◆ gf_isom_fragment_set_cenc_sai()

GF_Err gf_isom_fragment_set_cenc_sai ( GF_ISOFile isom_file,
GF_ISOTrackID  trackID,
u8 sai_b,
u32  sai_b_size,
Bool  use_subsample,
Bool  use_saio_32bit,
Bool  use_multikey 
)

sets side information for common encryption for the last added sample

Parameters
isom_filethe target ISO file
trackIDthe ID of the target track
sai_bbuffer containing the SAI information of the sample
sai_b_sizesize of the SAI buffer. If sai_b is NULL or sai_b_size is 0, add a clear SAI data
use_subsampleindicates if the media uses CENC subsamples
use_saio_32bitindicates if 32-bit saio shall be used
use_multikeyindicates if multikey is in use (required to tag saiz/saio boxes)
Returns
error if any

◆ gf_isom_clone_pssh()

GF_Err gf_isom_clone_pssh ( GF_ISOFile dst_file,
GF_ISOFile src_file,
Bool  in_moof 
)

clones PSSH data between two files

Parameters
dst_filethe target ISO file
src_filethe source ISO file
in_moofif GF_TRUE, indicates the pssh should be cloned in current moof box
Returns
error if any

◆ gf_isom_fragment_set_sample_roll_group()

GF_Err gf_isom_fragment_set_sample_roll_group ( GF_ISOFile isom_file,
GF_ISOTrackID  trackID,
u32  sample_number,
GF_ISOSampleRollType  roll_type,
s16  roll_distance 
)

sets roll information for a sample in a track fragment

Parameters
isom_filethe target ISO file
trackIDthe ID of the target track
sample_numberthe sample number of the last sample
roll_typeindicate the sample roll type
roll_distanceset to the roll distance for a roll sample
Returns
error if any

◆ gf_isom_fragment_set_sample_rap_group()

GF_Err gf_isom_fragment_set_sample_rap_group ( GF_ISOFile isom_file,
GF_ISOTrackID  trackID,
u32  sample_number_in_frag,
Bool  is_rap,
u32  num_leading_samples 
)

sets rap information for a sample in a track fragment

Parameters
isom_filethe target ISO file
trackIDthe ID of the target track
sample_number_in_fragthe sample number of the sample in the traf
is_rapset to GF_TRUE to indicate the sample is a RAP sample (open-GOP), GF_FALSE otherwise
num_leading_samplesset to the number of leading pictures for a RAP sample
Returns
error if any

◆ gf_isom_fragment_set_sample_flags()

GF_Err gf_isom_fragment_set_sample_flags ( GF_ISOFile isom_file,
GF_ISOTrackID  trackID,
u32  is_leading,
u32  dependsOn,
u32  dependedOn,
u32  redundant 
)

sets sample dependency flags in a track fragment - see ISO/IEC 14496-12 and gf_filter_pck_set_dependency_flags

Parameters
isom_filethe target ISO file
trackIDthe ID of the target track
is_leadingindicates that the sample is a leading picture
dependsOnindicates the sample dependency towards other samples
dependedOnindicates the sample dependency from other samples
redundantindicates that the sample contains redundant coding
Returns
error if any

◆ gf_isom_fragment_set_sample_aux_info()

GF_Err gf_isom_fragment_set_sample_aux_info ( GF_ISOFile isom_file,
u32  trackID,
u32  sample_number_in_frag,
u32  aux_type,
u32  aux_info,
u8 data,
u32  size 
)

adds sample auxiliary data

Parameters
isom_filethe target ISO file
trackIDthe ID of the target track
sample_number_in_fragthe sample number in the current fragment. Must be equal or larger to last auxiliary added
aux_typeauxiliary sample data type, shall not be 0
aux_infoauxiliary sample data specific info type, may be 0
datadata to add
sizesize of data to add
Returns
error if any

◆ gf_isom_set_next_moof_number()

void gf_isom_set_next_moof_number ( GF_ISOFile isom_file,
u32  value 
)

sets the number of the next moof to be produced

Parameters
isom_filethe target ISO file
valuethe number of the next moof