Home | History | Annotate | Download | only in include
      1 /* ------------------------------------------------------------------
      2  * Copyright (C) 1998-2009 PacketVideo
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
     13  * express or implied.
     14  * See the License for the specific language governing permissions
     15  * and limitations under the License.
     16  * -------------------------------------------------------------------
     17  */
     18 #ifndef ATOMDEFS_H_INCLUDED
     19 #define ATOMDEFS_H_INCLUDED
     20 
     21 #ifndef PV_MP4FFPARSER_CONFIG_H_INCLUDED
     22 #include "pv_mp4ffparser_config.h"
     23 #endif
     24 
     25 #ifndef OSCL_BASE_H_INCLUDED
     26 #include "oscl_base.h"
     27 #endif
     28 
     29 #ifndef OSCL_MEM_H_INCLUDED
     30 #include "oscl_mem.h"
     31 #endif
     32 
     33 #ifndef OSCL_FILE_IO_H_INCLUDED
     34 #include "oscl_file_io.h"
     35 #endif
     36 
     37 #ifndef OSCL_MEM__H_INCLUDED
     38 #include "oscl_mem.h"
     39 #endif
     40 
     41 #ifndef OSCL_STRING_CONTAINERS_H_INCLUDED
     42 #include "oscl_string_containers.h"
     43 #endif
     44 
     45 #ifndef OSCL_STRING_H_INCLUDED
     46 #include "oscl_string.h"
     47 #endif
     48 
     49 #ifndef OSCL_INT64_UTILS_H_INCLUDED
     50 #include "oscl_int64_utils.h"
     51 #endif
     52 static const int32 MEDIA_DATA_IN_MEMORY = 0;
     53 static const int32 MEDIA_DATA_ON_DISK = 1;
     54 
     55 static const uint32 DEFAULT_PRESENTATION_TIMESCALE = 1000; // For milliseconds
     56 static const uint32 INITIAL_TRACK_ID = 1; // Initial track ID for first track added to this movie
     57 
     58 static const int32 MEDIA_TYPE_UNKNOWN = 10;
     59 
     60 // MediaInformationHeaderAtom types
     61 static const int32 MEDIA_INFORMATION_HEADER_TYPE_AUDIO = 0;
     62 static const int32 MEDIA_INFORMATION_HEADER_TYPE_VISUAL = 1;
     63 static const int32 MEDIA_INFORMATION_HEADER_TYPE_HINT = 2;
     64 static const int32 MEDIA_INFORMATION_HEADER_TYPE_MPEG4 = 3;
     65 
     66 static const uint32 UNKNOWN_ATOM = 0;
     67 static const int32 UNKNOWN_DESCRIPTOR = 1;
     68 static const int32 UNKNOWN_HANDLER = 2;
     69 
     70 static const int32 CODING_TYPE_I = 0;
     71 static const int32 CODING_TYPE_P = 1;
     72 static const int32 CODING_TYPE_B = 2;
     73 static const int32 CODING_TYPE_SPRITE = 3;
     74 
     75 // Mpeg-4 file types
     76 static const int32 FILE_TYPE_AUDIO = 1;
     77 static const int32 FILE_TYPE_VIDEO = 2;
     78 static const int32 FILE_TYPE_AUDIO_VIDEO = 3; // Logical ORing of the two
     79 static const int32 FILE_TYPE_STILL_IMAGE = 4;
     80 static const int32 FILE_TYPE_STILL_IMAGE_AUDIO = 5; // Logical ORing of the two
     81 static const int32 FILE_TYPE_TEXT = 8;
     82 static const int32 FILE_TYPE_TEXT_AUDIO = 9;
     83 static const int32 FILE_TYPE_TEXT_VIDEO = 10;
     84 static const int32 FILE_TYPE_TEXT_AUDIO_VIDEO = 11; // Logical ORing
     85 
     86 
     87 // Scalability settings on the Mpeg4 file
     88 static const int32 STREAM_SCALABILITY_NONE = 0;
     89 static const int32 STREAM_SCALABILITY_TEMPORAL = 1;
     90 static const int32 STREAM_SCALABILITY_SPATIAL = 2;
     91 static const int32 STREAM_SCALABILITY_BOTH = 3; // Logical ORing of the two
     92 
     93 #define FourCharConstToUint32(a, b, c, d) ( (uint32(a) << 24) | (uint32(b) << 16) | (uint32(c) << 8) | uint32(d) )
     94 
     95 const uint32 PACKETVIDEO_FOURCC = FourCharConstToUint32('p', 'v', 'm', 'm');
     96 const uint32 PVUSER_DATA_ATOM = FourCharConstToUint32('p', 'v', 'm', 'm');
     97 
     98 const uint32    FILE_TYPE_ATOM = FourCharConstToUint32('f', 't', 'y', 'p');
     99 
    100 const uint32    UUID_ATOM = FourCharConstToUint32('u', 'u', 'i', 'd');
    101 
    102 const uint32    MOVIE_ATOM = FourCharConstToUint32('m', 'o', 'o', 'v');
    103 const uint32    MOVIE_HEADER_ATOM = FourCharConstToUint32('m', 'v', 'h', 'd');
    104 const uint32    TRACK_ATOM = FourCharConstToUint32('t', 'r', 'a', 'k');
    105 const uint32    ESD_ATOM = FourCharConstToUint32('e', 's', 'd', 's');
    106 const uint32    TRACK_HEADER_ATOM = FourCharConstToUint32('t', 'k', 'h', 'd');
    107 const uint32    TRACK_REFERENCE_ATOM = FourCharConstToUint32('t', 'r', 'e', 'f');
    108 
    109 //movie fragments
    110 const uint32    MOVIE_FRAGMENT_ATOM = FourCharConstToUint32('m', 'o', 'o', 'f');
    111 const uint32    MOVIE_EXTENDS_ATOM = FourCharConstToUint32('m', 'v', 'e', 'x');
    112 const uint32    MOVIE_EXTENDS_HEADER_ATOM = FourCharConstToUint32('m', 'e', 'h', 'd');
    113 const uint32    TRACK_EXTENDS_ATOM = FourCharConstToUint32('t', 'r', 'e', 'x');
    114 const uint32    MOVIE_FRAGMENT_HEADER_ATOM = FourCharConstToUint32('m', 'f', 'h', 'd');
    115 const uint32    TRACK_FRAGMENT_ATOM = FourCharConstToUint32('t', 'r', 'a', 'f');
    116 const uint32    TRACK_FRAGMENT_HEADER_ATOM = FourCharConstToUint32('t', 'f', 'h', 'd');
    117 const uint32    TRACK_FRAGMENT_RUN_ATOM = FourCharConstToUint32('t', 'r', 'u', 'n');
    118 const uint32    MOVIE_FRAGMENT_RANDOM_ACCESS_ATOM = FourCharConstToUint32('m', 'f', 'r', 'a');
    119 const uint32    MOVIE_FRAGMENT_RANDOM_ACCESS_OFFSET_ATOM = FourCharConstToUint32('m', 'f', 'r', 'o');
    120 const uint32    TRACK_FRAGMENT_RANDOM_ACCESS_ATOM = FourCharConstToUint32('t', 'f', 'r', 'a');
    121 
    122 const uint32    HINT_TRACK_REFERENCE_TYPE = FourCharConstToUint32('h', 'i', 'n', 't');
    123 const uint32    DPND_TRACK_REFERENCE_TYPE = FourCharConstToUint32('d', 'p', 'n', 'd');
    124 const uint32    IPIR_TRACK_REFERENCE_TYPE = FourCharConstToUint32('i', 'p', 'i', 'r');
    125 const uint32    MPOD_TRACK_REFERENCE_TYPE = FourCharConstToUint32('m', 'p', 'o', 'd');
    126 const uint32    SYNC_TRACK_REFERENCE_TYPE = FourCharConstToUint32('s', 'y', 'n', 'c');
    127 
    128 const uint32    MEDIA_ATOM = FourCharConstToUint32('m', 'd', 'i', 'a');
    129 const uint32    EDIT_ATOM = FourCharConstToUint32('e', 'd', 't', 's');
    130 const uint32    EDIT_LIST_ATOM = FourCharConstToUint32('e', 'l', 's', 't');
    131 const uint32    MEDIA_HEADER_ATOM = FourCharConstToUint32('m', 'd', 'h', 'd');
    132 const uint32    HANDLER_ATOM = FourCharConstToUint32('h', 'd', 'l', 'r');
    133 const uint32    MEDIA_INFORMATION_ATOM = FourCharConstToUint32('m', 'i', 'n', 'f');
    134 const uint32    VIDEO_MEDIA_HEADER_ATOM = FourCharConstToUint32('v', 'm', 'h', 'd');
    135 const uint32    SOUND_MEDIA_HEADER_ATOM = FourCharConstToUint32('s', 'm', 'h', 'd');
    136 const uint32    HINT_MEDIA_HEADER_ATOM = FourCharConstToUint32('h', 'm', 'h', 'd');
    137 const uint32    MPEG4_MEDIA_HEADER_ATOM = FourCharConstToUint32('n', 'm', 'h', 'd');
    138 const uint32    DATA_INFORMATION_ATOM = FourCharConstToUint32('d', 'i', 'n', 'f');
    139 const uint32    DATA_REFERENCE_ATOM = FourCharConstToUint32('d', 'r', 'e', 'f');
    140 const uint32    DATA_ENTRY_URL_ATOM = FourCharConstToUint32('u', 'r', 'l', ' ');
    141 const uint32    DATA_ENTRY_URN_ATOM = FourCharConstToUint32('u', 'r', 'n', ' ');
    142 const uint32    SAMPLE_TABLE_ATOM = FourCharConstToUint32('s', 't', 'b', 'l');
    143 const uint32    TIME_TO_SAMPLE_ATOM = FourCharConstToUint32('s', 't', 't', 's');
    144 const uint32    COMPOSITION_OFFSET_ATOM = FourCharConstToUint32('c', 't', 't', 's');
    145 const uint32    SAMPLE_DESCRIPTION_ATOM = FourCharConstToUint32('s', 't', 's', 'd');
    146 const uint32    SAMPLE_SIZE_ATOM = FourCharConstToUint32('s', 't', 's', 'z');
    147 const uint32    SAMPLE_TO_CHUNK_ATOM = FourCharConstToUint32('s', 't', 's', 'c');
    148 const uint32    CHUNK_OFFSET_ATOM = FourCharConstToUint32('s', 't', 'c', 'o');
    149 const uint32    SYNC_SAMPLE_ATOM = FourCharConstToUint32('s', 't', 's', 's');
    150 const uint32    SHADOW_SYNC_SAMPLE_ATOM = FourCharConstToUint32('s', 't', 's', 'h');
    151 const uint32    DEGRADATION_PRIORITY_ATOM = FourCharConstToUint32('s', 't', 'd', 'p');
    152 const uint32    OBJECT_DESCRIPTOR_ATOM = FourCharConstToUint32('i', 'o', 'd', 's');
    153 const uint32    MEDIA_DATA_ATOM = FourCharConstToUint32('m', 'd', 'a', 't');
    154 const uint32    FREE_SPACE_ATOM = FourCharConstToUint32('f', 'r', 'e', 'e');
    155 const uint32    SKIP_ATOM = FourCharConstToUint32('s', 'k', 'i', 'p');
    156 const uint32    USER_DATA_ATOM = FourCharConstToUint32('u', 'd', 't', 'a');
    157 const uint32    MEDIA_TYPE_AUDIO = FourCharConstToUint32('s', 'o', 'u', 'n');
    158 const uint32    MEDIA_TYPE_VISUAL = FourCharConstToUint32('v', 'i', 'd', 'e');
    159 const uint32    MEDIA_TYPE_HINT = FourCharConstToUint32('h', 'i', 'n', 't');
    160 const uint32    MEDIA_TYPE_OBJECT_DESCRIPTOR = FourCharConstToUint32('o', 'd', 's', 'm');
    161 const uint32    MEDIA_TYPE_CLOCK_REFERENCE = FourCharConstToUint32('c', 'r', 's', 'm');
    162 const uint32    MEDIA_TYPE_SCENE_DESCRIPTION = FourCharConstToUint32('s', 'd', 's', 'm');
    163 const uint32    MEDIA_TYPE_MPEG7 = FourCharConstToUint32('m', '7', 's', 'm');
    164 const uint32    MEDIA_TYPE_OBJECT_CONTENT_INFO = FourCharConstToUint32('o', 'c', 's', 'm');
    165 const uint32    MEDIA_TYPE_IPMP = FourCharConstToUint32('i', 'p', 's', 'm');
    166 const uint32    MEDIA_TYPE_MPEG_J = FourCharConstToUint32('m', 'j', 's', 'm');
    167 const uint32    MEDIA_TYPE_SCALABILITY = FourCharConstToUint32('p', 'v', 's', 'c');
    168 const uint32    MEDIA_TYPE_TEXT = FourCharConstToUint32('t', 'e', 'x', 't');
    169 
    170 const uint32    MPEG_SAMPLE_ENTRY = FourCharConstToUint32('m', 'p', '4', 's');
    171 const uint32    AUDIO_SAMPLE_ENTRY = FourCharConstToUint32('m', 'p', '4', 'a');
    172 const uint32    VIDEO_SAMPLE_ENTRY = FourCharConstToUint32('m', 'p', '4', 'v');
    173 
    174 const uint32    AMR_SAMPLE_ENTRY_ATOM = FourCharConstToUint32('s', 'a', 'm', 'r');
    175 const uint32    AMRWB_SAMPLE_ENTRY_ATOM = FourCharConstToUint32('s', 'a', 'w', 'b');
    176 const uint32    H263_SAMPLE_ENTRY_ATOM = FourCharConstToUint32('s', '2', '6', '3');
    177 
    178 const uint32    AMR_SPECIFIC_ATOM = FourCharConstToUint32('d', 'a', 'm', 'r');
    179 const uint32    H263_SPECIFIC_ATOM = FourCharConstToUint32('d', '2', '6', '3');
    180 const uint32    H263_BITRATE_ATOM = FourCharConstToUint32('b', 'i', 't', 'r');
    181 
    182 
    183 const uint32    COPYRIGHT_ATOM = FourCharConstToUint32('c', 'p', 'r', 't');
    184 
    185 const uint32    NULL_MEDIA_HEADER_ATOM = FourCharConstToUint32('n', 'm', 'h', 'd');
    186 const uint32    FONT_TABLE_ATOM = FourCharConstToUint32('f', 't', 'a', 'b');
    187 const uint32    TEXT_SAMPLE_ENTRY = FourCharConstToUint32('t', 'x', '3', 'g');
    188 
    189 // Part of udta at file level
    190 const uint32    PV_CONTENT_TYPE_ATOM = FourCharConstToUint32('p', 'v', 'c', 't');
    191 
    192 const uint32    ASSET_INFO_TITLE_ATOM = FourCharConstToUint32('t', 'i', 't', 'l');
    193 const uint32    ASSET_INFO_DESCP_ATOM = FourCharConstToUint32('d', 's', 'c', 'p');
    194 const uint32    ASSET_INFO_PERF_ATOM = FourCharConstToUint32('p', 'e', 'r', 'f');
    195 const uint32    ASSET_INFO_AUTHOR_ATOM = FourCharConstToUint32('a', 'u', 't', 'h');
    196 const uint32    ASSET_INFO_GENRE_ATOM = FourCharConstToUint32('g', 'n', 'r', 'e');
    197 const uint32    ASSET_INFO_RATING_ATOM = FourCharConstToUint32('r', 't', 'n', 'g');
    198 const uint32    ASSET_INFO_CLSF_ATOM = FourCharConstToUint32('c', 'l', 's', 'f');
    199 const uint32    ASSET_INFO_KEYWORD_ATOM = FourCharConstToUint32('k', 'y', 'w', 'd');
    200 const uint32    ASSET_INFO_LOCATION_ATOM = FourCharConstToUint32('l', 'o', 'c', 'i');
    201 const uint32    ASSET_INFO_ALBUM_ATOM = FourCharConstToUint32('a', 'l', 'b', 'm');
    202 const uint32    ASSET_INFO_YRRC_ATOM = FourCharConstToUint32('y', 'r', 'r', 'c');
    203 
    204 //AVC related atoms
    205 const uint32    AVC_SAMPLE_ENTRY = FourCharConstToUint32('a', 'v', 'c', '1');
    206 const uint32    AVC_CONFIGURATION_BOX = FourCharConstToUint32('a', 'v', 'c', 'C');
    207 const uint32    AVC_SAMPLE_DEPENDENCY_TYPE_BOX = FourCharConstToUint32('s', 'd', 't', 'p');
    208 const uint32    AVC_SAMPLE_TO_GROUP_BOX = FourCharConstToUint32('s', 'b', 'g', 'p');
    209 const uint32    AVC_SAMPLE_GROUP_DESCRIPTION_BOX = FourCharConstToUint32('s', 'g', 'p', 'd');
    210 const uint32    AVC_SUBSEQUENCE_DESCRIPTION_BOX = FourCharConstToUint32('a', 'v', 's', 's');
    211 const uint32    AVC_LAYER_DESCRIPTION_BOX = FourCharConstToUint32('a', 'v', 'l', 'l');
    212 const uint32    AVC_SAMPLE_DEPENDENCY_BOX = FourCharConstToUint32('s', 'd', 'e', 'p');
    213 
    214 const uint32    MPEG4_BITRATE_BOX = FourCharConstToUint32('b', 't', 'r', 't');
    215 const uint32    MPEG4_EXTENSION_DESCRIPTORS_BOX = FourCharConstToUint32('m', '4', 'd', 's');
    216 
    217 //Pixel Aspect Ratio
    218 const uint32  PIXELASPECTRATIO_BOX = FourCharConstToUint32('p', 'a', 's', 'p');
    219 
    220 
    221 const uint32    WMF_BRAND = FourCharConstToUint32('w', 'm', 'f', ' ');
    222 const uint32    BRAND_3GPP4 = FourCharConstToUint32('3', 'g', 'p', '4');
    223 const uint32    MOBILE_MP4 = FourCharConstToUint32('m', 'm', 'p', '4');
    224 const uint32    BRAND_3GPP5 = FourCharConstToUint32('3', 'g', 'p', '5');
    225 const uint32    BRAND_3GP6 = FourCharConstToUint32('3', 'g', 'p', '6');
    226 const uint32    BRAND_3GR6 = FourCharConstToUint32('3', 'g', 'r', '6');
    227 const uint32    BRAND_MP41 = FourCharConstToUint32('m', 'p', '4', '1');
    228 const uint32    BRAND_MP42 = FourCharConstToUint32('m', 'p', '4', '2');
    229 const uint32    BRAND_ISOM = FourCharConstToUint32('i', 's', 'o', 'm');
    230 
    231 
    232 /* OMA2 DRM Atoms */
    233 const uint32    ENCRYPTED_AUDIO_SAMPLE_ENTRY = FourCharConstToUint32('e', 'n', 'c', 'a');
    234 const uint32    ENCRYPTED_VIDEO_SAMPLE_ENTRY = FourCharConstToUint32('e', 'n', 'c', 'v');
    235 const uint32    ENCRYPTED_TEXT_SAMPLE_ENTRY = FourCharConstToUint32('e', 'n', 'c', 't');
    236 
    237 const uint32    PROTECTION_SCHEME_INFO_BOX = FourCharConstToUint32('s', 'i', 'n', 'f');
    238 const uint32    ORIGINAL_FORMAT_BOX = FourCharConstToUint32('f', 'r', 'm', 'a');
    239 const uint32    SCHEME_TYPE_BOX = FourCharConstToUint32('s', 'c', 'h', 'm');
    240 const uint32    SCHEME_INFORMATION_BOX = FourCharConstToUint32('s', 'c', 'h', 'i');
    241 const uint32    MUTABLE_DRM_INFORMATION = FourCharConstToUint32('m', 'd', 'r', 'i');
    242 const uint32    OMADRM_TRANSACTION_TRACKING_BOX = FourCharConstToUint32('o', 'd', 't', 't');
    243 const uint32    OMADRM_RIGHTS_OBJECT_BOX = FourCharConstToUint32('o', 'd', 'r', 'b');
    244 const uint32    OMADRM_KMS_BOX = FourCharConstToUint32('o', 'd', 'k', 'm');
    245 // Text Sample Modifier Atoms
    246 const uint32    TEXT_STYLE_BOX = FourCharConstToUint32('s', 't', 'y', 'l');
    247 const uint32    TEXT_HIGHLIGHT_BOX = FourCharConstToUint32('h', 'l', 'i', 't');
    248 const uint32    TEXT_HILIGHT_COLOR_BOX = FourCharConstToUint32('h', 'c', 'l', 'r');
    249 const uint32    TEXT_KARAOKE_BOX = FourCharConstToUint32('k', 'r', 'o', 'k');
    250 const uint32    TEXT_SCROLL_DELAY_BOX = FourCharConstToUint32('d', 'l', 'a', 'y');
    251 const uint32    TEXT_HYPER_TEXT_BOX = FourCharConstToUint32('h', 'r', 'e', 'f');
    252 const uint32    TEXT_OVER_RIDE_BOX = FourCharConstToUint32('t', 'b', 'o', 'x');
    253 const uint32    TEXT_BLINK_BOX = FourCharConstToUint32('b', 'l', 'n', 'k');
    254 
    255 
    256 
    257 
    258 const uint32    ITUNES_ALBUM_ATOM  = FourCharConstToUint32('', 'a', 'l', 'b');
    259 const uint32    ITUNES_ARTIST1_ATOM = FourCharConstToUint32('', 'a', 'r', 't');
    260 const uint32    ITUNES_ARTIST2_ATOM = FourCharConstToUint32('', 'A', 'R', 'T');
    261 const uint32    ITUNES_ALBUM_ARTIST_ATOM = FourCharConstToUint32('a', 'A', 'R', 'T');
    262 const uint32    ITUNES_COMMENT_ATOM = FourCharConstToUint32('', 'c', 'm', 't');
    263 const uint32    ITUNES_YEAR_ATOM = FourCharConstToUint32('', 'd', 'a', 'y');
    264 const uint32    ITUNES_SONG_TITLE_ATOM = FourCharConstToUint32('', 'n', 'a', 'm');
    265 const uint32    ITUNES_GENRE1_ATOM = FourCharConstToUint32('', 'g', 'e', 'n');
    266 const uint32    ITUNES_GENRE2_ATOM = FourCharConstToUint32('g', 'n', 'r', 'e');
    267 const uint32    ITUNES_TRACK_NUMBER_ATOM = FourCharConstToUint32('t', 'r', 'k', 'n');
    268 const uint32    ITUNES_DISK_NUMBER_ATOM = FourCharConstToUint32('d', 'i', 's', 'k');
    269 const uint32    ITUNES_COMPOSER_ATOM = FourCharConstToUint32('', 'w', 'r', 't');
    270 const uint32    ITUNES_ENCODER_TOOL_ATOM = FourCharConstToUint32('', 't', 'o', 'o');
    271 const uint32    ITUNES_ENCODEDBY_ATOM = FourCharConstToUint32('@', 'e', 'n', 'c');
    272 const uint32    ITUNES_BPM_ATOM = FourCharConstToUint32('t', 'm', 'p', 'o');
    273 const uint32    ITUNES_COMPILATION_ATOM = FourCharConstToUint32('c', 'p', 'i', 'l');
    274 const uint32    ITUNES_ART_WORK_ATOM = FourCharConstToUint32('c', 'o', 'v', 'r');
    275 const uint32    ITUNES_GROUPING1_ATOM = FourCharConstToUint32('', 'g', 'r', 'p');
    276 const uint32    ITUNES_GROUPING2_ATOM = FourCharConstToUint32('g', 'r', 'u', 'p');
    277 const uint32    ITUNES_LYRICS_ATOM = FourCharConstToUint32('', 'l', 'y', 'r');
    278 const uint32    ITUNES_DESCRIPTION_ATOM = FourCharConstToUint32('d', 'e', 's', 'c');
    279 const uint32    ITUNES_COPYRIGHT_ATOM = FourCharConstToUint32('c', 'p', 'r', 't');
    280 const uint32    META_DATA_ATOM = FourCharConstToUint32('m', 'e', 't', 'a');
    281 const uint32    ITUNES_FREE_FORM_DATA_NAME_ATOM = FourCharConstToUint32('n', 'a', 'm', 'e');
    282 const uint32    ITUNES_MDIRAPPL_HDLR_PART1 = FourCharConstToUint32('m', 'd', 'i', 'r');
    283 const uint32    ITUNES_MDIRAPPL_HDLR_PART2 = FourCharConstToUint32('a', 'p', 'p', 'l');
    284 const uint32    ITUNES_ILST_ATOM = FourCharConstToUint32('i', 'l', 's', 't');
    285 const uint32    ITUNES_ILST_DATA_ATOM = FourCharConstToUint32('d', 'a', 't', 'a');
    286 const uint32    ITUNES_MEAN_ATOM = FourCharConstToUint32('m', 'e', 'a', 'n');
    287 const uint32    ITUNES_FREE_FORM_ATOM = FourCharConstToUint32('-', '-', '-', '-');
    288 const uint32    ITUNES_TRACK_SUBTITLE_ATOM = FourCharConstToUint32('@', 's', 't', '3');
    289 const uint32    ITUNES_CONTENT_RATING_ATOM = FourCharConstToUint32('r', 't', 'n', 'g');  // Same tag as ASSET_INFO_RATING_ATOM
    290 
    291 
    292 
    293 //For iTunes
    294 #define ITUNES_FREE_FORM_DATA_ATOM_TYPE_NORM "iTunNORM"
    295 #define ITUNES_FREE_FORM_DATA_ATOM_TYPE_TOOL "tool"
    296 #define ITUNES_FREE_FORM_DATA_ATOM_TYPE_CDDB1 "iTunes_CDDB_1"
    297 #define ITUNES_FREE_FORM_DATA_ATOM_TYPE_CDDB_TRACKNUMBER "iTunes_CDDB_TrackNumber"
    298 #define ITUNES_FREE_FORM_DATA_ATOM_TYPE_CDDB_IDS "iTunes_CDDB_IDs"
    299 
    300 
    301 // VARIOUS DESCRIPTOR TAGS CURRENTLY IN USE
    302 
    303 #define ES_DESCRIPTOR_TAG             0x03
    304 #define ES_ID_INC_TAG                 0x0E
    305 #define ES_ID_REF_TAG                 0x0F
    306 #define DECODER_CONFIG_DESCRIPTOR_TAG 0x04
    307 #define DECODER_SPECIFIC_INFO_TAG     0x05
    308 #define SL_CONFIG_DESCRIPTOR          0x06
    309 
    310 #define STREAM_TYPE_AUDIO      0x05
    311 #define STREAM_TYPE_VISUAL     0x04
    312 
    313 #define DEFAULT_AUTHORING_MODE 0x00000000
    314 
    315 typedef enum
    316 {
    317     ENoFileType   = 0x0000,
    318     E3GP4         = 0x0001,
    319     E3GP5         = 0x0002,
    320     EISOM         = 0x0010,
    321     EMP41         = 0x0020,
    322     EMP42         = 0x0040,
    323     EMMP4         = 0x0100,
    324     EWMF          = 0x0200,
    325     EUNKNOWN_TYPE = 0x8000
    326 } FILE_TYPE_MASKS;
    327 
    328 typedef enum
    329 {
    330     CODEC_TYPE_AMR_AUDIO = 1,
    331     CODEC_TYPE_AAC_AUDIO
    332 
    333 } AUDIO_CODEC_TYPES;
    334 
    335 typedef enum
    336 {
    337     CODEC_TYPE_MPEG4_VIDEO = 1,
    338     CODEC_TYPE_BASELINE_H263_VIDEO,
    339     CODEC_TYPE_MPEG4_IMAGE
    340 
    341 } VIDEO_CODEC_TYPES;
    342 
    343 typedef enum
    344 {
    345     AMR_AUDIO   = 0xd0,
    346     QCELP_MP4   = 0xE1,
    347     MPEG4_AUDIO = 0x40,
    348     MPEG2_AUDIO_LC = 0x67,
    349     MPEG4_VIDEO = 0x20,
    350     H263_VIDEO  = 0xc0,
    351     AMRWB_AUDIO_3GPP = 0xFA,
    352     AVC_VIDEO   = 0xFB,
    353     AMR_AUDIO_3GPP = 0xFC,
    354     TIMED_TEXT  = 0xFD,
    355     MPEG4_SYS_OD = 0x01,
    356     MPEG4_SYS_BIFS = 0x01,
    357     TYPE_UNKNOWN = 0
    358 
    359 } OTI_VALUES;
    360 
    361 typedef enum
    362 {
    363     STRING_GENRE = 0,
    364     INTEGER_GENRE
    365 } GnreVersion;
    366 
    367 typedef struct
    368 {
    369     OSCL_wHeapString<OsclMemAllocator> title;
    370     OSCL_wHeapString<OsclMemAllocator> author;
    371     OSCL_wHeapString<OsclMemAllocator> description;
    372     OSCL_wHeapString<OsclMemAllocator> rating;
    373     OSCL_wHeapString<OsclMemAllocator> copyRight;
    374     OSCL_wHeapString<OsclMemAllocator> version;
    375     OSCL_wHeapString<OsclMemAllocator> creationDate;
    376 } ClipInfo;
    377 
    378 typedef enum
    379 {
    380 
    381     ORIGINAL_CHAR_TYPE_UNKNOWN,
    382     ORIGINAL_CHAR_TYPE_UTF8,
    383     ORIGINAL_CHAR_TYPE_UTF16
    384 
    385 } MP4FFParserOriginalCharEnc;
    386 
    387 
    388 #define JPEG    0x0000
    389 #define GIF     0x0001
    390 #define MP4_MIN_BYTES_FOR_GETTING_MOVIE_HDR_SIZE 1024
    391 
    392 #define DISABLE_REPOS_ON_CLIPS_HAVING_UNEQUAL_TFRA_ENTRY_COUNT 0
    393 
    394 #define COUNT_OF_TRUNS_PARSED_THRESHOLD 3000
    395 
    396 // when playing from a file
    397 #define MAX_CACHED_TABLE_ENTRIES_FILE       4096
    398 #define TABLE_ENTRIES_THRESHOLD_FILE            1024
    399 
    400 // when playing from a memory buffer data stream
    401 #define MAX_CACHED_TABLE_ENTRIES_MBDS       16384
    402 #define TABLE_ENTRIES_THRESHOLD_MBDS        4096
    403 
    404 #define BYTE_ORDER_MASK 0xFEFF
    405 #define BYTE_ORDER_MASK_SIZE 2
    406 #define MAX_UTF8_REPRESENTATION 4
    407 
    408 // Max limit for number of tracks in a file
    409 
    410 #define MAX_LIMIT_FOR_NUMBER_OF_TRACKS 1024
    411 
    412 #endif //ATOMDEFS_H_INCLUDED
    413