libgpac
Documentation of the core library of GPAC
dash_segmenter.c File Reference
#include <gpac/media_tools.h>
#include <gpac/network.h>
#include <gpac/mpd.h>
#include <gpac/filters.h>
+ Include dependency graph for dash_segmenter.c:

Data Structures

struct  GF_DASHSegmenter
 

Macros

#define DOSET(_field)
 

Functions

GF_EXPORT u32 gf_dasher_next_update_time (GF_DASHSegmenter *dasher, u64 *ms_in_session)
 
GF_EXPORT GF_DASHSegmenter * gf_dasher_new (const char *mpdName, GF_DashProfile dash_profile, const char *tmp_dir, u32 dash_timescale, const char *dasher_context_file)
 
GF_EXPORT void gf_dasher_set_start_date (GF_DASHSegmenter *dasher, const char *dash_utc_start_date)
 
GF_EXPORT void gf_dasher_clean_inputs (GF_DASHSegmenter *dasher)
 
GF_EXPORT void gf_dasher_del (GF_DASHSegmenter *dasher)
 
GF_EXPORT GF_Err gf_dasher_set_info (GF_DASHSegmenter *dasher, const char *title, const char *copyright, const char *moreInfoURL, const char *sourceInfo, const char *lang)
 
GF_EXPORT GF_Err gf_dasher_set_location (GF_DASHSegmenter *dasher, const char *location)
 
GF_EXPORT GF_Err gf_dasher_add_base_url (GF_DASHSegmenter *dasher, const char *base_url)
 
static void dasher_format_seg_name (GF_DASHSegmenter *dasher, const char *inName)
 
GF_EXPORT GF_Err gf_dasher_enable_url_template (GF_DASHSegmenter *dasher, Bool enable, const char *default_template, const char *default_extension, const char *default_init_extension)
 
GF_EXPORT GF_Err gf_dasher_enable_segment_timeline (GF_DASHSegmenter *dasher, Bool enable)
 
GF_EXPORT GF_Err gf_dasher_enable_single_segment (GF_DASHSegmenter *dasher, Bool enable)
 
GF_EXPORT GF_Err gf_dasher_enable_single_file (GF_DASHSegmenter *dasher, Bool enable)
 
GF_EXPORT GF_Err gf_dasher_set_switch_mode (GF_DASHSegmenter *dasher, GF_DashSwitchingMode bitstream_switching)
 
GF_EXPORT GF_Err gf_dasher_set_durations (GF_DASHSegmenter *dasher, Double default_segment_duration, Double default_fragment_duration, Double sub_duration)
 
GF_EXPORT GF_Err gf_dasher_enable_rap_splitting (GF_DASHSegmenter *dasher, Bool segments_start_with_rap, Bool fragments_start_with_rap)
 
GF_EXPORT GF_Err gf_dasher_set_segment_marker (GF_DASHSegmenter *dasher, u32 segment_marker_4cc)
 
GF_EXPORT GF_Err gf_dasher_print_session_info (GF_DASHSegmenter *dasher, u32 fs_print_flags)
 
GF_EXPORT GF_Err gf_dasher_keep_source_utc (GF_DASHSegmenter *dasher, Bool keep_utc)
 
GF_EXPORT GF_Err gf_dasher_enable_sidx (GF_DASHSegmenter *dasher, Bool enable_sidx, u32 subsegs_per_sidx, Bool daisy_chain_sidx, Bool use_ssix)
 
GF_EXPORT GF_Err gf_dasher_set_dynamic_mode (GF_DASHSegmenter *dasher, GF_DashDynamicMode dash_mode, Double mpd_update_time, s32 time_shift_depth, Double mpd_live_duration)
 
GF_EXPORT GF_Err gf_dasher_set_min_buffer (GF_DASHSegmenter *dasher, Double min_buffer)
 
GF_EXPORT GF_Err gf_dasher_set_ast_offset (GF_DASHSegmenter *dasher, s32 ast_offset_ms)
 
GF_EXPORT GF_Err gf_dasher_enable_memory_fragmenting (GF_DASHSegmenter *dasher, Bool fragments_in_memory)
 
GF_EXPORT GF_Err gf_dasher_set_initial_isobmf (GF_DASHSegmenter *dasher, u32 initial_moof_sn, u64 initial_tfdt)
 
GF_EXPORT GF_Err gf_dasher_configure_isobmf_default (GF_DASHSegmenter *dasher, Bool no_fragments_defaults, GF_DASHPSSHMode pssh_mode, Bool samplegroups_in_traf, Bool single_traf_per_moof, Bool tfdt_per_traf, Bool mvex_after_traks, u32 sdtp_in_traf)
 
GF_EXPORT GF_Err gf_dasher_enable_utc_ref (GF_DASHSegmenter *dasher, Bool insert_utc)
 
GF_EXPORT GF_Err gf_dasher_enable_real_time (GF_DASHSegmenter *dasher, Bool real_time)
 
