Home | History | Annotate | Download | only in webm
      1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef MEDIA_WEBM_WEBM_CONSTANTS_H_
      6 #define MEDIA_WEBM_WEBM_CONSTANTS_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "media/base/media_export.h"
     10 
     11 namespace media {
     12 
     13 // WebM element IDs.
     14 // This is a subset of the IDs in the Matroska spec.
     15 // http://www.matroska.org/technical/specs/index.html
     16 const int kWebMIdAESSettingsCipherMode = 0x47E8;
     17 const int kWebMIdAlphaMode = 0x53C0;
     18 const int kWebMIdAspectRatioType = 0x54B3;
     19 const int kWebMIdAttachedFile = 0x61A7;
     20 const int kWebMIdAttachmentLink = 0x7446;
     21 const int kWebMIdAttachments = 0x1941A469;
     22 const int kWebMIdAudio = 0xE1;
     23 const int kWebMIdBitDepth = 0x6264;
     24 const int kWebMIdBlock = 0xA1;
     25 const int kWebMIdBlockAddID = 0xEE;
     26 const int kWebMIdBlockAdditions = 0x75A1;
     27 const int kWebMIdBlockAdditional = 0xA5;
     28 const int kWebMIdBlockDuration = 0x9B;
     29 const int kWebMIdBlockGroup = 0xA0;
     30 const int kWebMIdBlockMore = 0xA6;
     31 const int kWebMIdChannels = 0x9F;
     32 const int kWebMIdChapCountry = 0x437E;
     33 const int kWebMIdChapLanguage = 0x437C;
     34 const int kWebMIdChapProcess = 0x6944;
     35 const int kWebMIdChapProcessCodecID = 0x6955;
     36 const int kWebMIdChapProcessCommand = 0x6911;
     37 const int kWebMIdChapProcessData = 0x6933;
     38 const int kWebMIdChapProcessPrivate = 0x450D;
     39 const int kWebMIdChapProcessTime = 0x6922;
     40 const int kWebMIdChapString = 0x85;
     41 const int kWebMIdChapterAtom = 0xB6;
     42 const int kWebMIdChapterDisplay = 0x80;
     43 const int kWebMIdChapterFlagEnabled = 0x4598;
     44 const int kWebMIdChapterFlagHidden = 0x98;
     45 const int kWebMIdChapterPhysicalEquiv = 0x63C3;
     46 const int kWebMIdChapters = 0x1043A770;
     47 const int kWebMIdChapterSegmentEditionUID = 0x6EBC;
     48 const int kWebMIdChapterSegmentUID = 0x6E67;
     49 const int kWebMIdChapterTimeEnd = 0x92;
     50 const int kWebMIdChapterTimeStart = 0x91;
     51 const int kWebMIdChapterTrack = 0x8F;
     52 const int kWebMIdChapterTrackNumber = 0x89;
     53 const int kWebMIdChapterTranslate = 0x6924;
     54 const int kWebMIdChapterTranslateCodec = 0x69BF;
     55 const int kWebMIdChapterTranslateEditionUID = 0x69FC;
     56 const int kWebMIdChapterTranslateID = 0x69A5;
     57 const int kWebMIdChapterUID = 0x73C4;
     58 const int kWebMIdCluster = 0x1F43B675;
     59 const int kWebMIdCodecDecodeAll = 0xAA;
     60 const int kWebMIdCodecID = 0x86;
     61 const int kWebMIdCodecName = 0x258688;
     62 const int kWebMIdCodecPrivate = 0x63A2;
     63 const int kWebMIdCodecState = 0xA4;
     64 const int kWebMIdColorSpace = 0x2EB524;
     65 const int kWebMIdContentCompAlgo = 0x4254;
     66 const int kWebMIdContentCompression = 0x5034;
     67 const int kWebMIdContentCompSettings = 0x4255;
     68 const int kWebMIdContentEncAESSettings = 0x47E7;
     69 const int kWebMIdContentEncAlgo = 0x47E1;
     70 const int kWebMIdContentEncKeyID = 0x47E2;
     71 const int kWebMIdContentEncoding = 0x6240;
     72 const int kWebMIdContentEncodingOrder = 0x5031;
     73 const int kWebMIdContentEncodings = 0x6D80;
     74 const int kWebMIdContentEncodingScope = 0x5032;
     75 const int kWebMIdContentEncodingType = 0x5033;
     76 const int kWebMIdContentEncryption = 0x5035;
     77 const int kWebMIdContentSigAlgo = 0x47E5;
     78 const int kWebMIdContentSigHashAlgo = 0x47E6;
     79 const int kWebMIdContentSigKeyID = 0x47E4;
     80 const int kWebMIdContentSignature = 0x47E3;
     81 const int kWebMIdCRC32 = 0xBF;
     82 const int kWebMIdCueBlockNumber = 0x5378;
     83 const int kWebMIdCueClusterPosition = 0xF1;
     84 const int kWebMIdCueCodecState = 0xEA;
     85 const int kWebMIdCuePoint = 0xBB;
     86 const int kWebMIdCueReference = 0xDB;
     87 const int kWebMIdCueRefTime = 0x96;
     88 const int kWebMIdCues = 0x1C53BB6B;
     89 const int kWebMIdCueTime = 0xB3;
     90 const int kWebMIdCueTrack = 0xF7;
     91 const int kWebMIdCueTrackPositions = 0xB7;
     92 const int kWebMIdDateUTC = 0x4461;
     93 const int kWebMIdDefaultDuration = 0x23E383;
     94 const int kWebMIdDisplayHeight = 0x54BA;
     95 const int kWebMIdDisplayUnit = 0x54B2;
     96 const int kWebMIdDisplayWidth = 0x54B0;
     97 const int kWebMIdDocType = 0x4282;
     98 const int kWebMIdDocTypeReadVersion = 0x4285;
     99 const int kWebMIdDocTypeVersion = 0x4287;
    100 const int kWebMIdDuration = 0x4489;
    101 const int kWebMIdEBMLHeader = 0x1A45DFA3;
    102 const int kWebMIdEBMLMaxIDLength = 0x42F2;
    103 const int kWebMIdEBMLMaxSizeLength = 0x42F3;
    104 const int kWebMIdEBMLReadVersion = 0x42F7;
    105 const int kWebMIdEBMLVersion = 0x4286;
    106 const int kWebMIdEditionEntry = 0x45B9;
    107 const int kWebMIdEditionFlagDefault = 0x45DB;
    108 const int kWebMIdEditionFlagHidden = 0x45BD;
    109 const int kWebMIdEditionFlagOrdered = 0x45DD;
    110 const int kWebMIdEditionUID = 0x45BC;
    111 const int kWebMIdFileData = 0x465C;
    112 const int kWebMIdFileDescription = 0x467E;
    113 const int kWebMIdFileMimeType = 0x4660;
    114 const int kWebMIdFileName = 0x466E;
    115 const int kWebMIdFileUID = 0x46AE;
    116 const int kWebMIdFlagDefault = 0x88;
    117 const int kWebMIdFlagEnabled = 0xB9;
    118 const int kWebMIdFlagForced = 0x55AA;
    119 const int kWebMIdFlagInterlaced = 0x9A;
    120 const int kWebMIdFlagLacing = 0x9C;
    121 const int kWebMIdInfo = 0x1549A966;
    122 const int kWebMIdJoinBlocks = 0xE9;
    123 const int kWebMIdLaceNumber = 0xCC;
    124 const int kWebMIdLanguage = 0x22B59C;
    125 const int kWebMIdMaxBlockAdditionId = 0x55EE;
    126 const int kWebMIdMaxCache = 0x6DF8;
    127 const int kWebMIdMinCache = 0x6DE7;
    128 const int kWebMIdMuxingApp = 0x4D80;
    129 const int kWebMIdName = 0x536E;
    130 const int kWebMIdNextFilename = 0x3E83BB;
    131 const int kWebMIdNextUID = 0x3EB923;
    132 const int kWebMIdOutputSamplingFrequency = 0x78B5;
    133 const int kWebMIdPixelCropBottom = 0x54AA;
    134 const int kWebMIdPixelCropLeft = 0x54CC;
    135 const int kWebMIdPixelCropRight = 0x54DD;
    136 const int kWebMIdPixelCropTop = 0x54BB;
    137 const int kWebMIdPixelHeight = 0xBA;
    138 const int kWebMIdPixelWidth = 0xB0;
    139 const int kWebMIdPosition = 0xA7;
    140 const int kWebMIdPrevFilename = 0x3C83AB;
    141 const int kWebMIdPrevSize = 0xAB;
    142 const int kWebMIdPrevUID = 0x3CB923;
    143 const int kWebMIdReferenceBlock = 0xFB;
    144 const int kWebMIdReferencePriority = 0xFA;
    145 const int kWebMIdSamplingFrequency = 0xB5;
    146 const int kWebMIdSeek = 0x4DBB;
    147 const int kWebMIdSeekHead = 0x114D9B74;
    148 const int kWebMIdSeekID = 0x53AB;
    149 const int kWebMIdSeekPosition = 0x53AC;
    150 const int kWebMIdSegment = 0x18538067;
    151 const int kWebMIdSegmentFamily = 0x4444;
    152 const int kWebMIdSegmentFilename = 0x7384;
    153 const int kWebMIdSegmentUID = 0x73A4;
    154 const int kWebMIdSilentTrackNumber = 0x58D7;
    155 const int kWebMIdSilentTracks = 0x5854;
    156 const int kWebMIdSimpleBlock = 0xA3;
    157 const int kWebMIdSimpleTag = 0x67C8;
    158 const int kWebMIdSlices = 0x8E;
    159 const int kWebMIdStereoMode = 0x53B8;
    160 const int kWebMIdTag = 0x7373;
    161 const int kWebMIdTagAttachmentUID = 0x63C6;
    162 const int kWebMIdTagBinary = 0x4485;
    163 const int kWebMIdTagChapterUID = 0x63C4;
    164 const int kWebMIdTagDefault = 0x4484;
    165 const int kWebMIdTagEditionUID = 0x63C9;
    166 const int kWebMIdTagLanguage = 0x447A;
    167 const int kWebMIdTagName = 0x45A3;
    168 const int kWebMIdTags = 0x1254C367;
    169 const int kWebMIdTagString = 0x4487;
    170 const int kWebMIdTagTrackUID = 0x63C5;
    171 const int kWebMIdTargets = 0x63C0;
    172 const int kWebMIdTargetType = 0x63CA;
    173 const int kWebMIdTargetTypeValue = 0x68CA;
    174 const int kWebMIdTimecode = 0xE7;
    175 const int kWebMIdTimecodeScale = 0x2AD7B1;
    176 const int kWebMIdTimeSlice = 0xE8;
    177 const int kWebMIdTitle = 0x7BA9;
    178 const int kWebMIdTrackCombinePlanes = 0xE3;
    179 const int kWebMIdTrackEntry = 0xAE;
    180 const int kWebMIdTrackJoinUID = 0xED;
    181 const int kWebMIdTrackNumber = 0xD7;
    182 const int kWebMIdTrackOperation = 0xE2;
    183 const int kWebMIdTrackOverlay = 0x6FAB;
    184 const int kWebMIdTrackPlane = 0xE4;
    185 const int kWebMIdTrackPlaneType = 0xE6;
    186 const int kWebMIdTrackPlaneUID = 0xE5;
    187 const int kWebMIdTracks = 0x1654AE6B;
    188 const int kWebMIdTrackTimecodeScale = 0x23314F;
    189 const int kWebMIdTrackTranslate = 0x6624;
    190 const int kWebMIdTrackTranslateCodec = 0x66BF;
    191 const int kWebMIdTrackTranslateEditionUID = 0x66FC;
    192 const int kWebMIdTrackTranslateTrackID = 0x66A5;
    193 const int kWebMIdTrackType = 0x83;
    194 const int kWebMIdTrackUID = 0x73C5;
    195 const int kWebMIdVideo = 0xE0;
    196 const int kWebMIdVoid = 0xEC;
    197 const int kWebMIdWritingApp = 0x5741;
    198 
    199 const int64 kWebMReservedId = 0x1FFFFFFF;
    200 const int64 kWebMUnknownSize = GG_LONGLONG(0x00FFFFFFFFFFFFFF);
    201 
    202 const uint8 kWebMFlagKeyframe = 0x80;
    203 
    204 // Current encrypted WebM request for comments specification is here
    205 // http://wiki.webmproject.org/encryption/webm-encryption-rfc
    206 const uint8 kWebMFlagEncryptedFrame = 0x1;
    207 const int kWebMIvSize = 8;
    208 const int kWebMSignalByteSize = 1;
    209 
    210 // Current specification for WebVTT embedded in WebM
    211 // http://wiki.webmproject.org/webm-metadata/temporal-metadata/webvtt-in-webm
    212 
    213 const int kWebMTrackTypeVideo = 1;
    214 const int kWebMTrackTypeAudio = 2;
    215 const int kWebMTrackTypeSubtitlesOrCaptions = 0x11;
    216 const int kWebMTrackTypeDescriptionsOrMetadata = 0x21;
    217 
    218 MEDIA_EXPORT extern const char kWebMCodecSubtitles[];
    219 MEDIA_EXPORT extern const char kWebMCodecCaptions[];
    220 MEDIA_EXPORT extern const char kWebMCodecDescriptions[];
    221 MEDIA_EXPORT extern const char kWebMCodecMetadata[];
    222 
    223 }  // namespace media
    224 
    225 #endif  // MEDIA_WEBM_WEBM_CONSTANTS_H_
    226