📄 isomedia_dev.h
字号:
typedef struct{ GF_ISOM_BOX u32 entry_count; GF_FontRecord *fonts;} GF_FontTableBox;typedef struct{ GF_ISOM_SAMPLE_ENTRY_FIELDS \ u32 displayFlags; s8 horizontal_justification; s8 vertical_justification; /*ARGB*/ u32 back_color; GF_BoxRecord default_box; GF_StyleRecord default_style; GF_FontTableBox *font_table;} GF_TextSampleEntryBox;typedef struct{ GF_ISOM_BOX u32 entry_count; GF_StyleRecord *styles;} GF_TextStyleBox;typedef struct{ GF_ISOM_BOX u16 startcharoffset; u16 endcharoffset; } GF_TextHighlightBox;typedef struct{ GF_ISOM_BOX /*ARGB*/ u32 hil_color;} GF_TextHighlightColorBox;typedef struct{ u32 highlight_endtime; u16 start_charoffset; u16 end_charoffset;} KaraokeRecord;typedef struct{ GF_ISOM_BOX u32 highlight_starttime; u16 entrycount; KaraokeRecord *records;} GF_TextKaraokeBox;typedef struct{ GF_ISOM_BOX u32 scroll_delay;} GF_TextScrollDelayBox;typedef struct{ GF_ISOM_BOX u16 startcharoffset; u16 endcharoffset; char *URL; char *URL_hint;} GF_TextHyperTextBox;typedef struct{ GF_ISOM_BOX GF_BoxRecord box;} GF_TextBoxBox;typedef struct{ GF_ISOM_BOX u16 startcharoffset; u16 endcharoffset;} GF_TextBlinkBox;typedef struct{ GF_ISOM_BOX u8 wrap_flag;} GF_TextWrapBox;/* MPEG-21 extensions*/typedef struct{ GF_ISOM_FULL_BOX u32 xml_length; char *xml;} GF_XMLBox;typedef struct{ GF_ISOM_FULL_BOX u32 data_length; char *data;} GF_BinaryXMLBox;typedef struct{ u64 extent_offset; u64 extent_length;#ifndef GPAC_READ_OLNLY /*for storage only*/ u64 original_extent_offset;#endif} GF_ItemExtentEntry;typedef struct { u16 item_ID; u16 data_reference_index; u64 base_offset;#ifndef GPAC_READ_OLNLY /*for storage only*/ u64 original_base_offset;#endif GF_List *extent_entries;} GF_ItemLocationEntry;typedef struct{ GF_ISOM_FULL_BOX u8 offset_size; u8 length_size; u8 base_offset_size; GF_List *location_entries;} GF_ItemLocationBox;typedef struct { GF_ISOM_FULL_BOX u16 item_ID;} GF_PrimaryItemBox;typedef struct{ GF_ISOM_FULL_BOX GF_List *protection_information;} GF_ItemProtectionBox;typedef struct { GF_ISOM_FULL_BOX u16 item_ID; u16 item_protection_index; /*zero-terminated strings*/ char *item_name; char *content_type; char *content_encoding; // needed to actually read the resource file, but not written in the MP21 file. char *full_path;} GF_ItemInfoEntryBox;typedef struct{ GF_ISOM_FULL_BOX GF_List *item_infos;} GF_ItemInfoBox;typedef struct{ GF_ISOM_BOX u32 data_format;} GF_OriginalFormatBox;typedef struct{ GF_ISOM_FULL_BOX u32 scheme_type; u32 scheme_version; char *URI;} GF_SchemeTypeBox;/*ISMACryp specific*/typedef struct{ GF_ISOM_FULL_BOX /*zero-terminated string*/ char *URI;} GF_ISMAKMSBox;/*ISMACryp specific*/typedef struct __isma_format_box{ GF_ISOM_FULL_BOX u8 selective_encryption; u8 key_indicator_length; u8 IV_length;} GF_ISMASampleFormatBox;typedef struct{ GF_ISOM_BOX GF_ISMAKMSBox *ikms; GF_ISMASampleFormatBox *isfm; struct __oma_kms_box *okms;} GF_SchemeInformationBox;typedef struct __tag_protect_box{ GF_ISOM_BOX GF_OriginalFormatBox *original_format; GF_SchemeTypeBox *scheme_type; GF_SchemeInformationBox *info;} GF_ProtectionInfoBox;typedef struct{ GF_ISOM_FULL_BOX GF_List *descriptors;} GF_IPMPInfoBox;typedef struct{ GF_ISOM_FULL_BOX GF_IPMP_ToolList *ipmp_tools; GF_List *descriptors;} GF_IPMPControlBox;typedef struct __tag_meta_box{ GF_ISOM_FULL_BOX GF_HandlerBox *handler; GF_PrimaryItemBox *primary_resource; GF_DataInformationBox *file_locations; GF_ItemLocationBox *item_locations; GF_ItemProtectionBox *protections; GF_ItemInfoBox *item_infos; GF_IPMPControlBox *IPMP_control; GF_List *other_boxes;} GF_MetaBox;#ifndef GF_ISOM_NO_FRAGMENTS/*V2 boxes - Movie Fragments*/typedef struct{ GF_ISOM_FULL_BOX u64 fragment_duration;} GF_MovieExtendsHeaderBox;typedef struct __tag_mvex_box{ GF_ISOM_BOX GF_List *TrackExList; GF_MovieExtendsHeaderBox *mehd; GF_ISOFile *mov;} GF_MovieExtendsBox;/*the TrackExtends contains default values for the track fragments*/typedef struct{ GF_ISOM_FULL_BOX u32 trackID; u32 def_sample_desc_index; u32 def_sample_duration; u32 def_sample_size; u32 def_sample_flags; GF_TrackBox *track;} GF_TrackExtendsBox;/*indicates the seq num of this fragment*/typedef struct{ GF_ISOM_FULL_BOX u32 sequence_number;} GF_MovieFragmentHeaderBox;/*MovieFragment is a container IN THE FILE, contains 1 fragment*/typedef struct{ GF_ISOM_BOX GF_MovieFragmentHeaderBox *mfhd; GF_List *TrackList; GF_ISOFile *mov;} GF_MovieFragmentBox;/*FLAGS for TRAF*/enum{ GF_ISOM_TRAF_BASE_OFFSET = 0x01, GF_ISOM_TRAF_SAMPLE_DESC = 0x02, GF_ISOM_TRAF_SAMPLE_DUR = 0x08, GF_ISOM_TRAF_SAMPLE_SIZE = 0x10, GF_ISOM_TRAF_SAMPLE_FLAGS = 0x20, GF_ISOM_TRAF_DUR_EMPTY = 0x10000};typedef struct{ GF_ISOM_FULL_BOX u32 trackID; /* all the following are optional fields */ u64 base_data_offset; u32 sample_desc_index; u32 def_sample_duration; u32 def_sample_size; u32 def_sample_flags; u32 EmptyDuration; u8 IFrameSwitching;} GF_TrackFragmentHeaderBox;typedef struct{ GF_ISOM_BOX GF_TrackFragmentHeaderBox *tfhd; GF_List *TrackRuns; /*keep a pointer to default flags*/ GF_TrackExtendsBox *trex; /*when data caching is on*/ u32 DataCache;} GF_TrackFragmentBox;/*FLAGS for TRUN : specify what is written in the SampleTable of TRUN*/enum{ GF_ISOM_TRUN_DATA_OFFSET = 0x01, GF_ISOM_TRUN_FIRST_FLAG = 0x04, GF_ISOM_TRUN_DURATION = 0x100, GF_ISOM_TRUN_SIZE = 0x200, GF_ISOM_TRUN_FLAGS = 0x400, GF_ISOM_TRUN_CTS_OFFSET = 0x800};typedef struct{ GF_ISOM_FULL_BOX u32 sample_count; /*the following are optional fields */ s32 data_offset; u32 first_sample_flags; /*can be empty*/ GF_List *entries; /*in write mode with data caching*/ GF_BitStream *cache;} GF_TrackFragmentRunBox;typedef struct{ u32 Duration; u32 size; u32 flags; u32 CTS_Offset;} GF_TrunEntry;#endif/*RTP Hint Track Sample Entry*/typedef struct{ GF_ISOM_SAMPLE_ENTRY_FIELDS u16 HintTrackVersion; u16 LastCompatibleVersion; u32 MaxPacketSize; GF_List *HintDataTable; /*this is where we store the current RTP sample in read/write mode*/ struct __tag_hint_sample *hint_sample; /*current hint sample in read mode, 1-based (0 is reset)*/ u32 cur_sample; u32 pck_sn, ts_offset, ssrc; GF_TrackReferenceTypeBox *hint_ref;} GF_HintSampleEntryBox;typedef struct{ GF_ISOM_BOX u32 subType; char *sdpText;} GF_RTPBox;typedef struct{ GF_ISOM_BOX char *sdpText;} GF_SDPBox;typedef struct{ GF_ISOM_BOX s32 timeOffset;} GF_RTPOBox;typedef struct{ GF_ISOM_BOX /*contains GF_SDPBox if in track, GF_RTPBox if in movie*/ GF_Box *SDP; GF_List *boxList;} GF_HintTrackInfoBox;typedef struct{ GF_ISOM_BOX u8 reserved; u8 prefered; u8 required;} GF_RelyHintBox;/*********************************************************** data entry tables for RTP***********************************************************/typedef struct{ GF_ISOM_BOX u32 timeScale;} GF_TSHintEntryBox;typedef struct{ GF_ISOM_BOX u32 TimeOffset; } GF_TimeOffHintEntryBox;typedef struct{ GF_ISOM_BOX u32 SeqOffset;} GF_SeqOffHintEntryBox;/*********************************************************** hint track information boxes for RTP***********************************************************//*Total number of bytes that will be sent, including 12-byte RTP headers, but not including any network headers*/typedef struct{ GF_ISOM_BOX u64 nbBytes;} GF_TRPYBox;/*32-bits version of trpy used in Darwin*/typedef struct{ GF_ISOM_BOX u32 nbBytes;} GF_TOTLBox;/*Total number of network packets that will be sent*/typedef struct{ GF_ISOM_BOX u64 nbPackets;} GF_NUMPBox;/*32-bits version of nump used in Darwin*/typedef struct{ GF_ISOM_BOX u32 nbPackets;} GF_NPCKBox;/*Total number of bytes that will be sent, not including 12-byte RTP headers*/typedef struct{ GF_ISOM_BOX u64 nbBytes;} GF_NTYLBox;/*32-bits version of tpyl used in Darwin*/typedef struct{ GF_ISOM_BOX u32 nbBytes;} GF_TPAYBox;/*Maximum data rate in bits per second.*/typedef struct{ GF_ISOM_BOX u32 granularity; u32 maxDataRate;} GF_MAXRBox;/*Total number of bytes from the media track to be sent*/typedef struct{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -