|
Tag Parser 12.5.1
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The Mp4TagField class is used by Mp4Tag to store the fields. More...
#include <mp4tagfield.h>
Classes | |
| struct | AdditionalData |
Public Member Functions | |
| Mp4TagField () | |
| Constructs a new Mp4TagField. | |
| Mp4TagField (IdentifierType id, const TagValue &value) | |
| Constructs a new Mp4TagField with the specified id and value. | |
| Mp4TagField (std::string_view mean, std::string_view name, const TagValue &value) | |
| Constructs a new Mp4TagField with the specified mean, name and value. | |
| void | reparse (Mp4Atom &ilstChild, Diagnostics &diag) |
| Parses field information from the specified Mp4Atom. | |
| Mp4TagFieldMaker | prepareMaking (Diagnostics &diag) |
| Prepares making. | |
| void | make (std::ostream &stream, Diagnostics &diag) |
| Saves the field to the specified stream. | |
| const std::vector< AdditionalData > & | additionalData () const |
| Returns additional data (and the corresponding raw data type, country and language). | |
| std::vector< AdditionalData > & | additionalData () |
| Returns additional data (and the corresponding raw data type, country and language). | |
| bool | isAdditionalTypeInfoUsed () const |
| Returns whether the additional type info is used. | |
| const std::string & | name () const |
| Returns the "name" for "extended" fields. | |
| void | setName (const std::string &name) |
| Sets the "name" for the "extended" field. | |
| const std::string & | mean () const |
| Returns the "mean" for "extended" fields. | |
| void | setMean (const std::string &mean) |
| Sets the "mean" for the "extended" field. | |
| std::uint32_t | parsedRawDataType () const |
| Returns the raw data type which has been determined when parsing. | |
| std::uint16_t | countryIndicator () const |
| Returns the country indicator. | |
| std::uint16_t | languageIndicator () const |
| Returns the language indicator. | |
| bool | supportsNestedFields () const |
| Returns whether nested fields are supported. | |
| std::vector< std::uint32_t > | expectedRawDataTypes () const |
| Returns the expected raw data types for the ID of the field. | |
| std::uint32_t | appropriateRawDataType () const |
| Returns an appropriate raw data type. | |
| std::uint32_t | appropriateRawDataTypeForValue (const TagValue &value) const |
| Returns an appropriate raw data type. | |
| Public Member Functions inherited from TagParser::TagField< Mp4TagField > | |
| TagField () | |
| Constructs an empty TagField. | |
| ~TagField () | |
| Destroys the TagField. | |
| IdentifierType & | id () |
| Returns the id of the current TagField. | |
| std::string | idToString () const |
| Returns the id of the current TagField as string. | |
| void | setId (const IdentifierType &id) |
| Sets the id of the current Tag Field. | |
| void | clearId () |
| Clears the id of the current TagField. | |
| TagValue & | value () |
| Returns the value of the current TagField. | |
| void | setValue (const TagValue &value) |
| Sets the value of the current TagField. | |
| void | clearValue () |
| Clears the value of the current TagField. | |
| const TypeInfoType & | typeInfo () const |
| Returns the type info of the current TagField. | |
| void | setTypeInfo (const TypeInfoType &typeInfo) |
| Sets the type info of the current TagField. | |
| void | removeTypeInfo () |
| Removes the type info from the current TagField. | |
| bool | isTypeInfoAssigned () const |
| Returns an indication whether a type info is assigned. | |
| bool | isDefault () const |
| Returns an indication whether the field is labeled as default. | |
| void | setDefault (bool isDefault) |
| Sets whether the field is labeled as default. | |
| void | clear () |
| Clears id, value, type info, sets default flag to false and resets further implementation specific values. | |
| bool | isAdditionalTypeInfoUsed () const |
| Returns an indication whether the additional type info is used. | |
| const std::vector< Mp4TagField > & | nestedFields () const |
| Returns the nested fields. | |
| bool | supportsNestedFields () const |
| Returns whether nested fields are supported by the implementation. | |
Static Public Member Functions | |
| static IdentifierType | fieldIdFromString (std::string_view idString) |
| Converts the specified ID string representation to an actual ID. | |
| static std::string | fieldIdToString (IdentifierType id) |
| Returns the string representation for the specified id. | |
Friends | |
| class | TagField< Mp4TagField > |
Additional Inherited Members | |
| Public Types inherited from TagParser::TagField< Mp4TagField > | |
| using | IdentifierType |
| using | TypeInfoType |
| Protected Member Functions inherited from TagParser::TagField< Mp4TagField > | |
| void | internallyClearValue () |
| Clears the assigned value; called via clearValue() and clear(). | |
| void | internallyClearFurtherData () |
| Clears further data; called via clear(). | |
The Mp4TagField class is used by Mp4Tag to store the fields.
Definition at line 112 of file mp4tagfield.h.
| TagParser::Mp4TagField::Mp4TagField | ( | ) |
Constructs a new Mp4TagField.
Definition at line 29 of file mp4tagfield.cpp.
| TagParser::Mp4TagField::Mp4TagField | ( | IdentifierType | id, |
| const TagValue & | value ) |
Constructs a new Mp4TagField with the specified id and value.
Definition at line 39 of file mp4tagfield.cpp.
| TagParser::Mp4TagField::Mp4TagField | ( | std::string_view | mean, |
| std::string_view | name, | ||
| const TagValue & | value ) |
Constructs a new Mp4TagField with the specified mean, name and value.
The ID will be set to Mp4TagAtomIds::Extended indicating an tag field using the reverse DNS style.
Definition at line 56 of file mp4tagfield.cpp.
|
inline |
Returns additional data (and the corresponding raw data type, country and language).
Definition at line 173 of file mp4tagfield.h.
|
inline |
Returns additional data (and the corresponding raw data type, country and language).
Definition at line 164 of file mp4tagfield.h.
| std::uint32_t TagParser::Mp4TagField::appropriateRawDataType | ( | ) | const |
Returns an appropriate raw data type.
Definition at line 408 of file mp4tagfield.cpp.
| std::uint32_t TagParser::Mp4TagField::appropriateRawDataTypeForValue | ( | const TagValue & | value | ) | const |
Returns an appropriate raw data type.
| Throws | TagParser::Failure if an appropriate raw data type can not be determined. It is possible to determine the raw data type for all supported tag field IDs (those where a conversion to KnownField via Mp4Tag exists). |
Definition at line 429 of file mp4tagfield.cpp.
|
inline |
Returns the country indicator.
Definition at line 229 of file mp4tagfield.h.
| std::vector< std::uint32_t > TagParser::Mp4TagField::expectedRawDataTypes | ( | ) | const |
Returns the expected raw data types for the ID of the field.
Definition at line 348 of file mp4tagfield.cpp.
|
inlinestatic |
Converts the specified ID string representation to an actual ID.
Definition at line 255 of file mp4tagfield.h.
|
inlinestatic |
Returns the string representation for the specified id.
Definition at line 271 of file mp4tagfield.h.
|
inline |
Returns whether the additional type info is used.
Definition at line 181 of file mp4tagfield.h.
|
inline |
Returns the language indicator.
Definition at line 237 of file mp4tagfield.h.
| void TagParser::Mp4TagField::make | ( | std::ostream & | stream, |
| Diagnostics & | diag ) |
Saves the field to the specified stream.
| Throws | std::ios_base::failure when an IO error occurs. |
| Throws | TagParser::Failure or a derived exception when a making error occurs. |
Definition at line 340 of file mp4tagfield.cpp.
|
inline |
Returns the "mean" for "extended" fields.
Definition at line 205 of file mp4tagfield.h.
|
inline |
Returns the "name" for "extended" fields.
Definition at line 189 of file mp4tagfield.h.
|
inline |
Returns the raw data type which has been determined when parsing.
Definition at line 221 of file mp4tagfield.h.
| Mp4TagFieldMaker TagParser::Mp4TagField::prepareMaking | ( | Diagnostics & | diag | ) |
Prepares making.
| Throws | TagParser::Failure or a derived exception when a making error occurs. |
This method might be useful when it is necessary to know the size of the field before making it.
Definition at line 328 of file mp4tagfield.cpp.
| void TagParser::Mp4TagField::reparse | ( | Mp4Atom & | ilstChild, |
| Diagnostics & | diag ) |
Parses field information from the specified Mp4Atom.
The specified atom should be a child atom of the "ilst" atom. Each child of the "ilst" atom holds one field of the Mp4Tag.
| Throws | std::ios_base::failure when an IO error occurs. |
| Throws | TagParser::Failure or a derived exception when a parsing error occurs. |
Definition at line 104 of file mp4tagfield.cpp.
|
inline |
Sets the "mean" for the "extended" field.
Definition at line 213 of file mp4tagfield.h.
|
inline |
Sets the "name" for the "extended" field.
Definition at line 197 of file mp4tagfield.h.
|
inline |
Returns whether nested fields are supported.
Definition at line 245 of file mp4tagfield.h.
|
friend |
Definition at line 93 of file mp4tagfield.h.