Tag Parser 11.5.1
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
18enum class ContainerFormat : unsigned int {
19 Unknown,
20 Ac3Frames,
21 Adts,
22 Ar,
23 Asf,
24 Bzip2,
25 Dirac,
26 Ebml,
27 Elf,
28 Flac,
30 Gif87a,
31 Gif89a,
32 Gzip,
33 Id2v2Tag,
34 Ivf,
36 Jpeg,
37 Lha,
38 Lzip,
39 Lzw,
40 Matroska,
41 Midi,
43 Mp4,
45 Ogg,
47 Png,
49 QuickTime,
50 Rar,
51 Riff,
52 RiffAvi,
53 RiffWave,
54 SevenZ,
55 Tar,
58 Utf16Text,
59 Utf32Text,
60 Utf8Text,
61 WavPack,
62 Webm,
65 Xz,
66 YUV4Mpeg2,
67 Zip,
68 Aiff,
69};
70
71TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize);
72TAG_PARSER_EXPORT ContainerFormat parseSignature(std::string_view buffer);
73TAG_PARSER_EXPORT std::string_view containerFormatName(ContainerFormat containerFormat);
75 ContainerFormat containerFormat, MediaType mediaType = MediaType::Unknown, unsigned int version = 0);
76TAG_PARSER_EXPORT std::string_view containerFormatSubversion(ContainerFormat containerFormat);
77TAG_PARSER_EXPORT std::string_view containerMimeType(ContainerFormat containerFormat, MediaType mediaType = MediaType::Unknown);
78TAG_PARSER_EXPORT TagTargetLevel containerTargetLevel(ContainerFormat containerFormat, std::uint64_t targetLevelValue);
79TAG_PARSER_EXPORT std::uint64_t containerTargetLevelValue(ContainerFormat containerFormat, TagTargetLevel targetLevel);
80
81inline ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize)
82{
83 return parseSignature(std::string_view(buffer, bufferSize));
84}
85
86} // namespace TagParser
87
88#endif // TAG_PARSER_SIGNATURE_H
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:10
TAG_PARSER_EXPORT std::string_view containerFormatSubversion(ContainerFormat containerFormat)
Returns the subversion of the container format as C-style string.
Definition: signature.cpp:494
@ PortableExecutable
Definition: signature.cpp:99
@ MpegAudioFrames
Definition: signature.cpp:98
TagTargetLevel
The TagTargetLevel enum specifies tag target levels.
Definition: tagtarget.h:16
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:263
TAG_PARSER_EXPORT std::string_view containerFormatName(ContainerFormat containerFormat)
Returns the name of the specified container format as C-style string.
Definition: signature.cpp:387
TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize)
Definition: signature.h:81
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:515
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:588
@ TiffBigEndian
Definition: signature.cpp:66
@ PhotoshopDocument
Definition: signature.cpp:62
@ TiffLittleEndian
Definition: signature.cpp:67
@ MonkeysAudio
Definition: signature.cpp:59
@ JavaClassFile
Definition: signature.cpp:56
MediaType
The MediaType enum specifies the type of media data (audio, video, text, ...).
Definition: mediaformat.h:14
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:602
ContainerFormat
Specifies the container format.
Definition: signature.h:18