⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpeg4_odf.h

📁 一个用于智能手机的多媒体库适合S60 WinCE的跨平台开发库
💻 H
📖 第 1 页 / 共 3 页
字号:
/* *			GPAC - Multimedia Framework C SDK * *			Copyright (c) Jean Le Feuvre 2000-2005  *					All rights reserved * *  This file is part of GPAC / MPEG-4 Object Descriptor 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_MPEG4_ODF_H_#define _GF_MPEG4_ODF_H_#ifdef __cplusplusextern "C" {#endif#include <gpac/list.h>#include <gpac/bitstream.h>#include <gpac/sync_layer.h>/***************************************			Descriptors Tag***************************************/enum{	GF_ODF_OD_TAG			= 0x01,	GF_ODF_IOD_TAG			= 0x02,	GF_ODF_ESD_TAG			= 0x03,	GF_ODF_DCD_TAG			= 0x04,	GF_ODF_DSI_TAG			= 0x05,	GF_ODF_SLC_TAG			= 0x06,	GF_ODF_CI_TAG			= 0x07,	GF_ODF_SCI_TAG			= 0x08,	GF_ODF_IPI_PTR_TAG		= 0x09,	GF_ODF_IPMP_PTR_TAG		= 0x0A,	GF_ODF_IPMP_TAG			= 0x0B,	GF_ODF_QOS_TAG			= 0x0C,	GF_ODF_REG_TAG			= 0x0D,	/*FILE FORMAT RESERVED IDs - NEVER CREATE / USE THESE DESCRIPTORS*/	GF_ODF_ESD_INC_TAG		= 0x0E,	GF_ODF_ESD_REF_TAG		= 0x0F,	GF_ODF_ISOM_IOD_TAG		= 0x10,	GF_ODF_ISOM_OD_TAG		= 0x11,	GF_ODF_ISOM_IPI_PTR_TAG	= 0x12,	/*END FILE FORMAT RESERVED*/		GF_ODF_EXT_PL_TAG		= 0x13,	GF_ODF_PL_IDX_TAG		= 0x14,		GF_ODF_ISO_BEGIN_TAG	= 0x15,	GF_ODF_ISO_END_TAG		= 0x3F,	GF_ODF_CC_TAG			= 0x40,	GF_ODF_KW_TAG			= 0x41,	GF_ODF_RATING_TAG		= 0x42,	GF_ODF_LANG_TAG			= 0x43,	GF_ODF_SHORT_TEXT_TAG	= 0x44,	GF_ODF_TEXT_TAG			= 0x45,	GF_ODF_CC_NAME_TAG		= 0x46,	GF_ODF_CC_DATE_TAG		= 0x47,	GF_ODF_OCI_NAME_TAG		= 0x48,	GF_ODF_OCI_DATE_TAG		= 0x49,	GF_ODF_SMPTE_TAG		= 0x4A,	GF_ODF_SEGMENT_TAG		= 0x4B,	GF_ODF_MEDIATIME_TAG	= 0x4C,	GF_ODF_IPMP_TL_TAG		= 0x60,	GF_ODF_IPMP_TOOL_TAG	= 0x61,	GF_ODF_ISO_RES_BEGIN_TAG	= 0x62,	GF_ODF_ISO_RES_END_TAG		= 0xBF,		GF_ODF_USER_BEGIN_TAG	= 0xC0,	/*internal descriptor for mux input description*/	GF_ODF_MUXINFO_TAG		= GF_ODF_USER_BEGIN_TAG,	/*internal descriptor for bifs config input description*/	GF_ODF_BIFS_CFG_TAG		= GF_ODF_USER_BEGIN_TAG + 1,	/*internal descriptor for UI config input description*/	GF_ODF_UI_CFG_TAG		= GF_ODF_USER_BEGIN_TAG + 2,	/*internal descriptor for TextConfig description*/	GF_ODF_TEXT_CFG_TAG		= GF_ODF_USER_BEGIN_TAG + 3,	GF_ODF_TX3G_TAG			= GF_ODF_USER_BEGIN_TAG + 4,	GF_ODF_ELEM_MASK_TAG	= GF_ODF_USER_BEGIN_TAG + 5,	/*internal descriptor for LASeR config input description*/	GF_ODF_LASER_CFG_TAG	= GF_ODF_USER_BEGIN_TAG + 6,	GF_ODF_USER_END_TAG		= 0xFE,	GF_ODF_OCI_BEGIN_TAG	= 0x40,	GF_ODF_OCI_END_TAG		= (GF_ODF_ISO_RES_BEGIN_TAG - 1),	GF_ODF_EXT_BEGIN_TAG	= 0x80,	GF_ODF_EXT_END_TAG		= 0xFE,};/***************************************			Descriptors***************************************/#define BASE_DESCRIPTOR \		u8 tag;typedef struct{	BASE_DESCRIPTOR} GF_Descriptor;/*	default descriptor. 	NOTE: The decoderSpecificInfo is used as a default desc with tag 0x05 */typedef struct{	BASE_DESCRIPTOR	u32 dataLength;	char *data;} GF_DefaultDescriptor;/*Object Descriptor*/typedef struct{	BASE_DESCRIPTOR	GF_List *ipmp_tools;} GF_IPMP_ToolList;/*ObjectDescriptor*/typedef struct{	BASE_DESCRIPTOR	u16 objectDescriptorID;	char *URLString;	GF_List *ESDescriptors;	GF_List *OCIDescriptors;	/*includes BOTH IPMP_DescriptorPointer (IPMP & IPMPX) and GF_IPMP_Descriptor (IPMPX only)*/	GF_List *IPMP_Descriptors;	GF_List *extensionDescriptors;} GF_ObjectDescriptor;/*GF_InitialObjectDescriptor - WARNING: even though the bitstream IOD is nota bit extension of OD, internally it is a real overclass of ODwe usually typecast IOD to OD when flags are not needed !!!*/typedef struct{	BASE_DESCRIPTOR	u16 objectDescriptorID;	char *URLString;	GF_List *ESDescriptors;	GF_List *OCIDescriptors;	/*includes BOTH IPMP_DescriptorPointer (IPMP & IPMPX) and GF_IPMP_Descriptor (IPMPX only)*/	GF_List *IPMP_Descriptors;	GF_List *extensionDescriptors;	/*IOD extensions*/	u8 inlineProfileFlag;	u8 OD_profileAndLevel;	u8 scene_profileAndLevel;	u8 audio_profileAndLevel;	u8 visual_profileAndLevel;	u8 graphics_profileAndLevel;	GF_IPMP_ToolList *IPMPToolList;} GF_InitialObjectDescriptor;/*File Format Object Descriptor*/typedef struct{	BASE_DESCRIPTOR	u16 objectDescriptorID;	char *URLString;	GF_List *ES_ID_RefDescriptors;	GF_List *OCIDescriptors;	GF_List *IPMP_Descriptors;	GF_List *extensionDescriptors;	GF_List *ES_ID_IncDescriptors;} GF_IsomObjectDescriptor;/*File Format Initial Object Descriptor - same remark as IOD*/typedef struct{	BASE_DESCRIPTOR	u16 objectDescriptorID;	char *URLString;	GF_List *ES_ID_RefDescriptors;	GF_List *OCIDescriptors;	GF_List *IPMP_Descriptors;	GF_List *extensionDescriptors;	GF_List *ES_ID_IncDescriptors;	u8 inlineProfileFlag;	u8 OD_profileAndLevel;	u8 scene_profileAndLevel;	u8 audio_profileAndLevel;	u8 visual_profileAndLevel;	u8 graphics_profileAndLevel;	GF_IPMP_ToolList *IPMPToolList;} GF_IsomInitialObjectDescriptor;/*File Format ES Descriptor for IOD*/typedef struct {	BASE_DESCRIPTOR	u32 trackID;} GF_ES_ID_Inc;/*File Format ES Descriptor for OD*/typedef struct {	BASE_DESCRIPTOR	u16 trackRef;} GF_ES_ID_Ref;/*Decoder config Descriptor*/typedef struct{	BASE_DESCRIPTOR	u8 objectTypeIndication;	u8 streamType;	u8 upstream;	u32 bufferSizeDB;	u32 maxBitrate;	u32 avgBitrate;	GF_DefaultDescriptor *decoderSpecificInfo;	GF_List *profileLevelIndicationIndexDescriptor;} GF_DecoderConfig;/*Content Identification Descriptor*/typedef struct {	BASE_DESCRIPTOR	u8 compatibility;	u8 protectedContent;	u8 contentTypeFlag;	u8 contentIdentifierFlag;	u8 contentType;	u8 contentIdentifierType;	/*international code string*/	char *contentIdentifier;	} GF_CIDesc;/*Supplementary Content Identification Descriptor)*/typedef struct {	BASE_DESCRIPTOR	u32 languageCode;	char *supplContentIdentifierTitle;	char *supplContentIdentifierValue;} GF_SCIDesc;/*IPI (Intelectual Property Identification) Descriptor Pointer*/typedef struct {	BASE_DESCRIPTOR	u16 IPI_ES_Id;} GF_IPIPtr;/*IPMP Descriptor Pointer*/typedef struct {	BASE_DESCRIPTOR	u8 IPMP_DescriptorID;	u16 IPMP_DescriptorIDEx;	u16 IPMP_ES_ID;	} GF_IPMPPtr;/*IPMPX control points*/enum{	/*no control point*/	IPMP_CP_NONE = 0,	/*control point between DB and decoder*/	IPMP_CP_DB = 1,	/*control point between decoder and CB*/	IPMP_CP_CB = 2,	/*control point between CB and render*/	IPMP_CP_CM = 3,	/*control point in BIFS tree (???)*/	IPMP_CP_BIFS = 4,	/*the rest is reserved or forbidden(0xFF)*/};/*IPMPX base classe*/#define GF_IPMPX_BASE	\	u8 tag;	\	u8 version;	\	u32 dataID;	\typedef struct {	GF_IPMPX_BASE} GF_GF_IPMPX_Base;/*IPMP descriptor*/typedef struct {	BASE_DESCRIPTOR	u8 IPMP_DescriptorID;	u16 IPMPS_Type;	/*if IPMPS_Type=0, NULL-terminated URL, else if IPMPS_Type is not IPMPX, opaque data*/	char *opaque_data;	/*if IPMPS_Type=0, irrelevant (strlen(URL)), else if IPMPS_Type is not IPMPX, opaque data size*/	u32 opaque_data_size;	/*IPMPX specific*/	u16 IPMP_DescriptorIDEx;	bin128 IPMP_ToolID;	u8 control_point;	u8 cp_sequence_code;	GF_List *ipmpx_data;} GF_IPMP_Descriptor;/*IPMPTool*/#define MAX_IPMP_ALT_TOOLS	20typedef struct{	BASE_DESCRIPTOR	bin128 IPMP_ToolID;	/*if set, this is an alternate tool*/	u32 num_alternate;	bin128 specificToolID[MAX_IPMP_ALT_TOOLS];	struct _tagIPMPXParamDesc *toolParamDesc;	char *tool_url;} GF_IPMP_Tool;/* Elementary Mask of Bifs Config - parsing only */typedef struct {	BASE_DESCRIPTOR	u32 node_id;			// referenced nodeID	char *node_name;		// referenced node name} GF_ElementaryMask;/*BIFSConfig - parsing only, STORED IN ESD:DCD:DSI*/typedef struct __tag_bifs_config{	BASE_DESCRIPTOR	u32 version;	u16 nodeIDbits;	u16 routeIDbits;	u16 protoIDbits;	Bool pixelMetrics;	u16 pixelWidth, pixelHeight;	/*BIFS-Anim stuff*/	Bool randomAccess;	GF_List *elementaryMasks;} GF_BIFSConfig;/*flags for style*/enum{	GF_TXT_STYLE_NORMAL = 0,	GF_TXT_STYLE_BOLD = 1,	GF_TXT_STYLE_ITALIC = 2,	GF_TXT_STYLE_UNDERLINED = 4};typedef struct{	u16 startCharOffset;	u16 endCharOffset;	u16 fontID;	u8 style_flags;	u8 font_size;	/*ARGB*/	u32 text_color;} GF_StyleRecord;typedef struct{	u16 fontID;	char *fontName;} GF_FontRecord;typedef struct{	s16 top, left, bottom, right;} GF_BoxRecord;/*scroll flags*/enum{	GF_TXT_SCROLL_CREDITS = 0,	GF_TXT_SCROLL_MARQUEE = 1,	GF_TXT_SCROLL_DOWN = 2,	GF_TXT_SCROLL_RIGHT = 3};/* display flags*/enum{	GF_TXT_SCROLL_IN = 0x00000020,	GF_TXT_SCROLL_OUT = 0x00000040,	/*use one of the scroll flags, eg GF_TXT_SCROLL_DIRECTION | GF_TXT_SCROLL_CREDITS*/	GF_TXT_SCROLL_DIRECTION = 0x00000180,	GF_TXT_KARAOKE	= 0x00000800,	GF_TXT_VERTICAL = 0x00020000,	GF_TXT_FILL_REGION = 0x00040000,};typedef struct{	/*this is defined as a descriptor for parsing*/	BASE_DESCRIPTOR	u32 displayFlags;	/*left, top: 0 -  centered: 1 - bottom, right: -1*/	s8 horiz_justif, vert_justif;	/*ARGB*/	u32 back_color;	GF_BoxRecord default_pos;	GF_StyleRecord	default_style;	u32 font_count;	GF_FontRecord *fonts;	/*unused in isomedia but needed for streamingText*/	u8 sample_index;} GF_TextSampleDescriptor;typedef struct{	BASE_DESCRIPTOR	/*only 0x10 shall be used for 3GP text stream*/	u8 Base3GPPFormat;	/*only 0x10 shall be used for StreamingText*/	u8 MPEGExtendedFormat;	/*only 0x10 shall be used for StreamingText (base profile, base level)*/	u8 profileLevel;	u32 timescale;	/*0 forbidden, 1: out-of-band desc only, 2: in-band desc only, 3: both*/	u8 sampleDescriptionFlags;	/*More negative layer values are towards the viewer*/	s16 layer;	/*text track width & height*/	u16 text_width;	u16 text_height;	/*compatible 3GP formats, same coding as 3GPPBaseFormat*/	u8 nb_compatible_formats;	u8 compatible_formats[20];	/*defined in isomedia.h*/	GF_List *sample_descriptions;	/*if true info below are valid (cf 3GPP for their meaning)*/	Bool has_vid_info;	u16 video_width;	u16 video_height;	s16 horiz_offset;	s16 vert_offset;} GF_TextConfig;/*MuxInfo descriptor - parsing only, stored in ESD:extDescr*/typedef struct {	BASE_DESCRIPTOR	/*input location*/	char *file_name;	/*input groupID for interleaving*/	u32 GroupID;	/*input stream format (not required, guessed from file_name)*/	char *streamFormat;	/*time offset in ms from first TS (appends an edit list in mp4)*/	u32 startTime;	/*media length to import in ms (from 0)*/	u32 duration;	/*SRT/SUB import extensions - only support for text and italic style*/	char *textNode;	char *fontNode;	/*video and SUB import*/	Double frame_rate;	/*same as importer flags, cf media.h*/	u32 import_flags;	/*indicates input file shall be destryed - used during SWF import*/	Bool delete_file;} GF_MuxInfo;typedef struct{	BASE_DESCRIPTOR	/*input type*/	char *deviceName;	/*string sensor terminaison (validation) char*/	char termChar;	/*string sensor deletion char*/	char delChar;	/*device-specific data*/	char *ui_data;	u32 ui_data_length;} GF_UIConfig;/*LASERConfig - parsing only, STORED IN ESD:DCD:DSI*/typedef struct __tag_laser_config{	BASE_DESCRIPTOR	u8 profile;	u8 level;	u8 pointsCodec;	u8 pathComponents;	u8 fullRequestHost;	u16 time_resolution;	u8 colorComponentBits;	s8 resolution;	u8 coord_bits;	u8 scale_bits_minus_coord_bits;	u8 newSceneIndicator;	u8 extensionIDBits;	/*the rest of the structure is never coded, only used for the config of GPAC...*/	Bool force_string_ids;/*forces all nodes to be defined with string IDs*/} GF_LASERConfig;/***************************************			QoS Tags***************************************/enum{	QoSMaxDelayTag = 0x01,	QoSPrefMaxDelayTag = 0x02,	QoSLossProbTag = 0x03,	QoSMaxGapLossTag = 0x04,	QoSMaxAUSizeTag = 0x41,	QoSAvgAUSizeTag = 0x42,	QoSMaxAURateTag = 0x43};/***************************************			QoS Qualifiers***************************************/typedef struct {	BASE_DESCRIPTOR	u8 predefined;	GF_List *QoS_Qualifiers;} GF_QoS_Descriptor;#define QOS_BASE_QUALIFIER \	u8 tag;	\	u32 size;

⌨️ 快捷键说明

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