odf_dev.h

来自「gaca源码」· C头文件 代码 · 共 356 行 · 第 1/2 页

H
356
字号
/*
 *			GPAC - Multimedia Framework C SDK
 *
 *			Copyright (c) Jean Le Feuvre 2000-2005 
 *					All rights reserved
 *
 *  This file is part of GPAC / MPEG-4 ObjectDescriptor sub-project
 *
 *  GPAC is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2, or (at your option)
 *  any later version.
 *   
 *  GPAC is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 *   
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; see the file COPYING.  If not, write to
 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
 *
 */


#ifndef _GF_OD_DEV_H_
#define _GF_OD_DEV_H_

#include <gpac/mpeg4_odf.h>

/*read-write OD formatted strings*/
GF_Err gf_odf_read_url_string(GF_BitStream *bs, char **string, u32 *readBytes);
GF_Err gf_odf_write_url_string(GF_BitStream *bs, char *string);
u32 gf_odf_size_url_string(char *string);

/*descriptors base functions*/
GF_Descriptor *gf_odf_create_descriptor(u8 tag);
GF_Err gf_odf_delete_descriptor(GF_Descriptor *desc);
GF_Err gf_odf_parse_descriptor(GF_BitStream *bs, GF_Descriptor **desc, u32 *size);
GF_Err gf_odf_read_descriptor(GF_BitStream *bs, GF_Descriptor *desc, u32 DescSize);
GF_Err gf_odf_write_base_descriptor(GF_BitStream *bs, u8 tag, u32 size);
GF_Err gf_odf_write_descriptor(GF_BitStream *bs, GF_Descriptor *desc);
GF_Err gf_odf_size_descriptor(GF_Descriptor *desc, u32 *outSize);
GF_Err gf_odf_delete_descriptor_list(GF_List *descList);
GF_Err gf_odf_write_descriptor_list(GF_BitStream *bs, GF_List *descList);
GF_Err gf_odf_write_descriptor_list_filter(GF_BitStream *bs, GF_List *descList, u8 tag_only);
GF_Err gf_odf_size_descriptor_list(GF_List *descList, u32 *outSize);

/*handle lazy bitstreams where SizeOfInstance is always encoded on 4 bytes*/
s32 gf_odf_size_field_size(u32 size_desc);

/*IPMPX tools*/
u32 gf_ipmpx_array_size(GF_BitStream *bs, u32 *array_size);
void gf_ipmpx_write_array(GF_BitStream *bs, char *data, u32 data_len);

/*QoS qualifiers base functions*/
GF_Err gf_odf_parse_qos_qual(GF_BitStream *bs, GF_QoS_Default **qos_qual, u32 *qos_size);
void gf_odf_delete_qos_qual(GF_QoS_Default *qos);
GF_Err gf_odf_size_qos_qual(GF_QoS_Default *qos);
GF_Err gf_odf_write_qos_qual(GF_BitStream *bs, GF_QoS_Default *qos);

GF_Descriptor *gf_odf_new_iod();
GF_Descriptor *gf_odf_new_esd();
GF_Descriptor *gf_odf_new_dcd();
GF_Descriptor *gf_odf_new_slc(u8 predef);
GF_Descriptor *gf_odf_new_cc();
GF_Descriptor *gf_odf_new_cc_date();
GF_Descriptor *gf_odf_new_cc_name();
GF_Descriptor *gf_odf_new_ci();
GF_Descriptor *gf_odf_new_default();
GF_Descriptor *gf_odf_new_esd_inc();
GF_Descriptor *gf_odf_new_esd_ref();
GF_Descriptor *gf_odf_new_exp_text();
GF_Descriptor *gf_odf_new_pl_ext();
GF_Descriptor *gf_odf_new_ipi_ptr();
GF_Descriptor *gf_odf_new_ipmp();
GF_Descriptor *gf_odf_new_ipmp_ptr();
GF_Descriptor *gf_odf_new_kw();
GF_Descriptor *gf_odf_new_lang();
GF_Descriptor *gf_odf_new_isom_iod();
GF_Descriptor *gf_odf_new_isom_od();
GF_Descriptor *gf_odf_new_od();
GF_Descriptor *gf_odf_new_oci_date();
GF_Descriptor *gf_odf_new_oci_name();
GF_Descriptor *gf_odf_new_pl_idx();
GF_Descriptor *gf_odf_new_qos();
GF_Descriptor *gf_odf_new_rating();
GF_Descriptor *gf_odf_new_reg();
GF_Descriptor *gf_odf_new_short_text();
GF_Descriptor *gf_odf_new_smpte_camera();
GF_Descriptor *gf_odf_new_sup_cid();
GF_Descriptor *gf_odf_new_segment();
GF_Descriptor *gf_odf_new_mediatime();
GF_Descriptor *gf_odf_new_ipmp_tool_list();
GF_Descriptor *gf_odf_new_ipmp_tool();
GF_Descriptor *gf_odf_new_muxinfo();
GF_Descriptor *gf_odf_New_ElemMask();
GF_Descriptor *gf_odf_new_bifs_cfg();
GF_Descriptor *gf_odf_new_ui_cfg();
GF_Descriptor *gf_odf_new_laser_cfg();

