WebmElements.h 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  1. // Copyright (c) Kuba Szczodrzyński 2022-1-16.
  2. #pragma once
  3. enum class ElementId {
  4. /** [sub-elements] Set the EBML characteristics of the data to follow. Each EBML document has to start with this. */
  5. EBML = 0x1A45DFA3,
  6. /** [u-integer] The version of EBML parser used to create the file. */
  7. EBMLVersion = 0x4286,
  8. /** [u-integer] The minimum EBML version a parser has to support to read this file. */
  9. EBMLReadVersion = 0x42F7,
  10. /** [u-integer] The maximum length of the IDs you'll find in this file (4 or less in Matroska). */
  11. EBMLMaxIDLength = 0x42F2,
  12. /** [u-integer] The maximum length of the sizes you'll find in this file (8 or less in Matroska). This does not
  13. override the element size indicated at the beginning of an element. Elements that have an indicated size which is
  14. larger than what is allowed by EBMLMaxSizeLength shall be considered invalid. */
  15. EBMLMaxSizeLength = 0x42F3,
  16. /** [string] A string that describes the type of document that follows this EBML header ('matroska' in our case). */
  17. DocType = 0x4282,
  18. /** [u-integer] The version of DocType interpreter used to create the file. */
  19. DocTypeVersion = 0x4287,
  20. /** [u-integer] The minimum DocType version an interpreter has to support to read this file. */
  21. DocTypeReadVersion = 0x4285,
  22. /** [binary] The CRC is computed on all the data from the last CRC element (or start of the upper level element), up
  23. to the CRC element, including other previous CRC elements. All level 1 elements should include a CRC-32. */
  24. CRC32 = 0xBF,
  25. /** [binary] Used to void damaged data, to avoid unexpected behaviors when using damaged data. The content is
  26. discarded. Also used to reserve space in a sub-element for later use. */
  27. Void = 0xEC,
  28. /** [sub-elements] Contain signature of some (coming) elements in the stream. */
  29. SignatureSlot = 0x1B538667,
  30. /** [u-integer] Signature algorithm used (1=RSA, 2=elliptic). */
  31. SignatureAlgo = 0x7E8A,
  32. /** [u-integer] Hash algorithm used (1=SHA1-160, 2=MD5). */
  33. SignatureHash = 0x7E9A,
  34. /** [binary] The public key to use with the algorithm (in the case of a PKI-based signature). */
  35. SignaturePublicKey = 0x7EA5,
  36. /** [binary] The signature of the data (until a new. */
  37. Signature = 0x7EB5,
  38. /** [sub-elements] Contains elements that will be used to compute the signature. */
  39. SignatureElements = 0x7E5B,
  40. /** [sub-elements] A list consists of a number of consecutive elements that represent one case where data is used in
  41. signature. Ex: Cluster|Block|BlockAdditional means that the BlockAdditional of all Blocks in all Clusters is used
  42. for encryption. */
  43. SignatureElementList = 0x7E7B,
  44. /** [binary] An element ID whose data will be used to compute the signature. */
  45. SignedElement = 0x6532,
  46. /* ebml_matroska.xml */
  47. /** [master] The Root Element that contains all other Top-Level Elements (Elements defined only at Level 1). A
  48. Matroska file is composed of 1 Segment. */
  49. Segment = 0x18538067,
  50. /** [master] Contains the Segment Position of other Top-Level Elements. */
  51. SeekHead = 0x114D9B74,
  52. /** [master] Contains a single seek entry to an EBML Element. */
  53. Seek = 0x4DBB,
  54. /** [binary] The binary ID corresponding to the Element name. */
  55. SeekID = 0x53AB,
  56. /** [uinteger] The Segment Position of the Element. */
  57. SeekPosition = 0x53AC,
  58. /** [master] Contains general information about the Segment. */
  59. Info = 0x1549A966,
  60. /** [binary] A randomly generated unique ID to identify the Segment amongst many others (128 bits). */
  61. SegmentUID = 0x73A4,
  62. /** [utf-8] A filename corresponding to this Segment. */
  63. SegmentFilename = 0x7384,
  64. /** [binary] A unique ID to identify the previous Segment of a Linked Segment (128 bits). */
  65. PrevUID = 0x3CB923,
  66. /** [utf-8] A filename corresponding to the file of the previous Linked Segment. */
  67. PrevFilename = 0x3C83AB,
  68. /** [binary] A unique ID to identify the next Segment of a Linked Segment (128 bits). */
  69. NextUID = 0x3EB923,
  70. /** [utf-8] A filename corresponding to the file of the next Linked Segment. */
  71. NextFilename = 0x3E83BB,
  72. /** [binary] A randomly generated unique ID that all Segments of a Linked Segment **MUST** share (128 bits). */
  73. SegmentFamily = 0x4444,
  74. /** [master] The mapping between this `Segment` and a segment value in the given Chapter Codec. */
  75. ChapterTranslate = 0x6924,
  76. /** [binary] The binary value used to represent this Segment in the chapter codec data. The format depends on the
  77. ChapProcessCodecID used; see (#chapprocesscodecid-element). */
  78. ChapterTranslateID = 0x69A5,
  79. /** [uinteger] This `ChapterTranslate` applies to this chapter codec of the given chapter edition(s); see
  80. (#chapprocesscodecid-element). */
  81. ChapterTranslateCodec = 0x69BF,
  82. /** [uinteger] Specify a chapter edition UID on which this `ChapterTranslate` applies. */
  83. ChapterTranslateEditionUID = 0x69FC,
  84. /** [uinteger] Timestamp scale in nanoseconds (1.000.000 means all timestamps in the Segment are expressed in
  85. milliseconds). */
  86. TimestampScale = 0x2AD7B1,
  87. /** [float] Duration of the Segment in nanoseconds based on TimestampScale. */
  88. Duration = 0x4489,
  89. /** [date] The date and time that the Segment was created by the muxing application or library. */
  90. DateUTC = 0x4461,
  91. /** [utf-8] General name of the Segment. */
  92. Title = 0x7BA9,
  93. /** [utf-8] Muxing application or library (example: "libmatroska-0.4.3"). */
  94. MuxingApp = 0x4D80,
  95. /** [utf-8] Writing application (example: "mkvmerge-0.3.3"). */
  96. WritingApp = 0x5741,
  97. /** [master] The Top-Level Element containing the (monolithic) Block structure. */
  98. Cluster = 0x1F43B675,
  99. /** [uinteger] Absolute timestamp of the cluster (based on TimestampScale). */
  100. Timestamp = 0xE7,
  101. /** [master] The list of tracks that are not used in that part of the stream. It is useful when using overlay tracks
  102. on seeking or to decide what track to use. */
  103. SilentTracks = 0x5854,
  104. /** [uinteger] One of the track number that are not used from now on in the stream. It could change later if not
  105. specified as silent in a further Cluster. */
  106. SilentTrackNumber = 0x58D7,
  107. /** [uinteger] The Segment Position of the Cluster in the Segment (0 in live streams). It might help to
  108. resynchronise offset on damaged streams. */
  109. Position = 0xA7,
  110. /** [uinteger] Size of the previous Cluster, in octets. Can be useful for backward playing. */
  111. PrevSize = 0xAB,
  112. /** [binary] Similar to Block, see (#block-structure), but without all the extra information, mostly used to reduced
  113. overhead when no extra feature is needed; see (#simpleblock-structure) on SimpleBlock Structure. */
  114. SimpleBlock = 0xA3,
  115. /** [master] Basic container of information containing a single Block and information specific to that Block. */
  116. BlockGroup = 0xA0,
  117. /** [binary] Block containing the actual data to be rendered and a timestamp relative to the Cluster Timestamp; see
  118. (#block-structure) on Block Structure. */
  119. Block = 0xA1,
  120. /** [binary] A Block with no data. It **MUST** be stored in the stream at the place the real Block would be in
  121. display order. */
  122. BlockVirtual = 0xA2,
  123. /** [master] Contain additional blocks to complete the main one. An EBML parser that has no knowledge of the Block
  124. structure could still see and use/skip these data. */
  125. BlockAdditions = 0x75A1,
  126. /** [master] Contain the BlockAdditional and some parameters. */
  127. BlockMore = 0xA6,
  128. /** [uinteger] An ID to identify the BlockAdditional level. If BlockAddIDType of the corresponding block is 0, this
  129. value is also the value of BlockAddIDType for the meaning of the content of BlockAdditional. */
  130. BlockAddID = 0xEE,
  131. /** [binary] Interpreted by the codec as it wishes (using the BlockAddID). */
  132. BlockAdditional = 0xA5,
  133. /** [uinteger] The duration of the Block (based on TimestampScale). The BlockDuration Element can be useful at the
  134. end of a Track to define the duration of the last frame (as there is no subsequent Block available), or when
  135. there is a break in a track like for subtitle tracks. */
  136. BlockDuration = 0x9B,
  137. /** [uinteger] This frame is referenced and has the specified cache priority. In cache only a frame of the same or
  138. higher priority can replace this frame. A value of 0 means the frame is not referenced. */
  139. ReferencePriority = 0xFA,
  140. /** [integer] A timestamp value, relative to the timestamp of the Block in this BlockGroup. This is used to
  141. reference other frames necessary to decode this frame. The relative value **SHOULD** correspond to a valid
  142. `Block` this `Block` depends on. Historically Matroska Writer didn't write the actual `Block(s)` this `Block`
  143. depends on, but *some* `Block` in the past. The value "0" **MAY** also be used to signify this `Block` cannot be
  144. decoded on its own, but without knownledge of which `Block` is necessary. In this case, other `ReferenceBlock`
  145. **MUST NOT** be found in the same `BlockGroup`. If the `BlockGroup` doesn't have any `ReferenceBlock` element,
  146. then the `Block` it contains can be decoded without using any other `Block` data. */
  147. ReferenceBlock = 0xFB,
  148. /** [integer] The Segment Position of the data that would otherwise be in position of the virtual block. */
  149. ReferenceVirtual = 0xFD,
  150. /** [binary] The new codec state to use. Data interpretation is private to the codec. This information **SHOULD**
  151. always be referenced by a seek entry. */
  152. CodecState = 0xA4,
  153. /** [integer] Duration in nanoseconds of the silent data added to the Block (padding at the end of the Block for
  154. positive value, at the beginning of the Block for negative value). The duration of DiscardPadding is not
  155. calculated in the duration of the TrackEntry and **SHOULD** be discarded during playback. */
  156. DiscardPadding = 0x75A2,
  157. /** [master] Contains slices description. */
  158. Slices = 0x8E,
  159. /** [master] Contains extra time information about the data contained in the Block. Being able to interpret this
  160. Element is not **REQUIRED** for playback. */
  161. TimeSlice = 0xE8,
  162. /** [uinteger] The reverse number of the frame in the lace (0 is the last frame, 1 is the next to last, etc). Being
  163. able to interpret this Element is not **REQUIRED** for playback. */
  164. LaceNumber = 0xCC,
  165. /** [uinteger] The number of the frame to generate from this lace with this delay (allow you to generate many frames
  166. from the same Block/Frame). */
  167. FrameNumber = 0xCD,
  168. /** [uinteger] The ID of the BlockAdditional Element (0 is the main Block). */
  169. BlockAdditionID = 0xCB,
  170. /** [uinteger] The (scaled) delay to apply to the Element. */
  171. Delay = 0xCE,
  172. /** [uinteger] The (scaled) duration to apply to the Element. */
  173. SliceDuration = 0xCF,
  174. /** [master] Contains information about the last reference frame. See [@?DivXTrickTrack]. */
  175. ReferenceFrame = 0xC8,
  176. /** [uinteger] The relative offset, in bytes, from the previous BlockGroup element for this Smooth FF/RW video track
  177. to the containing BlockGroup element. See [@?DivXTrickTrack]. */
  178. ReferenceOffset = 0xC9,
  179. /** [uinteger] The timecode of the BlockGroup pointed to by ReferenceOffset. See [@?DivXTrickTrack]. */
  180. ReferenceTimestamp = 0xCA,
  181. /** [binary] Similar to SimpleBlock, see (#simpleblock-structure), but the data inside the Block are Transformed
  182. (encrypt and/or signed). */
  183. EncryptedBlock = 0xAF,
  184. /** [master] A Top-Level Element of information with many tracks described. */
  185. Tracks = 0x1654AE6B,
  186. /** [master] Describes a track with all Elements. */
  187. TrackEntry = 0xAE,
  188. /** [uinteger] The track number as used in the Block Header (using more than 127 tracks is not encouraged, though
  189. the design allows an unlimited number). */
  190. TrackNumber = 0xD7,
  191. /** [uinteger] A unique ID to identify the Track. */
  192. TrackUID = 0x73C5,
  193. /** [uinteger] The `TrackType` defines the type of each frame found in the Track. The value **SHOULD** be stored on
  194. 1 octet. */
  195. TrackType = 0x83,
  196. /** [uinteger] Set to 1 if the track is usable. It is possible to turn a not usable track into a usable track using
  197. chapter codecs or control tracks. */
  198. FlagEnabled = 0xB9,
  199. /** [uinteger] Set if that track (audio, video or subs) **SHOULD** be eligible for automatic selection by the
  200. player; see (#default-track-selection) for more details. */
  201. FlagDefault = 0x88,
  202. /** [uinteger] Applies only to subtitles. Set if that track **SHOULD** be eligible for automatic selection by the
  203. player if it matches the user's language preference, even if the user's preferences would normally not enable
  204. subtitles with the selected audio track; this can be used for tracks containing only translations of
  205. foreign-language audio or onscreen text. See (#default-track-selection) for more details. */
  206. FlagForced = 0x55AA,
  207. /** [uinteger] Set to 1 if that track is suitable for users with hearing impairments, set to 0 if it is unsuitable
  208. for users with hearing impairments. */
  209. FlagHearingImpaired = 0x55AB,
  210. /** [uinteger] Set to 1 if that track is suitable for users with visual impairments, set to 0 if it is unsuitable
  211. for users with visual impairments. */
  212. FlagVisualImpaired = 0x55AC,
  213. /** [uinteger] Set to 1 if that track contains textual descriptions of video content, set to 0 if that track does
  214. not contain textual descriptions of video content. */
  215. FlagTextDescriptions = 0x55AD,
  216. /** [uinteger] Set to 1 if that track is in the content's original language, set to 0 if it is a translation. */
  217. FlagOriginal = 0x55AE,
  218. /** [uinteger] Set to 1 if that track contains commentary, set to 0 if it does not contain commentary. */
  219. FlagCommentary = 0x55AF,
  220. /** [uinteger] Set to 1 if the track **MAY** contain blocks using lacing. When set to 0 all blocks **MUST** have
  221. their lacing flags set to No lacing; see (#block-lacing) on Block Lacing. */
  222. FlagLacing = 0x9C,
  223. /** [uinteger] The minimum number of frames a player **SHOULD** be able to cache during playback. If set to 0, the
  224. reference pseudo-cache system is not used. */
  225. MinCache = 0x6DE7,
  226. /** [uinteger] The maximum cache size necessary to store referenced frames in and the current frame. 0 means no
  227. cache is needed. */
  228. MaxCache = 0x6DF8,
  229. /** [uinteger] Number of nanoseconds (not scaled via TimestampScale) per frame (frame in the Matroska sense -- one
  230. Element put into a (Simple)Block). */
  231. DefaultDuration = 0x23E383,
  232. /** [uinteger] The period in nanoseconds (not scaled by TimestampScale) between two successive fields at the output
  233. of the decoding process, see (#defaultdecodedfieldduration) for more information */
  234. DefaultDecodedFieldDuration = 0x234E7A,
  235. /** [float] DEPRECATED, DO NOT USE. The scale to apply on this track to work at normal speed in relation with other
  236. tracks (mostly used to adjust video speed when the audio length differs). */
  237. TrackTimestampScale = 0x23314F,
  238. /** [integer] A value to add to the Block's Timestamp. This can be used to adjust the playback offset of a track. */
  239. TrackOffset = 0x537F,
  240. /** [uinteger] The maximum value of BlockAddID ((#blockaddid-element)). A value 0 means there is no BlockAdditions
  241. ((#blockadditions-element)) for this track. */
  242. MaxBlockAdditionID = 0x55EE,
  243. /** [master] Contains elements that extend the track format, by adding content either to each frame, with BlockAddID
  244. ((#blockaddid-element)), or to the track as a whole with BlockAddIDExtraData. */
  245. BlockAdditionMapping = 0x41E4,
  246. /** [uinteger] If the track format extension needs content beside frames, the value refers to the BlockAddID
  247. ((#blockaddid-element)), value being described. To keep MaxBlockAdditionID as low as possible, small values
  248. **SHOULD** be used. */
  249. BlockAddIDValue = 0x41F0,
  250. /** [string] A human-friendly name describing the type of BlockAdditional data, as defined by the associated Block
  251. Additional Mapping. */
  252. BlockAddIDName = 0x41A4,
  253. /** [uinteger] Stores the registered identifier of the Block Additional Mapping to define how the BlockAdditional
  254. data should be handled. */
  255. BlockAddIDType = 0x41E7,
  256. /** [binary] Extra binary data that the BlockAddIDType can use to interpret the BlockAdditional data. The
  257. interpretation of the binary data depends on the BlockAddIDType value and the corresponding Block Additional
  258. Mapping. */
  259. BlockAddIDExtraData = 0x41ED,
  260. /** [utf-8] A human-readable track name. */
  261. Name = 0x536E,
  262. /** [string] Specifies the language of the track in the Matroska languages form; see (#language-codes) on language
  263. codes. This Element **MUST** be ignored if the LanguageIETF Element is used in the same TrackEntry. */
  264. Language = 0x22B59C,
  265. /** [string] Specifies the language of the track according to [@!BCP47] and using the IANA Language Subtag Registry
  266. [@!IANALangRegistry]. If this Element is used, then any Language Elements used in the same TrackEntry **MUST** be
  267. ignored. */
  268. LanguageIETF = 0x22B59D,
  269. /** [string] An ID corresponding to the codec, see [@!MatroskaCodec] for more info. */
  270. CodecID = 0x86,
  271. /** [binary] Private data only known to the codec. */
  272. CodecPrivate = 0x63A2,
  273. /** [utf-8] A human-readable string specifying the codec. */
  274. CodecName = 0x258688,
  275. /** [uinteger] The UID of an attachment that is used by this codec. */
  276. AttachmentLink = 0x7446,
  277. /** [utf-8] A string describing the encoding setting used. */
  278. CodecSettings = 0x3A9697,
  279. /** [string] A URL to find information about the codec used. */
  280. CodecInfoURL = 0x3B4040,
  281. /** [string] A URL to download about the codec used. */
  282. CodecDownloadURL = 0x26B240,
  283. /** [uinteger] Set to 1 if the codec can decode potentially damaged data. */
  284. CodecDecodeAll = 0xAA,
  285. /** [uinteger] Specify that this track is an overlay track for the Track specified (in the u-integer). That means
  286. when this track has a gap, see (#silenttracks-element) on SilentTracks, the overlay track **SHOULD** be used
  287. instead. The order of multiple TrackOverlay matters, the first one is the one that **SHOULD** be used. If not
  288. found it **SHOULD** be the second, etc. */
  289. TrackOverlay = 0x6FAB,
  290. /** [uinteger] CodecDelay is The codec-built-in delay in nanoseconds. This value **MUST** be subtracted from each
  291. block timestamp in order to get the actual timestamp. The value **SHOULD** be small so the muxing of tracks with
  292. the same actual timestamp are in the same Cluster. */
  293. CodecDelay = 0x56AA,
  294. /** [uinteger] After a discontinuity, SeekPreRoll is the duration in nanoseconds of the data the decoder **MUST**
  295. decode before the decoded data is valid. */
  296. SeekPreRoll = 0x56BB,
  297. /** [master] The mapping between this `TrackEntry` and a track value in the given Chapter Codec. */
  298. TrackTranslate = 0x6624,
  299. /** [binary] The binary value used to represent this `TrackEntry` in the chapter codec data. The format depends on
  300. the `ChapProcessCodecID` used; see (#chapprocesscodecid-element). */
  301. TrackTranslateTrackID = 0x66A5,
  302. /** [uinteger] This `TrackTranslate` applies to this chapter codec of the given chapter edition(s); see
  303. (#chapprocesscodecid-element). */
  304. TrackTranslateCodec = 0x66BF,
  305. /** [uinteger] Specify a chapter edition UID on which this `TrackTranslate` applies. */
  306. TrackTranslateEditionUID = 0x66FC,
  307. /** [master] Video settings. */
  308. Video = 0xE0,
  309. /** [uinteger] Specify whether the video frames in this track are interlaced or not. */
  310. FlagInterlaced = 0x9A,
  311. /** [uinteger] Specify the field ordering of video frames in this track. */
  312. FieldOrder = 0x9D,
  313. /** [uinteger] Stereo-3D video mode. There are some more details in (#multi-planar-and-3d-videos). */
  314. StereoMode = 0x53B8,
  315. /** [uinteger] Alpha Video Mode. Presence of this Element indicates that the BlockAdditional Element could contain
  316. Alpha data. */
  317. AlphaMode = 0x53C0,
  318. /** [uinteger] DEPRECATED, DO NOT USE. Bogus StereoMode value used in old versions of libmatroska. */
  319. OldStereoMode = 0x53B9,
  320. /** [uinteger] Width of the encoded video frames in pixels. */
  321. PixelWidth = 0xB0,
  322. /** [uinteger] Height of the encoded video frames in pixels. */
  323. PixelHeight = 0xBA,
  324. /** [uinteger] The number of video pixels to remove at the bottom of the image. */
  325. PixelCropBottom = 0x54AA,
  326. /** [uinteger] The number of video pixels to remove at the top of the image. */
  327. PixelCropTop = 0x54BB,
  328. /** [uinteger] The number of video pixels to remove on the left of the image. */
  329. PixelCropLeft = 0x54CC,
  330. /** [uinteger] The number of video pixels to remove on the right of the image. */
  331. PixelCropRight = 0x54DD,
  332. /** [uinteger] Width of the video frames to display. Applies to the video frame after cropping (PixelCrop*
  333. Elements). */
  334. DisplayWidth = 0x54B0,
  335. /** [uinteger] Height of the video frames to display. Applies to the video frame after cropping (PixelCrop*
  336. Elements). */
  337. DisplayHeight = 0x54BA,
  338. /** [uinteger] How DisplayWidth & DisplayHeight are interpreted. */
  339. DisplayUnit = 0x54B2,
  340. /** [uinteger] Specify the possible modifications to the aspect ratio. */
  341. AspectRatioType = 0x54B3,
  342. /** [binary] Specify the uncompressed pixel format used for the Track's data as a FourCC. This value is similar in
  343. scope to the biCompression value of AVI's `BITMAPINFO` [@?AVIFormat]. See the YUV video formats [@?FourCC-YUV]
  344. and RGB video formats [@?FourCC-RGB] for common values. */
  345. UncompressedFourCC = 0x2EB524,
  346. /** [float] Gamma Value. */
  347. GammaValue = 0x2FB523,
  348. /** [float] Number of frames per second. This value is Informational only. It is intended for constant frame rate
  349. streams, and **SHOULD NOT** be used for a variable frame rate TrackEntry. */
  350. FrameRate = 0x2383E3,
  351. /** [master] Settings describing the colour format. */
  352. Colour = 0x55B0,
  353. /** [uinteger] The Matrix Coefficients of the video used to derive luma and chroma values from red, green, and blue
  354. color primaries. For clarity, the value and meanings for MatrixCoefficients are adopted from Table 4 of ISO/IEC
  355. 23001-8:2016 or ITU-T H.273. */
  356. MatrixCoefficients = 0x55B1,
  357. /** [uinteger] Number of decoded bits per channel. A value of 0 indicates that the BitsPerChannel is unspecified. */
  358. BitsPerChannel = 0x55B2,
  359. /** [uinteger] The amount of pixels to remove in the Cr and Cb channels for every pixel not removed horizontally.
  360. Example: For video with 4:2:0 chroma subsampling, the ChromaSubsamplingHorz **SHOULD** be set to 1. */
  361. ChromaSubsamplingHorz = 0x55B3,
  362. /** [uinteger] The amount of pixels to remove in the Cr and Cb channels for every pixel not removed vertically.
  363. Example: For video with 4:2:0 chroma subsampling, the ChromaSubsamplingVert **SHOULD** be set to 1. */
  364. ChromaSubsamplingVert = 0x55B4,
  365. /** [uinteger] The amount of pixels to remove in the Cb channel for every pixel not removed horizontally. This is
  366. additive with ChromaSubsamplingHorz. Example: For video with 4:2:1 chroma subsampling, the ChromaSubsamplingHorz
  367. **SHOULD** be set to 1 and CbSubsamplingHorz **SHOULD** be set to 1. */
  368. CbSubsamplingHorz = 0x55B5,
  369. /** [uinteger] The amount of pixels to remove in the Cb channel for every pixel not removed vertically. This is
  370. additive with ChromaSubsamplingVert. */
  371. CbSubsamplingVert = 0x55B6,
  372. /** [uinteger] How chroma is subsampled horizontally. */
  373. ChromaSitingHorz = 0x55B7,
  374. /** [uinteger] How chroma is subsampled vertically. */
  375. ChromaSitingVert = 0x55B8,
  376. /** [uinteger] Clipping of the color ranges. */
  377. Range = 0x55B9,
  378. /** [uinteger] The transfer characteristics of the video. For clarity, the value and meanings for
  379. TransferCharacteristics are adopted from Table 3 of ISO/IEC 23091-4 or ITU-T H.273. */
  380. TransferCharacteristics = 0x55BA,
  381. /** [uinteger] The colour primaries of the video. For clarity, the value and meanings for Primaries are adopted from
  382. Table 2 of ISO/IEC 23091-4 or ITU-T H.273. */
  383. Primaries = 0x55BB,
  384. /** [uinteger] Maximum brightness of a single pixel (Maximum Content Light Level) in candelas per square meter
  385. (cd/m^2^). */
  386. MaxCLL = 0x55BC,
  387. /** [uinteger] Maximum brightness of a single full frame (Maximum Frame-Average Light Level) in candelas per square
  388. meter (cd/m^2^). */
  389. MaxFALL = 0x55BD,
  390. /** [master] SMPTE 2086 mastering data. */
  391. MasteringMetadata = 0x55D0,
  392. /** [float] Red X chromaticity coordinate, as defined by CIE 1931. */
  393. PrimaryRChromaticityX = 0x55D1,
  394. /** [float] Red Y chromaticity coordinate, as defined by CIE 1931. */
  395. PrimaryRChromaticityY = 0x55D2,
  396. /** [float] Green X chromaticity coordinate, as defined by CIE 1931. */
  397. PrimaryGChromaticityX = 0x55D3,
  398. /** [float] Green Y chromaticity coordinate, as defined by CIE 1931. */
  399. PrimaryGChromaticityY = 0x55D4,
  400. /** [float] Blue X chromaticity coordinate, as defined by CIE 1931. */
  401. PrimaryBChromaticityX = 0x55D5,
  402. /** [float] Blue Y chromaticity coordinate, as defined by CIE 1931. */
  403. PrimaryBChromaticityY = 0x55D6,
  404. /** [float] White X chromaticity coordinate, as defined by CIE 1931. */
  405. WhitePointChromaticityX = 0x55D7,
  406. /** [float] White Y chromaticity coordinate, as defined by CIE 1931. */
  407. WhitePointChromaticityY = 0x55D8,
  408. /** [float] Maximum luminance. Represented in candelas per square meter (cd/m^2^). */
  409. LuminanceMax = 0x55D9,
  410. /** [float] Minimum luminance. Represented in candelas per square meter (cd/m^2^). */
  411. LuminanceMin = 0x55DA,
  412. /** [master] Describes the video projection details. Used to render spherical, VR videos or flipping videos
  413. horizontally/vertically. */
  414. Projection = 0x7670,
  415. /** [uinteger] Describes the projection used for this video track. */
  416. ProjectionType = 0x7671,
  417. /** [binary] Private data that only applies to a specific projection. * If `ProjectionType` equals 0
  418. (Rectangular), then this element must not be present. * If `ProjectionType` equals 1 (Equirectangular),
  419. then this element must be present and contain the same binary data that would be stored inside an ISOBMFF
  420. Equirectangular Projection Box ('equi'). * If `ProjectionType` equals 2 (Cubemap), then this element must be
  421. present and contain the same binary data that would be stored inside an ISOBMFF Cubemap Projection Box
  422. ('cbmp'). * If `ProjectionType` equals 3 (Mesh), then this element must be present and contain the same binary
  423. data that would be stored inside an ISOBMFF Mesh Projection Box ('mshp'). */
  424. ProjectionPrivate = 0x7672,
  425. /** [float] Specifies a yaw rotation to the projection. Value represents a clockwise rotation, in degrees, around
  426. the up vector. This rotation must be applied before any `ProjectionPosePitch` or `ProjectionPoseRoll` rotations.
  427. The value of this element **MUST** be in the -180 to 180 degree range, both included. Setting
  428. `ProjectionPoseYaw` to 180 or -180 degrees, with the `ProjectionPoseRoll` and `ProjectionPosePitch` set to 0
  429. degrees flips the image horizontally. */
  430. ProjectionPoseYaw = 0x7673,
  431. /** [float] Specifies a pitch rotation to the projection. Value represents a counter-clockwise rotation, in
  432. degrees, around the right vector. This rotation must be applied after the `ProjectionPoseYaw` rotation and before
  433. the `ProjectionPoseRoll` rotation. The value of this element **MUST** be in the -90 to 90 degree range, both
  434. included. */
  435. ProjectionPosePitch = 0x7674,
  436. /** [float] Specifies a roll rotation to the projection. Value represents a counter-clockwise rotation, in degrees,
  437. around the forward vector. This rotation must be applied after the `ProjectionPoseYaw` and `ProjectionPosePitch`
  438. rotations. The value of this element **MUST** be in the -180 to 180 degree range, both included. Setting
  439. `ProjectionPoseRoll` to 180 or -180 degrees, the `ProjectionPoseYaw` to 180 or -180 degrees with
  440. `ProjectionPosePitch` set to 0 degrees flips the image vertically. Setting `ProjectionPoseRoll` to 180 or -180
  441. degrees, with the `ProjectionPoseYaw` and `ProjectionPosePitch` set to 0 degrees flips the image horizontally and
  442. vertically. */
  443. ProjectionPoseRoll = 0x7675,
  444. /** [master] Audio settings. */
  445. Audio = 0xE1,
  446. /** [float] Sampling frequency in Hz. */
  447. SamplingFrequency = 0xB5,
  448. /** [float] Real output sampling frequency in Hz (used for SBR techniques). */
  449. OutputSamplingFrequency = 0x78B5,
  450. /** [uinteger] Numbers of channels in the track. */
  451. Channels = 0x9F,
  452. /** [binary] Table of horizontal angles for each successive channel. */
  453. ChannelPositions = 0x7D7B,
  454. /** [uinteger] Bits per sample, mostly used for PCM. */
  455. BitDepth = 0x6264,
  456. /** [master] Operation that needs to be applied on tracks to create this virtual track. For more details look at
  457. (#track-operation). */
  458. TrackOperation = 0xE2,
  459. /** [master] Contains the list of all video plane tracks that need to be combined to create this 3D track */
  460. TrackCombinePlanes = 0xE3,
  461. /** [master] Contains a video plane track that need to be combined to create this 3D track */
  462. TrackPlane = 0xE4,
  463. /** [uinteger] The trackUID number of the track representing the plane. */
  464. TrackPlaneUID = 0xE5,
  465. /** [uinteger] The kind of plane this track corresponds to. */
  466. TrackPlaneType = 0xE6,
  467. /** [master] Contains the list of all tracks whose Blocks need to be combined to create this virtual track */
  468. TrackJoinBlocks = 0xE9,
  469. /** [uinteger] The trackUID number of a track whose blocks are used to create this virtual track. */
  470. TrackJoinUID = 0xED,
  471. /** [uinteger] The TrackUID of the Smooth FF/RW video in the paired EBML structure corresponding to this video
  472. track. See [@?DivXTrickTrack]. */
  473. TrickTrackUID = 0xC0,
  474. /** [binary] The SegmentUID of the Segment containing the track identified by TrickTrackUID. See [@?DivXTrickTrack].
  475. */
  476. TrickTrackSegmentUID = 0xC1,
  477. /** [uinteger] Set to 1 if this video track is a Smooth FF/RW track. If set to 1, MasterTrackUID and
  478. MasterTrackSegUID should must be present and BlockGroups for this track must contain ReferenceFrame structures.
  479. Otherwise, TrickTrackUID and TrickTrackSegUID must be present if this track has a corresponding Smooth FF/RW
  480. track. See [@?DivXTrickTrack]. */
  481. TrickTrackFlag = 0xC6,
  482. /** [uinteger] The TrackUID of the video track in the paired EBML structure that corresponds to this Smooth FF/RW
  483. track. See [@?DivXTrickTrack]. */
  484. TrickMasterTrackUID = 0xC7,
  485. /** [binary] The SegmentUID of the Segment containing the track identified by MasterTrackUID. See
  486. [@?DivXTrickTrack]. */
  487. TrickMasterTrackSegmentUID = 0xC4,
  488. /** [master] Settings for several content encoding mechanisms like compression or encryption. */
  489. ContentEncodings = 0x6D80,
  490. /** [master] Settings for one content encoding like compression or encryption. */
  491. ContentEncoding = 0x6240,
  492. /** [uinteger] Tells when this modification was used during encoding/muxing starting with 0 and counting upwards.
  493. The decoder/demuxer has to start with the highest order number it finds and work its way down. This value has to
  494. be unique over all ContentEncodingOrder Elements in the TrackEntry that contains this ContentEncodingOrder
  495. element. */
  496. ContentEncodingOrder = 0x5031,
  497. /** [uinteger] A bit field that describes which Elements have been modified in this way. Values (big-endian) can be
  498. OR'ed. */
  499. ContentEncodingScope = 0x5032,
  500. /** [uinteger] A value describing what kind of transformation is applied. */
  501. ContentEncodingType = 0x5033,
  502. /** [master] Settings describing the compression used. This Element **MUST** be present if the value of
  503. ContentEncodingType is 0 and absent otherwise. Each block **MUST** be decompressable even if no previous block is
  504. available in order not to prevent seeking. */
  505. ContentCompression = 0x5034,
  506. /** [uinteger] The compression algorithm used. */
  507. ContentCompAlgo = 0x4254,
  508. /** [binary] Settings that might be needed by the decompressor. For Header Stripping (`ContentCompAlgo`=3), the
  509. bytes that were removed from the beginning of each frames of the track. */
  510. ContentCompSettings = 0x4255,
  511. /** [master] Settings describing the encryption used. This Element **MUST** be present if the value of
  512. `ContentEncodingType` is 1 (encryption) and **MUST** be ignored otherwise. */
  513. ContentEncryption = 0x5035,
  514. /** [uinteger] The encryption algorithm used. The value "0" means that the contents have not been encrypted. */
  515. ContentEncAlgo = 0x47E1,
  516. /** [binary] For public key algorithms this is the ID of the public key the the data was encrypted with. */
  517. ContentEncKeyID = 0x47E2,
  518. /** [master] Settings describing the encryption algorithm used. If `ContentEncAlgo` != 5 this **MUST** be ignored.
  519. */
  520. ContentEncAESSettings = 0x47E7,
  521. /** [uinteger] The AES cipher mode used in the encryption. */
  522. AESSettingsCipherMode = 0x47E8,
  523. /** [binary] A cryptographic signature of the contents. */
  524. ContentSignature = 0x47E3,
  525. /** [binary] This is the ID of the private key the data was signed with. */
  526. ContentSigKeyID = 0x47E4,
  527. /** [uinteger] The algorithm used for the signature. */
  528. ContentSigAlgo = 0x47E5,
  529. /** [uinteger] The hash algorithm used for the signature. */
  530. ContentSigHashAlgo = 0x47E6,
  531. /** [master] A Top-Level Element to speed seeking access. All entries are local to the Segment. */
  532. Cues = 0x1C53BB6B,
  533. /** [master] Contains all information relative to a seek point in the Segment. */
  534. CuePoint = 0xBB,
  535. /** [uinteger] Absolute timestamp according to the Segment time base. */
  536. CueTime = 0xB3,
  537. /** [master] Contain positions for different tracks corresponding to the timestamp. */
  538. CueTrackPositions = 0xB7,
  539. /** [uinteger] The track for which a position is given. */
  540. CueTrack = 0xF7,
  541. /** [uinteger] The Segment Position of the Cluster containing the associated Block. */
  542. CueClusterPosition = 0xF1,
  543. /** [uinteger] The relative position inside the Cluster of the referenced SimpleBlock or BlockGroup with 0 being the
  544. first possible position for an Element inside that Cluster. */
  545. CueRelativePosition = 0xF0,
  546. /** [uinteger] The duration of the block according to the Segment time base. If missing the track's DefaultDuration
  547. does not apply and no duration information is available in terms of the cues. */
  548. CueDuration = 0xB2,
  549. /** [uinteger] Number of the Block in the specified Cluster. */
  550. CueBlockNumber = 0x5378,
  551. /** [uinteger] The Segment Position of the Codec State corresponding to this Cue Element. 0 means that the data is
  552. taken from the initial Track Entry. */
  553. CueCodecState = 0xEA,
  554. /** [master] The Clusters containing the referenced Blocks. */
  555. CueReference = 0xDB,
  556. /** [uinteger] Timestamp of the referenced Block. */
  557. CueRefTime = 0x96,
  558. /** [uinteger] The Segment Position of the Cluster containing the referenced Block. */
  559. CueRefCluster = 0x97,
  560. /** [uinteger] Number of the referenced Block of Track X in the specified Cluster. */
  561. CueRefNumber = 0x535F,
  562. /** [uinteger] The Segment Position of the Codec State corresponding to this referenced Element. 0 means that the
  563. data is taken from the initial Track Entry. */
  564. CueRefCodecState = 0xEB,
  565. /** [master] Contain attached files. */
  566. Attachments = 0x1941A469,
  567. /** [master] An attached file. */
  568. AttachedFile = 0x61A7,
  569. /** [utf-8] A human-friendly name for the attached file. */
  570. FileDescription = 0x467E,
  571. /** [utf-8] Filename of the attached file. */
  572. FileName = 0x466E,
  573. /** [string] MIME type of the file. */
  574. FileMimeType = 0x4660,
  575. /** [binary] The data of the file. */
  576. FileData = 0x465C,
  577. /** [uinteger] Unique ID representing the file, as random as possible. */
  578. FileUID = 0x46AE,
  579. /** [binary] A binary value that a track/codec can refer to when the attachment is needed. */
  580. FileReferral = 0x4675,
  581. /** [uinteger] The timecode at which this optimized font attachment comes into context, based on the Segment
  582. TimecodeScale. This element is reserved for future use and if written must be the segment start time. See
  583. [@?DivXWorldFonts]. */
  584. FileUsedStartTime = 0x4661,
  585. /** [uinteger] The timecode at which this optimized font attachment goes out of context, based on the Segment
  586. TimecodeScale. This element is reserved for future use and if written must be the segment end time. See
  587. [@?DivXWorldFonts]. */
  588. FileUsedEndTime = 0x4662,
  589. /** [master] A system to define basic menus and partition data. For more detailed information, look at the Chapters
  590. explanation in (#chapters). */
  591. Chapters = 0x1043A770,
  592. /** [master] Contains all information about a Segment edition. */
  593. EditionEntry = 0x45B9,
  594. /** [uinteger] A unique ID to identify the edition. It's useful for tagging an edition. */
  595. EditionUID = 0x45BC,
  596. /** [uinteger] Set to 1 if an edition is hidden. Hidden editions **SHOULD NOT** be available to the user interface
  597. (but still to Control Tracks; see (#chapter-flags) on Chapter flags). */
  598. EditionFlagHidden = 0x45BD,
  599. /** [uinteger] Set to 1 if the edition **SHOULD** be used as the default one. */
  600. EditionFlagDefault = 0x45DB,
  601. /** [uinteger] Set to 1 if the chapters can be defined multiple times and the order to play them is enforced; see
  602. (#editionflagordered). */
  603. EditionFlagOrdered = 0x45DD,
  604. /** [master] Contains the atom information to use as the chapter atom (apply to all tracks). */
  605. ChapterAtom = 0xB6,
  606. /** [uinteger] A unique ID to identify the Chapter. */
  607. ChapterUID = 0x73C4,
  608. /** [utf-8] A unique string ID to identify the Chapter. Use for WebVTT cue identifier storage [@!WebVTT]. */
  609. ChapterStringUID = 0x5654,
  610. /** [uinteger] Timestamp of the start of Chapter (not scaled). */
  611. ChapterTimeStart = 0x91,
  612. /** [uinteger] Timestamp of the end of Chapter (timestamp excluded, not scaled). The value **MUST** be greater than
  613. or equal to the `ChapterTimeStart` of the same `ChapterAtom`. */
  614. ChapterTimeEnd = 0x92,
  615. /** [uinteger] Set to 1 if a chapter is hidden. Hidden chapters **SHOULD NOT** be available to the user interface
  616. (but still to Control Tracks; see (#chapterflaghidden) on Chapter flags). */
  617. ChapterFlagHidden = 0x98,
  618. /** [uinteger] Set to 1 if the chapter is enabled. It can be enabled/disabled by a Control Track. When disabled, the
  619. movie **SHOULD** skip all the content between the TimeStart and TimeEnd of this chapter; see (#chapter-flags) on
  620. Chapter flags. */
  621. ChapterFlagEnabled = 0x4598,
  622. /** [binary] The SegmentUID of another Segment to play during this chapter. */
  623. ChapterSegmentUID = 0x6E67,
  624. /** [uinteger] The EditionUID to play from the Segment linked in ChapterSegmentUID. If ChapterSegmentEditionUID is
  625. undeclared, then no Edition of the linked Segment is used; see (#medium-linking) on medium-linking Segments. */
  626. ChapterSegmentEditionUID = 0x6EBC,
  627. /** [uinteger] Specify the physical equivalent of this ChapterAtom like "DVD" (60) or "SIDE" (50); see
  628. (#physical-types) for a complete list of values. */
  629. ChapterPhysicalEquiv = 0x63C3,
  630. /** [master] List of tracks on which the chapter applies. If this Element is not present, all tracks apply */
  631. ChapterTrack = 0x8F,
  632. /** [uinteger] UID of the Track to apply this chapter to. In the absence of a control track, choosing this chapter
  633. will select the listed Tracks and deselect unlisted tracks. Absence of this Element indicates that the Chapter
  634. **SHOULD** be applied to any currently used Tracks. */
  635. ChapterTrackUID = 0x89,
  636. /** [master] Contains all possible strings to use for the chapter display. */
  637. ChapterDisplay = 0x80,
  638. /** [utf-8] Contains the string to use as the chapter atom. */
  639. ChapString = 0x85,
  640. /** [string] A language corresponding to the string, in the bibliographic ISO-639-2 form [@!ISO639-2]. This Element
  641. **MUST** be ignored if a ChapLanguageIETF Element is used within the same ChapterDisplay Element. */
  642. ChapLanguage = 0x437C,
  643. /** [string] Specifies a language corresponding to the ChapString in the format defined in [@!BCP47] and using the
  644. IANA Language Subtag Registry [@!IANALangRegistry]. If a ChapLanguageIETF Element is used, then any ChapLanguage
  645. and ChapCountry Elements used in the same ChapterDisplay **MUST** be ignored. */
  646. ChapLanguageIETF = 0x437D,
  647. /** [string] A country corresponding to the string, using the same 2 octets country-codes as in Internet domains
  648. [@!IANADomains] based on [@!ISO3166-1] alpha-2 codes. This Element **MUST** be ignored if a ChapLanguageIETF
  649. Element is used within the same ChapterDisplay Element. */
  650. ChapCountry = 0x437E,
  651. /** [master] Contains all the commands associated to the Atom. */
  652. ChapProcess = 0x6944,
  653. /** [uinteger] Contains the type of the codec used for the processing. A value of 0 means native Matroska processing
  654. (to be defined), a value of 1 means the DVD command set is used; see (#menu-features) on DVD menus. More codec
  655. IDs can be added later. */
  656. ChapProcessCodecID = 0x6955,
  657. /** [binary] Some optional data attached to the ChapProcessCodecID information. For ChapProcessCodecID = 1, it
  658. is the "DVD level" equivalent; see (#menu-features) on DVD menus. */
  659. ChapProcessPrivate = 0x450D,
  660. /** [master] Contains all the commands associated to the Atom. */
  661. ChapProcessCommand = 0x6911,
  662. /** [uinteger] Defines when the process command **SHOULD** be handled */
  663. ChapProcessTime = 0x6922,
  664. /** [binary] Contains the command information. The data **SHOULD** be interpreted depending on the
  665. ChapProcessCodecID value. For ChapProcessCodecID = 1, the data correspond to the binary DVD cell pre/post
  666. commands; see (#menu-features) on DVD menus. */
  667. ChapProcessData = 0x6933,
  668. /** [master] Element containing metadata describing Tracks, Editions, Chapters, Attachments, or the Segment as a
  669. whole. A list of valid tags can be found in [@!MatroskaTags]. */
  670. Tags = 0x1254C367,
  671. /** [master] A single metadata descriptor. */
  672. Tag = 0x7373,
  673. /** [master] Specifies which other elements the metadata represented by the Tag applies to. If empty or not present,
  674. then the Tag describes everything in the Segment. */
  675. Targets = 0x63C0,
  676. /** [uinteger] A number to indicate the logical level of the target. */
  677. TargetTypeValue = 0x68CA,
  678. /** [string] An informational string that can be used to display the logical level of the target like "ALBUM",
  679. "TRACK", "MOVIE", "CHAPTER", etc ; see Section 6.4 of [@!MatroskaTags]. */
  680. TargetType = 0x63CA,
  681. /** [uinteger] A unique ID to identify the Track(s) the tags belong to. */
  682. TagTrackUID = 0x63C5,
  683. /** [uinteger] A unique ID to identify the EditionEntry(s) the tags belong to. */
  684. TagEditionUID = 0x63C9,
  685. /** [uinteger] A unique ID to identify the Chapter(s) the tags belong to. */
  686. TagChapterUID = 0x63C4,
  687. /** [uinteger] A unique ID to identify the Attachment(s) the tags belong to. */
  688. TagAttachmentUID = 0x63C6,
  689. /** [master] Contains general information about the target. */
  690. SimpleTag = 0x67C8,
  691. /** [utf-8] The name of the Tag that is going to be stored. */
  692. TagName = 0x45A3,
  693. /** [string] Specifies the language of the tag specified, in the Matroska languages form; see (#language-codes) on
  694. language codes. This Element **MUST** be ignored if the TagLanguageIETF Element is used within the same SimpleTag
  695. Element. */
  696. TagLanguage = 0x447A,
  697. /** [string] Specifies the language used in the TagString according to [@!BCP47] and using the IANA Language Subtag
  698. Registry [@!IANALangRegistry]. If this Element is used, then any TagLanguage Elements used in the same SimpleTag
  699. **MUST** be ignored. */
  700. TagLanguageIETF = 0x447B,
  701. /** [uinteger] A boolean value to indicate if this is the default/original language to use for the given tag. */
  702. TagDefault = 0x4484,
  703. /** [uinteger] A variant of the TagDefault element with a bogus Element ID; see (#tagdefault-element). */
  704. TagDefaultBogus = 0x44B4,
  705. /** [utf-8] The value of the Tag. */
  706. TagString = 0x4487,
  707. /** [binary] The values of the Tag, if it is binary. Note that this cannot be used in the same SimpleTag as
  708. TagString. */
  709. TagBinary = 0x4485,
  710. };