Tag Parser
9.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
Go to the documentation of this file. 1 #ifndef TAG_PARSER_MP4TAG_H
2 #define TAG_PARSER_MP4TAG_H
6 #include "../fieldbasedtag.h"
14 Mp4ExtendedFieldId(
const char *mean =
nullptr,
const char *name =
nullptr,
bool updateOnly =
false);
17 operator bool()
const;
34 , updateOnly(updateOnly)
41 inline Mp4ExtendedFieldId::operator bool()
const
60 std::uint64_t requiredSize()
const;
66 std::vector<Mp4TagFieldMaker> m_maker;
67 std::uint64_t m_metaSize;
68 std::uint64_t m_ilstSize;
69 bool m_omitPreDefinedGenre;
94 using Compare = std::less<typename FieldType::IdentifierType>;
104 static constexpr
const char *tagName =
"MP4/iTunes tag";
108 bool supportsField(
KnownField field)
const override;
112 std::vector<const TagValue *> values(
KnownField field)
const override;
113 const TagValue &value(
const std::string &mean,
const std::string &name)
const;
114 const TagValue &value(
const char *mean,
const char *name)
const;
118 bool setValues(
KnownField field,
const std::vector<TagValue> &values)
override;
119 bool setValue(
const std::string &mean,
const std::string &name,
const TagValue &value);
120 bool setValue(
const char *mean,
const char *name,
const TagValue &value);
122 bool hasField(
KnownField value)
const override;
123 bool supportsMultipleValues(
KnownField)
const override;
127 void make(std::ostream &stream,
Diagnostics &diag);
130 IdentifierType internallyGetFieldId(
KnownField field)
const;
131 KnownField internallyGetKnownField(
const IdentifierType &
id)
const;
144 case KnownField::EncoderSettings:
156 return value(mean.data(), name.data());
179 #endif // TAG_PARSER_MP4TAG_H
bool supportsField(KnownField field) const
Returns an indication whether the specified field is supported by the tag.
std::uint64_t requiredSize() const
Returns the number of bytes which will be written when making the tag.
bool supportsMultipleValues(KnownField) const override
Returns false for all fields (for now).
TagTextEncoding
Specifies the text encoding.
bool updateOnly
Whether only existing fields should be updated but no new extended field should be created.
The Diagnostics class is a container for DiagMessage.
Contains all classes and functions of the TagInfo library.
const char * name
name parameter
The Mp4ExtendedFieldId specifies parameter for an extended field denoted via Mp4TagAtomIds::Extended.
const char * mean
mean parameter, usually Mp4TagExtendedMeanIds::iTunes
The Mp4TagMaker class helps writing MP4 tags.
bool supportsField(KnownField field) const override
Returns an indication whether the specified field is supported by the tag.
const Mp4Tag & tag() const
Returns the associated tag.
const TagValue & value(KnownField value) const override
Returns the value of the specified field.
Mp4ExtendedFieldId(const char *mean=nullptr, const char *name=nullptr, bool updateOnly=false)
Constructs a new instance with the specified parameter.
KnownField
Specifies the field.
The FieldMapBasedTag provides a generic implementation of Tag which stores the tag fields using std::...
The TagValue class wraps values of different types.
Implementation of TagParser::Tag for the MP4 container.
std::less< typename FieldType::IdentifierType > Compare
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
bool matches(const Mp4TagField &field) const
Returns whether the current parameter match the specified field.
bool setValue(KnownField field, const TagValue &value) override
Assigns the given value to the specified field.
Defines traits for the specified ImplementationType.
const std::string & mean() const
Returns the "mean" for "extended" fields.
The Mp4Atom class helps to parse MP4 files.
Mp4Tag()
Constructs a new tag.
The Mp4TagField class is used by Mp4Tag to store the fields.
TagType
Specifies the tag type.
const std::string & name() const
Returns the "name" for "extended" fields.