GF_Err gf_odf_del_iod(GF_InitialObjectDescriptor *iod);
GF_Err gf_odf_del_esd(GF_ESD *esd);
GF_Err gf_odf_del_dcd(GF_DecoderConfig *dcd);
GF_Err gf_odf_del_slc(GF_SLConfig *sl);
GF_Err gf_odf_del_cc(GF_CCDescriptor *ccd);
GF_Err gf_odf_del_cc_date(GF_CC_Date *cdd);
GF_Err gf_odf_del_cc_name(GF_CC_Name *cnd);
GF_Err gf_odf_del_ci(GF_CIDesc *cid);
GF_Err gf_odf_del_default(GF_DefaultDescriptor *dd);
GF_Err gf_odf_del_esd_inc(GF_ES_ID_Inc *esd_inc);
GF_Err gf_odf_del_esd_ref(GF_ES_ID_Ref *esd_ref);
GF_Err gf_odf_del_exp_text(GF_ExpandedTextual *etd);
GF_Err gf_odf_del_pl_ext(GF_PLExt *pld);
GF_Err gf_odf_del_ipi_ptr(GF_IPIPtr *ipid);
GF_Err gf_odf_del_ipmp(GF_IPMP_Descriptor *ipmp);
GF_Err gf_odf_del_ipmp_ptr(GF_IPMPPtr *ipmpd);
GF_Err gf_odf_del_kw(GF_KeyWord *kwd);
GF_Err gf_odf_del_lang(GF_Language *ld);
GF_Err gf_odf_del_isom_iod(GF_IsomInitialObjectDescriptor *iod);
GF_Err gf_odf_del_isom_od(GF_IsomObjectDescriptor *od);
GF_Err gf_odf_del_od(GF_ObjectDescriptor *od);
GF_Err gf_odf_del_oci_date(GF_OCI_Data *ocd);
GF_Err gf_odf_del_oci_name(GF_OCICreators *ocn);
GF_Err gf_odf_del_pl_idx(GF_PL_IDX *plid);
GF_Err gf_odf_del_qos(GF_QoS_Descriptor *qos);
GF_Err gf_odf_del_rating(GF_Rating *rd);
GF_Err gf_odf_del_reg(GF_Registration *reg);
GF_Err gf_odf_del_short_text(GF_ShortTextual *std);
GF_Err gf_odf_del_smpte_camera(GF_SMPTECamera *cpd);
GF_Err gf_odf_del_sup_cid(GF_SCIDesc *scid);
GF_Err gf_odf_del_segment(GF_Segment *sd);
GF_Err gf_odf_del_mediatime(GF_MediaTime *mt);
GF_Err gf_odf_del_ipmp_tool_list(GF_IPMP_ToolList *ipmptl);
GF_Err gf_odf_del_ipmp_tool(GF_IPMP_Tool *ipmp);
GF_Err gf_odf_del_muxinfo(GF_MuxInfo *mi);
GF_Err gf_odf_del_bifs_cfg(GF_BIFSConfig *desc);
GF_Err gf_odf_del_ui_cfg(GF_UIConfig *desc);
GF_Err gf_odf_del_laser_cfg(GF_LASERConfig *desc);

