libgpac
Documentation of the core library of GPAC
movie_fragments.c File Reference
+ Include dependency graph for movie_fragments.c:

Data Structures

struct  SIDXEntry
 

Functions

GF_TrackExtendsBoxGetTrex (GF_MovieBox *moov, GF_ISOTrackID TrackID)
 
GF_TrackFragmentBoxgf_isom_get_traf (GF_ISOFile *mov, GF_ISOTrackID TrackID)
 
GF_Err gf_isom_set_movie_duration (GF_ISOFile *movie, u64 duration, Bool remove_mehd)
 
GF_EXPORT GF_Err gf_isom_finalize_for_fragment (GF_ISOFile *movie, u32 media_segment_type, Bool mvex_after_tracks)
 
GF_Err gf_isom_change_track_fragment_defaults (GF_ISOFile *movie, GF_ISOTrackID TrackID, u32 DefaultSampleDescriptionIndex, u32 DefaultSampleDuration, u32 DefaultSampleSize, u8 DefaultSampleIsSync, u8 DefaultSamplePadding, u16 DefaultDegradationPriority, u8 force_traf_flags)
 
GF_EXPORT GF_Err gf_isom_setup_track_fragment (GF_ISOFile *movie, GF_ISOTrackID TrackID, u32 DefaultSampleDescriptionIndex, u32 DefaultSampleDuration, u32 DefaultSampleSize, u8 DefaultSampleSyncFlags, u8 DefaultSamplePadding, u16 DefaultDegradationPriority, Bool force_traf_flags)
 
GF_EXPORT GF_Err gf_isom_setup_track_fragment_template (GF_ISOFile *movie, GF_ISOTrackID TrackID, u8 *boxes, u32 boxes_size, u8 force_traf_flags)
 
u32 GetNumUsedValues (GF_TrackFragmentBox *traf, u32 value, u32 index)
 
void ComputeFragmentDefaults (GF_TrackFragmentBox *traf)
 
GF_EXPORT GF_Err gf_isom_set_fragment_option (GF_ISOFile *movie, GF_ISOTrackID TrackID, GF_ISOTrackFragmentOption Code, u32 Param)
 
void update_trun_offsets (GF_ISOFile *movie, s32 offset)
 
static u32 UpdateRuns (GF_ISOFile *movie, GF_TrackFragmentBox *traf)
 
static s32 get_earliest_cts_following (GF_TrackFragmentBox *traf, u32 trun_idx, u32 samp_idx)
 
static u32 moof_get_sap_info (GF_MovieFragmentBox *moof, GF_ISOTrackID refTrackID, u32 *sap_delta, Bool *starts_with_sap)
 
u32 moof_get_duration (GF_MovieFragmentBox *moof, GF_ISOTrackID refTrackID)
 
static u64 moof_get_earliest_cts (GF_MovieFragmentBox *moof, GF_ISOTrackID refTrackID)
 
GF_Err gf_isom_write_compressed_box (GF_ISOFile *mov, GF_Box *root_box, u32 repl_type, GF_BitStream *bs, u32 *box_csize)
 
void flush_ref_samples (GF_ISOFile *movie, u64 *out_seg_size, Bool is_last_moof)
 
GF_Err gf_bs_grow (GF_BitStream *bs, u32 addSize)
 
static GF_Err StoreFragment (GF_ISOFile *movie, Bool load_mdat_only, s32 data_offset_diff, u32 *moof_size, Bool reassign_bs)
 
static GF_Err sidx_rewrite (GF_SegmentIndexBox *sidx, GF_BitStream *bs, u64 start_pos, GF_SubsegmentIndexBox *ssix)
 
GF_Err gf_isom_allocate_sidx (GF_ISOFile *movie, s32 subsegs_per_sidx, Bool daisy_chain_sidx, u32 nb_segs, u32 *frags_per_segment, u32 *start_range, u32 *end_range, Bool use_ssix)
 
static GF_Err gf_isom_write_styp (GF_ISOFile *movie, Bool last_segment)
 
GF_EXPORT GF_Err gf_isom_flush_fragments (GF_ISOFile *movie, Bool last_segment)
 
static u64 get_presentation_time (u64 media_time, s32 ts_shift)
 
static void compute_seg_size (GF_ISOFile *movie, u64 *out_seg_size)
 
static u32 moof_get_first_sap_end (GF_MovieFragmentBox *moof)
 
static u64 estimate_next_moof_earliest_presentation_time (u64 ref_track_decode_time, s32 ts_shift, u32 refTrackID, GF_ISOFile *movie)
 
