Tag Parser 12.3.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
settings.h
Go to the documentation of this file.
1#ifndef TAGPARSER_SETTINGS_H
2#define TAGPARSER_SETTINGS_H
3
4#include "./tagtarget.h"
5
6#include <c++utilities/misc/flagenumclass.h>
7
8#include <cstdint>
9#include <type_traits>
10
11namespace TagParser {
12
13enum class ElementPosition {
15 AfterData,
16 Keep,
17};
18
22enum class TagUsage {
23 Always,
25 Never,
26};
27
31enum class TagCreationFlags : std::uint64_t {
32 None = 0,
34 Id3InitOnCreate = 1 << 1,
38 = 1 << 4,
39};
40
41} // namespace TagParser
42
44
45namespace TagParser {
46
52 std::vector<TagTarget> requiredTargets = std::vector<TagTarget>();
61 std::uint8_t id3v2MajorVersion = 3;
62
63 // workaround for GGC bug 66297 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66297)
64#if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 2)
65 inline
66#else
67 constexpr
68#endif
70 setFlag(TagCreationFlags flag, bool enabled);
71};
72
73#if __GNUC__ < 7 || (__GNUC__ == 7 && __GNUC_MINOR__ < 2)
74inline
75#else
76constexpr
77#endif
80{
81 if (enabled) {
82 flags += flag;
83 } else {
84 flags -= flag;
85 }
86 return *this;
87}
88
89} // namespace TagParser
90
91#endif // TAGPARSER_SETTINGS_H
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
ElementPosition
Definition settings.h:13
TagCreationFlags
The Flags enum contains options to control the tag creation via MediaFileInfo::createAppropriateTags(...
Definition settings.h:31
TagUsage
The TagUsage enum specifies the usage of a certain tag type.
Definition settings.h:22
CPP_UTILITIES_MARK_FLAG_ENUM_CLASS(TagParser, TagParser::TagCreationFlags)
The TagSettings struct contains settings which can be passed to MediaFileInfo::createAppropriateTags(...
Definition settings.h:50
std::vector< TagTarget > requiredTargets
Specifies the required targets. If targets are not supported by the container an informal notificatio...
Definition settings.h:52
std::uint8_t id3v2MajorVersion
Specifies the ID3v2 version to be used in case an ID3v2 tag present or will be created....
Definition settings.h:61
TagUsage id3v2usage
Specifies the usage of ID3v2 when creating tags for MP3 files (has no effect when the file is no MP3 ...
Definition settings.h:59
TagCreationSettings & setFlag(TagCreationFlags flag, bool enabled)
Definition settings.h:79
TagCreationFlags flags
Specifies options to control the tag creation. See TagSettings::Flags.
Definition settings.h:54
TagUsage id3v1usage
Specifies the usage of ID3v1 when creating tags for MP3 files (has no effect when the file is no MP3 ...
Definition settings.h:57