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 uint64 requiredSize()
const;
66 std::vector<Mp4TagFieldMaker> m_maker;
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;
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.
The FieldMapBasedTag provides a generic implementation of Tag which stores the tag fields using std::...
const char * mean
mean parameter, usually Mp4TagExtendedMeanIds::iTunes
Implementation of TagParser::Tag for the MP4 container.
const std::string & name() const
Returns the "name" for "extended" fields.
The Mp4TagField class is used by Mp4Tag to store the fields.
bool matches(const Mp4TagField &field) const
Returns whether the current parameter match the specified field.
Mp4ExtendedFieldId(const char *mean=nullptr, const char *name=nullptr, bool updateOnly=false)
Constructs a new instance with the specified parameter.
std::less< typename FieldType::IdentifierType > Compare
Mp4Tag()
Constructs a new tag.
KnownField
Specifies the field.
const Mp4Tag & tag() const
Returns the associated tag.
bool setValue(KnownField field, const TagValue &value) override
Assigns the given value to the specified field.
The Mp4TagMaker class helps writing MP4 tags.
The Mp4Atom class helps to parse MP4 files.
Defines traits for the specified ImplementationType.
The Mp4ExtendedFieldId specifies parameter for an extended field denoted via Mp4TagAtomIds::Extended...
const char * name
name parameter
bool supportsField(KnownField field) const override
Returns an indication whether the specified field is supported by the tag.
bool supportsMultipleValues(KnownField) const override
Returns false for all fields (for now).
uint64 requiredSize() const
Returns the number of bytes which will be written when making the tag.
The TagValue class wraps values of different types.
bool updateOnly
Whether only existing fields should be updated but no new extended field should be created...
TagType
Specifies the tag type.
TagTextEncoding
Specifies the text encoding.
Contains all classes and functions of the TagInfo library.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
The Diagnostics class is a container for DiagMessage.
const std::string & mean() const
Returns the "mean" for "extended" fields.
const TagValue & value(KnownField value) const override
Returns the value of the specified field.