libgpac
Documentation of the core library of GPAC
mpd.h File Reference

Utility tools for dash, smooth and HLS manifest loading. More...

#include <gpac/constants.h>
#include <gpac/xml.h>
#include <gpac/media_tools.h>
+ Include dependency graph for mpd.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  GF_MPD_Metrics
 
struct  GF_MPD_ContentComponent
 
struct  GF_MPD_Descriptor
 
struct  GF_MPD_Subset
 
struct  GF_MPD_SegmentTimelineEntry
 
struct  GF_MPD_SegmentTimeline
 
struct  GF_MPD_ByteRange
 
struct  GF_MPD_BaseURL
 
struct  GF_MPD_URL
 
struct  GF_MPD_Fractional
 
struct  GF_MPD_ISOBMFInfo
 
struct  GF_MPD_SegmentBase
 
struct  GF_MPD_MultipleSegmentBase
 
struct  GF_MPD_SegmentURL
 
struct  GF_MPD_SegmentList
 
struct  GF_MPD_SegmentTemplate
 
struct  GF_MPD_CommonAttributes
 
struct  GF_MPD_ProducerReferenceTime
 
struct  GF_MPD_SubRepresentation
 
struct  GF_DASH_RepresentationPlayback
 
struct  GF_DASH_SegmenterContext
 
struct  GF_DASH_FragmentContext
 
struct  GF_DASH_SegmentContext
 
struct  GF_MPD_Representation
 
struct  GF_MPD_AdaptationSet
 
struct  GF_MPD_Inband_Event
 
struct  GF_MPD_Period
 
struct  GF_MPD_ProgramInfo
 
struct  GF_MPD
 
struct  GF_FileDownload
 
struct  GF_DASHCueInfo
 

Macros

#define MPD_EXTENSIBLE
 
#define GF_MPD_SEGMENT_BASE
 
#define GF_MPD_MULTIPLE_SEGMENT_BASE
 
#define GF_MPD_COMMON_ATTRIBUTES_ELEMENTS
 

Enumerations

enum  GF_DashTemplateSegmentType {
  GF_DASH_TEMPLATE_SEGMENT = 0 , GF_DASH_TEMPLATE_INITIALIZATION , GF_DASH_TEMPLATE_TEMPLATE , GF_DASH_TEMPLATE_TEMPLATE_WITH_PATH ,
  GF_DASH_TEMPLATE_INITIALIZATION_TEMPLATE , GF_DASH_TEMPLATE_REPINDEX , GF_DASH_TEMPLATE_REPINDEX_TEMPLATE , GF_DASH_TEMPLATE_REPINDEX_TEMPLATE_WITH_PATH ,
  GF_DASH_TEMPLATE_INITIALIZATION_SKIPINIT , GF_DASH_TEMPLATE_INITIALIZATION_TEMPLATE_SKIPINIT , GF_DASH_TEMPLATE_SEGMENT_SUBNUMBER
}
 
enum  GF_MPD_ScanType { GF_MPD_SCANTYPE_UNKNOWN , GF_MPD_SCANTYPE_PROGRESSIVE , GF_MPD_SCANTYPE_INTERLACED }
 
enum  GF_MPD_ProducerRefType { GF_MPD_PRODUCER_REF_ENCODER = 0 , GF_MPD_PRODUCER_REF_CAPTURED , GF_MPD_PRODUCER_REF_APPLICATION }
 
enum  GF_MPD_Type { GF_MPD_TYPE_STATIC , GF_MPD_TYPE_DYNAMIC , GF_MPD_TYPE_DYNAMIC_LAST }
 
enum  GF_M3U8WriteMode { GF_M3U8_WRITE_ALL =0 , GF_M3U8_WRITE_MASTER , GF_M3U8_WRITE_CHILD }
 
enum  GF_MPD_URLResolveType {
  GF_MPD_RESOLVE_URL_MEDIA , GF_MPD_RESOLVE_URL_INIT , GF_MPD_RESOLVE_URL_INDEX , GF_MPD_RESOLVE_URL_MEDIA_TEMPLATE ,
  GF_MPD_RESOLVE_URL_MEDIA_NOSTART , GF_MPD_RESOLVE_URL_MEDIA_TEMPLATE_NO_BASE
}
 
enum  MPDSeekMode { MPD_SEEK_PREV , MPD_SEEK_NEAREST }
 

Functions

GF_Err gf_media_mpd_format_segment_name (GF_DashTemplateSegmentType seg_type, Bool is_bs_switching, char *segment_name, const char *rep_id, const char *base_url, const char *seg_rad_name, const char *seg_ext, u64 start_time, u32 bandwidth, u32 segment_number, Bool use_segment_timeline, Bool forced)
 
GF_Err gf_mpd_init_from_dom (GF_XMLNode *root, GF_MPD *mpd, const char *base_url)
 
GF_Err gf_mpd_complete_from_dom (GF_XMLNode *root, GF_MPD *mpd, const char *base_url)
 
GF_MPDgf_mpd_new ()
 
void gf_mpd_del (GF_MPD *mpd)
 
