libgpac
Documentation of the core library of GPAC
|
#include "mp4box.h"
#include <gpac/media_tools.h>
#include <gpac/main.h>
#include <gpac/ietf.h>
#include <gpac/crypt_tools.h>
#include <gpac/constants.h>
#include <gpac/filters.h>
#include <gpac/mpd.h>
Data Structures | |
struct | SDPLine |
struct | MetaRef |
struct | MetaAction |
struct | TrackAction |
struct | TSELAction |
struct | MP4BoxArg |
Macros | |
#define | BUFFSIZE 8192 |
#define | DEFAULT_INTERLEAVING_IN_SEC 0.5 |
#define | LANG_SIZE 50 |
#define | ARG_OPEN_EDIT 1 |
#define | ARG_NEED_SAVE 1<<1 |
#define | ARG_NO_INPLACE 1<<2 |
#define | ARG_BIT_MASK 1<<3 |
#define | ARG_BIT_MASK_REM 1<<4 |
#define | ARG_HAS_VALUE 1<<5 |
#define | ARG_DIV_1000 1<<6 |
#define | ARG_NON_ZERO 1<<7 |
#define | ARG_64BITS 1<<8 |
#define | ARG_IS_4CC 1<<9 |
#define | ARG_BOOL_REV 1<<10 |
#define | ARG_INT_INC 1<<11 |
#define | ARG_IS_FUN 1<<12 |
#define | ARG_EMPTY 1<<13 |
#define | ARG_PUSH_SYSARGS 1<<14 |
#define | ARG_IS_FUN2 1<<15 |
#define | MP4BOX_ARG(_a, _c, _f, _g, _h, _i, _j) {_a, NULL, _c, NULL, NULL, _f, _g, _h, _i, _j} |
#define | MP4BOX_ARG_ALT(_a, _b, _c, _f, _g, _h, _i, _j) {_a, _b, _c, NULL, NULL, _f, _g, _h, _i, _j} |
#define | MP4BOX_ARG_S(_a, _s, _c, _g, _h, _i, _j) {_a, NULL, _c, _s, NULL, GF_ARG_CUSTOM, _g, _h, _i, _j} |
#define | MP4BOX_ARG_S_ALT(_a, _b, _s, _c, _g, _h, _i, _j) {_a, _b, _c, _s, NULL, GF_ARG_CUSTOM, _g, _h, _i, _j} |
#define | CHECK_IMGPROP |
#define | DOC_AUTOGEN_WARNING "<!-- automatically generated - do not edit, patch gpac/applications/mp4box/mp4box.c -->\n" |
#define | BASE_PAYT 96 |
Typedefs | |
typedef u32(* | parse_arg_fun) (char *arg_val, u32 param) |
typedef u32(* | parse_arg_fun2) (char *arg_name, char *arg_val, u32 param) |
Functions | |
static u32 | mp4box_cleanup (u32 ret_code) |
GF_FileType | get_file_type_by_ext (char *inName) |
static void | init_global_vars () |
static u32 | parse_meta_args (char *opts, MetaActionType act_type) |
static Bool | parse_tsel_args (char *opts, TSELActionType act) |
u32 | parse_u32 (char *val, char *log_name) |
s32 | parse_s32 (char *val, char *log_name) |
static Bool | parse_track_id (TrackIdentifier *tkid, char *arg_val, Bool allow_all) |
Bool | print_version (char *arg_val, u32 param) |
void | PrintGeneralUsage () |
static void | PrintSplitUsage () |
void | PrintDASHUsage () |
void | PrintImportUsage () |
Bool | mp4box_check_isom_fileopt (char *opt) |
Bool | mp4box_check_non_extk_fileopt (char *opt) |
void | PrintEncodeUsage () |
void | PrintEncryptUsage () |
void | PrintHintUsage () |
void | PrintExtractUsage () |
void | PrintDumpUsage () |
void | PrintMetaUsage () |
void | PrintSWFUsage () |
void | PrintLiveUsage () |
void | PrintCoreUsage () |
void | PrintTags () |
void | PrintCICP () |
void | PrintUsage () |
static u32 | PrintHelpForArgs (char *arg_name, MP4BoxArg *args, GF_GPACArg *_args, u32 search_type, char *class_name) |
static Bool | PrintHelpArg (char *arg_name, u32 search_type, GF_FilterSession *fs) |
static void | PrintHelp (char *arg_name, Bool search_desc, Bool no_match) |
u32 | parse_sdp_ext (char *arg_val, u32 param) |
GF_DashSegmenterInput * | set_dash_input (GF_DashSegmenterInput *dash_inputs, char *name, u32 *nb_dash_inputs) |
static Bool | create_new_track_action (char *arg_val, u32 act_type, u32 dump_type) |
u32 | parse_track_dump (char *arg, u32 dump_type) |
u32 | parse_track_action (char *arg, u32 act_type) |
u32 | parse_comp_box (char *arg_val, u32 opt) |
u32 | parse_dnal (char *arg_val, u32 opt) |
u32 | parse_dsap (char *arg_val, u32 opt) |
u32 | parse_bs_switch (char *arg_val, u32 opt) |
u32 | parse_cp_loc (char *arg_val, u32 opt) |
u32 | parse_pssh (char *arg_val, u32 opt) |
u32 | parse_sdtp (char *arg_val, u32 opt) |
u32 | parse_rap_ref (char *arg_val, u32 opt) |
u32 | parse_store_mode (char *arg_val, u32 opt) |
u32 | parse_base_url (char *arg_val, u32 opt) |
u32 | parse_multi_rtp (char *arg_val, u32 opt) |
u32 | parse_senc_param (char *arg_val, u32 opt) |
u32 | parse_cryp (char *arg_val, u32 opt) |
u32 | parse_dash_profile (char *arg_val, u32 opt) |
u32 | parse_fps (char *arg_val, u32 opt) |
u32 | parse_split (char *arg_val, u32 opt) |
u32 | parse_brand (char *b, u32 opt) |
u32 | parse_mpegu (char *arg_val, u32 opt) |
u32 | parse_file_info (char *arg_val, u32 opt) |
u32 | parse_boxpatch (char *arg_val, u32 opt) |
u32 | parse_compress (char *arg_val, u32 opt) |
u32 | parse_dump_udta (char *code, u32 opt) |
u32 | parse_dump_ts (char *arg_val, u32 opt) |
u32 | parse_ttxt (char *arg_val, u32 opt) |
u32 | parse_dashlive (char *arg, char *arg_val, u32 opt) |
u32 | parse_help (char *arg_val, u32 opt) |
u32 | parse_gendoc (char *name, u32 opt) |
u32 | mp4box_parse_single_arg_class (int argc, char **argv, char *arg, u32 *arg_index, MP4BoxArg *arg_class) |
Bool | mp4box_parse_single_arg (int argc, char **argv, char *arg, u32 *arg_index) |
u32 | mp4box_parse_args (int argc, char **argv) |
void | scene_coding_log (void *cbk, GF_LOG_Level log_level, GF_LOG_Tool log_tool, const char *fmt, va_list vlist) |
void | SetupClockReferences (GF_ISOFile *file) |
GF_Err | HintFile (GF_ISOFile *file, u32 MTUSize, u32 max_ptime, u32 rtp_rate, u32 base_flags, Bool copy_data, Bool interleave, Bool regular_iod, Bool single_group, Bool hint_no_offset) |
static void | check_media_profile (GF_ISOFile *file, u32 track) |
void | remove_systems_tracks (GF_ISOFile *file) |
static GF_Err | xml_bs_to_bin (char *inName, char *outName, u32 dump_std) |
static u64 | do_size_top_boxes (char *inName, char *compress_top_boxes, u32 mode) |
static GF_Err | do_compress_top_boxes (char *inName, char *outName) |
static GF_Err | hash_file (char *name, u32 dump_std) |
static u32 | do_raw_cat () |
static u32 | do_write_udp () |
static u32 | convert_mpd () |
static u32 | do_import_sub () |
static u32 | do_add_cat (int argc, char **argv) |
static GF_Err | do_scene_encode () |
static GF_Err | do_dash () |
defined(GPAC_DISABLE_ISOM_WRITE) && !defined(GPAC_DISABLE_SCENE_ENCODER) && !defined(GPAC_DISABLE_MEDIA_IMPORT) More... | |
static GF_Err | do_export_tracks_non_isobmf () |
static GF_Err | do_dump_iod () |
static u32 | get_track_id (GF_ISOFile *file, TrackIdentifier *tkid) |
static GF_Err | do_export_tracks () |
static GF_Err | do_meta_act () |
static GF_Err | do_tsel_act () |
static void | do_ipod_conv () |
static GF_Err | do_track_act () |
static Bool | do_qt_keys (char *name, char *val) |
static GF_Err | do_itunes_tag () |
static void | set_sdp_ext () |
static GF_Err | do_remux_file () |
int | mp4box_main (int argc, char **argv) |
struct SDPLine |
struct MetaAction |
Data Fields | ||
---|---|---|
MetaActionType | act_type | |
Bool | root_meta | |
Bool | use_dref | |
TrackIdentifier | track_id | |
u32 | meta_4cc | |
char * | szPath | |
char * | szName | |
char * | mime_type | |
char * | enc_type | |
char * | keep_props | |
u32 | item_id | |
Bool | primary | |
Bool | replace | |
u32 | item_type | |
u32 | ref_item_id | |
GF_List * | item_refs | |
u32 | group_id | |
u32 | group_type | |
GF_ImageItemProperties * | image_props |
struct TrackAction |
Data Fields | ||
---|---|---|
TrackActionType | act_type | |
TrackIdentifier | target_track | |
char | lang[LANG_SIZE] | |
GF_Fraction | delay | |
const char * | kms | |
const char * | hdl_name | |
s32 | par_num | |
s32 | par_den | |
u8 | force_par | |
u8 | rewrite_bs | |
u32 | dump_type | |
u32 | sample_num | |
char * | out_name | |
char * | src_name | |
char * | string | |
u32 | udta_type | |
char * | kind_scheme | |
char * | kind_value | |
TrackIdentifier | newTrackID | |
s32 | clap_wnum | |
s32 | clap_wden | |
s32 | clap_hnum | |
s32 | clap_hden | |
s32 | clap_honum | |
s32 | clap_hoden | |
s32 | clap_vonum | |
s32 | clap_voden | |
s32 | mx[9] | |
u64 | time |
struct TSELAction |
Data Fields | ||
---|---|---|
TSELActionType | act_type | |
TrackIdentifier | target_track | |
TrackIdentifier | reference_track | |
u32 | criteria[30] | |
u32 | nb_criteria | |
Bool | is_switchGroup | |
u32 | switchGroupID |
struct MP4BoxArg |
Data Fields | ||
---|---|---|
GF_GPAC_ARG_BASE void * | arg_ptr | |
u32 | argv_val | |
u16 | parse_flags |
#define BUFFSIZE 8192 |
#define DEFAULT_INTERLEAVING_IN_SEC 0.5 |
#define LANG_SIZE 50 |
#define ARG_OPEN_EDIT 1 |
#define ARG_NEED_SAVE 1<<1 |
#define ARG_NO_INPLACE 1<<2 |
#define ARG_BIT_MASK 1<<3 |
#define ARG_BIT_MASK_REM 1<<4 |
#define ARG_HAS_VALUE 1<<5 |
#define ARG_DIV_1000 1<<6 |
#define ARG_NON_ZERO 1<<7 |
#define ARG_64BITS 1<<8 |
#define ARG_IS_4CC 1<<9 |
#define ARG_BOOL_REV 1<<10 |
#define ARG_INT_INC 1<<11 |
#define ARG_IS_FUN 1<<12 |
#define ARG_EMPTY 1<<13 |
#define ARG_PUSH_SYSARGS 1<<14 |
#define ARG_IS_FUN2 1<<15 |
#define MP4BOX_ARG | ( | _a, | |
_c, | |||
_f, | |||
_g, | |||
_h, | |||
_i, | |||
_j | |||
) | {_a, NULL, _c, NULL, NULL, _f, _g, _h, _i, _j} |
#define MP4BOX_ARG_ALT | ( | _a, | |
_b, | |||
_c, | |||
_f, | |||
_g, | |||
_h, | |||
_i, | |||
_j | |||
) | {_a, _b, _c, NULL, NULL, _f, _g, _h, _i, _j} |
#define MP4BOX_ARG_S | ( | _a, | |
_s, | |||
_c, | |||
_g, | |||
_h, | |||
_i, | |||
_j | |||
) | {_a, NULL, _c, _s, NULL, GF_ARG_CUSTOM, _g, _h, _i, _j} |
#define MP4BOX_ARG_S_ALT | ( | _a, | |
_b, | |||
_s, | |||
_c, | |||
_g, | |||
_h, | |||
_i, | |||
_j | |||
) | {_a, _b, _c, _s, NULL, GF_ARG_CUSTOM, _g, _h, _i, _j} |
#define CHECK_IMGPROP |
#define DOC_AUTOGEN_WARNING "<!-- automatically generated - do not edit, patch gpac/applications/mp4box/mp4box.c -->\n" |
#define BASE_PAYT 96 |
enum MetaActionType |
enum TrackActionType |
anonymous enum |
enum TSELActionType |
GF_FileType get_file_type_by_ext | ( | char * | inName | ) |
defined(GPAC_DISABLE_ISOM_WRITE) && !defined(GPAC_DISABLE_AV_PARSERS)
|
static |
|
static |
|
static |
u32 parse_u32 | ( | char * | val, |
char * | log_name | ||
) |
s32 parse_s32 | ( | char * | val, |
char * | log_name | ||
) |
|
static |
void PrintGeneralUsage | ( | ) |
|
static |
void PrintDASHUsage | ( | ) |
void PrintImportUsage | ( | ) |
Bool mp4box_check_isom_fileopt | ( | char * | opt | ) |
Bool mp4box_check_non_extk_fileopt | ( | char * | opt | ) |
void PrintEncodeUsage | ( | ) |
void PrintEncryptUsage | ( | ) |
void PrintHintUsage | ( | ) |
void PrintExtractUsage | ( | ) |
void PrintDumpUsage | ( | ) |
void PrintMetaUsage | ( | ) |
void PrintSWFUsage | ( | ) |
void PrintLiveUsage | ( | ) |
void PrintCoreUsage | ( | ) |
void PrintTags | ( | ) |
void PrintCICP | ( | ) |
void PrintUsage | ( | ) |
|
static |
GF_DashSegmenterInput* set_dash_input | ( | GF_DashSegmenterInput * | dash_inputs, |
char * | name, | ||
u32 * | nb_dash_inputs | ||
) |
u32 mp4box_parse_single_arg_class | ( | int | argc, |
char ** | argv, | ||
char * | arg, | ||
u32 * | arg_index, | ||
MP4BoxArg * | arg_class | ||
) |
u32 mp4box_parse_args | ( | int | argc, |
char ** | argv | ||
) |
void scene_coding_log | ( | void * | cbk, |
GF_LOG_Level | log_level, | ||
GF_LOG_Tool | log_tool, | ||
const char * | fmt, | ||
va_list | vlist | ||
) |
void SetupClockReferences | ( | GF_ISOFile * | file | ) |
GF_Err HintFile | ( | GF_ISOFile * | file, |
u32 | MTUSize, | ||
u32 | max_ptime, | ||
u32 | rtp_rate, | ||
u32 | base_flags, | ||
Bool | copy_data, | ||
Bool | interleave, | ||
Bool | regular_iod, | ||
Bool | single_group, | ||
Bool | hint_no_offset | ||
) |
|
static |
void remove_systems_tracks | ( | GF_ISOFile * | file | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
GPAC_DISABLE_MEDIA_IMPORT && !GPAC_DISABLE_ISOM_WRITE
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
defined(GPAC_DISABLE_ISOM_HINTING) && !defined(GPAC_DISABLE_SENG)
int mp4box_main | ( | int | argc, |
char ** | argv | ||
) |
GPAC_DISABLE_MEDIA_IMPORT && !GPAC_DISABLE_ISOM_WRITE
defined(GPAC_DISABLE_ISOM_WRITE) && !defined(GPAC_DISABLE_SCENE_ENCODER) && !defined(GPAC_DISABLE_MEDIA_IMPORT)
defined(GPAC_DISABLE_ISOM_HINTING) && !defined(GPAC_DISABLE_SENG)
char outfile[GF_MAX_PATH] |
GF_SMEncodeOptions smenc_opts |
u32 swf_flags |
GF_Fraction import_fps |
FILE* helpout |
u32 help_flags |
Double interleaving_time |
Double split_duration |
Double split_start |
Double dash_duration |
Double dash_subduration |
Double swf_flatten_angle |
Double mpd_live_duration |
Double min_buffer |
Double mpd_update_time |
Bool arg_parse_res |
Bool dash_duration_strict |
Bool dvbhdemux |
Bool keep_sys_tracks |
Bool align_cat |
Bool do_hint |
Bool do_save |
Bool full_interleave |
Bool do_frag |
Bool hint_interleave |
Bool dump_rtp |
Bool regular_iod |
Bool remove_sys_tracks |
Bool remove_hint |
Bool remove_root_od |
Bool print_sdp |
Bool open_edit |
Bool dump_cr |
Bool force_ocr |
Bool encode |
Bool do_scene_log |
Bool dump_srt |
Bool dump_ttxt |
Bool do_saf |
Bool dump_m2ts |
Bool dump_cart |
Bool dump_chunk |
Bool dump_check_xml |
Bool fuzz_chk |
Bool do_hash |
Bool verbose |
Bool force_cat |
Bool pack_wgt |
Bool single_group |
Bool clean_groups |
Bool dash_live |
Bool no_fragments_defaults |
Bool single_traf_per_moof |
Bool tfdt_per_traf |
Bool hls_clock |
Bool do_mpd_rip |
Bool merge_vtt_cues |
Bool get_nb_tracks |
Bool no_inplace |
Bool merge_last_seg |
Bool freeze_box_order |
Bool no_odf_conf |
Bool insert_utc |
Bool chunk_mode |
Bool HintCopy |
Bool hint_no_offset |
Bool do_bin_xml |
Bool frag_real_time |
Bool force_co64 |
Bool live_scene |
Bool use_mfra |
Bool dump_iod |
Bool samplegroups_in_traf |
Bool mvex_after_traks |
Bool daisy_chain_sidx |
Bool use_ssix |
Bool single_segment |
Bool single_file |
Bool segment_timeline |
Bool has_add_image |
Bool strict_cues |
Bool use_url_template |
Bool seg_at_rap |
Bool frag_at_rap |
Bool memory_frags |
Bool keep_utc |
Bool has_next_arg |
Bool no_cache |
Bool no_loop |
Bool conv_type_from_ext |
Bool dump_keep_comp |
u32 stat_level |
u32 hint_flags |
u32 import_flags |
u32 nb_add |
u32 nb_cat |
u32 crypt_type |
u32 agg_samples |
u32 nb_sdp_ex |
u32 max_ptime |
u32 split_size |
u32 nb_meta_act |
u32 nb_track_act |
u32 rtp_rate |
u32 major_brand |
u32 nb_alt_brand_add |
u32 nb_alt_brand_rem |
u32 old_interleave |
u32 minor_version |
u32 conv_type |
u32 nb_tsel_acts |
u32 program_number |
u32 time_shift_depth |
u32 initial_moof_sn |
u32 dump_std |
u32 import_subtitle |
u32 dump_saps_mode |
u32 force_new |
u32 compress_moov |
u32 track_dump_type |
u32 dump_isom |
u32 dump_timestamps |
u32 dump_nal_type |
u32 do_flat |
u32 print_info |
u32 size_top_box |
u32 fs_dump_flags |
u32 dump_chap |
u32 dump_udta_type |
u32 moov_pading |
u32 sdtp_in_traf |
u32 segment_marker |
u32 timescale |
u32 dash_scale |
u32 MTUSize |
u32 run_for |
u32 dash_cumulated_time |
u32 dash_prev_time |
u32 dash_now_time |
u32 adjust_split_end |
u32 nb_mpd_base_urls |
u32 nb_dash_inputs |
u64 initial_tfdt |
s32 subsegs_per_sidx |
s32 laser_resolution |
s32 ast_offset_ms |
char* inName |
char * outName |
char * mediaSource |
char * input_ctx |
char * output_ctx |
char * drm_file |
char * avi2raw |
char * cprt |
char * chap_file |
char * chap_file_qt |
char * itunes_tags |
char * pack_file |
char* raw_cat |
char * seg_name |
char * dash_ctx_file |
char * compress_top_boxes |
char * high_dynamc_range_filename |
char * use_init_seg |
char * box_patch_filename |
char * udp_dest |
char* do_mpd_conv |
char * dash_start_date |
char * dash_profile_extension |
char * dash_cues |
char * do_wget |
char * mux_name |
char * seg_ext |
char * init_seg_ext |
char * dash_title |
char * dash_source |
char* dash_more_info |
char * split_range_str |
GF_DASH_ContentLocationMode cp_location_mode |
GF_MemTrackerType mem_track |
GF_DASHPSSHMode pssh_mode |
GF_DashProfile dash_profile |
GF_DASH_SplitMode dash_split_mode |
GF_DashSwitchingMode bitstream_switching_mode |
GF_DashDynamicMode dash_mode |
GF_SceneDumpFormat dump_mode |
MetaAction* metas |
TrackAction* tracks |
TSELAction* tsel_acts |
SDPLine* sdp_lines |
u32* brand_add |
u32* brand_rem |
char** mpd_base_urls |
GF_DashSegmenterInput* dash_inputs |
FILE* logfile |
GF_ISOFile* file |
TrackIdentifier info_track_id |
TrackIdentifier ttxt_track_id |
TrackIdentifier dump_nal_track |
TrackIdentifier dump_saps_track |
TrackIdentifier box_patch_track |
TrackIdentifier dump_udta_track |
MP4BoxArg m4b_gen_args[] |
MP4BoxArg m4b_split_args[] |
MP4BoxArg m4b_dash_args[] |
MP4BoxArg m4b_imp_args[] |
|
static |
MP4BoxArg m4b_senc_args[] |
MP4BoxArg m4b_crypt_args[] |
MP4BoxArg m4b_hint_args[] |
MP4BoxArg m4b_extr_args[] |
MP4BoxArg m4b_dump_args[] |
MP4BoxArg m4b_meta_args[] |
MP4BoxArg m4b_swf_args[] |
MP4BoxArg m4b_liveenc_args[] |
MP4BoxArg m4b_usage_args[] |