Tag Parser: signature.cpp Source File

Tag Parser 12.5.2 C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags

Loading...
Searching...
No Matches
signature.cpp
Go to the documentation of this file.
1#include "./signature.h"
2#include "./matroska/matroskatagid.h"
3
4#include <c++utilities/conversion/binaryconversion.h>
5
6#include <cstdint>
7
8using namespace CppUtilities;
9
10namespace TagParser {
11
15 enum Sig64 : std::uint64_t {
16 ApeTag = 0x4150455441474558ul, // APETAGEX
17 Ar = 0x213C617263683E0A,
18 Asf1 = 0x3026B2758E66CF11ul,
19 Asf2 = 0xA6D900AA0062CE6Cul,
20 Png = 0x89504E470D0A1A0Aul,
21 RiffAvi = 0x415649204C495354ul,
22 YUV4Mpeg2 = 0x595556344D504547ul,
23};
24
28 enum Sig56 : std::uint64_t {
29 Rar = 0x526172211A0700ul,
30};
31
35 enum Sig48 : std::uint64_t {
36 Gif87a = 0x474946383761ul,
37 Gif89a = 0x474946383961ul,
38 SevenZ = 0x377ABCAF271Cul,
39 Xz = 0xFD377A585A00ul,
40};
41
45 enum Sig40 : std::uint64_t {
46 Aiff = 0x464F524D00ul,
47};
48
52 enum Sig32 : std::uint32_t {
53 Dirac = 0x42424344u,
54 Elf = 0x7F454C46u,
55 Flac = 0x664C6143u,
56 Ivf = 0x444B4946u,
57 JavaClassFile = 0xCAFEBABEu,
58 Ebml = 0x1A45DFA3u,
59 Midi = 0x4D546864u,
60 MonkeysAudio = 0x4D414320u,
61 Mp4 = 0x66747970u,
62 Ogg = 0x4F676753u,
63 PhotoshopDocument = 0x38425053u,
64 QuickTime = 0x6D6F6F76u,
65 Riff = 0x52494646u,
66 RiffWave = 0x57415645u,
67 TiffBigEndian = 0x4D4D002Au,
68 TiffLittleEndian = 0x49492A00u,
69 Utf32Text = 0xFFFE0000u,
70 WavPack = 0x7776706Bu,
71 WindowsIcon = 0x00000100u,
72 Lzip = 0x4C5A4950u,
73 Zip1 = 0x504B0304u,
74 Zip2 = 0x504B0506u,
75 Zip3 = 0x504B0708u,
76 Zstd = 0x28b52ffdu,
77};
78
82 enum Sig24 : std::uint32_t {
83 Bzip2 = 0x425A68u,
84 Flv = 0x464C56u,
85 Gzip = 0x1F8B08u,
86 Id3v2 = 0x494433u,
87 Utf8Text = 0xEFBBBFu,
88};
89
93 enum Sig16 : std::uint16_t {
94 Ac3 = 0x0B77u,
95 Adts = 0xFFF0u,
96 AdtsMask = 0xFFF6u,
97 Jpeg = 0xffd8u,
98 Lha = 0x1FA0u,
99 Lzw = 0x1F9Du,
100 MpegAudioFrames = 0x7FFu,
101 PortableExecutable = 0x4D5Au,
102 Utf16Text = 0xFFFEu,
103 WindowsBitmap = 0x424du,
104};
105
113 ContainerFormat parseSignature(std::string_view buffer)
114{
115 // read signature
116 std::uint64_t sig = 0;
117 if (buffer.size() >= 8) {
118 sig = BE::toInt<std::uint64_t>(buffer.data());
119 } else if (buffer.size() >= 4) {
120 sig = BE::toInt<std::uint32_t>(buffer.data());
121 sig <<= 4;
122 } else if (buffer.size() >= 2) {
123 sig = BE::toInt<std::uint16_t>(buffer.data());
124 sig <<= 6;
125 } else {
126 return ContainerFormat::Unknown;
127 }
128 // return corresponding container format
129 switch (sig) { // check 64-bit signatures
130 case ApeTag:
131 return ContainerFormat::ApeTag;
132 case Ar:
133 return ContainerFormat::Ar;
134 case Asf1:
135 return ContainerFormat::Asf;
136 case Asf2:
137 return ContainerFormat::Asf;
138 case Png:
139 return ContainerFormat::Png;
140 case YUV4Mpeg2:
141 if (buffer.size() >= 10 && buffer[8] == 0x32 && buffer[9] == 0x20) {
142 return ContainerFormat::YUV4Mpeg2;
143 }
144 break;
145 default:;
146 }
147 switch (sig & 0x00000000FFFFFFFF) { // check 32-bit signatures @ bit 31
148 case Mp4:
149 return ContainerFormat::Mp4;
150 case QuickTime:
151 return ContainerFormat::QuickTime;
152 default:;
153 }
154 switch (sig >> 8) { // check 56-bit signatures
155 case Rar:
156 return ContainerFormat::Rar;
157 default:;
158 }
159 switch (sig >> 16) { // check 48-bit signatures
160 case Gif87a:
161 return ContainerFormat::Gif87a;
162 case Gif89a:
163 return ContainerFormat::Gif89a;
164 case SevenZ:
165 return ContainerFormat::SevenZ;
166 case Xz:
167 return ContainerFormat::Xz;
168 default:;
169 }
170 switch (sig >> 24) { // check 40-bit signatures
171 case Aiff:
172 return ContainerFormat::Aiff;
173 default:;
174 }
175 switch (sig >> 32) { // check 32-bit signatures
176 case Dirac:
177 return ContainerFormat::Dirac;
178 case Elf:
179 return ContainerFormat::Elf;
180 case Flac:
181 return ContainerFormat::Flac;
182 case Ivf:
183 return ContainerFormat::Ivf;
184 case JavaClassFile:
185 return ContainerFormat::JavaClassFile;
186 case Ebml:
187 return ContainerFormat::Ebml;
188 case Midi:
189 return ContainerFormat::Midi;
190 case MonkeysAudio:
191 return ContainerFormat::MonkeysAudio;
192 case Ogg:
193 return ContainerFormat::Ogg;
194 case PhotoshopDocument:
195 return ContainerFormat::PhotoshopDocument;
196 case Riff:
197 if (buffer.size() >= 16 && BE::toInt<std::uint64_t>(buffer.data() + 8) == Sig64::RiffAvi) {
198 return ContainerFormat::RiffAvi;
199 } else if (buffer.size() >= 12 && BE::toInt<std::uint32_t>(buffer.data() + 8) == RiffWave) {
200 return ContainerFormat::RiffWave;
201 } else {
202 return ContainerFormat::Riff;
203 }
204 case TiffBigEndian:
205 return ContainerFormat::TiffBigEndian;
206 case TiffLittleEndian:
207 return ContainerFormat::TiffLittleEndian;
208 case Utf32Text:
209 return ContainerFormat::Utf32Text;
210 case WavPack:
211 return ContainerFormat::WavPack;
212 case WindowsIcon:
213 return ContainerFormat::WindowsIcon;
214 case Lzip:
215 return ContainerFormat::Lzip;
216 case Zip1:
217 case Zip2:
218 case Zip3:
219 return ContainerFormat::Zip;
220 case Zstd:
221 return ContainerFormat::Zstd;
222 default:;
223 }
224 switch (sig >> 40) { // check 24-bit signatures
225 case Bzip2:
226 return ContainerFormat::Bzip2;
227 case Flv:
228 return ContainerFormat::FlashVideo;
229 case Gzip:
230 return ContainerFormat::Gzip;
231 case Id3v2:
232 return ContainerFormat::Id3v2Tag;
233 case Utf8Text:
234 return ContainerFormat::Utf8Text;
235 }
236 switch (sig >> 48) { // check 16-bit signatures
237 case Ac3:
238 return ContainerFormat::Ac3Frames;
239 case Jpeg:
240 return ContainerFormat::Jpeg;
241 case Lha:
242 return ContainerFormat::Lha;
243 case Lzw:
244 return ContainerFormat::Lzw;
245 case PortableExecutable:
246 return ContainerFormat::PortableExecutable;
247 case Utf16Text:
248 return ContainerFormat::Utf16Text;
249 case WindowsBitmap:
250 return ContainerFormat::WindowsBitmap;
251 default:;
252 }
253 // check other signatures
254 if (((sig >> 48) & AdtsMask) == Adts) {
255 return ContainerFormat::Adts;
256 }
257 if ((sig >> 53) == MpegAudioFrames) {
258 return ContainerFormat::MpegAudioFrames;
259 }
260 return ContainerFormat::Unknown;
261}
262
269std::string_view containerFormatAbbreviation(ContainerFormat containerFormat, MediaType mediaType, unsigned int version)
270{
271 switch (containerFormat) {
272 case ContainerFormat::Ac3Frames:
273 return "ac3";
274 case ContainerFormat::Ar:
275 return "a";
276 case ContainerFormat::Asf:
277 return "asf";
278 case ContainerFormat::Dirac:
279 return "drc";
280 case ContainerFormat::Elf:
281 return "elf";
282 case ContainerFormat::Flac:
283 return "flac";
284 case ContainerFormat::FlashVideo:
285 return "flv";
286 case ContainerFormat::Gif87a:
287 case ContainerFormat::Gif89a:
288 return "gif";
289 case ContainerFormat::Ivf:
290 return "ivf";
291 case ContainerFormat::JavaClassFile:
292 return "class";
293 case ContainerFormat::Jpeg:
294 return "jpeg";
295 case ContainerFormat::Lha:
296 return "lzh";
297 case ContainerFormat::Lzw:
298 return "lzw";
299 case ContainerFormat::Mp4:
300 switch (mediaType) {
301 case MediaType::Audio:
302 return "m4a";
303 default:
304 return "mp4";
305 }
306 case ContainerFormat::Ogg:
307 switch (mediaType) {
308 case MediaType::Video:
309 return "ogv";
310 default:
311 switch (version) {
312 case static_cast<unsigned int>(GeneralMediaFormat::Opus):
313 return "opus";
314 case static_cast<unsigned int>(GeneralMediaFormat::Speex):
315 return "spx";
316 default:
317 return "ogg";
318 }
319 }
320 case ContainerFormat::PhotoshopDocument:
321 return "psd";
322 case ContainerFormat::Png:
323 return "png";
324 case ContainerFormat::PortableExecutable:
325 return "exe";
326 case ContainerFormat::Rar:
327 return "rar";
328 case ContainerFormat::Matroska:
329 switch (mediaType) {
330 case MediaType::Audio:
331 return "mka";
332 default:
333 return "mkv";
334 }
335 case ContainerFormat::MpegAudioFrames:
336 switch (version) {
337 case 1:
338 return "mp1";
339 case 2:
340 return "mp2";
341 default:
342 return "mp3";
343 }
344 case ContainerFormat::Riff:
345 return "riff";
346 case ContainerFormat::RiffWave:
347 return "wav";
348 case ContainerFormat::RiffAvi:
349 return "avi";
350 case ContainerFormat::Tar:
351 return "tar";
352 case ContainerFormat::TiffBigEndian:
353 case ContainerFormat::TiffLittleEndian:
354 return "tiff";
355 case ContainerFormat::WindowsBitmap:
356 return "bmp";
357 case ContainerFormat::WindowsIcon:
358 return "ico";
359 case ContainerFormat::Bzip2:
360 return "bz";
361 case ContainerFormat::Gzip:
362 return "gz";
363 case ContainerFormat::Lzip:
364 return "lz";
365 case ContainerFormat::QuickTime:
366 return "mov";
367 case ContainerFormat::Zip:
368 return "zip";
369 case ContainerFormat::SevenZ:
370 return "7z";
371 case ContainerFormat::Xz:
372 return "xz";
373 case ContainerFormat::YUV4Mpeg2:
374 return "y4m";
375 case ContainerFormat::WavPack:
376 return "wv";
377 case ContainerFormat::MonkeysAudio:
378 return "ape";
379 case ContainerFormat::Midi:
380 return "mid";
381 case ContainerFormat::Aiff:
382 return "aiff";
383 case ContainerFormat::Zstd:
384 return "zst";
385 default:
386 return "";
387 }
388}
389
395std::string_view containerFormatName(ContainerFormat containerFormat)
396{
397 switch (containerFormat) {
398 case ContainerFormat::Ac3Frames:
399 return "raw Dolby Digital";
400 case ContainerFormat::Adts:
401 return "Audio Data Transport Stream";
402 case ContainerFormat::Ar:
403 return "Archive (GNU ar)";
404 case ContainerFormat::Asf:
405 return "Advanced Systems Format";
406 case ContainerFormat::Dirac:
407 return "raw Dirac";
408 case ContainerFormat::Elf:
409 return "Executable and Linkable Format";
410 case ContainerFormat::Flac:
411 return "raw Free Lossless Audio Codec frames";
412 case ContainerFormat::FlashVideo:
413 return "Flash Video";
414 case ContainerFormat::Gif87a:
415 case ContainerFormat::Gif89a:
416 return "Graphics Interchange Format";
417 case ContainerFormat::Ivf:
418 return "IVF";
419 case ContainerFormat::JavaClassFile:
420 return "Java class file";
421 case ContainerFormat::Jpeg:
422 return "JPEG File Interchange Format";
423 case ContainerFormat::Lha:
424 return "LHA compressed file";
425 case ContainerFormat::Lzw:
426 return "LZW compressed file";
427 case ContainerFormat::Mp4:
428 return "MPEG-4 Part 14";
429 case ContainerFormat::Ogg:
430 return "Ogg transport bitstream";
431 case ContainerFormat::PhotoshopDocument:
432 return "Photoshop document";
433 case ContainerFormat::Png:
434 return "Portable Network Graphics";
435 case ContainerFormat::PortableExecutable:
436 return "Portable Executable";
437 case ContainerFormat::Rar:
438 return "RAR Archive";
439 case ContainerFormat::Ebml:
440 return "EBML";
441 case ContainerFormat::Matroska:
442 return "Matroska";
443 case ContainerFormat::Webm:
444 return "WebM";
445 case ContainerFormat::MpegAudioFrames:
446 return "MPEG-1 Layer 1/2/3 frames";
447 case ContainerFormat::Riff:
448 return "Resource Interchange File Format";
449 case ContainerFormat::RiffWave:
450 return "RIFF/WAVE";
451 case ContainerFormat::RiffAvi:
452 return "RIFF/Audio Video Interleave";
453 case ContainerFormat::Tar:
454 return "TAR archive";
455 case ContainerFormat::TiffBigEndian:
456 case ContainerFormat::TiffLittleEndian:
457 return "Tagged Image File Format";
458 case ContainerFormat::Utf16Text:
459 return "UTF-16 text";
460 case ContainerFormat::Utf32Text:
461 return "UTF-32 text";
462 case ContainerFormat::Utf8Text:
463 return "UTF-8 text";
464 case ContainerFormat::WavPack:
465 return "WavPack";
466 case ContainerFormat::WindowsBitmap:
467 return "Microsoft Windows Bitmap";
468 case ContainerFormat::WindowsIcon:
469 return "Microsoft Windows Icon";
470 case ContainerFormat::Bzip2:
471 return "bzip2 compressed file";
472 case ContainerFormat::Gzip:
473 return "gzip compressed file";
474 case ContainerFormat::Lzip:
475 return "lzip compressed file";
476 case ContainerFormat::SevenZ:
477 return "7z archive";
478 case ContainerFormat::QuickTime:
479 return "Quick Time";
480 case ContainerFormat::Xz:
481 return "xz compressed file";
482 case ContainerFormat::YUV4Mpeg2:
483 return "YUV4MPEG2";
484 case ContainerFormat::Zip:
485 return "ZIP archive";
486 case ContainerFormat::MonkeysAudio:
487 return "Monkey's Audio";
488 case ContainerFormat::Midi:
489 return "MIDI";
490 case ContainerFormat::Aiff:
491 return "Audio Interchange File Format";
492 case ContainerFormat::Zstd:
493 return "Zstandard compressed file";
494 case ContainerFormat::Id3v2Tag:
495 return "ID3v2 tag";
496 case ContainerFormat::ApeTag:
497 return "APE tag";
498 default:
499 return "unknown";
500 }
501}
502
508std::string_view containerFormatSubversion(ContainerFormat containerFormat)
509{
510 switch (containerFormat) {
511 case ContainerFormat::Gif87a:
512 return "87a";
513 case ContainerFormat::Gif89a:
514 return "89a";
515 case ContainerFormat::TiffBigEndian:
516 return "big endian";
517 case ContainerFormat::TiffLittleEndian:
518 return "little endian";
519 default:
520 return "";
521 }
522}
523
529std::string_view containerMimeType(ContainerFormat containerFormat, MediaType mediaType)
530{
531 switch (containerFormat) {
532 case ContainerFormat::Ac3Frames:
533 return "audio/ac3";
534 case ContainerFormat::Asf:
535 return "video/x-ms-asf";
536 case ContainerFormat::Flac:
537 return "audio/flac";
538 case ContainerFormat::FlashVideo:
539 return "video/x-flv";
540 case ContainerFormat::Gif87a:
541 case ContainerFormat::Gif89a:
542 return "image/gif";
543 case ContainerFormat::Jpeg:
544 return "image/jpeg";
545 case ContainerFormat::Png:
546 return "image/png";
547 case ContainerFormat::MpegAudioFrames:
548 return "audio/mpeg";
549 case ContainerFormat::Mp4:
550 switch (mediaType) {
551 case MediaType::Audio:
552 return "audio/mp4";
553 default:
554 return "video/mp4";
555 }
556 case ContainerFormat::Ogg:
557 switch (mediaType) {
558 case MediaType::Audio:
559 return "audio/ogg";
560 default:
561 return "video/ogg";
562 }
563 case ContainerFormat::Matroska:
564 switch (mediaType) {
565 case MediaType::Audio:
566 return "audio/x-matroska";
567 default:
568 return "video/x-matroska";
569 }
570 case ContainerFormat::Midi:
571 return "audio/midi";
572 case ContainerFormat::Bzip2:
573 return "application/x-bzip";
574 case ContainerFormat::Gzip:
575 return "application/gzip";
576 case ContainerFormat::Lha:
577 return "application/x-lzh-compressed";
578 case ContainerFormat::Rar:
579 return "application/x-rar-compressed";
580 case ContainerFormat::Lzip:
581 return "application/x-lzip";
582 case ContainerFormat::QuickTime:
583 return "video/quicktime";
584 case ContainerFormat::Zip:
585 return "application/zip";
586 case ContainerFormat::SevenZ:
587 return "application/x-7z-compressed";
588 case ContainerFormat::Xz:
589 return "application/x-xz";
590 case ContainerFormat::WindowsBitmap:
591 return "image/bmp";
592 case ContainerFormat::WindowsIcon:
593 return "image/vnd.microsoft.icon";
594 case ContainerFormat::Zstd:
595 return "application/zstd";
596 default:
597 return "";
598 }
599}
600
604 TagTargetLevel containerTargetLevel(ContainerFormat containerFormat, std::uint64_t targetLevelValue)
605{
606 switch (containerFormat) {
607 case ContainerFormat::Matroska:
608 case ContainerFormat::Webm:
609 return matroskaTagTargetLevel(targetLevelValue);
610 default:
611 return TagTargetLevel::Unspecified;
612 }
613}
614
618std::uint64_t containerTargetLevelValue(ContainerFormat containerFormat, TagTargetLevel targetLevel)
619{
620 switch (containerFormat) {
621 case ContainerFormat::Matroska:
622 case ContainerFormat::Webm:
623 return matroskaTagTargetLevelValue(targetLevel);
624 default:
625 return 0;
626 }
627}
628
629} // namespace TagParser
matroskatagid.h
CppUtilities
Definition abstractcontainer.h:16
TagParser
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
TagParser::containerFormatSubversion
TAG_PARSER_EXPORT std::string_view containerFormatSubversion(ContainerFormat containerFormat)
Returns the subversion of the container format as C-style string.
Definition signature.cpp:508
TagParser::Sig16
Sig16
Holds 16-bit signatures.
Definition signature.cpp:93
TagParser::Lzw
@ Lzw
Definition signature.cpp:99
TagParser::Adts
@ Adts
Definition signature.cpp:95
TagParser::AdtsMask
@ AdtsMask
Definition signature.cpp:96
TagParser::Utf16Text
@ Utf16Text
Definition signature.cpp:102
TagParser::PortableExecutable
@ PortableExecutable
Definition signature.cpp:101
TagParser::Ac3
@ Ac3
Definition signature.cpp:94
TagParser::MpegAudioFrames
@ MpegAudioFrames
Definition signature.cpp:100
TagParser::WindowsBitmap
@ WindowsBitmap
Definition signature.cpp:103
TagParser::Lha
@ Lha
Definition signature.cpp:98
TagParser::Jpeg
@ Jpeg
Definition signature.cpp:97
TagParser::TagTargetLevel
TagTargetLevel
The TagTargetLevel enum specifies tag target levels.
Definition tagtarget.h:16
TagParser::TagTargetLevel::Unspecified
@ Unspecified
Definition tagtarget.h:16
TagParser::containerFormatAbbreviation
TAG_PARSER_EXPORT std::string_view containerFormatAbbreviation(ContainerFormat containerFormat, MediaType mediaType=MediaType::Unknown, unsigned int version=0)
Returns the abbreviation of the container format as C-style string considering the specified media ty...
Definition signature.cpp:269
TagParser::Sig24
Sig24
Holds 24-bit signatures.
Definition signature.cpp:82
TagParser::Flv
@ Flv
Definition signature.cpp:84
TagParser::Bzip2
@ Bzip2
Definition signature.cpp:83
TagParser::Utf8Text
@ Utf8Text
Definition signature.cpp:87
TagParser::Id3v2
@ Id3v2
Definition signature.cpp:86
TagParser::Gzip
@ Gzip
Definition signature.cpp:85
TagParser::Sig48
Sig48
Holds 48-bit signatures.
Definition signature.cpp:35
TagParser::SevenZ
@ SevenZ
Definition signature.cpp:38
TagParser::Xz
@ Xz
Definition signature.cpp:39
TagParser::Gif87a
@ Gif87a
Definition signature.cpp:36
TagParser::Gif89a
@ Gif89a
Definition signature.cpp:37
TagParser::matroskaTagTargetLevelValue
constexpr TAG_PARSER_EXPORT std::uint64_t matroskaTagTargetLevelValue(TagTargetLevel targetLevel)
Returns the Matroska specific target level value for the specified general targetLevel.
Definition matroskatagid.h:532
TagParser::containerFormatName
TAG_PARSER_EXPORT std::string_view containerFormatName(ContainerFormat containerFormat)
Returns the name of the specified container format as C-style string.
Definition signature.cpp:395
TagParser::parseSignature
TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize)
Definition signature.h:83
TagParser::containerMimeType
TAG_PARSER_EXPORT std::string_view containerMimeType(ContainerFormat containerFormat, MediaType mediaType=MediaType::Unknown)
Returns the MIME-type of the container format as C-style string.
Definition signature.cpp:529
TagParser::matroskaTagTargetLevel
constexpr TAG_PARSER_EXPORT TagTargetLevel matroskaTagTargetLevel(std::uint64_t targetLevelValue)
Returns the general TagTargetLevel for the Matroska specific targetLevelValue.
Definition matroskatagid.h:524
TagParser::Sig56
Sig56
Holds 52-bit signatures.
Definition signature.cpp:28
TagParser::Rar
@ Rar
Definition signature.cpp:29
TagParser::containerTargetLevel
TAG_PARSER_EXPORT TagTargetLevel containerTargetLevel(ContainerFormat containerFormat, std::uint64_t targetLevelValue)
Returns the general TagTargetLevel for the specified container format and raw targetLevelValue.
Definition signature.cpp:604
TagParser::Sig32
Sig32
Holds 32-bit signatures.
Definition signature.cpp:52
TagParser::Midi
@ Midi
Definition signature.cpp:59
TagParser::Ogg
@ Ogg
Definition signature.cpp:62
TagParser::Zip1
@ Zip1
Definition signature.cpp:73
TagParser::Zip3
@ Zip3
Definition signature.cpp:75
TagParser::QuickTime
@ QuickTime
Definition signature.cpp:64
TagParser::Zip2
@ Zip2
Definition signature.cpp:74
TagParser::TiffBigEndian
@ TiffBigEndian
Definition signature.cpp:67
TagParser::Elf
@ Elf
Definition signature.cpp:54
TagParser::PhotoshopDocument
@ PhotoshopDocument
Definition signature.cpp:63
TagParser::Zstd
@ Zstd
Definition signature.cpp:76
TagParser::Riff
@ Riff
Definition signature.cpp:65
TagParser::Ebml
@ Ebml
Definition signature.cpp:58
TagParser::Dirac
@ Dirac
Definition signature.cpp:53
TagParser::Ivf
@ Ivf
Definition signature.cpp:56
TagParser::WavPack
@ WavPack
Definition signature.cpp:70
TagParser::Flac
@ Flac
Definition signature.cpp:55
TagParser::TiffLittleEndian
@ TiffLittleEndian
Definition signature.cpp:68
TagParser::MonkeysAudio
@ MonkeysAudio
Definition signature.cpp:60
TagParser::JavaClassFile
@ JavaClassFile
Definition signature.cpp:57
TagParser::RiffWave
@ RiffWave
Definition signature.cpp:66
TagParser::Utf32Text
@ Utf32Text
Definition signature.cpp:69
TagParser::Lzip
@ Lzip
Definition signature.cpp:72
TagParser::WindowsIcon
@ WindowsIcon
Definition signature.cpp:71
TagParser::Mp4
@ Mp4
Definition signature.cpp:61
TagParser::MediaType
MediaType
The MediaType enum specifies the type of media data (audio, video, text, ...).
Definition mediaformat.h:14
TagParser::MediaType::Video
@ Video
Definition mediaformat.h:17
TagParser::MediaType::Audio
@ Audio
Definition mediaformat.h:16
TagParser::Sig64
Sig64
Holds 64-bit signatures.
Definition signature.cpp:15
TagParser::YUV4Mpeg2
@ YUV4Mpeg2
Definition signature.cpp:22
TagParser::Ar
@ Ar
Definition signature.cpp:17
TagParser::Asf2
@ Asf2
Definition signature.cpp:19
TagParser::ApeTag
@ ApeTag
Definition signature.cpp:16
TagParser::Png
@ Png
Definition signature.cpp:20
TagParser::RiffAvi
@ RiffAvi
Definition signature.cpp:21
TagParser::Asf1
@ Asf1
Definition signature.cpp:18
TagParser::containerTargetLevelValue
TAG_PARSER_EXPORT std::uint64_t containerTargetLevelValue(ContainerFormat containerFormat, TagTargetLevel targetLevel)
Returns the raw target level value for the specified containerFormat and general targetLevel.
Definition signature.cpp:618
TagParser::GeneralMediaFormat::Speex
@ Speex
Definition mediaformat.h:83
TagParser::GeneralMediaFormat::Opus
@ Opus
Definition mediaformat.h:72
TagParser::ContainerFormat
ContainerFormat
Specifies the container format.
Definition signature.h:18
TagParser::ContainerFormat::Xz
@ Xz
Definition signature.h:65
TagParser::ContainerFormat::Zstd
@ Zstd
Definition signature.h:69
TagParser::ContainerFormat::FlashVideo
@ FlashVideo
Definition signature.h:29
TagParser::ContainerFormat::TiffLittleEndian
@ TiffLittleEndian
Definition signature.h:57
TagParser::ContainerFormat::Utf32Text
@ Utf32Text
Definition signature.h:59
TagParser::ContainerFormat::Ebml
@ Ebml
Definition signature.h:26
TagParser::ContainerFormat::Gzip
@ Gzip
Definition signature.h:32
TagParser::ContainerFormat::ApeTag
@ ApeTag
Definition signature.h:70
TagParser::ContainerFormat::Webm
@ Webm
Definition signature.h:62
TagParser::ContainerFormat::Lha
@ Lha
Definition signature.h:37
TagParser::ContainerFormat::Ivf
@ Ivf
Definition signature.h:34
TagParser::ContainerFormat::Lzip
@ Lzip
Definition signature.h:38
TagParser::ContainerFormat::Midi
@ Midi
Definition signature.h:41
TagParser::ContainerFormat::TiffBigEndian
@ TiffBigEndian
Definition signature.h:56
TagParser::ContainerFormat::MonkeysAudio
@ MonkeysAudio
Definition signature.h:42
TagParser::ContainerFormat::Jpeg
@ Jpeg
Definition signature.h:36
TagParser::ContainerFormat::Flac
@ Flac
Definition signature.h:28
TagParser::ContainerFormat::Elf
@ Elf
Definition signature.h:27
TagParser::ContainerFormat::Utf16Text
@ Utf16Text
Definition signature.h:58
TagParser::ContainerFormat::PortableExecutable
@ PortableExecutable
Definition signature.h:48
TagParser::ContainerFormat::Asf
@ Asf
Definition signature.h:23
TagParser::ContainerFormat::Riff
@ Riff
Definition signature.h:51
TagParser::ContainerFormat::Ogg
@ Ogg
Definition signature.h:45
TagParser::ContainerFormat::Mp4
@ Mp4
Definition signature.h:43
TagParser::ContainerFormat::RiffWave
@ RiffWave
Definition signature.h:53
TagParser::ContainerFormat::Rar
@ Rar
Definition signature.h:50
TagParser::ContainerFormat::Ar
@ Ar
Definition signature.h:22
TagParser::ContainerFormat::RiffAvi
@ RiffAvi
Definition signature.h:52
TagParser::ContainerFormat::Unknown
@ Unknown
Definition signature.h:19
TagParser::ContainerFormat::Matroska
@ Matroska
Definition signature.h:40
TagParser::ContainerFormat::Utf8Text
@ Utf8Text
Definition signature.h:60
TagParser::ContainerFormat::Zip
@ Zip
Definition signature.h:67
TagParser::ContainerFormat::WavPack
@ WavPack
Definition signature.h:61
TagParser::ContainerFormat::Bzip2
@ Bzip2
Definition signature.h:24
TagParser::ContainerFormat::Dirac
@ Dirac
Definition signature.h:25
TagParser::ContainerFormat::Lzw
@ Lzw
Definition signature.h:39
TagParser::ContainerFormat::WindowsIcon
@ WindowsIcon
Definition signature.h:64
TagParser::ContainerFormat::Ac3Frames
@ Ac3Frames
Definition signature.h:20
TagParser::ContainerFormat::WindowsBitmap
@ WindowsBitmap
Definition signature.h:63
TagParser::ContainerFormat::Aiff
@ Aiff
Definition signature.h:68
TagParser::ContainerFormat::JavaClassFile
@ JavaClassFile
Definition signature.h:35
TagParser::ContainerFormat::Gif89a
@ Gif89a
Definition signature.h:31
TagParser::ContainerFormat::MpegAudioFrames
@ MpegAudioFrames
Definition signature.h:44
TagParser::ContainerFormat::PhotoshopDocument
@ PhotoshopDocument
Definition signature.h:46
TagParser::ContainerFormat::Id3v2Tag
@ Id3v2Tag
Definition signature.h:33
TagParser::ContainerFormat::Adts
@ Adts
Definition signature.h:21
TagParser::ContainerFormat::SevenZ
@ SevenZ
Definition signature.h:54
TagParser::ContainerFormat::QuickTime
@ QuickTime
Definition signature.h:49
TagParser::ContainerFormat::Tar
@ Tar
Definition signature.h:55
TagParser::ContainerFormat::YUV4Mpeg2
@ YUV4Mpeg2
Definition signature.h:66
TagParser::ContainerFormat::Png
@ Png
Definition signature.h:47
TagParser::ContainerFormat::Gif87a
@ Gif87a
Definition signature.h:30
TagParser::Sig40
Sig40
Holds 40-bit signatures.
Definition signature.cpp:45
TagParser::Aiff
@ Aiff
Definition signature.cpp:46
signature.h