Tag Parser 12.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
matroskaid.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_MATROSKAIDS_H
2#define TAG_PARSER_MATROSKAIDS_H
3
4#include "../global.h"
5
6#include <cstdint>
7#include <string_view>
8
9namespace TagParser {
10
11namespace MatroskaIds {
12
17 Segment = 0x18538067,
18 SegmentInfo = 0x1549A966,
19 Tracks = 0x1654AE6B,
20 Cues = 0x1C53BB6B,
21 Tags = 0x1254C367,
22 SeekHead = 0x114D9B74,
23 Cluster = 0x1F43B675,
24 Attachments = 0x1941A469,
25 Chapters = 0x1043A770
26};
27
32 Seek = 0x4DBB,
33};
34
38enum SeekIds { SeekID = 0x53AB, SeekPosition = 0x53AC };
39
44 TimeCodeScale = 0x2AD7B1,
45 Duration = 0x4489,
46 WrittingApp = 0x5741, // TODOv13: change to WritingApp
47 MuxingApp = 0x4D80,
48 DateUTC = 0x4461,
49 SegmentUID = 0x73A4,
51 PrevUID = 0x3CB923,
52 PrevFileName = 0x3C83AB,
53 NexUID = 0x3EB923,
54 NextFileName = 0x3E83BB,
55 Title = 0x7BA9,
56 SegmentFamily = 0x4444,
57 ChapterTranslate = 0x6924
58};
59
64
69 TrackEntry = 0xAE,
70};
71
120
125
131 StereoMode = 0x53B8,
132 AlphaMode = 0x53c0,
137 PixelCropTop = 0x54BB,
140 DisplayWidth = 0x54B0,
142 DisplayUnit = 0x54B2,
144 ColorSpace = 0x2EB524,
145 GammaValue = 0x2FB523,
146 FrameRate = 0x2383E3
148
152enum TrackAudioIds { SamplingFrequency = 0xB5, OutputSamplingFrequency = 0x78B5, Channels = 0x9F, ChannelsPositions = 0x7D7B, BitDepth = 0x6264 };
153
158
163
168
173
178
189
194
206
211 Tag = 0x7373,
212};
213
217enum TagIds {
218 SimpleTag = 0x67C8,
219 Targets = 0x63C0,
220};
221
226 TagName = 0x45A3,
227 TagString = 0x4487,
228 TagLanguage = 0x447A,
230 TagDefault = 0x4484,
231 TagBinary = 0x4485,
232};
233
239 TargetType = 0x63ca,
240 TagTrackUID = 0x63c5,
243 TagAttachmentUID = 0x63c6
245
249enum CuesIds { CuePoint = 0xbb };
250
254enum CuePointIds { CueTime = 0xb3, CueTrackPositions = 0xb7 };
255
268
272enum CueReferenceIds { CueRefTime = 0x96, CueRefCluster = 0x97, CueRefNumber = 0x535f, CueRefCodecState = 0xeb };
273
277enum AttachmentsIds { AttachedFile = 0x61a7 };
278
284 FileName = 0x466e,
285 FileMimeType = 0x4660,
286 FileData = 0x465c,
287 FileUID = 0x46ae,
288 FileReferral = 0x4675,
290 FileUsedEndTime = 0x4662
292
296enum ChaptersIds { EditionEntry = 0x45b9 };
297
308
326
331
335enum ChapterDisplayIds { ChapString = 0x85, ChapLanguage = 0x437c, ChapLanguageIETF = 0x437D, ChapCountry = 0x437e };
336
341
346
351 Timecode = 0xe7,
352 SilentTracks = 0x5854,
353 Position = 0xa7,
354 PrevSize = 0xab,
357 EncryptedBlock = 0xaf
359
364
381
386
391
395enum SlicesIds { TimeSlice = 0xe8 };
396
400enum TimeSliceIds { LaceNumber = 0xcc, FrameNumber = 0xcd, BlockAdditionID = 0xcb, Delay = 0xce, SliceDuration = 0xcf };
401
406
407} // namespace MatroskaIds
408
409namespace MatroskaTrackType {
410
411enum KnownValues { Video = 0x1, Audio = 0x2, Complex = 0x3, Logo = 0x10, Subtitle = 0x11, Buttons = 0x12, Control = 0x20 };
412}
413
414enum class MatroskaElementLevel : std::uint8_t {
415 TopLevel = 0x0,
416 Level1,
417 Level2,
418 Level3,
419 Level4,
420 Level5,
421 Level6,
422 Global = 0xFE,
423 Unknown = 0xFF,
424};
425
427{
428 return static_cast<std::uint8_t>(lhs) < static_cast<std::uint8_t>(MatroskaElementLevel::Global)
429 && static_cast<std::uint8_t>(rhs) < static_cast<std::uint8_t>(MatroskaElementLevel::Global)
430 && static_cast<std::uint8_t>(lhs) > static_cast<std::uint8_t>(rhs);
431}
432
433constexpr bool operator>(std::uint8_t lhs, MatroskaElementLevel rhs)
434{
435 return lhs < static_cast<std::uint8_t>(MatroskaElementLevel::Global)
436 && static_cast<std::uint8_t>(rhs) < static_cast<std::uint8_t>(MatroskaElementLevel::Global)
437 && static_cast<std::uint8_t>(lhs) > static_cast<std::uint8_t>(rhs);
438}
439
441{
442 return static_cast<std::uint8_t>(lhs) < static_cast<std::uint8_t>(MatroskaElementLevel::Global)
443 && static_cast<std::uint8_t>(rhs) < static_cast<std::uint8_t>(MatroskaElementLevel::Global)
444 && static_cast<std::uint8_t>(lhs) < static_cast<std::uint8_t>(rhs);
445}
446
448{
449 return lhs == rhs || lhs > rhs;
450}
451
453{
454 return lhs == rhs || lhs < rhs;
455}
456
457TAG_PARSER_EXPORT std::string_view matroskaIdName(std::uint32_t matroskaId);
459
460} // namespace TagParser
461
462#endif // TAG_PARSER_MATROSKAIDS_H
The Tag class is used to store, read and write tag information.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
ChaptersIds
Encapsulates all ID values in the Chapters master.
Definition matroskaid.h:296
SeekIds
Encapsulates all ID values in the Seek master.
Definition matroskaid.h:38
SeekHeadIds
Encapsulates all ID values in the SeekHead master.
Definition matroskaid.h:31
TrackOperationIds
Encapsulates all ID values in the TrackOperation master.
Definition matroskaid.h:157
CuesIds
Encapsulates all ID values in the Cues master.
Definition matroskaid.h:249
TrackCombinePlanesIds
Encapsulates all ID values in the TrackCombinePlanes master.
Definition matroskaid.h:162
ChapProcessIds
Encapsulates all ID values in the ChapProcess master.
Definition matroskaid.h:340
ChapterAtomIds
Encapsulates all ID values in the ChapterAtom master.
Definition matroskaid.h:312
CuePointIds
Encapsulates all ID values in the CuePoint master.
Definition matroskaid.h:254
SilentTracksIds
Encapsulates all ID values in the SilentTracks master.
Definition matroskaid.h:363
TopLevelIds
Encapsulates all top level ID values.
Definition matroskaid.h:16
TimeSliceIds
Encapsulates all ID values in the TimeSlice master.
Definition matroskaid.h:400
ChapterTranslateIds
Encapsulates all ID values in the ChapterTranslate master.
Definition matroskaid.h:63
TrackPlaneIds
Encapsulates all ID values in the TrackPlane master.
Definition matroskaid.h:167
SlicesIds
Encapsulates all ID values in the Slices master.
Definition matroskaid.h:395
SimpleTagIds
Encapsulates all ID values in the SimpleTag master.
Definition matroskaid.h:225
TrackEntryIds
Encapsulates all ID values in the TrackEntry master.
Definition matroskaid.h:75
AttachedFileIds
Encapsulates all ID values in the AttachedFile master.
Definition matroskaid.h:282
BlockMoreIds
Encapsulates all ID values in the BlockMore master.
Definition matroskaid.h:390
EditionEntryIds
Encapsulates all ID values in the EditionEntry master.
Definition matroskaid.h:301
ReferenceFrameIds
Encapsulates all ID values in the ReferenceFrame master.
Definition matroskaid.h:405
CueReferenceIds
Encapsulates all ID values in the CueReference master.
Definition matroskaid.h:272
TracksIds
Encapsulates all ID values in the Tracks master.
Definition matroskaid.h:68
BlockAdditionsIds
Encapsulates all ID values in the BlockAdditions master.
Definition matroskaid.h:385
TrackAudioIds
Encapsulates all ID values in the TrackAudio master.
Definition matroskaid.h:152
TrackVideoIds
Encapsulates all ID values in the TrackVideo master.
Definition matroskaid.h:129
TargetsIds
Encapsulates all ID values in the Targets master.
Definition matroskaid.h:237
ContentEncodingsIds
Encapsulates all ID values in the ContentEncodings master.
Definition matroskaid.h:177
SegmentInfoIds
Encapsulates all ID values in the SegmentInfo master.
Definition matroskaid.h:43
TrackTranslateIds
Encapsulates all ID values in the TrackTranslate master.
Definition matroskaid.h:124
ContentCompressionIds
Encapsulates all ID values in the ContentCompression master.
Definition matroskaid.h:193
ChapProcessCommandIds
Encapsulates all ID values in the ChapProcessCommand master.
Definition matroskaid.h:345
TrackJoinBlocksIds
Encapsulates all ID values in the TrackJoinBlocks master.
Definition matroskaid.h:172
TagsIds
Encapsulates all ID values in the Tags master.
Definition matroskaid.h:210
CueTrackPositionsIds
Encapsulates all ID values in the CueTrackPositions master.
Definition matroskaid.h:259
ClusterIds
Encapsulates all ID values in the Cluster master.
Definition matroskaid.h:350
BlockGroupIds
Encapsulates all ID values in the BlockGroup master.
Definition matroskaid.h:368
AttachmentsIds
Encapsulates all ID values in the Attachments master.
Definition matroskaid.h:277
ContentEncryptionIds
Encapsulates all ID values in the ContentEncryption master.
Definition matroskaid.h:198
ChapterTrackIds
Encapsulates all ID values in the ChapterTrack master.
Definition matroskaid.h:330
ContentEncodingIds
Encapsulates all ID values in the ContentEncoding master.
Definition matroskaid.h:182
TagIds
Encapsulates all ID values in the Tag master.
Definition matroskaid.h:217
ChapterDisplayIds
Encapsulates all ID values in the ChapterDisplay master.
Definition matroskaid.h:335
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
TAG_PARSER_EXPORT MatroskaElementLevel matroskaIdLevel(std::uint32_t matroskaId)
Returns the level at which elements with the specified matroskaId are supposed to occur in a Matroska...
AspectRatioType
The AspectRatioType enum specifies the possible modifications to the aspect ratio.
TAG_PARSER_EXPORT std::string_view matroskaIdName(std::uint32_t matroskaId)
Returns a string for the specified matroskaId if known; otherwise returns an empty string.
constexpr bool operator>=(MatroskaElementLevel lhs, MatroskaElementLevel rhs)
Definition matroskaid.h:447
StereoMode
The StereoMode enum specifies the Stereo-3D video mode.
DisplayUnit
The DisplayUnit enum specifies how display width and heigh are interpreted.
AlphaMode
The AlphaMode enum specifies the alpha video mode.
constexpr bool operator<(MatroskaElementLevel lhs, MatroskaElementLevel rhs)
Definition matroskaid.h:440
constexpr bool operator<=(MatroskaElementLevel lhs, MatroskaElementLevel rhs)
Definition matroskaid.h:452
constexpr bool operator>(MatroskaElementLevel lhs, MatroskaElementLevel rhs)
Definition matroskaid.h:426
TrackType
The TrackType enum specifies the underlying file type of a track and the concrete class of the track ...