1#ifndef TAG_PARSER_MP4TAG_H
2#define TAG_PARSER_MP4TAG_H
17 operator bool()
const;
41inline Mp4ExtendedFieldId::operator bool()
const
43 return !
mean.empty() && !
name.empty();
41inline Mp4ExtendedFieldId::operator bool()
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 std::string_view
tagName =
"MP4/iTunes tag";
113 const TagValue &
value(std::string_view mean, std::string_view name)
const;
The Diagnostics class is a container for DiagMessage.
std::less< typename FieldType::IdentifierType > Compare
Defines traits for the specified ImplementationType.
typename FieldMapBasedTagTraits< Mp4Tag >::FieldType::IdentifierType IdentifierType
typename FieldMapBasedTagTraits< Mp4Tag >::FieldType FieldType
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.
void make(std::ostream &stream, Diagnostics &diag)
Saves the tag (specified when constructing the object) to the specified stream.
Implementation of TagParser::Tag for the MP4 container.
std::vector< const TagValue * > values(KnownField field) const override
Returns the values of the specified field.
bool supportsMultipleValues(KnownField) const override
Returns false for all fields (for now).
const TagValue & value(KnownField value) const override
Returns the value of the specified field.
bool hasField(KnownField value) const override
Returns an indication whether the specified field is present.
bool setValue(KnownField field, const TagValue &value) override
Assigns the given value to the specified field.
IdentifierType internallyGetFieldId(KnownField field) const
bool supportsField(KnownField field) const override
Returns an indication whether the specified field is supported by the tag.
static constexpr std::string_view tagName
Mp4TagMaker prepareMaking(Diagnostics &diag)
Prepares making.
bool setValues(KnownField field, const std::vector< TagValue > &values) override
Assigns the given values to the field with the specified id.
Mp4Tag()
Constructs a new tag.
void parse(Mp4Atom &metaAtom, Diagnostics &diag)
Parses tag information from the specified metaAtom.
void make(std::ostream &stream, Diagnostics &diag)
Writes tag information to the specified stream.
bool canEncodingBeUsed(TagTextEncoding encoding) const override
Returns an indication whether the specified encoding can be used to provide string values for the tag...
KnownField internallyGetKnownField(const IdentifierType &id) const
static constexpr TagTextEncoding defaultTextEncoding
void internallyGetValuesFromField(const FieldType &field, std::vector< const TagValue * > &values) const
Adds values from additional data atoms as well.
static constexpr TagType tagType
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.
bool updateOnly
Whether only existing fields should be updated but no new extended field should be created.
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