4#include <c++utilities/conversion/binaryconversion.h>
16 Ar = 0x213C617263683E0A,
17 Asf1 = 0x3026B2758E66CF11ul,
18 Asf2 = 0xA6D900AA0062CE6Cul,
19 Png = 0x89504E470D0A1A0Aul,
28 Rar = 0x526172211A0700ul,
38 Xz = 0xFD377A585A00ul,
114 std::uint64_t sig = 0;
115 if (buffer.size() >= 8) {
116 sig = BE::toUInt64(buffer.data());
117 }
else if (buffer.size() >= 4) {
118 sig = BE::toUInt32(buffer.data());
120 }
else if (buffer.size() >= 2) {
121 sig = BE::toUInt16(buffer.data());
137 if (buffer.size() >= 10 && buffer[8] == 0x32 && buffer[9] == 0x20) {
143 switch (sig & 0x00000000FFFFFFFF) {
193 if (buffer.size() >= 16 && BE::toUInt64(buffer.data() + 8) ==
Sig64::RiffAvi) {
195 }
else if (buffer.size() >= 12 && BE::toUInt32(buffer.data() + 8) ==
RiffWave) {
265 switch (containerFormat) {
389 switch (containerFormat) {
391 return "raw Dolby Digital";
393 return "Audio Data Transport Stream";
395 return "Archive (GNU ar)";
397 return "Advanced Systems Format";
401 return "Executable and Linkable Format";
403 return "raw Free Lossless Audio Codec frames";
405 return "Flash Video";
408 return "Graphics Interchange Format";
412 return "Java class file";
414 return "JPEG File Interchange Format";
416 return "LHA compressed file";
418 return "LZW compressed file";
420 return "MPEG-4 Part 14";
422 return "Ogg transport bitstream";
424 return "Photoshop document";
426 return "Portable Network Graphics";
428 return "Portable Executable";
430 return "RAR Archive";
438 return "MPEG-1 Layer 1/2/3 frames";
440 return "Resource Interchange File Format";
444 return "RIFF/Audio Video Interleave";
446 return "TAR archive";
449 return "Tagged Image File Format";
451 return "UTF-16 text";
453 return "UTF-32 text";
459 return "Microsoft Windows Bitmap";
461 return "Microsoft Windows Icon";
463 return "bzip2 compressed file";
465 return "gzip compressed file";
467 return "lzip compressed file";
473 return "xz compressed file";
477 return "ZIP archive";
479 return "Monkey's Audio";
483 return "Audio Interchange File Format";
496 switch (containerFormat) {
504 return "little endian";
517 switch (containerFormat) {
521 return "video/x-ms-asf";
525 return "video/x-flv";
552 return "audio/x-matroska";
554 return "video/x-matroska";
559 return "application/x-bzip";
561 return "application/gzip";
563 return "application/x-lzh-compressed";
565 return "application/x-rar-compressed";
567 return "application/x-lzip";
569 return "video/quicktime";
571 return "application/zip";
573 return "application/x-7z-compressed";
575 return "application/x-xz";
579 return "image/vnd.microsoft.icon";
590 switch (containerFormat) {
604 switch (containerFormat) {
Contains all classes and functions of the TagInfo library.
TAG_PARSER_EXPORT std::string_view containerFormatSubversion(ContainerFormat containerFormat)
Returns the subversion of the container format as C-style string.
Sig16
Holds 16-bit signatures.
TagTargetLevel
The TagTargetLevel enum specifies tag target levels.
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...
Sig24
Holds 24-bit signatures.
Sig48
Holds 48-bit signatures.
constexpr TAG_PARSER_EXPORT std::uint64_t matroskaTagTargetLevelValue(TagTargetLevel targetLevel)
Returns the Matroska specific target level value for the specified general targetLevel.
TAG_PARSER_EXPORT std::string_view containerFormatName(ContainerFormat containerFormat)
Returns the name of the specified container format as C-style string.
TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize)
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.
constexpr TAG_PARSER_EXPORT TagTargetLevel matroskaTagTargetLevel(std::uint64_t targetLevelValue)
Returns the general TagTargetLevel for the Matroska specific targetLevelValue.
Sig56
Holds 52-bit signatures.
TAG_PARSER_EXPORT TagTargetLevel containerTargetLevel(ContainerFormat containerFormat, std::uint64_t targetLevelValue)
Returns the general TagTargetLevel for the specified container format and raw targetLevelValue.
Sig32
Holds 32-bit signatures.
MediaType
The MediaType enum specifies the type of media data (audio, video, text, ...).
Sig64
Holds 64-bit signatures.
TAG_PARSER_EXPORT std::uint64_t containerTargetLevelValue(ContainerFormat containerFormat, TagTargetLevel targetLevel)
Returns the raw target level value for the specified containerFormat and general targetLevel.
ContainerFormat
Specifies the container format.
Sig40
Holds 40-bit signatures.