1#ifndef TAG_PARSER_MP4TAG_H
2#define TAG_PARSER_MP4TAG_H
14 Mp4ExtendedFieldId(std::string_view mean, std::string_view name,
bool updateOnly =
false);
15 Mp4ExtendedFieldId(KnownField field);
17 operator bool()
const;
18 bool matches(
const Mp4TagField &field)
const;
25 bool updateOnly =
false;
34 , updateOnly(updateOnly)
41inline Mp4ExtendedFieldId::operator bool()
const
43 return !mean.empty() && !name.empty();
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>;
103 static constexpr TagType tagType = TagType::Mp4Tag;
104 static constexpr std::string_view 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(std::string_view mean, std::string_view name)
const;
117 bool setValues(
KnownField field,
const std::vector<TagValue> &values)
override;
118 bool setValue(std::string_view mean, std::string_view name,
const TagValue &value);
120 bool hasField(
KnownField value)
const override;
121 bool supportsMultipleValues(
KnownField)
const override;
125 void make(std::ostream &stream,
Diagnostics &diag);
128 IdentifierType internallyGetFieldId(
KnownField field)
const;
129 KnownField internallyGetKnownField(
const IdentifierType &
id)
const;
130 void internallyGetValuesFromField(
const FieldType &field, std::vector<const TagValue *> &values)
const;
The Diagnostics class is a container for DiagMessage.
std::less< typename FieldType::IdentifierType > Compare
Defines traits for the specified ImplementationType.
The FieldMapBasedTag provides a generic implementation of Tag which stores the tag fields using std::...
bool supportsField(KnownField field) const
Returns an indication whether the specified field is supported by the tag.
The Mp4Atom class helps to parse MP4 files.
The Mp4TagField class is used by Mp4Tag to store the fields.
const std::string & name() const
Returns the "name" for "extended" fields.
const std::string & mean() const
Returns the "mean" for "extended" fields.
The Mp4TagMaker class helps writing MP4 tags.
const Mp4Tag & tag() const
Returns the associated tag.
std::uint64_t requiredSize() const
Returns the number of bytes which will be written when making the tag.
Implementation of TagParser::Tag for the MP4 container.
bool supportsMultipleValues(KnownField) const override
Returns false for all fields (for now).
bool supportsField(KnownField field) const override
Returns an indication whether the specified field is supported by the tag.
Mp4Tag()
Constructs a new tag.
The TagValue class wraps values of different types.
#define TAG_PARSER_EXPORT
Marks the symbol to be exported by the tagparser library.
Contains all classes and functions of the TagInfo library.
KnownField
Specifies the field.
TagTextEncoding
Specifies the text encoding.
TagType
Specifies the tag type.
bool matches(const Mp4TagField &field) const
Returns whether the current parameter match the specified field.
std::string_view mean
mean parameter, usually Mp4TagExtendedMeanIds::iTunes
Mp4ExtendedFieldId(std::string_view mean, std::string_view name, bool updateOnly=false)
Constructs a new instance with the specified parameter.
std::string_view name
name parameter