GF_EXPORT GF_Err gf_isom_close_segment (GF_ISOFile *movie, s32 subsegments_per_sidx, GF_ISOTrackID referenceTrackID, u64 ref_track_decode_time, s32 ts_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_EXPORT GF_Err gf_isom_flush_sidx (GF_ISOFile *movie, u32 sidx_max_size, Bool force_v1)
 
GF_EXPORT GF_Err gf_isom_close_fragments (GF_ISOFile *movie)
 
GF_EXPORT GF_Err gf_isom_start_segment (GF_ISOFile *movie, const char *SegName, Bool memory_mode)
 
GF_EXPORT GF_Err gf_isom_set_fragment_reference_time (GF_ISOFile *movie, GF_ISOTrackID reference_track_ID, u64 ntp, u64 timestamp)
 
GF_EXPORT GF_Err gf_isom_set_traf_mss_timeext (GF_ISOFile *movie, GF_ISOTrackID reference_track_ID, u64 ntp_in_track_timescale, u64 traf_duration_in_track_timescale)
 
GF_EXPORT GF_Err gf_isom_start_fragment (GF_ISOFile *movie, GF_ISOStartFragmentFlags flags)
 
GF_Err gf_isom_set_fragment_template (GF_ISOFile *movie, u8 *tpl_data, u32 tpl_size, Bool *has_tfdt, GF_SegmentIndexBox **out_sidx)
 
GF_EXPORT GF_Err gf_isom_fragment_add_sample_ex (GF_ISOFile *movie, GF_ISOTrackID TrackID, const GF_ISOSample *sample, u32 DescIndex, u32 Duration, u8 PaddingBits, u16 DegradationPriority, Bool redundant_coding, void **ref, u32 ref_offset)
 
GF_EXPORT GF_Err gf_isom_fragment_add_sample (GF_ISOFile *movie, GF_ISOTrackID TrackID, const GF_ISOSample *sample, u32 DescIndex, u32 Duration, u8 PaddingBits, u16 DegradationPriority, Bool redundant_coding)
 
GF_EXPORT GF_Err gf_isom_fragment_set_cenc_sai (GF_ISOFile *output, GF_ISOTrackID TrackID, u8 *sai_b, u32 sai_b_size, Bool use_subsamples, Bool use_saio_32bit, Bool use_multikey)
 
GF_EXPORT GF_Err gf_isom_fragment_append_data_ex (GF_ISOFile *movie, GF_ISOTrackID TrackID, u8 *data, u32 data_size, u8 PaddingBits, void **ref, u32 ref_offset)
 
GF_EXPORT GF_Err gf_isom_fragment_append_data (GF_ISOFile *movie, GF_ISOTrackID TrackID, u8 *data, u32 data_size, u8 PaddingBits)
 
GF_Err gf_isom_fragment_add_subsample (GF_ISOFile *movie, GF_ISOTrackID TrackID, u32 flags, u32 subSampleSize, u8 priority, u32 reserved, Bool discardable)
 
GF_Err gf_isom_set_fragment_original_duration (GF_ISOFile *movie, GF_ISOTrackID TrackID, u32 orig_dur, u32 elapsed_dur)
 
GF_Err gf_isom_fragment_set_sample_flags (GF_ISOFile *movie, GF_ISOTrackID trackID, u32 is_leading, u32 dependsOn, u32 dependedOn, u32 redundant)
 
GF_EXPORT GF_Err gf_isom_set_traf_base_media_decode_time (GF_ISOFile *movie, GF_ISOTrackID TrackID, u64 decode_time)
 
GF_Err gf_isom_enable_mfra (GF_ISOFile *file)
 
GF_EXPORT void gf_isom_set_next_moof_number (GF_ISOFile *movie, u32 value)
 
GF_EXPORT u32 gf_isom_get_next_moof_number (GF_ISOFile *movie)
 
GF_Err gf_isom_set_emsg (GF_ISOFile *movie, u8 *data, u32 size)
 
GF_EXPORT Bool gf_isom_is_track_fragmented (GF_ISOFile *movie, GF_ISOTrackID TrackID)
 
GF_EXPORT Bool gf_isom_is_fragmented (GF_ISOFile *movie)
 
GF_Err isom_sample_refs_push (GF_SampleReferences *sref, s32 refID, u32 nb_refs, s32 *refs)
 
GF_EXPORT GF_Err gf_isom_fragment_add_sample_references (GF_ISOFile *movie, GF_ISOTrackID TrackID, s32 refID, u32 nb_refs, s32 *refs)
 

Data Structure Documentation

◆ SIDXEntry

struct SIDXEntry
+ Collaboration diagram for SIDXEntry:
Data Fields
GF_SegmentIndexBox * sidx
u64 start_offset
u64 end_offset

Function Documentation

◆ GetTrex()

GF_TrackExtendsBox* GetTrex ( GF_MovieBox moov,
GF_ISOTrackID  TrackID 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_get_traf()

GF_TrackFragmentBox* gf_isom_get_traf ( GF_ISOFile *  mov,
GF_ISOTrackID  TrackID 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetNumUsedValues()

u32 GetNumUsedValues ( GF_TrackFragmentBox traf,
u32  value,
u32  index 
)
+ Here is the call graph for this function:

◆ ComputeFragmentDefaults()

void ComputeFragmentDefaults ( GF_TrackFragmentBox traf)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update_trun_offsets()

void update_trun_offsets ( GF_ISOFile *  movie,
s32  offset 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateRuns()

static u32 UpdateRuns ( GF_ISOFile *  movie,
GF_TrackFragmentBox traf 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_earliest_cts_following()

static s32 get_earliest_cts_following ( GF_TrackFragmentBox traf,
u32  trun_idx,
u32  samp_idx 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moof_get_sap_info()

static u32 moof_get_sap_info ( GF_MovieFragmentBox moof,
GF_ISOTrackID  refTrackID,
u32 sap_delta,
Bool starts_with_sap 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moof_get_duration()

u32 moof_get_duration ( GF_MovieFragmentBox moof,
GF_ISOTrackID  refTrackID 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moof_get_earliest_cts()

static u64 moof_get_earliest_cts ( GF_MovieFragmentBox moof,
GF_ISOTrackID  refTrackID 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_write_compressed_box()

GF_Err gf_isom_write_compressed_box ( GF_ISOFile *  mov,
GF_Box root_box,
u32  repl_type,
GF_BitStream *  bs,
u32 box_csize 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flush_ref_samples()

void flush_ref_samples ( GF_ISOFile *  movie,
u64 out_seg_size,
Bool  is_last_moof 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_bs_grow()

GF_Err gf_bs_grow ( GF_BitStream *  bs,
u32  addSize 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StoreFragment()

static GF_Err StoreFragment ( GF_ISOFile *  movie,
Bool  load_mdat_only,
s32  data_offset_diff,
u32 moof_size,
Bool  reassign_bs 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sidx_rewrite()

static GF_Err sidx_rewrite ( GF_SegmentIndexBox sidx,
GF_BitStream *  bs,
u64  start_pos,
GF_SubsegmentIndexBox ssix 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_write_styp()

static GF_Err gf_isom_write_styp ( GF_ISOFile *  movie,
Bool  last_segment 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_presentation_time()

static u64 get_presentation_time ( u64  media_time,
s32  ts_shift 
)
static
+ Here is the caller graph for this function:

◆ compute_seg_size()

static void compute_seg_size ( GF_ISOFile *  movie,
u64 out_seg_size 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moof_get_first_sap_end()

static u32 moof_get_first_sap_end ( GF_MovieFragmentBox moof)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ estimate_next_moof_earliest_presentation_time()

static u64 estimate_next_moof_earliest_presentation_time ( u64  ref_track_decode_time,
s32  ts_shift,
u32  refTrackID,
GF_ISOFile *  movie 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_flush_sidx()

GF_EXPORT GF_Err gf_isom_flush_sidx ( GF_ISOFile *  movie,
u32  sidx_max_size,
Bool  force_v1 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_close_fragments()

GF_EXPORT GF_Err gf_isom_close_fragments ( GF_ISOFile *  movie)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_set_fragment_template()

GF_Err gf_isom_set_fragment_template ( GF_ISOFile *  movie,
u8 tpl_data,
u32  tpl_size,
Bool has_tfdt,
GF_SegmentIndexBox **  out_sidx 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_fragment_add_sample_ex()

GF_EXPORT GF_Err gf_isom_fragment_add_sample_ex ( GF_ISOFile *  movie,
GF_ISOTrackID  TrackID,
const GF_ISOSample sample,
u32  DescIndex,
u32  Duration,
u8  PaddingBits,
u16  DegradationPriority,
Bool  redundant_coding,
void **  ref,
u32  ref_offset 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_fragment_append_data_ex()

GF_EXPORT GF_Err gf_isom_fragment_append_data_ex ( GF_ISOFile *  movie,
GF_ISOTrackID  TrackID,
u8 data,
u32  data_size,
u8  PaddingBits,
void **  ref,
u32  ref_offset 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_isom_set_emsg()

GF_Err gf_isom_set_emsg ( GF_ISOFile *  movie,
u8 data,
u32  size 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isom_sample_refs_push()

GF_Err isom_sample_refs_push ( GF_SampleReferences sref,
s32  refID,
u32  nb_refs,
s32 refs 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function: