2 * GPAC - Multimedia Framework C SDK
\r
4 * Copyright (c) Jean Le Feuvre 2000-2005
\r
5 * All rights reserved
\r
7 * This file is part of GPAC / MPEG-4 Object Descriptor sub-project
\r
9 * GPAC is free software; you can redistribute it and/or modify
\r
10 * it under the terms of the GNU Lesser General Public License as published by
\r
11 * the Free Software Foundation; either version 2, or (at your option)
\r
12 * any later version.
\r
14 * GPAC is distributed in the hope that it will be useful,
\r
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 * GNU Lesser General Public License for more details.
\r
19 * You should have received a copy of the GNU Lesser General Public
\r
20 * License along with this library; see the file COPYING. If not, write to
\r
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
\r
25 #ifndef _GF_MPEG4_ODF_H_
\r
26 #define _GF_MPEG4_ODF_H_
\r
32 #include <gpac/list.h>
\r
33 #include <gpac/bitstream.h>
\r
34 #include <gpac/sync_layer.h>
\r
36 /***************************************
\r
38 ***************************************/
\r
41 GF_ODF_OD_TAG = 0x01,
\r
42 GF_ODF_IOD_TAG = 0x02,
\r
43 GF_ODF_ESD_TAG = 0x03,
\r
44 GF_ODF_DCD_TAG = 0x04,
\r
45 GF_ODF_DSI_TAG = 0x05,
\r
46 GF_ODF_SLC_TAG = 0x06,
\r
47 GF_ODF_CI_TAG = 0x07,
\r
48 GF_ODF_SCI_TAG = 0x08,
\r
49 GF_ODF_IPI_PTR_TAG = 0x09,
\r
50 GF_ODF_IPMP_PTR_TAG = 0x0A,
\r
51 GF_ODF_IPMP_TAG = 0x0B,
\r
52 GF_ODF_QOS_TAG = 0x0C,
\r
53 GF_ODF_REG_TAG = 0x0D,
\r
55 /*FILE FORMAT RESERVED IDs - NEVER CREATE / USE THESE DESCRIPTORS*/
\r
56 GF_ODF_ESD_INC_TAG = 0x0E,
\r
57 GF_ODF_ESD_REF_TAG = 0x0F,
\r
58 GF_ODF_ISOM_IOD_TAG = 0x10,
\r
59 GF_ODF_ISOM_OD_TAG = 0x11,
\r
60 GF_ODF_ISOM_IPI_PTR_TAG = 0x12,
\r
61 /*END FILE FORMAT RESERVED*/
\r
63 GF_ODF_EXT_PL_TAG = 0x13,
\r
64 GF_ODF_PL_IDX_TAG = 0x14,
\r
66 GF_ODF_ISO_BEGIN_TAG = 0x15,
\r
67 GF_ODF_ISO_END_TAG = 0x3F,
\r
69 GF_ODF_CC_TAG = 0x40,
\r
70 GF_ODF_KW_TAG = 0x41,
\r
71 GF_ODF_RATING_TAG = 0x42,
\r
72 GF_ODF_LANG_TAG = 0x43,
\r
73 GF_ODF_SHORT_TEXT_TAG = 0x44,
\r
74 GF_ODF_TEXT_TAG = 0x45,
\r
75 GF_ODF_CC_NAME_TAG = 0x46,
\r
76 GF_ODF_CC_DATE_TAG = 0x47,
\r
77 GF_ODF_OCI_NAME_TAG = 0x48,
\r
78 GF_ODF_OCI_DATE_TAG = 0x49,
\r
79 GF_ODF_SMPTE_TAG = 0x4A,
\r
81 GF_ODF_SEGMENT_TAG = 0x4B,
\r
82 GF_ODF_MEDIATIME_TAG = 0x4C,
\r
84 GF_ODF_IPMP_TL_TAG = 0x60,
\r
85 GF_ODF_IPMP_TOOL_TAG = 0x61,
\r
87 GF_ODF_ISO_RES_BEGIN_TAG = 0x62,
\r
88 GF_ODF_ISO_RES_END_TAG = 0xBF,
\r
90 GF_ODF_USER_BEGIN_TAG = 0xC0,
\r
92 /*internal descriptor for mux input description*/
\r
93 GF_ODF_MUXINFO_TAG = GF_ODF_USER_BEGIN_TAG,
\r
94 /*internal descriptor for bifs config input description*/
\r
95 GF_ODF_BIFS_CFG_TAG = GF_ODF_USER_BEGIN_TAG + 1,
\r
96 /*internal descriptor for UI config input description*/
\r
97 GF_ODF_UI_CFG_TAG = GF_ODF_USER_BEGIN_TAG + 2,
\r
98 /*internal descriptor for TextConfig description*/
\r
99 GF_ODF_TEXT_CFG_TAG = GF_ODF_USER_BEGIN_TAG + 3,
\r
100 GF_ODF_TX3G_TAG = GF_ODF_USER_BEGIN_TAG + 4,
\r
101 GF_ODF_ELEM_MASK_TAG = GF_ODF_USER_BEGIN_TAG + 5,
\r
102 /*internal descriptor for LASeR config input description*/
\r
103 GF_ODF_LASER_CFG_TAG = GF_ODF_USER_BEGIN_TAG + 6,
\r
105 GF_ODF_USER_END_TAG = 0xFE,
\r
107 GF_ODF_OCI_BEGIN_TAG = 0x40,
\r
108 GF_ODF_OCI_END_TAG = (GF_ODF_ISO_RES_BEGIN_TAG - 1),
\r
110 GF_ODF_EXT_BEGIN_TAG = 0x80,
\r
111 GF_ODF_EXT_END_TAG = 0xFE,
\r
114 /*descriptor for aucilary video data*/
\r
115 GF_ODF_AUX_VIDEO_DATA = GF_ODF_EXT_BEGIN_TAG + 1,
\r
119 /***************************************
\r
121 ***************************************/
\r
123 #define BASE_DESCRIPTOR \
\r
132 /* default descriptor.
\r
133 NOTE: The decoderSpecificInfo is used as a default desc with tag 0x05 */
\r
139 } GF_DefaultDescriptor;
\r
141 /*Object Descriptor*/
\r
145 GF_List *ipmp_tools;
\r
146 } GF_IPMP_ToolList;
\r
148 /*ObjectDescriptor*/
\r
152 u16 objectDescriptorID;
\r
154 GF_List *ESDescriptors;
\r
155 GF_List *OCIDescriptors;
\r
156 /*includes BOTH IPMP_DescriptorPointer (IPMP & IPMPX) and GF_IPMP_Descriptor (IPMPX only)*/
\r
157 GF_List *IPMP_Descriptors;
\r
158 GF_List *extensionDescriptors;
\r
159 } GF_ObjectDescriptor;
\r
161 /*GF_InitialObjectDescriptor - WARNING: even though the bitstream IOD is not
\r
162 a bit extension of OD, internally it is a real overclass of OD
\r
163 we usually typecast IOD to OD when flags are not needed !!!*/
\r
167 u16 objectDescriptorID;
\r
169 GF_List *ESDescriptors;
\r
170 GF_List *OCIDescriptors;
\r
171 /*includes BOTH IPMP_DescriptorPointer (IPMP & IPMPX) and GF_IPMP_Descriptor (IPMPX only)*/
\r
172 GF_List *IPMP_Descriptors;
\r
173 GF_List *extensionDescriptors;
\r
176 u8 inlineProfileFlag;
\r
177 u8 OD_profileAndLevel;
\r
178 u8 scene_profileAndLevel;
\r
179 u8 audio_profileAndLevel;
\r
180 u8 visual_profileAndLevel;
\r
181 u8 graphics_profileAndLevel;
\r
183 GF_IPMP_ToolList *IPMPToolList;
\r
184 } GF_InitialObjectDescriptor;
\r
186 /*File Format Object Descriptor*/
\r
190 u16 objectDescriptorID;
\r
192 GF_List *ES_ID_RefDescriptors;
\r
193 GF_List *OCIDescriptors;
\r
194 GF_List *IPMP_Descriptors;
\r
195 GF_List *extensionDescriptors;
\r
196 GF_List *ES_ID_IncDescriptors;
\r
197 } GF_IsomObjectDescriptor;
\r
199 /*File Format Initial Object Descriptor - same remark as IOD*/
\r
203 u16 objectDescriptorID;
\r
205 GF_List *ES_ID_RefDescriptors;
\r
206 GF_List *OCIDescriptors;
\r
207 GF_List *IPMP_Descriptors;
\r
208 GF_List *extensionDescriptors;
\r
209 GF_List *ES_ID_IncDescriptors;
\r
211 u8 inlineProfileFlag;
\r
212 u8 OD_profileAndLevel;
\r
213 u8 scene_profileAndLevel;
\r
214 u8 audio_profileAndLevel;
\r
215 u8 visual_profileAndLevel;
\r
216 u8 graphics_profileAndLevel;
\r
218 GF_IPMP_ToolList *IPMPToolList;
\r
219 } GF_IsomInitialObjectDescriptor;
\r
222 /*File Format ES Descriptor for IOD*/
\r
228 /*File Format ES Descriptor for OD*/
\r
234 /*Decoder config Descriptor*/
\r
238 u8 objectTypeIndication;
\r
244 GF_DefaultDescriptor *decoderSpecificInfo;
\r
245 GF_List *profileLevelIndicationIndexDescriptor;
\r
246 } GF_DecoderConfig;
\r
249 /*Content Identification Descriptor*/
\r
253 u8 protectedContent;
\r
254 u8 contentTypeFlag;
\r
255 u8 contentIdentifierFlag;
\r
257 u8 contentIdentifierType;
\r
258 /*international code string*/
\r
259 char *contentIdentifier;
\r
262 /*Supplementary Content Identification Descriptor)*/
\r
266 char *supplContentIdentifierTitle;
\r
267 char *supplContentIdentifierValue;
\r
270 /*IPI (Intelectual Property Identification) Descriptor Pointer*/
\r
276 /*IPMP Descriptor Pointer*/
\r
279 u8 IPMP_DescriptorID;
\r
280 u16 IPMP_DescriptorIDEx;
\r
284 /*IPMPX control points*/
\r
287 /*no control point*/
\r
289 /*control point between DB and decoder*/
\r
291 /*control point between decoder and CB*/
\r
293 /*control point between CB and render*/
\r
295 /*control point in BIFS tree (???)*/
\r
297 /*the rest is reserved or forbidden(0xFF)*/
\r
300 /*IPMPX base classe*/
\r
301 #define GF_IPMPX_BASE \
\r
309 } GF_GF_IPMPX_Base;
\r
311 /*IPMP descriptor*/
\r
314 u8 IPMP_DescriptorID;
\r
316 /*if IPMPS_Type=0, NULL-terminated URL, else if IPMPS_Type is not IPMPX, opaque data*/
\r
318 /*if IPMPS_Type=0, irrelevant (strlen(URL)), else if IPMPS_Type is not IPMPX, opaque data size*/
\r
319 u32 opaque_data_size;
\r
322 u16 IPMP_DescriptorIDEx;
\r
323 bin128 IPMP_ToolID;
\r
325 u8 cp_sequence_code;
\r
326 GF_List *ipmpx_data;
\r
327 } GF_IPMP_Descriptor;
\r
331 #define MAX_IPMP_ALT_TOOLS 20
\r
335 bin128 IPMP_ToolID;
\r
336 /*if set, this is an alternate tool*/
\r
338 bin128 specificToolID[MAX_IPMP_ALT_TOOLS];
\r
340 struct _tagIPMPXParamDesc *toolParamDesc;
\r
345 /* Elementary Mask of Bifs Config - parsing only */
\r
348 u32 node_id; // referenced nodeID
\r
349 char *node_name; // referenced node name
\r
350 } GF_ElementaryMask;
\r
352 /*BIFSConfig - parsing only, STORED IN ESD:DCD:DSI*/
\r
353 typedef struct __tag_bifs_config
\r
361 u16 pixelWidth, pixelHeight;
\r
362 /*BIFS-Anim stuff*/
\r
364 GF_List *elementaryMasks;
\r
365 /*internal extensions for encoding*/
\r
369 /*flags for style*/
\r
372 GF_TXT_STYLE_NORMAL = 0,
\r
373 GF_TXT_STYLE_BOLD = 1,
\r
374 GF_TXT_STYLE_ITALIC = 2,
\r
375 GF_TXT_STYLE_UNDERLINED = 4
\r
380 u16 startCharOffset;
\r
397 s16 top, left, bottom, right;
\r
403 GF_TXT_SCROLL_CREDITS = 0,
\r
404 GF_TXT_SCROLL_MARQUEE = 1,
\r
405 GF_TXT_SCROLL_DOWN = 2,
\r
406 GF_TXT_SCROLL_RIGHT = 3
\r
412 GF_TXT_SCROLL_IN = 0x00000020,
\r
413 GF_TXT_SCROLL_OUT = 0x00000040,
\r
414 /*use one of the scroll flags, eg GF_TXT_SCROLL_DIRECTION | GF_TXT_SCROLL_CREDITS*/
\r
415 GF_TXT_SCROLL_DIRECTION = 0x00000180,
\r
416 GF_TXT_KARAOKE = 0x00000800,
\r
417 GF_TXT_VERTICAL = 0x00020000,
\r
418 GF_TXT_FILL_REGION = 0x00040000,
\r
423 /*this is defined as a descriptor for parsing*/
\r
427 /*left, top: 0 - centered: 1 - bottom, right: -1*/
\r
428 s8 horiz_justif, vert_justif;
\r
431 GF_BoxRecord default_pos;
\r
432 GF_StyleRecord default_style;
\r
435 GF_FontRecord *fonts;
\r
437 /*unused in isomedia but needed for streamingText*/
\r
439 } GF_TextSampleDescriptor;
\r
444 /*only 0x10 shall be used for 3GP text stream*/
\r
446 /*only 0x10 shall be used for StreamingText*/
\r
447 u8 MPEGExtendedFormat;
\r
448 /*only 0x10 shall be used for StreamingText (base profile, base level)*/
\r
451 /*0 forbidden, 1: out-of-band desc only, 2: in-band desc only, 3: both*/
\r
452 u8 sampleDescriptionFlags;
\r
453 /*More negative layer values are towards the viewer*/
\r
455 /*text track width & height*/
\r
458 /*compatible 3GP formats, same coding as 3GPPBaseFormat*/
\r
459 u8 nb_compatible_formats;
\r
460 u8 compatible_formats[20];
\r
461 /*defined in isomedia.h*/
\r
462 GF_List *sample_descriptions;
\r
464 /*if true info below are valid (cf 3GPP for their meaning)*/
\r
473 /*MuxInfo descriptor - parsing only, stored in ESD:extDescr*/
\r
478 /*input groupID for interleaving*/
\r
480 /*input stream format (not required, guessed from file_name)*/
\r
481 char *streamFormat;
\r
482 /*time offset in ms from first TS (appends an edit list in mp4)*/
\r
485 /*media length to import in ms (from 0)*/
\r
488 /*SRT/SUB import extensions - only support for text and italic style*/
\r
492 /*video and SUB import*/
\r
495 /*same as importer flags, cf media.h*/
\r
498 /*indicates input file shall be destryed - used during SWF import*/
\r
507 /*string sensor terminaison (validation) char*/
\r
509 /*string sensor deletion char*/
\r
511 /*device-specific data*/
\r
513 u32 ui_data_length;
\r
516 /*LASERConfig - parsing only, STORED IN ESD:DCD:DSI*/
\r
517 typedef struct __tag_laser_config
\r
524 u8 fullRequestHost;
\r
525 u16 time_resolution;
\r
526 u8 colorComponentBits;
\r
529 u8 scale_bits_minus_coord_bits;
\r
530 u8 newSceneIndicator;
\r
531 u8 extensionIDBits;
\r
533 /*the rest of the structure is never coded, only used for the config of GPAC...*/
\r
534 Bool force_string_ids;/*forces all nodes to be defined with string IDs*/
\r
538 /***************************************
\r
540 ***************************************/
\r
543 QoSMaxDelayTag = 0x01,
\r
544 QoSPrefMaxDelayTag = 0x02,
\r
545 QoSLossProbTag = 0x03,
\r
546 QoSMaxGapLossTag = 0x04,
\r
547 QoSMaxAUSizeTag = 0x41,
\r
548 QoSAvgAUSizeTag = 0x42,
\r
549 QoSMaxAURateTag = 0x43
\r
552 /***************************************
\r
554 ***************************************/
\r
558 GF_List *QoS_Qualifiers;
\r
559 } GF_QoS_Descriptor;
\r
562 #define QOS_BASE_QUALIFIER \
\r
578 } GF_QoS_PrefMaxDelay;
\r
588 } GF_QoS_MaxGapLoss;
\r
593 } GF_QoS_MaxAUSize;
\r
598 } GF_QoS_AvgAUSize;
\r
603 } GF_QoS_MaxAURate;
\r
607 u32 DataLength; /*max size class : 2^28 - 1*/
\r
612 /*Registration Descriptor*/
\r
615 u32 formatIdentifier;
\r
617 char *additionalIdentificationInfo;
\r
620 /*Language Descriptor*/
\r
626 /*Elementary Stream Descriptor*/
\r
635 GF_DecoderConfig *decoderConfig;
\r
636 GF_SLConfig *slConfig;
\r
638 GF_QoS_Descriptor *qos;
\r
639 GF_Registration *RegDescriptor;
\r
640 /*0 or 1 lang desc*/
\r
641 GF_Language *langDesc;
\r
643 GF_List *IPIDataSet;
\r
644 GF_List *IPMPDescriptorPointers;
\r
645 GF_List *extensionDescriptors;
\r
650 /*Auxiliary Video Data Descriptor*/
\r
653 u32 aux_video_type;
\r
654 u32 position_offset_h;
\r
655 u32 position_offset_v;
\r
659 u32 parallax_scale;
\r
662 } GF_AuxVideoDescriptor;
\r
664 /*Content Classification Descriptor*/
\r
667 u32 classificationEntity;
\r
668 u16 classificationTable;
\r
670 char *contentClassificationData;
\r
674 /*this structure is used in GF_KeyWord*/
\r
679 /*Key Word Descriptor*/
\r
684 GF_List *keyWordsList;
\r
687 /*Rating Descriptor*/
\r
691 u16 ratingCriteria;
\r
697 /*Short Textual Descriptor*/
\r
707 /*this structure is used in GF_ExpandedTextual*/
\r
712 /*Expanded Textual Descriptor*/
\r
717 GF_List *itemDescriptionList;
\r
718 GF_List *itemTextList;
\r
720 } GF_ExpandedTextual;
\r
722 /*this structure is used in GF_CC_Name*/
\r
726 char *contentCreatorName;
\r
727 } GF_ContentCreatorInfo;
\r
729 /*Content Creator Name GF_Descriptor
\r
730 NOTE: the desctructor will delete all the items in the list
\r
731 (GF_ContentCreatorInfo items) */
\r
734 GF_List *ContentCreators;
\r
737 /*Content Creation Date Descriptor*/
\r
740 char contentCreationDate[5];
\r
744 /*this structure is used in GF_OCICreators*/
\r
748 char *OCICreatorName;
\r
749 } GF_OCICreator_item;
\r
751 /*OCI Creator Name Descriptor*/
\r
754 GF_List *OCICreators;
\r
757 /*OCI Creation Date Descriptor*/
\r
760 char OCICreationDate[5];
\r
764 /*this structure is used in GF_SMPTECamera*/
\r
770 /*Smpte Camera Position Descriptor*/
\r
774 GF_List *ParamList;
\r
778 /*Extension Profile Level Descriptor*/
\r
781 u8 profileLevelIndicationIndex;
\r
782 u8 ODProfileLevelIndication;
\r
783 u8 SceneProfileLevelIndication;
\r
784 u8 AudioProfileLevelIndication;
\r
785 u8 VisualProfileLevelIndication;
\r
786 u8 GraphicsProfileLevelIndication;
\r
787 u8 MPEGJProfileLevelIndication;
\r
790 /*Profile Level Indication Index Descriptor*/
\r
793 u8 profileLevelIndicationIndex;
\r
797 /*AVC config descriptor - not a real MPEG-4 descriptor */
\r
798 /*used for sequenceParameterSetNALUnit and pictureParameterSetNALUnit*/
\r
803 } GF_AVCConfigSlot;
\r
807 u8 configurationVersion;
\r
808 u8 AVCProfileIndication;
\r
809 u8 profile_compatibility;
\r
810 u8 AVCLevelIndication;
\r
813 GF_List *sequenceParameterSets;
\r
814 GF_List *pictureParameterSets;
\r
818 /************************************************************
\r
819 Media Control Extensions
\r
820 ************************************************************/
\r
832 Double mediaTimeStamp;
\r
836 /****************************************************************************
\r
838 MPEG-4 SYSTEM - OBJECT DESCRIPTORS COMMANDS DECLARATION
\r
840 ****************************************************************************/
\r
843 /***************************************
\r
845 ***************************************/
\r
848 GF_ODF_OD_UPDATE_TAG = 0x01,
\r
849 GF_ODF_OD_REMOVE_TAG = 0x02,
\r
850 GF_ODF_ESD_UPDATE_TAG = 0x03,
\r
851 GF_ODF_ESD_REMOVE_TAG = 0x04,
\r
852 GF_ODF_IPMP_UPDATE_TAG = 0x05,
\r
853 GF_ODF_IPMP_REMOVE_TAG = 0x06,
\r
855 /*file format reserved*/
\r
856 GF_ODF_ESD_REMOVE_REF_TAG = 0x07,
\r
858 GF_ODF_COM_ISO_BEGIN_TAG = 0x0D,
\r
859 GF_ODF_COM_ISO_END_TAG = 0xBF,
\r
861 GF_ODF_COM_USER_BEGIN_TAG = 0xC0,
\r
862 GF_ODF_COM_USER_END_TAG = 0xFE
\r
865 /***************************************
\r
867 ***************************************/
\r
868 #define BASE_OD_COMMAND \
\r
871 /*the (abstract) base command. */
\r
876 /*the default bcommand*/
\r
883 /*Object Descriptor Update
\r
884 NB: the list can contain OD or IOD, except internally in the File Format (only MP4_OD)*/
\r
888 GF_List *objectDescriptors;
\r
891 /*Object Descriptor Remove*/
\r
899 /*Elementary Stream Descriptor Update*/
\r
904 GF_List *ESDescriptors;
\r
907 /*Elementary Stream Descriptor Remove*/
\r
915 /*IPMP Descriptor Update*/
\r
918 GF_List *IPMPDescList;
\r
921 /*IPMP Descriptor Remove*/
\r
925 /*now this is bad: only IPMPv1 descriptors can be removed at run tim...*/
\r
934 /********************************************************************
\r
936 ********************************************************************/
\r
938 /*OD CODEC object - just a simple reader/writer*/
\r
939 typedef struct tagODCoDec
\r
942 GF_List *CommandList;
\r
945 /*construction / destruction*/
\r
946 GF_ODCodec *gf_odf_codec_new();
\r
947 void gf_odf_codec_del(GF_ODCodec *codec);
\r
948 /* add a command to the codec command list. */
\r
949 GF_Err gf_odf_codec_add_com(GF_ODCodec *codec, GF_ODCom *command);
\r
950 /*encode the current coimmand list - once called the commands are destroyed*/
\r
951 GF_Err gf_odf_codec_encode(GF_ODCodec *codec, Bool delete_content);
\r
952 /*get the encoded AU. user is responsible of allocated space*/
\r
953 GF_Err gf_odf_codec_get_au(GF_ODCodec *codec, char **outAU, u32 *au_length);
\r
954 /* set the encoded AU to the codec*/
\r
955 GF_Err gf_odf_codec_set_au(GF_ODCodec *codec, char *au, u32 au_length);
\r
956 /*decode the previously set-up AU*/
\r
957 GF_Err gf_odf_codec_decode(GF_ODCodec *codec);
\r
958 /*get the first OD command in the list. Once called, the command is removed
\r
959 from the command list. Return NULL when commandList is empty*/
\r
960 GF_ODCom *gf_odf_codec_get_com(GF_ODCodec *codec);
\r
962 /*apply a command to the codec command list. Command is duplicated if needed
\r
963 This is used for state maintenance and RAP generation.*/
\r
964 GF_Err gf_odf_codec_apply_com(GF_ODCodec *codec, GF_ODCom *command);
\r
966 /************************************************************
\r
968 ************************************************************/
\r
970 /*Commands Creation / Destruction*/
\r
971 GF_ODCom *gf_odf_com_new(u8 tag);
\r
972 GF_Err gf_odf_com_del(GF_ODCom **com);
\r
975 /************************************************************
\r
976 Descriptors Functions
\r
977 ************************************************************/
\r
979 /*Descriptors Creation / Destruction*/
\r
980 GF_Descriptor *gf_odf_desc_new(u8 tag);
\r
981 void gf_odf_desc_del(GF_Descriptor *desc);
\r
983 /*use this function to decode a standalone descriptor
\r
984 the raw descriptor MUST be formatted with tag and size field!!!
\r
985 a new desc is created and you must delete it when done*/
\r
986 GF_Err gf_odf_desc_read(char *raw_desc, u32 descSize, GF_Descriptor * *outDesc);
\r
988 /*use this function to encode a standalone descriptor
\r
989 the desc will be formatted with tag and size field
\r
990 the output buffer is allocated and you must delete it when done*/
\r
991 GF_Err gf_odf_desc_write(GF_Descriptor *desc, char **outEncDesc, u32 *outSize);
\r
993 /*use this function to get the size of a standalone descriptor (including tag and size fields)
\r
994 return 0 if error*/
\r
995 u32 gf_odf_desc_size(GF_Descriptor *desc);
\r
997 /*this is usefull to duplicate on the fly a descriptor*/
\r
998 GF_Err gf_odf_desc_copy(GF_Descriptor *inDesc, GF_Descriptor **outDesc);
\r
1001 /*This functions handles internally what desc can be added to another desc
\r
1002 and adds it. NO DUPLICATION of the descriptor, so
\r
1003 once a desc is added to its parent, destroying the parent WILL DESTROY
\r
1005 GF_Err gf_odf_desc_add_desc(GF_Descriptor *parentDesc, GF_Descriptor *newDesc);
\r
1008 /*this is a helper for building a preformatted GF_ESD with decoderConfig, decoderSpecificInfo with no data and
\r
1009 SLConfig descriptor with predefined*/
\r
1010 GF_ESD *gf_odf_desc_esd_new(u32 sl_predefined);
\r
1013 /*Since IPMP V2, we introduce a new set of functions to read / write a list of descriptors
\r
1014 that have no containers (a bit like an OD command, but for descriptors)
\r
1015 This is usefull for IPMPv2 DecoderSpecificInfo which contains a set of IPMP_Declarators
\r
1016 As it could be used for other purposes we keep it generic
\r
1017 you must create the list yourself, the functions just encode/decode from/to the list*/
\r
1019 /*uncompress an encoded list of descriptors. You must pass an empty GF_List structure
\r
1020 to know exactly what was in the buffer*/
\r
1021 GF_Err gf_odf_desc_list_read(char *raw_list, u32 raw_size, GF_List *descList);
\r
1022 /*compress all descriptors in the list into a single buffer. The buffer is allocated
\r
1023 by the lib and must be destroyed by your app
\r
1024 you must pass (outEncList != NULL && *outEncList == NULL)*/
\r
1025 GF_Err gf_odf_desc_list_write(GF_List *descList, char **outEncList, u32 *outSize);
\r
1026 /*returns size of encoded desc list*/
\r
1027 GF_Err gf_odf_desc_list_size(GF_List *descList, u32 *outSize);
\r
1028 /*destroy the descriptors in a list but not the list*/
\r
1029 GF_Err gf_odf_desc_list_del(GF_List *descList);
\r
1031 /*retuns NULL if unknown, otherwise value*/
\r
1032 const char *gf_odf_stream_type_name(u32 streamType);
\r
1033 u32 gf_odf_stream_type_by_name(const char *streamType);
\r
1035 /*special function for authoring - convert DSI to BIFSConfig*/
\r
1036 GF_BIFSConfig *gf_odf_get_bifs_config(GF_DefaultDescriptor *dsi, u8 oti);
\r
1037 /*special function for authoring - convert DSI to LASERConfig*/
\r
1038 GF_Err gf_odf_get_laser_config(GF_DefaultDescriptor *dsi, GF_LASERConfig *cfg);
\r
1039 /*sepcial function for authoring - convert DSI to TextConfig*/
\r
1040 GF_Err gf_odf_get_text_config(GF_DefaultDescriptor *dsi, u8 oti, GF_TextConfig *cfg);
\r
1041 /*special function for authoring - convert DSI to UIConfig*/
\r
1042 GF_Err gf_odf_get_ui_config(GF_DefaultDescriptor *dsi, GF_UIConfig *cfg);
\r
1043 /*converts UIConfig to dsi - does not destroy input descr but does create output one*/
\r
1044 GF_Err gf_odf_encode_ui_config(GF_UIConfig *cfg, GF_DefaultDescriptor **out_dsi);
\r
1046 /*simple constructor/destructor*/
\r
1047 GF_AVCConfig *gf_odf_avc_cfg_new();
\r
1048 void gf_odf_avc_cfg_del(GF_AVCConfig *cfg);
\r
1049 /*gets GF_AVCConfig from MPEG-4 DSI*/
\r
1050 GF_AVCConfig *gf_odf_avc_cfg_read(char *dsi, u32 dsi_size);
\r
1051 /*writes GF_AVCConfig as MPEG-4 DSI*/
\r
1052 GF_Err gf_odf_avc_cfg_write(GF_AVCConfig *cfg, char **outData, u32 *outSize);
\r
1056 /************************************************************
\r
1057 QoS Qualifiers Functions
\r
1058 ************************************************************/
\r
1060 /*QoS Qualifiers Creation / Destruction*/
\r
1061 GF_QoS_Default *gf_odf_qos_new(u8 tag);
\r
1062 GF_Err gf_odf_qos_del(GF_QoS_Default **qos);
\r
1064 /*READ/WRITE functions: QoS qualifiers are special descriptors but follow the same rules as descriptors.
\r
1065 therefore, use gf_odf_desc_read and gf_odf_desc_write for QoS*/
\r
1067 /*same function, but for QoS, as a Qualifier IS NOT a descriptor*/
\r
1068 GF_Err gf_odf_qos_add_qualif(GF_QoS_Descriptor *desc, GF_QoS_Default *qualif);
\r
1073 OCI Stream AU is a list of OCI event (like OD AU is a list of OD commands)
\r
1076 typedef struct __tag_oci_event OCIEvent;
\r
1078 OCIEvent *gf_oci_event_new(u16 EventID);
\r
1079 void gf_oci_event_del(OCIEvent *event);
\r
1081 GF_Err gf_oci_event_set_start_time(OCIEvent *event, u8 Hours, u8 Minutes, u8 Seconds, u8 HundredSeconds, u8 IsAbsoluteTime);
\r
1082 GF_Err gf_oci_event_set_duration(OCIEvent *event, u8 Hours, u8 Minutes, u8 Seconds, u8 HundredSeconds);
\r
1083 GF_Err gf_oci_event_add_desc(OCIEvent *event, GF_Descriptor *oci_desc);
\r
1085 GF_Err gf_oci_event_get_id(OCIEvent *event, u16 *ID);
\r
1086 GF_Err gf_oci_event_get_start_time(OCIEvent *event, u8 *Hours, u8 *Minutes, u8 *Seconds, u8 *HundredSeconds, u8 *IsAbsoluteTime);
\r
1087 GF_Err gf_oci_event_get_duration(OCIEvent *event, u8 *Hours, u8 *Minutes, u8 *Seconds, u8 *HundredSeconds);
\r
1088 u32 gf_oci_event_get_desc_count(OCIEvent *event);
\r
1089 GF_Descriptor *gf_oci_event_get_desc(OCIEvent *event, u32 DescIndex);
\r
1090 GF_Err gf_oci_event_rem_desc(OCIEvent *event, u32 DescIndex);
\r
1094 typedef struct __tag_oci_codec OCICodec;
\r
1096 /*construction / destruction
\r
1097 IsEncoder specifies an OCI Event encoder
\r
1098 version is for future extensions, and only 0x01 is valid for now*/
\r
1099 OCICodec *gf_oci_codec_new(u8 IsEncoder, u8 Version);
\r
1100 void gf_oci_codec_del(OCICodec *codec);
\r
1102 /* ENCODER FUNCTIONS
\r
1103 add a command to the codec event list.
\r
1104 The event WILL BE DESTROYED BY THE CODEC after encoding*/
\r
1105 GF_Err gf_oci_codec_add_event(OCICodec *codec, OCIEvent *event);
\r
1107 /*encode AU. The memory allocation is done in place
\r
1108 WARNING: once this function called, the codec event List is empty
\r
1109 and events destroyed
\r
1110 you must set *outAU = NULL*/
\r
1111 GF_Err gf_oci_codec_encode(OCICodec *codec, char **outAU, u32 *au_length);
\r
1115 /*Decoder: decode the previously set-up AU
\r
1116 the input buffer is cleared once decoded*/
\r
1117 GF_Err gf_oci_codec_decode(OCICodec *codec, char *au, u32 au_length);
\r
1119 /*get the first OCI Event in the list. Once called, the event is removed
\r
1120 from the event list. Return NULL when the event List is empty
\r
1121 you MUST delete events */
\r
1122 OCIEvent *gf_oci_codec_get_event(OCICodec *codec);
\r
1126 GF_Err gf_odf_dump_au(char *data, u32 dataLength, FILE *trace, u32 indent, Bool XMTDump);
\r
1127 GF_Err gf_odf_dump_com(void *p, FILE *trace, u32 indent, Bool XMTDump);
\r
1128 GF_Err gf_odf_dump_desc(void *ptr, FILE *trace, u32 indent, Bool XMTDump);
\r
1129 GF_Err gf_odf_dump_com_list(GF_List *commandList, FILE *trace, u32 indent, Bool XMTDump);
\r
1131 /*OCI dump tools*/
\r
1132 GF_Err gf_oci_dump_event(OCIEvent *ev, FILE *trace, u32 indent, Bool XMTDump);
\r
1133 GF_Err gf_oci_dump_au(u8 version, char *au, u32 au_length, FILE *trace, u32 indent, Bool XMTDump);
\r
1136 /*OD parsing tools (XMT/BT)*/
\r
1137 /*returns desc tag based on name*/
\r
1138 u32 gf_odf_get_tag_by_name(char *descName);
\r
1139 /*field type for OD/QoS/IPMPX/etc*/
\r
1143 GF_ODF_FT_DEFAULT = 0,
\r
1144 /*single descriptor type*/
\r
1146 /*descriptor list type*/
\r
1147 GF_ODF_FT_OD_LIST = 2,
\r
1148 /*IPMP Data type*/
\r
1149 GF_ODF_FT_IPMPX = 3,
\r
1150 /*IPMP Data list type*/
\r
1151 GF_ODF_FT_IPMPX_LIST = 4,
\r
1152 /*IPMP ByteArray type*/
\r
1153 GF_ODF_FT_IPMPX_BA = 5,
\r
1154 /*IPMP ByteArray list type*/
\r
1155 GF_ODF_FT_IPMPX_BA_LIST = 6,
\r
1157 u32 gf_odf_get_field_type(GF_Descriptor *desc, char *fieldName);
\r
1158 /*set non-descriptor field value - value string shall be presented without ' or " characters*/
\r
1159 GF_Err gf_odf_set_field(GF_Descriptor *desc, char *fieldName, char *val);
\r
1165 IPMPX extensions - IPMP Data only (messages are not supported yet)
\r
1172 } GF_IPMPX_ByteArray;
\r
1174 /*IPMPX authentication descriptors*/
\r
1175 #define GF_IPMPX_AUTH_DESC \
\r
1180 GF_IPMPX_AUTH_DESC
\r
1181 } GF_IPMPX_Authentication;
\r
1185 GF_IPMPX_AUTH_Forbidden_Tag = 0x00,
\r
1186 GF_IPMPX_AUTH_AlgorithmDescr_Tag = 0x01,
\r
1187 GF_IPMPX_AUTH_KeyDescr_Tag = 0x02,
\r
1192 GF_IPMPX_AUTH_DESC
\r
1194 u32 keyBodyLength;
\r
1195 } GF_IPMPX_AUTH_KeyDescriptor;
\r
1199 GF_IPMPX_AUTH_DESC
\r
1200 /*used if no specAlgoID*/
\r
1202 GF_IPMPX_ByteArray *specAlgoID;
\r
1203 GF_IPMPX_ByteArray *OpaqueData;
\r
1204 } GF_IPMPX_AUTH_AlgorithmDescriptor;
\r
1207 /*IPMP data messages*/
\r
1210 GF_IPMPX_OPAQUE_DATA_TAG = 0x01,
\r
1211 GF_IPMPX_AUDIO_WM_INIT_TAG = 0x02,
\r
1212 GF_IPMPX_VIDEO_WM_INIT_TAG = 0x03,
\r
1213 GF_IPMPX_SEL_DEC_INIT_TAG = 0x04,
\r
1214 GF_IPMPX_KEY_DATA_TAG = 0x05,
\r
1215 GF_IPMPX_AUDIO_WM_SEND_TAG = 0x06,
\r
1216 GF_IPMPX_VIDEO_WM_SEND_TAG = 0x07,
\r
1217 GF_IPMPX_RIGHTS_DATA_TAG = 0x08,
\r
1218 GF_IPMPX_SECURE_CONTAINER_TAG = 0x09,
\r
1219 GF_IPMPX_ADD_TOOL_LISTENER_TAG = 0x0A,
\r
1220 GF_IPMPX_REMOVE_TOOL_LISTENER_TAG = 0x0B,
\r
1221 GF_IPMPX_INIT_AUTHENTICATION_TAG = 0x0C,
\r
1222 GF_IPMPX_MUTUAL_AUTHENTICATION_TAG = 0x0D,
\r
1223 GF_IPMPX_USER_QUERY_TAG = 0x0E,
\r
1224 GF_IPMPX_USER_RESPONSE_TAG = 0x0F,
\r
1225 GF_IPMPX_PARAMETRIC_DESCRIPTION_TAG = 0x10,
\r
1226 GF_IPMPX_PARAMETRIC_CAPS_QUERY_TAG = 0x11,
\r
1227 GF_IPMPX_PARAMETRIC_CAPS_RESPONSE_TAG = 0x12,
\r
1228 /*NO ASSOCIATED STRUCTURE*/
\r
1229 GF_IPMPX_GET_TOOLS_TAG = 0x13,
\r
1230 GF_IPMPX_GET_TOOLS_RESPONSE_TAG = 0x14,
\r
1231 GF_IPMPX_GET_TOOL_CONTEXT_TAG = 0x15,
\r
1232 GF_IPMPX_GET_TOOL_CONTEXT_RESPONSE_TAG = 0x16,
\r
1233 GF_IPMPX_CONNECT_TOOL_TAG = 0x17,
\r
1234 GF_IPMPX_DISCONNECT_TOOL_TAG = 0x18,
\r
1235 GF_IPMPX_NOTIFY_TOOL_EVENT_TAG = 0x19,
\r
1236 GF_IPMPX_CAN_PROCESS_TAG = 0x1A,
\r
1237 GF_IPMPX_TRUST_SECURITY_METADATA_TAG = 0x1B,
\r
1238 GF_IPMPX_TOOL_API_CONFIG_TAG = 0x1C,
\r
1241 GF_IPMPX_ISMACRYP_TAG = 0xD0,
\r
1243 /*intern ones for parsing (not real datas)*/
\r
1244 GF_IPMPX_TRUSTED_TOOL_TAG = 0xA1,
\r
1245 GF_IPMPX_TRUST_SPECIFICATION_TAG = 0xA2,
\r
1246 /*emulate algo descriptors as base IPMP classes for parsing...*/
\r
1247 GF_IPMPX_ALGORITHM_DESCRIPTOR_TAG = 0xA3,
\r
1248 GF_IPMPX_KEY_DESCRIPTOR_TAG = 0xA4,
\r
1249 GF_IPMPX_PARAM_DESCRIPTOR_ITEM_TAG = 0xA5,
\r
1250 GF_IPMPX_SEL_ENC_BUFFER_TAG = 0xA6,
\r
1251 GF_IPMPX_SEL_ENC_FIELD_TAG = 0xA7,
\r
1254 typedef char GF_IPMPX_Date[5];
\r
1257 #define GF_IPMPX_DATA_BASE \
\r
1264 GF_IPMPX_DATA_BASE
\r
1269 GF_IPMPX_DATA_BASE
\r
1272 } GF_IPMPX_InitAuthentication;
\r
1274 /*NOT a real DATA, only used as data for parsing*/
\r
1277 GF_IPMPX_DATA_BASE
\r
1278 GF_IPMPX_Date startDate;
\r
1279 u8 attackerProfile;
\r
1280 u32 trustedDuration;
\r
1281 GF_IPMPX_ByteArray *CCTrustMetadata;
\r
1282 } GF_IPMPX_TrustSpecification;
\r
1284 /*NOT a real DATA, only used as data for parsing*/
\r
1287 GF_IPMPX_DATA_BASE
\r
1289 GF_IPMPX_Date AuditDate;
\r
1290 GF_List *trustSpecifications;
\r
1291 } GF_IPMPX_TrustedTool;
\r
1293 typedef struct _ipmpx_TrustSecurityMetadata
\r
1295 GF_IPMPX_DATA_BASE
\r
1296 GF_List *TrustedTools;
\r
1297 } GF_IPMPX_TrustSecurityMetadata;
\r
1302 GF_IPMPX_DATA_BASE
\r
1303 Bool failedNegotiation;
\r
1305 GF_List *candidateAlgorithms;
\r
1306 GF_List *agreedAlgorithms;
\r
1307 GF_IPMPX_ByteArray *AuthenticationData;
\r
1309 /*inclAuthCodes will be set if any of the members is set (cf spec...)*/
\r
1311 /*GF_IPMPX_ByteArray list*/
\r
1312 GF_List *certificates;
\r
1313 GF_IPMPX_AUTH_KeyDescriptor *publicKey;
\r
1314 GF_IPMPX_ByteArray *opaque;
\r
1315 GF_IPMPX_TrustSecurityMetadata *trustData;
\r
1316 GF_IPMPX_ByteArray *authCodes;
\r
1317 } GF_IPMPX_MutualAuthentication;
\r
1321 GF_IPMPX_DATA_BASE
\r
1322 /*if set MAC is part of the encrypted data*/
\r
1323 Bool isMACEncrypted;
\r
1325 GF_IPMPX_ByteArray *encryptedData;
\r
1326 GF_IPMPX_Data *protectedMsg;
\r
1327 GF_IPMPX_ByteArray *MAC;
\r
1328 } GF_IPMPX_SecureContainer;
\r
1332 GF_List *ipmp_tools;
\r
1333 } GF_IPMPX_GetToolsResponse;
\r
1337 GF_IPMPX_DATA_BASE
\r
1338 GF_IPMPX_ByteArray *main_class;
\r
1339 GF_IPMPX_ByteArray *subClass;
\r
1340 GF_IPMPX_ByteArray *typeData;
\r
1341 GF_IPMPX_ByteArray *type;
\r
1342 GF_IPMPX_ByteArray *addedData;
\r
1343 } GF_IPMPX_ParametricDescriptionItem;
\r
1345 typedef struct _tagIPMPXParamDesc
\r
1347 GF_IPMPX_DATA_BASE
\r
1348 GF_IPMPX_ByteArray *descriptionComment;
\r
1351 /*list of GF_IPMPX_ParametricDescriptionItem*/
\r
1352 GF_List *descriptions;
\r
1353 } GF_IPMPX_ParametricDescription;
\r
1357 GF_IPMPX_DATA_BASE
\r
1358 GF_IPMPX_ParametricDescription *description;
\r
1359 } GF_IPMPX_ToolParamCapabilitiesQuery;
\r
1363 GF_IPMPX_DATA_BASE
\r
1364 Bool capabilitiesSupported;
\r
1365 } GF_IPMPX_ToolParamCapabilitiesResponse;
\r
1370 GF_IPMPX_DATA_BASE
\r
1371 GF_IPMP_Descriptor *toolDescriptor;
\r
1372 } GF_IPMPX_ConnectTool;
\r
1376 GF_IPMPX_DATA_BASE
\r
1377 u32 IPMP_ToolContextID;
\r
1378 } GF_IPMPX_DisconnectTool;
\r
1383 GF_IPMPX_DATA_BASE
\r
1385 u16 IPMP_DescriptorIDEx;
\r
1386 } GF_IPMPX_GetToolContext;
\r
1391 GF_IPMPX_DATA_BASE
\r
1394 u32 IPMP_ToolContextID;
\r
1395 } GF_IPMPX_GetToolContextResponse;
\r
1397 /*GF_IPMPX_LISTEN_Types*/
\r
1400 GF_IPMPX_LISTEN_CONNECTED = 0x00,
\r
1401 GF_IPMPX_LISTEN_CONNECTIONFAILED = 0x01,
\r
1402 GF_IPMPX_LISTEN_DISCONNECTED = 0x02,
\r
1403 GF_IPMPX_LISTEN_DISCONNECTIONFAILED = 0x03,
\r
1404 GF_IPMPX_LISTEN_WATERMARKDETECTED = 0x04,
\r
1409 GF_IPMPX_DATA_BASE
\r
1411 /*events to listen to*/
\r
1412 u8 eventTypeCount;
\r
1414 } GF_IPMPX_AddToolNotificationListener;
\r
1418 GF_IPMPX_DATA_BASE
\r
1419 u8 eventTypeCount;
\r
1421 } GF_IPMPX_RemoveToolNotificationListener;
\r
1425 GF_IPMPX_DATA_BASE
\r
1429 u32 IPMP_ToolContextID;
\r
1430 } GF_IPMPX_NotifyToolEvent;
\r
1434 GF_IPMPX_DATA_BASE
\r
1436 } GF_IPMPX_CanProcess;
\r
1440 GF_IPMPX_DATA_BASE
\r
1441 GF_IPMPX_ByteArray *opaqueData;
\r
1442 } GF_IPMPX_OpaqueData;
\r
1447 GF_IPMPX_DATA_BASE
\r
1448 GF_IPMPX_ByteArray *keyBody;
\r
1451 hasStartPacketID = 1<<1;
\r
1452 hasExpireDTS = 1<<2;
\r
1453 hasExpirePacketID = 1<<3
\r
1458 u32 startPacketID;
\r
1460 u32 expirePacketID;
\r
1461 GF_IPMPX_ByteArray *OpaqueData;
\r
1462 } GF_IPMPX_KeyData;
\r
1466 GF_IPMPX_DATA_BASE
\r
1467 GF_IPMPX_ByteArray *rightsInfo;
\r
1468 } GF_IPMPX_RightsData;
\r
1471 /*not a real GF_IPMPX_Data in spec, but emulated as if for parsing*/
\r
1474 GF_IPMPX_DATA_BASE
\r
1475 bin128 cipher_Id;
\r
1477 /*block mode if stream cypher info is NULL*/
\r
1481 GF_IPMPX_ByteArray *Stream_Cipher_Specific_Init_Info;
\r
1482 } GF_IPMPX_SelEncBuffer;
\r
1484 /*not a real GF_IPMPX_Data in spec, but emulated as if for parsing*/
\r
1487 GF_IPMPX_DATA_BASE
\r
1492 u16 mappingTableSize;
\r
1493 u16 *mappingTable;
\r
1494 GF_IPMPX_ByteArray *shuffleSpecificInfo;
\r
1495 } GF_IPMPX_SelEncField;
\r
1498 /*mediaTypeExtension*/
\r
1501 GF_IPMPX_SE_MT_ISO_IEC = 0x00,
\r
1502 GF_IPMPX_SE_MT_ITU = 0x01
\r
1503 /*the rest is reserved or forbidden*/
\r
1509 GF_IPMPX_SE_COMP_FULLY = 0x00,
\r
1510 GF_IPMPX_SE_COMP_VIDEO_PACKETS = 0x01,
\r
1511 GF_IPMPX_SE_COMP_VIDEO_VOP = 0x02,
\r
1512 GF_IPMPX_SE_COMP_VIDEO_NONE = 0x03,
\r
1513 GF_IPMPX_SE_COMP_VIDEO_GOB = 0x04,
\r
1514 /*0x05-2F ISO Reserved for video*/
\r
1515 GF_IPMPX_SE_COMP_AAC_DF = 0x30,
\r
1516 GF_IPMPX_SE_COMP_AAC_NONE = 0x31,
\r
1518 0x32 - 0x5F ISO Reserved for audio
\r
1519 0x60 - 0xCF ISO Reserved
\r
1520 0xD0 - 0xFE User Defined
\r
1528 GF_IPMPX_SE_SYNC_VID7EO_PACKETS = 0x00,
\r
1529 GF_IPMPX_SE_SYNC_VIDEO_VOP = 0x01,
\r
1530 GF_IPMPX_SE_SYNC_VIDEO_GOV = 0x02,
\r
1531 /*0x03-2F ISO Reserved for video,*/
\r
1532 GF_IPMPX_SE_SYNC_AAC_DF = 0x30,
\r
1533 /*0x31 - 0x5F ISO Reserved for audio
\r
1534 0x60 - 0xCF ISO Reserved
\r
1535 0xD0 - 0xFE User Defined
\r
1543 GF_IPMPX_SE_FID_VIDEO_MV = 0x00,
\r
1544 GF_IPMPX_SE_FID_VIDEO_DC = 0x01,
\r
1545 GF_IPMPX_SE_FID_VIDEO_DCT_SIGN = 0x02,
\r
1546 GF_IPMPX_SE_FID_VIDEO_DQUANT = 0x03,
\r
1547 GF_IPMPX_SE_FID_VIDEO_DCT_COEF = 0x04,
\r
1548 GF_IPMPX_SE_FID_VIDEO_ALL = 0x05,
\r
1549 /*0x06-2F ISO Reserved for video*/
\r
1550 GF_IPMPX_SE_FID_AAC_SIGN = 0x30,
\r
1551 GF_IPMPX_SE_FID_AAC_CODEWORDS = 0x31,
\r
1552 GF_IPMPX_SE_FID_AAC_SCALE = 0x32,
\r
1553 /*0x32 - 0x5F ISO Reserved for audio
\r
1554 0x60 - 0xCF ISO Reserved
\r
1555 0xD0 - 0xFE User Defined
\r
1562 GF_IPMPX_DATA_BASE
\r
1563 u8 mediaTypeExtension;
\r
1564 u8 mediaTypeIndication;
\r
1565 u8 profileLevelIndication;
\r
1568 GF_List *SelEncBuffer;
\r
1570 GF_List *SelEncFields;
\r
1572 u16 RLE_DataLength;
\r
1574 } GF_IPMPX_SelectiveDecryptionInit;
\r
1577 /*watermark init ops*/
\r
1580 GF_IPMPX_WM_INSERT = 0,
\r
1581 GF_IPMPX_WM_EXTRACT = 1,
\r
1582 GF_IPMPX_WM_REMARK = 2,
\r
1583 GF_IPMPX_WM_DETECT_COMPRESSION = 3,
\r
1586 /*used for both audio and video WM init*/
\r
1589 GF_IPMPX_DATA_BASE
\r
1591 for audio: PCM defined (0x01) and all audio objectTypeIndications
\r
1592 for video: YUV defined (0x01) and all visual objectTypeIndications
\r
1597 /*valid for audio WM, inputFormat=0x01*/
\r
1602 /*valid for video WM, inputFormat=0x01*/
\r
1603 u16 frame_horizontal_size;
\r
1604 u16 frame_vertical_size;
\r
1610 u16 wmRecipientId;
\r
1612 u32 opaqueDataSize;
\r
1614 } GF_IPMPX_WatermarkingInit;
\r
1621 GF_IPMPX_WM_PAYLOAD = 0,
\r
1622 GF_IPMPX_WM_NOPAYLOAD = 1,
\r
1623 GF_IPMPX_WM_NONE = 2,
\r
1624 GF_IPMPX_WM_UNKNOWN = 3
\r
1627 /*compression status*/
\r
1630 GF_IPMPX_WM_COMPRESSION = 0,
\r
1631 GF_IPMPX_WM_NO_COMPRESSION = 1,
\r
1632 GF_IPMPX_WM_COMPRESSION_UNKNOWN = 2,
\r
1637 GF_IPMPX_DATA_BASE
\r
1639 u8 compression_status;
\r
1640 /*if payload is set, status is FORCED to AUDIO_GF_IPMPX_WM_PAYLOAD*/
\r
1641 GF_IPMPX_ByteArray *payload;
\r
1642 GF_IPMPX_ByteArray *opaqueData;
\r
1643 } GF_IPMPX_SendWatermark;
\r
1648 GF_IPMPX_DATA_BASE
\r
1649 /*GPAC only supports non-0 IDs*/
\r
1650 u32 Instantiation_API_ID;
\r
1651 u32 Messaging_API_ID;
\r
1652 GF_IPMPX_ByteArray *opaqueData;
\r
1653 } GF_IPMPX_ToolAPI_Config;
\r
1657 GF_IPMPX_DATA_BASE
\r
1660 Bool use_selective_encryption;
\r
1661 u8 key_indicator_length;
\r
1662 } GF_IPMPX_ISMACryp;
\r
1665 /*constructor/destructor*/
\r
1666 GF_IPMPX_Data *gf_ipmpx_data_new(u8 tag);
\r
1667 void gf_ipmpx_data_del(GF_IPMPX_Data *p);
\r
1669 /*parse from bitstream*/
\r
1670 GF_Err gf_ipmpx_data_parse(GF_BitStream *bs, GF_IPMPX_Data **out_data);
\r
1671 /*get IPMP_Data contained size (eg without tag & sizeofinstance)*/
\r
1672 u32 gf_ipmpx_data_size(GF_IPMPX_Data *p);
\r
1673 /*get fulml IPMP_Data encoded size (eg with tag & sizeofinstance)*/
\r
1674 u32 gf_ipmpx_data_full_size(GF_IPMPX_Data *p);
\r
1675 /*writes IPMP_Data to buffer*/
\r
1676 GF_Err gf_ipmpx_data_write(GF_BitStream *bs, GF_IPMPX_Data *_p);
\r
1678 /*returns GF_IPMPX_Tag based on name*/
\r
1679 u8 gf_ipmpx_get_tag(char *dataName);
\r
1680 /*return values: cf above */
\r
1681 u32 gf_ipmpx_get_field_type(GF_IPMPX_Data *p, char *fieldName);
\r
1682 GF_Err gf_ipmpx_set_field(GF_IPMPX_Data *desc, char *fieldName, char *val);
\r
1683 /*assign subdata*/
\r
1684 GF_Err gf_ipmpx_set_sub_data(GF_IPMPX_Data *desc, char *fieldName, GF_IPMPX_Data *subdesc);
\r
1685 /*assign bytearray*/
\r
1686 GF_Err gf_ipmpx_set_byte_array(GF_IPMPX_Data *p, char *field, char *str);
\r
1689 GF_Err gf_ipmpx_dump_data(GF_IPMPX_Data *_p, FILE *trace, u32 indent, Bool XMTDump);
\r
1693 #ifdef __cplusplus
\r
1697 #endif /*_GF_MPEG4_ODF_H_*/
\r