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 typedef std::less<typename FieldType::IdentifierType>
Compare;
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;
114 const TagValue &value(
const std::string mean,
const std::string name)
const;
116 const TagValue &value(
const std::string &mean,
const std::string &name)
const;
117 const TagValue &value(
const char *mean,
const char *name)
const;
121 bool setValues(
KnownField field,
const std::vector<TagValue> &values)
override;
123 bool setValue(
const std::string mean,
const std::string name,
const TagValue &value);
125 bool setValue(
const std::string &mean,
const std::string &name,
const TagValue &value);
126 bool setValue(
const char *mean,
const char *name,
const TagValue &value);
128 bool hasField(
KnownField value)
const override;
132 void make(std::ostream &stream,
Diagnostics &diag);
135 IdentifierType internallyGetFieldId(
KnownField field)
const;
136 KnownField internallyGetKnownField(
const IdentifierType &
id)
const;
161 return value(mean.data(), name.data());
174 #endif // TAG_PARSER_MP4TAG_H bool supportsField(KnownField field) const
Returns an indication whether the specified field is supported by the tag.
const char * mean
mean parameter, usually Mp4TagExtendedMeanIds::iTunes
const std::string & name() const
Returns the "name" for "extended" 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.
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.
const char * name
name parameter
bool supportsField(KnownField field) const override
Returns an indication whether the specified field is supported by the tag.
std::less< typename FieldType::IdentifierType > Compare
uint64 requiredSize() const
Returns the number of bytes which will be written when making the tag.
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.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
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.