GF_EXPORT GF_Err gf_dasher_set_content_protection_location_mode (GF_DASHSegmenter *dasher, GF_DASH_ContentLocationMode mode)
 
GF_EXPORT GF_Err gf_dasher_set_profile_extension (GF_DASHSegmenter *dasher, const char *dash_profile_extension)
 
GF_EXPORT GF_Err gf_dasher_enable_cached_inputs (GF_DASHSegmenter *dasher, Bool no_cache)
 
GF_EXPORT GF_Err gf_dasher_enable_loop_inputs (GF_DASHSegmenter *dasher, Bool do_loop)
 
GF_EXPORT GF_Err gf_dasher_set_hls_clock (GF_DASHSegmenter *dasher, Bool insert_clock)
 
GF_EXPORT GF_Err gf_dasher_set_split_mode (GF_DASHSegmenter *dasher, GF_DASH_SplitMode split_mode)
 
GF_EXPORT GF_Err gf_dasher_set_last_segment_merge (GF_DASHSegmenter *dasher, Bool merge_last_seg)
 
GF_EXPORT GF_Err gf_dasher_set_cues (GF_DASHSegmenter *dasher, const char *cues_file, Bool strict_cues)
 
GF_EXPORT GF_Err gf_dasher_add_input (GF_DASHSegmenter *dasher, const GF_DashSegmenterInput *input)
 
static Bool on_dasher_event (void *_udta, GF_Event *evt)
 
static GF_Err gf_dasher_setup (GF_DASHSegmenter *dasher)
 
GF_Err dash_state_check_timing (const char *dash_state, u64 *next_gen_ntp_ms, u32 *next_time_ms)
 
GF_EXPORT GF_Err gf_dasher_process (GF_DASHSegmenter *dasher)
 

Variables

char gf_prog_lf
 

Data Structure Documentation

◆ __gf_dash_segmenter

struct __gf_dash_segmenter

DASH segmenter

Data Fields
GF_FilterSession * fsess
GF_Filter * output
GF_List * inputs
char * title
char * copyright
char * moreInfoURL
char * sourceInfo
char * lang
char * locations
char * base_urls
char * mpd_name
GF_DashProfile profile
GF_DashDynamicMode dash_mode
u32 use_url_template
Bool use_segment_timeline
Bool single_segment
Bool single_file
GF_DashSwitchingMode bitstream_switching_mode
Bool segments_start_with_rap
Double segment_duration
Double fragment_duration
Double sub_duration
char * seg_rad_name
const char * seg_ext
const char * seg_init_ext
u32 segment_marker_4cc
Bool enable_sidx
u32 subsegs_per_sidx
Bool daisy_chain_sidx
Bool use_ssix
Bool fragments_start_with_rap
Double mpd_update_time
s32 time_shift_depth
u32 min_buffer_time
s32 ast_offset_ms
u32 dash_scale
Bool fragments_in_memory
u32 initial_moof_sn
u64 initial_tfdt
Bool no_fragments_defaults
GF_DASHPSSHMode pssh_mode
Bool samplegroups_in_traf
Bool single_traf_per_moof
Bool single_trun_per_traf
Bool tfdt_per_traf
Double mpd_live_duration
Bool insert_utc
Bool real_time
char * utc_start_date
const char * dash_profile_extension
GF_DASH_ContentLocationMode cp_location_mode
Bool no_cache
Bool disable_loop
GF_DASH_SplitMode split_mode
Bool mvex_after_traks
u32 sdtp_in_traf
Bool hls_clock
const char * cues_file
Bool strict_cues
Bool disable_segment_alignment
Bool enable_mix_codecs
Bool enable_sar_mix
Bool check_duration
Bool merge_last_seg
const char * dash_state
u64 next_gen_ntp_ms
u64 mpd_time_ms
Bool dash_mode_changed
u32 print_stats_graph
s32 dash_filter_idx_plus_one
u32 last_prog
Bool keep_utc
Bool skip_profile

Macro Definition Documentation

◆ DOSET

#define DOSET (   _field)
Value:
if (dasher->_field) gf_free(dasher->_field);\
dasher->_field = _field ? gf_strdup(_field) : NULL;\
void gf_free(void *ptr)
Definition: alloc.c:163
char * gf_strdup(const char *str)
Definition: alloc.c:168

Function Documentation

◆ dasher_format_seg_name()

static void dasher_format_seg_name ( GF_DASHSegmenter *  dasher,
const char *  inName 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_dasher_event()

static Bool on_dasher_event ( void *  _udta,
GF_Event evt 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gf_dasher_setup()

static GF_Err gf_dasher_setup ( GF_DASHSegmenter *  dasher)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dash_state_check_timing()

GF_Err dash_state_check_timing ( const char *  dash_state,
u64 next_gen_ntp_ms,
u32 next_time_ms 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ gf_prog_lf

char gf_prog_lf
extern