isomedia_dev.h
来自「gaca源码」· C头文件 代码 · 共 2,422 行 · 第 1/5 页
H
2,422 行
u16 bytesPerComp;
u16 samplesPerComp;
} GF_SampleDTE;
typedef struct
{
GF_ISMO_BASE_DTE_ENTRY
s8 trackRefIndex;
u32 streamDescIndex;
u16 dataLength;
u32 byteOffset;
u32 reserved;
} GF_StreamDescDTE;
GF_GenericDTE *NewDTE(u8 type);
void DelDTE(GF_GenericDTE *dte);
GF_Err ReadDTE(GF_GenericDTE *dte, GF_BitStream *bs);
GF_Err WriteDTE(GF_GenericDTE *dte, GF_BitStream *bs);
GF_Err OffsetDTE(GF_GenericDTE *dte, u32 offset, u32 HintSampleNumber);
/*****************************************************
RTP Sample
*****************************************************/
/*data cache when reading*/
typedef struct __tag_hint_data_cache
{
GF_ISOSample *samp;
GF_TrackBox *trak;
u32 sample_num;
} GF_HintDataCache;
typedef struct __tag_hint_sample
{
/*used internally for future protocol support (write only)*/
u8 HintType;
/*QT packets*/
u16 reserved;
GF_List *packetTable;
char *AdditionalData;
u32 dataLength;
/*used internally for hinting*/
u64 TransmissionTime;
/*for read only, used to store samples fetched while building packets*/
GF_List *sample_cache;
} GF_HintSample;
GF_HintSample *gf_isom_hint_sample_new();
void gf_isom_hint_sample_del(GF_HintSample *ptr);
GF_Err gf_isom_hint_sample_read(GF_HintSample *ptr, GF_BitStream *bs, u32 sampleSize);
u32 gf_isom_hint_sample_write(GF_HintSample *ptr, GF_BitStream *bs);
u32 gf_isom_hint_sample_size(GF_HintSample *ptr);
/*****************************************************
Hint Packets (generic packet for future protocol support)
*****************************************************/
#define GF_ISOM_BASE_PACKET \
s32 relativeTransTime;
typedef struct
{
GF_ISOM_BASE_PACKET
} GF_HintPacket;
GF_HintPacket *gf_isom_hint_pck_new(u8 HintType);
void gf_isom_hint_pck_del(u8 HintType, GF_HintPacket *ptr);
GF_Err gf_isom_hint_pck_read(u8 HintType, GF_HintPacket *ptr, GF_BitStream *bs);
GF_Err gf_isom_hint_pck_write(u8 HintType, GF_HintPacket *ptr, GF_BitStream *bs);
u32 gf_isom_hint_pck_size(u8 HintType, GF_HintPacket *ptr);
GF_Err gf_isom_hint_pck_offset(u8 HintType, GF_HintPacket *ptr, u32 offset, u32 HintSampleNumber);
GF_Err gf_isom_hint_pck_add_dte(u8 HintType, GF_HintPacket *ptr, GF_GenericDTE *dte, u8 AtBegin);
/*get the size of the packet AS RECONSTRUCTED BY THE SERVER (without CSRC)*/
u32 gf_isom_hint_pck_length(u8 HintType, GF_HintPacket *ptr);
/*the RTP packet*/
typedef struct
{
GF_ISOM_BASE_PACKET
/*RTP Header*/
u8 P_bit;
u8 X_bit;
u8 M_bit;
/*on 7 bits */
u8 payloadType;
u16 SequenceNumber;
/*Hinting flags*/
u8 B_bit;
u8 R_bit;
/*ExtraInfos TLVs - not really used */
GF_List *TLV;
/*DataTable - contains the DTEs...*/
GF_List *DataTable;
} GF_RTPPacket;
GF_RTPPacket *gf_isom_hint_rtp_new();
void gf_isom_hint_rtp_del(GF_RTPPacket *ptr);
GF_Err gf_isom_hint_rtp_read(GF_RTPPacket *ptr, GF_BitStream *bs);
GF_Err gf_isom_hint_rtp_write(GF_RTPPacket *ptr, GF_BitStream *bs);
u32 gf_isom_hint_rtp_size(GF_RTPPacket *ptr);
GF_Err gf_isom_hint_rtp_offset(GF_RTPPacket *ptr, u32 offset, u32 HintSampleNumber);
u32 gf_isom_hint_rtp_length(GF_RTPPacket *ptr);
struct _3gpp_text_sample
{
char *text;
u32 len;
GF_TextStyleBox *styles;
/*at most one of these*/
GF_TextHighlightColorBox *highlight_color;
GF_TextScrollDelayBox *scroll_delay;
GF_TextBoxBox *box;
GF_TextWrapBox *wrap;
GF_List *others;
GF_TextKaraokeBox *cur_karaoke;
};
GF_TextSample *gf_isom_parse_texte_sample(GF_BitStream *bs);
GF_TextSample *gf_isom_parse_texte_sample_from_data(char *data, u32 dataLength);
/*
these are exported just in case, there should never be needed outside the lib
*/
GF_Box *reftype_New();
GF_Box *free_New();
GF_Box *mdat_New();
GF_Box *moov_New();
GF_Box *mvhd_New();
GF_Box *mdhd_New();
GF_Box *vmhd_New();
GF_Box *smhd_New();
GF_Box *hmhd_New();
GF_Box *nmhd_New();
GF_Box *stbl_New();
GF_Box *dinf_New();
GF_Box *url_New();
GF_Box *urn_New();
GF_Box *cprt_New();
GF_Box *chpl_New();
GF_Box *hdlr_New();
GF_Box *iods_New();
GF_Box *trak_New();
GF_Box *mp4s_New();
GF_Box *mp4v_New();
GF_Box *mp4a_New();
GF_Box *edts_New();
GF_Box *udta_New();
GF_Box *dref_New();
GF_Box *stsd_New();
GF_Box *stts_New();
GF_Box *ctts_New();
GF_Box *stsh_New();
GF_Box *elst_New();
GF_Box *stsc_New();
GF_Box *stsz_New();
GF_Box *stco_New();
GF_Box *stss_New();
GF_Box *stdp_New();
GF_Box *sdtp_New();
GF_Box *co64_New();
GF_Box *esds_New();
GF_Box *minf_New();
GF_Box *tkhd_New();
GF_Box *tref_New();
GF_Box *mdia_New();
GF_Box *defa_New();
GF_Box *uuid_New();
GF_Box *void_New();
GF_Box *stsf_New();
GF_Box *gnrm_New();
GF_Box *gnrv_New();
GF_Box *gnra_New();
GF_Box *pdin_New();
void reftype_del(GF_Box *);
void free_del(GF_Box *);
void mdat_del(GF_Box *);
void moov_del(GF_Box *);
void mvhd_del(GF_Box *);
void mdhd_del(GF_Box *);
void vmhd_del(GF_Box *);
void smhd_del(GF_Box *);
void hmhd_del(GF_Box *);
void nmhd_del(GF_Box *);
void stbl_del(GF_Box *);
void dinf_del(GF_Box *);
void url_del(GF_Box *);
void urn_del(GF_Box *);
void chpl_del(GF_Box *);
void cprt_del(GF_Box *);
void hdlr_del(GF_Box *);
void iods_del(GF_Box *);
void trak_del(GF_Box *);
void mp4s_del(GF_Box *);
void mp4v_del(GF_Box *);
void mp4a_del(GF_Box *);
void edts_del(GF_Box *);
void udta_del(GF_Box *);
void dref_del(GF_Box *);
void stsd_del(GF_Box *);
void stts_del(GF_Box *);
void ctts_del(GF_Box *);
void stsh_del(GF_Box *);
void elst_del(GF_Box *);
void stsc_del(GF_Box *);
void stsz_del(GF_Box *);
void stco_del(GF_Box *);
void stss_del(GF_Box *);
void stdp_del(GF_Box *);
void sdtp_del(GF_Box *);
void co64_del(GF_Box *);
void esds_del(GF_Box *);
void minf_del(GF_Box *);
void tkhd_del(GF_Box *);
void tref_del(GF_Box *);
void mdia_del(GF_Box *);
void defa_del(GF_Box *);
void uuid_del(GF_Box *);
void void_del(GF_Box *);
void stsf_del(GF_Box *);
void gnrm_del(GF_Box *);
void gnrv_del(GF_Box *);
void gnra_del(GF_Box *);
void pdin_del(GF_Box *);
GF_Err reftype_Write(GF_Box *s, GF_BitStream *bs);
GF_Err free_Write(GF_Box *s, GF_BitStream *bs);
GF_Err mdat_Write(GF_Box *s, GF_BitStream *bs);
GF_Err moov_Write(GF_Box *s, GF_BitStream *bs);
GF_Err mvhd_Write(GF_Box *s, GF_BitStream *bs);
GF_Err mdhd_Write(GF_Box *s, GF_BitStream *bs);
GF_Err vmhd_Write(GF_Box *s, GF_BitStream *bs);
GF_Err smhd_Write(GF_Box *s, GF_BitStream *bs);
GF_Err hmhd_Write(GF_Box *s, GF_BitStream *bs);
GF_Err nmhd_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stbl_Write(GF_Box *s, GF_BitStream *bs);
GF_Err dinf_Write(GF_Box *s, GF_BitStream *bs);
GF_Err url_Write(GF_Box *s, GF_BitStream *bs);
GF_Err urn_Write(GF_Box *s, GF_BitStream *bs);
GF_Err chpl_Write(GF_Box *s, GF_BitStream *bs);
GF_Err cprt_Write(GF_Box *s, GF_BitStream *bs);
GF_Err hdlr_Write(GF_Box *s, GF_BitStream *bs);
GF_Err iods_Write(GF_Box *s, GF_BitStream *bs);
GF_Err trak_Write(GF_Box *s, GF_BitStream *bs);
GF_Err mp4s_Write(GF_Box *s, GF_BitStream *bs);
GF_Err mp4v_Write(GF_Box *s, GF_BitStream *bs);
GF_Err mp4a_Write(GF_Box *s, GF_BitStream *bs);
GF_Err edts_Write(GF_Box *s, GF_BitStream *bs);
GF_Err udta_Write(GF_Box *s, GF_BitStream *bs);
GF_Err dref_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stsd_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stts_Write(GF_Box *s, GF_BitStream *bs);
GF_Err ctts_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stsh_Write(GF_Box *s, GF_BitStream *bs);
GF_Err elst_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stsc_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stsz_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stco_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stss_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stdp_Write(GF_Box *s, GF_BitStream *bs);
GF_Err sdtp_Write(GF_Box *s, GF_BitStream *bs);
GF_Err co64_Write(GF_Box *s, GF_BitStream *bs);
GF_Err esds_Write(GF_Box *s, GF_BitStream *bs);
GF_Err minf_Write(GF_Box *s, GF_BitStream *bs);
GF_Err tkhd_Write(GF_Box *s, GF_BitStream *bs);
GF_Err tref_Write(GF_Box *s, GF_BitStream *bs);
GF_Err mdia_Write(GF_Box *s, GF_BitStream *bs);
GF_Err defa_Write(GF_Box *s, GF_BitStream *bs);
GF_Err uuid_Write(GF_Box *s, GF_BitStream *bs);
GF_Err void_Write(GF_Box *s, GF_BitStream *bs);
GF_Err stsf_Write(GF_Box *s, GF_BitStream *bs);
GF_Err gnrm_Write(GF_Box *s, GF_BitStream *bs);
GF_Err gnrv_Write(GF_Box *s, GF_BitStream *bs);
GF_Err gnra_Write(GF_Box *s, GF_BitStream *bs);
GF_Err pdin_Write(GF_Box *s, GF_BitStream *bs);
GF_Err reftype_Size(GF_Box *);
GF_Err free_Size(GF_Box *);
GF_Err mdat_Size(GF_Box *);
GF_Err moov_Size(GF_Box *);
GF_Err mvhd_Size(GF_Box *);
GF_Err mdhd_Size(GF_Box *);
GF_Err vmhd_Size(GF_Box *);
GF_Err smhd_Size(GF_Box *);
GF_Err hmhd_Size(GF_Box *);
GF_Err nmhd_Size(GF_Box *);
GF_Err stbl_Size(GF_Box *);
GF_Err dinf_Size(GF_Box *);
GF_Err url_Size(GF_Box *);
GF_Err urn_Size(GF_Box *);
GF_Err chpl_Size(GF_Box *);
GF_Err cprt_Size(GF_Box *);
GF_Err hdlr_Size(GF_Box *);
GF_Err iods_Size(GF_Box *);
GF_Err trak_Size(GF_Box *);
GF_Err mp4s_Size(GF_Box *);
GF_Err mp4v_Size(GF_Box *);
GF_Err mp4a_Size(GF_Box *);
GF_Err edts_Size(GF_Box *);
GF_Err udta_Size(GF_Box *);
GF_Err dref_Size(GF_Box *);
GF_Err stsd_Size(GF_Box *);
GF_Err stts_Size(GF_Box *);
GF_Err ctts_Size(GF_Box *);
GF_Err stsh_Size(GF_Box *);
GF_Err elst_Size(GF_Box *);
GF_Err stsc_Size(GF_Box *);
GF_Err stsz_Size(GF_Box *);
GF_Err stco_Size(GF_Box *);
GF_Err stss_Size(GF_Box *);
GF_Err stdp_Size(GF_Box *);
GF_Err sdtp_Size(GF_Box *);
GF_Err co64_Size(GF_Box *);
GF_Err esds_Size(GF_Box *);
GF_Err minf_Size(GF_Box *);
GF_Err tkhd_Size(GF_Box *);
GF_Err tref_Size(GF_Box *);
GF_Err mdia_Size(GF_Box *);
GF_Err defa_Size(GF_Box *);
GF_Err uuid_Size(GF_Box *);
GF_Err void_Size(GF_Box *);
GF_Err stsf_Size(GF_Box *);
GF_Err gnrm_Size(GF_Box *);
GF_Err gnrv_Size(GF_Box *);
GF_Err gnra_Size(GF_Box *);
GF_Err pdin_Size(GF_Box *);
GF_Err reftype_Read(GF_Box *s, GF_BitStream *bs);
GF_Err free_Read(GF_Box *s, GF_BitStream *bs);
GF_Err mdat_Read(GF_Box *s, GF_BitStream *bs);
GF_Err moov_Read(GF_Box *s, GF_BitStream *bs);
GF_Err mvhd_Read(GF_Box *s, GF_BitStream *bs);
GF_Err mdhd_Read(GF_Box *s, GF_BitStream *bs);
GF_Err vmhd_Read(GF_Box *s, GF_BitStream *bs);
GF_Err smhd_Read(GF_Box *s, GF_BitStream *bs);
GF_Err hmhd_Read(GF_Box *s, GF_BitStream *bs);
GF_Err nmhd_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stbl_Read(GF_Box *s, GF_BitStream *bs);
GF_Err dinf_Read(GF_Box *s, GF_BitStream *bs);
GF_Err url_Read(GF_Box *s, GF_BitStream *bs);
GF_Err urn_Read(GF_Box *s, GF_BitStream *bs);
GF_Err chpl_Read(GF_Box *s, GF_BitStream *bs);
GF_Err cprt_Read(GF_Box *s, GF_BitStream *bs);
GF_Err hdlr_Read(GF_Box *s, GF_BitStream *bs);
GF_Err iods_Read(GF_Box *s, GF_BitStream *bs);
GF_Err trak_Read(GF_Box *s, GF_BitStream *bs);
GF_Err mp4s_Read(GF_Box *s, GF_BitStream *bs);
GF_Err mp4v_Read(GF_Box *s, GF_BitStream *bs);
GF_Err mp4a_Read(GF_Box *s, GF_BitStream *bs);
GF_Err edts_Read(GF_Box *s, GF_BitStream *bs);
GF_Err udta_Read(GF_Box *s, GF_BitStream *bs);
GF_Err dref_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stsd_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stts_Read(GF_Box *s, GF_BitStream *bs);
GF_Err ctts_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stsh_Read(GF_Box *s, GF_BitStream *bs);
GF_Err elst_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stsc_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stsz_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stco_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stss_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stdp_Read(GF_Box *s, GF_BitStream *bs);
GF_Err sdtp_Read(GF_Box *s, GF_BitStream *bs);
GF_Err co64_Read(GF_Box *s, GF_BitStream *bs);
GF_Err esds_Read(GF_Box *s, GF_BitStream *bs);
GF_Err minf_Read(GF_Box *s, GF_BitStream *bs);
GF_Err tkhd_Read(GF_Box *s, GF_BitStream *bs);
GF_Err tref_Read(GF_Box *s, GF_BitStream *bs);
GF_Err mdia_Read(GF_Box *s, GF_BitStream *bs);
GF_Err defa_Read(GF_Box *s, GF_BitStream *bs);
GF_Err uuid_Read(GF_Box *s, GF_BitStream *bs);
GF_Err void_Read(GF_Box *s, GF_BitStream *bs);
GF_Err stsf_Read(GF_Box *s, GF_BitStream *bs);
GF_Err pdin_Read(GF_Box *s, GF_BitStream *bs);
GF_Box *hinf_New();
GF_Box *trpy_New();
GF_Box *totl_New();
GF_Box *nump_New();
GF_Box *npck_New();
GF_Box *tpyl_New();
GF_Box *tpay_New();
GF_Box *maxr_New();
GF_Box *dmed_New();
GF_Box *dimm_New();
GF_Box *drep_New();
GF_Box *tmin_New();
GF_Box *tmax_New();
GF_Box *pmax_New();
GF_Box *dmax_New();
GF_Box *payt_New();
GF_Box *name_New();
GF_Box *rely_New();
GF_Box *snro_New();
GF_Box *tims_New();
GF_Box *tsro_New();
GF_Box *ghnt_New();
GF_Box *hnti_New();
GF_Box *sdp_New();
GF_Box *rtpo_New();
void hinf_del(GF_Box *s);
void trpy_del(GF_Box *s);
void totl_del(GF_Box *s);
void nump_del(GF_Box *s);
void npck_del(GF_Box *s);
void tpyl_del(GF_Box *s);
void tpay_del(GF_Box *s);
void maxr_del(GF_Box *s);
void dmed_del(GF_Box *s);
void dimm_del(GF_Box *s);
void drep_del(GF_Box *s);
void tmin_del(GF_Box *s);
void tmax_del(GF_Box *s);
void pmax_del(GF_Box *s);
void dmax_del(GF_Box *s);
void payt_del(GF_Box *s);
void name_del(GF_Box *s);
void rely_del(GF_Box *s);
void snro_del(GF_Box *s);
void tims_del(GF_Box *s);
void tsro_del(GF_Box *s);
void ghnt_del(GF_Box *s);
void hnti_del(GF_Box *a);
void sdp_del(GF_Box *a);
void rtpo_del(GF_Box *s);
GF_Err hinf_Read(GF_Box *s, GF_BitStream *bs);
GF_Err trpy_Read(GF_Box *s, GF_BitStream *bs);
GF_Err totl_Read(GF_Box *s, GF_BitStream *bs);
GF_Err nump_Read(GF_Box *s, GF_BitStream *bs);
GF_Err npck_Read(GF_Box *s, GF_BitStream *bs);
GF_Err tpyl_Read(GF_Box *s, GF_BitStream *bs);
GF_Err tpay_Read(GF_Box *s, GF_BitStream *bs);
GF_Err maxr_Read(GF_Box *s, GF_BitStream *bs);
GF_Err dmed_Read(GF_Box *s, GF_BitStream *bs);
GF_Err dimm_Read(GF_Box *s, GF_BitStream *bs);
GF_Err drep_Read(GF_Box *s, GF_BitStream *bs);
GF_Err tmin_Read(GF_Box *s, GF_BitStream *bs);
GF_Err tmax_Read(GF_Box *s, GF_BitStream *bs);
GF_Err pmax_Read(GF_Box *s, GF_BitStream *bs);
GF_Err dmax_Read(GF_Box *s, GF_BitStream *bs);
GF_Err payt_Read(GF_Box *s, GF_BitStream *bs);
GF_Err name_Read(GF_Box *s, GF_BitStream *bs);
GF_Err rely_Read(GF_Box *s, GF_BitStream *bs);
GF_Err snro_Read(GF_Box *s, GF_BitStream *bs);
GF_Err tims_Read(GF_Box *s, GF_BitStream *bs);
GF_Err tsro_Read(GF_Box *s, GF_BitStream *bs);
GF_Err ghnt_Read(GF_Box *s, GF_BitStream *bs);
GF_Err hnti_Read(GF_Box *s, GF_BitStream *bs);
GF_Err sdp_Read(GF_Box *s, GF_BitStream *bs);
GF_Err rtpo_Read(GF_Box *s, GF_BitStream *bs);
GF_Err hinf_Write(GF_Box *s, GF_BitStream *bs);
GF_Err trpy_Write(GF_Box *s, GF_BitStream *bs);
GF_Err totl_Write(GF_Box *s, GF_BitStream *bs);
GF_Err nump_Write(GF_Box *s, GF_BitStream *bs);
GF_Err npck_Write(GF_Box *s, GF_BitStream *bs);
GF_Err tpyl_Write(GF_Box *s, GF_BitStream *bs);
GF_Err tpay_Write(GF_Box *s, GF_BitStream *bs);
GF_Err maxr_Write(GF_Box *s, GF_BitStream *bs);
GF_Err dmed_Write(GF_Box *s, GF_BitStream *bs);
GF_Err dimm_Write(GF_Box *s, GF_BitStream *bs);
GF_Err drep_Write(GF_Box *s, GF_BitStream *bs);
GF_Err tmin_Write(GF_Box *s, GF_BitStream *bs);
GF_Err tmax_Write(GF_Box *s, GF_BitStream *bs);
GF_Err pmax_Write(GF_Box *s, GF_BitStream *bs);
GF_Err dmax_Write(GF_Box *s, GF_BitStream *bs);
GF_Err payt_Write(GF_Box *s, GF_BitStream *bs);
GF_Err name_Write(GF_Box *s, GF_BitStream *bs);
GF_Err rely_Write(GF_Box *s, GF_BitStream *bs);
G
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?