GF_Err gf_odf_read_iod(GF_BitStream *bs, GF_InitialObjectDescriptor *iod, u32 DescSize);
GF_Err gf_odf_read_esd(GF_BitStream *bs, GF_ESD *esd, u32 DescSize);
GF_Err gf_odf_read_dcd(GF_BitStream *bs, GF_DecoderConfig *dcd, u32 DescSize);
GF_Err gf_odf_read_slc(GF_BitStream *bs, GF_SLConfig *sl, u32 DescSize);
GF_Err gf_odf_read_cc(GF_BitStream *bs, GF_CCDescriptor *ccd, u32 DescSize);
GF_Err gf_odf_read_cc_date(GF_BitStream *bs, GF_CC_Date *cdd, u32 DescSize);
GF_Err gf_odf_read_cc_name(GF_BitStream *bs, GF_CC_Name *cnd, u32 DescSize);
GF_Err gf_odf_read_ci(GF_BitStream *bs, GF_CIDesc *cid, u32 DescSize);
GF_Err gf_odf_read_default(GF_BitStream *bs, GF_DefaultDescriptor *dd, u32 DescSize);
GF_Err gf_odf_read_esd_inc(GF_BitStream *bs, GF_ES_ID_Inc *esd_inc, u32 DescSize);
GF_Err gf_odf_read_esd_ref(GF_BitStream *bs, GF_ES_ID_Ref *esd_ref, u32 DescSize);
GF_Err gf_odf_read_exp_text(GF_BitStream *bs, GF_ExpandedTextual *etd, u32 DescSize);
GF_Err gf_odf_read_pl_ext(GF_BitStream *bs, GF_PLExt *pld, u32 DescSize);
GF_Err gf_odf_read_ipi_ptr(GF_BitStream *bs, GF_IPIPtr *ipid, u32 DescSize);
GF_Err gf_odf_read_ipmp(GF_BitStream *bs, GF_IPMP_Descriptor *ipmp, u32 DescSize);
GF_Err gf_odf_read_ipmp_ptr(GF_BitStream *bs, GF_IPMPPtr *ipmpd, u32 DescSize);
GF_Err gf_odf_read_kw(GF_BitStream *bs, GF_KeyWord *kwd, u32 DescSize);
GF_Err gf_odf_read_lang(GF_BitStream *bs, GF_Language *ld, u32 DescSize);
GF_Err gf_odf_read_isom_iod(GF_BitStream *bs, GF_IsomInitialObjectDescriptor *iod, u32 DescSize);
GF_Err gf_odf_read_isom_od(GF_BitStream *bs, GF_IsomObjectDescriptor *od, u32 DescSize);
GF_Err gf_odf_read_od(GF_BitStream *bs, GF_ObjectDescriptor *od, u32 DescSize);
GF_Err gf_odf_read_oci_date(GF_BitStream *bs, GF_OCI_Data *ocd, u32 DescSize);
GF_Err gf_odf_read_oci_name(GF_BitStream *bs, GF_OCICreators *ocn, u32 DescSize);
GF_Err gf_odf_read_pl_idx(GF_BitStream *bs, GF_PL_IDX *plid, u32 DescSize);
GF_Err gf_odf_read_qos(GF_BitStream *bs, GF_QoS_Descriptor *qos, u32 DescSize);
GF_Err gf_odf_read_rating(GF_BitStream *bs, GF_Rating *rd, u32 DescSize);
GF_Err gf_odf_read_reg(GF_BitStream *bs, GF_Registration *reg, u32 DescSize);
GF_Err gf_odf_read_short_text(GF_BitStream *bs, GF_ShortTextual *std, u32 DescSize);
GF_Err gf_odf_read_smpte_camera(GF_BitStream *bs, GF_SMPTECamera *cpd, u32 DescSize);
GF_Err gf_odf_read_sup_cid(GF_BitStream *bs, GF_SCIDesc *scid, u32 DescSize);
GF_Err gf_odf_read_segment(GF_BitStream *bs, GF_Segment *sd, u32 DescSize);
GF_Err gf_odf_read_mediatime(GF_BitStream *bs, GF_MediaTime *mt, u32 DescSize);
GF_Err gf_odf_read_muxinfo(GF_BitStream *bs, GF_MuxInfo *mi, u32 DescSize);
GF_Err gf_odf_read_ipmp_tool_list(GF_BitStream *bs, GF_IPMP_ToolList *ipmptl, u32 DescSize);
GF_Err gf_odf_read_ipmp_tool(GF_BitStream *bs, GF_IPMP_Tool *ipmp, u32 DescSize);

GF_Err gf_odf_size_iod(GF_InitialObjectDescriptor *iod, u32 *outSize);
GF_Err gf_odf_size_esd(GF_ESD *esd, u32 *outSize);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?