Tag Parser 12.3.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 Id3v2Tag,
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 Zstd,
70 ApeTag,
71};
72
73TAG_PARSER_EXPORT ContainerFormat parseSignature(const char *buffer, std::size_t bufferSize);
74TAG_PARSER_EXPORT ContainerFormat parseSignature(std::string_view buffer);
75TAG_PARSER_EXPORT std::string_view containerFormatName(ContainerFormat containerFormat);
77 ContainerFormat containerFormat, MediaType mediaType = MediaType::Unknown, unsigned int version = 0);
78TAG_PARSER_EXPORT std::string_view containerFormatSubversion(ContainerFormat containerFormat);
79TAG_PARSER_EXPORT std::string_view containerMimeType(ContainerFormat containerFormat, MediaType mediaType = MediaType::Unknown);
80TAG_PARSER_EXPORT TagTargetLevel containerTargetLevel(ContainerFormat containerFormat, std::uint64_t targetLevelValue);
81TAG_PARSER_EXPORT std::uint64_t containerTargetLevelValue(ContainerFormat containerFormat, TagTargetLevel targetLevel);
82
83inline 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
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Definition global.h:14
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.
@ PortableExecutable
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...
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)
Definition signature.h:83
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.
TAG_PARSER_EXPORT TagTargetLevel containerTargetLevel(ContainerFormat containerFormat, std::uint64_t targetLevelValue)
Returns the general TagTargetLevel for the specified container format and raw targetLevelValue.
@ PhotoshopDocument
Definition signature.cpp:63
@ TiffLittleEndian
Definition signature.cpp:68
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.
ContainerFormat
Specifies the container format.
Definition signature.h:18