void gf_mpd_segment_url_free (void *ptr)
 
void gf_mpd_segment_base_free (void *ptr)
 
void gf_mpd_parse_segment_url (GF_List *container, GF_XMLNode *root)
 
u64 gf_mpd_parse_date (const char *const attr)
 
void gf_mpd_url_free (void *_item)
 
GF_MPD_Periodgf_mpd_period_new ()
 
void gf_mpd_period_free (void *_item)
 
GF_Err gf_mpd_write (GF_MPD const *const mpd, FILE *out, Bool compact)
 
GF_Err gf_mpd_write_file (GF_MPD const *const mpd, const char *file_name)
 
GF_Err gf_mpd_write_m3u8_master_playlist (GF_MPD const *const mpd, FILE *out, const char *m3u8_name, GF_MPD_Period *period, GF_M3U8WriteMode mode)
 
GF_Err gf_mpd_parse_period (GF_MPD *mpd, GF_XMLNode *root)
 
GF_MPD_Descriptorgf_mpd_descriptor_new (const char *id, const char *uri, const char *value)
 
GF_MPD_AdaptationSetgf_mpd_adaptation_set_new ()
 
GF_Err gf_m3u8_to_mpd (const char *m3u8_file, const char *base_url, const char *mpd_file, u32 reload_count, char *mimeTypeForM3U8Segments, Bool do_import, Bool use_mpd_templates, Bool use_segment_timeline, GF_FileDownload *getter, GF_MPD *mpd, Bool parse_sub_playlist, Bool keep_files)
 
GF_Err gf_m3u8_solve_representation_xlink (GF_MPD_Representation *rep, const char *base_url, GF_FileDownload *getter, Bool *is_static, u64 *duration, u8 signature[GF_SHA1_DIGEST_SIZE])
 
GF_MPD_SegmentListgf_mpd_solve_segment_list_xlink (GF_MPD *mpd, GF_XMLNode *root)
 
GF_Err gf_mpd_init_smooth_from_dom (GF_XMLNode *root, GF_MPD *mpd, const char *default_base_url)
 
void gf_mpd_delete_segment_list (GF_MPD_SegmentList *segment_list)
 
void gf_mpd_del_list (GF_List *list, void(*__destructor)(void *), Bool reset_only)
 
void gf_mpd_descriptor_free (void *item)
 
GF_Err gf_mpd_split_adaptation_sets (GF_MPD *mpd)
 
GF_Err gf_mpd_smooth_to_mpd (char *smooth_file, GF_MPD *mpd, const char *default_base_url)
 
u32 gf_mpd_get_base_url_count (GF_MPD *mpd, GF_MPD_Period *period, GF_MPD_AdaptationSet *set, GF_MPD_Representation *rep)
 
GF_Err gf_mpd_resolve_url (GF_MPD *mpd, GF_MPD_Representation *rep, GF_MPD_AdaptationSet *set, GF_MPD_Period *period, const char *mpd_url, u32 base_url_index, GF_MPD_URLResolveType resolve_type, u32 item_index, u32 nb_segments_removed, char **out_url, u64 *out_range_start, u64 *out_range_end, u64 *segment_duration, Bool *is_in_base_url, char **out_key_url, bin128 *key_iv, u32 *out_start_number, s32 subseg_index)
 
Double gf_mpd_get_duration (GF_MPD *mpd)
 
void gf_mpd_resolve_segment_duration (GF_MPD_Representation *rep, GF_MPD_AdaptationSet *set, GF_MPD_Period *period, u64 *out_duration, u32 *out_timescale, u64 *out_pts_offset, GF_MPD_SegmentTimeline **out_segment_timeline)
 
GF_Err gf_mpd_get_segment_start_time_with_timescale (s32 in_segment_index, GF_MPD_Period const *const in_period, GF_MPD_AdaptationSet const *const in_set, GF_MPD_Representation const *const in_rep, u64 *out_segment_start_time, u64 *out_opt_segment_duration, u32 *out_opt_scale)
 
GF_Err gf_mpd_seek_in_period (Double seek_time, MPDSeekMode seek_mode, GF_MPD_Period const *const in_period, GF_MPD_AdaptationSet const *const in_set, GF_MPD_Representation const *const in_rep, u32 *out_segment_index, Double *out_opt_seek_time, Double *out_seg_dur)
 
void gf_mpd_base_url_free (void *_item)
 
GF_MPD_Representationgf_mpd_representation_new ()
 
void gf_mpd_representation_free (void *_item)
 
GF_MPD_SegmentTimelinegf_mpd_segmentimeline_new ()
 
GF_Err gf_mpd_load_cues (const char *cues_file, u32 stream_id, u32 *cues_timescale, Bool *use_edit_list, s32 *ts_offset, GF_DASHCueInfo **out_cues, u32 *nb_cues)
 
GF_MPD_Descriptorgf_mpd_get_descriptor (GF_List *desclist, char *scheme_id)
 
char * gf_mpd_resolve_subnumber (char *llhas_template, char *segment_filename, u32 part_idx)
 

Detailed Description

>