Tag Parser: signature.h Source File

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

Loading...
Searching...
No Matches
signature.h
Go to the documentation of this file.
1#ifndef TAG_PARSER_SIGNATURE_H
2#define TAG_PARSER_SIGNATURE_H
3
4#include "./mediaformat.h"
5
6#include <cstdint>
7#include <string_view>
8
9namespace TagParser {
10
11enum class TagTargetLevel : std::uint8_t;
12
18 enum class ContainerFormat : unsigned int {
19 Unknown,
20 Ac3Frames,
21 Adts,
22 Ar,
23 Asf,
24 Bzip2,
25 Dirac,
26 Ebml,
27 Elf,
28 Flac,
29 FlashVideo,
30 Gif87a,
31 Gif89a,
32 Gzip,
33 Id3v2Tag,
34 Ivf,
35 JavaClassFile,
36 Jpeg,
37 Lha,
38 Lzip,
39 Lzw,
40 Matroska,
41 Midi,
42 MonkeysAudio,
43 Mp4,
44 MpegAudioFrames,
45 Ogg,
46 PhotoshopDocument,
47 Png,
48 PortableExecutable,
49 QuickTime,
50 Rar,
51 Riff,
52 RiffAvi,
53 RiffWave,
54 SevenZ,
55 Tar,
56 TiffBigEndian,
57 TiffLittleEndian,
58 Utf16Text,
59 Utf32Text,
60 Utf8Text,
61 WavPack,
62 Webm,
63 WindowsBitmap,
64 WindowsIcon,
65 Xz,
66 YUV4Mpeg2,
67 Zip,
68 Aiff,
69 Zstd,
70 ApeTag,
71};
72
73 TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize);
74 TAG_PARSER_EXPORT ContainerFormat parseSignature(std::string_view buffer);
75 TAG_PARSER_EXPORT std::string_view containerFormatName(ContainerFormat containerFormat);
76 TAG_PARSER_EXPORT std::string_view containerFormatAbbreviation(
77 ContainerFormat containerFormat, MediaType mediaType = MediaType::Unknown, unsigned int version = 0);
78 TAG_PARSER_EXPORT std::string_view containerFormatSubversion(ContainerFormat containerFormat);
79 TAG_PARSER_EXPORT std::string_view containerMimeType(ContainerFormat containerFormat, MediaType mediaType = MediaType::Unknown);
80 TAG_PARSER_EXPORT TagTargetLevel containerTargetLevel(ContainerFormat containerFormat, std::uint64_t targetLevelValue);
81 TAG_PARSER_EXPORT std::uint64_t containerTargetLevelValue(ContainerFormat containerFormat, TagTargetLevel targetLevel);
82
83 inline ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize)
84{
85 return parseSignature(std::string_view(buffer, bufferSize));
86}
87
88} // namespace TagParser
89
90#endif // TAG_PARSER_SIGNATURE_H
TagParser::Id3v2Tag
Implementation of TagParser::Tag for ID3v2 tags.
Definition id3v2tag.h:78
TAG_PARSER_EXPORT
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
mediaformat.h
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.
Definition signature.cpp:505
TagParser::Lzw
@ Lzw
Definition signature.cpp:99
TagParser::Adts
@ Adts
Definition signature.cpp:95
TagParser::Utf16Text
@ Utf16Text
Definition signature.cpp:102
TagParser::PortableExecutable
@ PortableExecutable
Definition signature.cpp:101
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::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 considering the specified media type and version.
Definition signature.cpp:268
TagParser::Bzip2
@ Bzip2
Definition signature.cpp:83
TagParser::Utf8Text
@ Utf8Text
Definition signature.cpp:87
TagParser::Gzip
@ Gzip
Definition signature.cpp:85
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::containerFormatName
TAG_PARSER_EXPORT std::string_view containerFormatName(ContainerFormat containerFormat)
Returns the name of the specified container format.
Definition signature.cpp:393
TagParser::parseSignature
TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize)
Definition signature.h:83
TagParser::StereoMode::Unknown
@ Unknown
Definition abstracttrack.h:77
TagParser::containerMimeType
TAG_PARSER_EXPORT std::string_view containerMimeType(ContainerFormat containerFormat, MediaType mediaType=MediaType::Unknown)
Returns the MIME-type of the container format.
Definition signature.cpp:525
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:600
TagParser::Midi
@ Midi
Definition signature.cpp:59
TagParser::Ogg
@ Ogg
Definition signature.cpp:62
TagParser::QuickTime
@ QuickTime
Definition signature.cpp:64
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::Unknown
@ Unknown
Definition mediaformat.h:15
TagParser::YUV4Mpeg2
@ YUV4Mpeg2
Definition signature.cpp:22
TagParser::Ar
@ Ar
Definition signature.cpp:17
TagParser::ApeTag
@ ApeTag
Definition signature.cpp:16
TagParser::Png
@ Png
Definition signature.cpp:20
TagParser::RiffAvi
@ RiffAvi
Definition signature.cpp:21
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:614
TagParser::ContainerFormat
ContainerFormat
Specifies the container format.
Definition signature.h:18
TagParser::ContainerFormat::FlashVideo
@ FlashVideo
Definition signature.h:29
TagParser::ContainerFormat::Webm
@ Webm
Definition signature.h:62
TagParser::ContainerFormat::Asf
@ Asf
Definition signature.h:23
TagParser::ContainerFormat::Matroska
@ Matroska
Definition signature.h:40
TagParser::ContainerFormat::Zip
@ Zip
Definition signature.h:67
TagParser::ContainerFormat::Ac3Frames
@ Ac3Frames
Definition signature.h:20
TagParser::ContainerFormat::Tar
@ Tar
Definition signature.h:55
TagParser::Aiff
@ Aiff
Definition signature.cpp:46