Tag Parser: mp4/mp4tag.cpp Source File

Tag Parser 12.5.3 C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags

Loading...
Searching...
No Matches
mp4tag.cpp
Go to the documentation of this file.
1#include "./mp4tag.h"
2#include "./mp4atom.h"
3#include "./mp4container.h"
4#include "./mp4ids.h"
5
6#include "../exceptions.h"
7
8#include <c++utilities/conversion/stringconversion.h>
9#include <c++utilities/io/binarywriter.h>
10
11using namespace std;
12using namespace CppUtilities;
13
14namespace TagParser {
15
20
25 Mp4ExtendedFieldId::Mp4ExtendedFieldId(KnownField field)
26{
27 switch (field) {
28 case KnownField::EncoderSettings:
29 mean = Mp4TagExtendedMeanIds::iTunes;
30 name = Mp4TagExtendedNameIds::cdec;
31 updateOnly = false;
32 break;
33 case KnownField::RecordLabel:
34 mean = Mp4TagExtendedMeanIds::iTunes;
35 name = Mp4TagExtendedNameIds::label;
36 updateOnly = true; // set record label via extended field only if extended field is already present
37 break;
38 default:;
39 }
40}
41
46
47 bool Mp4Tag::canEncodingBeUsed(TagTextEncoding encoding) const
48{
49 switch (encoding) {
50 case TagTextEncoding::Utf8:
51 return true;
52 case TagTextEncoding::Utf16BigEndian:
53 return true;
54 default:
55 return false;
56 }
57}
58
59 const TagValue &Mp4Tag::value(KnownField field) const
60{
61 switch (field) {
62 case KnownField::Genre: {
63 const TagValue &value = FieldMapBasedTag<Mp4Tag>::value(Mp4TagAtomIds::Genre);
64 if (!value.isEmpty()) {
65 return value;
66 } else {
67 return FieldMapBasedTag<Mp4Tag>::value(Mp4TagAtomIds::PreDefinedGenre);
68 }
69 }
70 case KnownField::EncoderSettings:
71 return this->value(Mp4TagExtendedMeanIds::iTunes, Mp4TagExtendedNameIds::cdec);
72 case KnownField::RecordLabel: {
73 const TagValue &value = FieldMapBasedTag<Mp4Tag>::value(Mp4TagAtomIds::RecordLabel);
74 if (!value.isEmpty()) {
75 return value;
76 } else {
77 return this->value(Mp4TagExtendedMeanIds::iTunes, Mp4TagExtendedNameIds::label);
78 }
79 }
80 default:
81 return FieldMapBasedTag<Mp4Tag>::value(field);
82 }
83}
84
85std::vector<const TagValue *> Mp4Tag::values(KnownField field) const
86{
87 auto values = FieldMapBasedTag<Mp4Tag>::values(field);
88 if (const auto extendedId = Mp4ExtendedFieldId(field)) {
89 auto range = fields().equal_range(Mp4TagAtomIds::Extended);
90 for (auto i = range.first; i != range.second; ++i) {
91 const auto &extendedField = i->second;
92 if (extendedId.matches(extendedField)) {
93 values.emplace_back(&extendedField.value());
94 for (const auto &additionalData : extendedField.additionalData()) {
95 values.emplace_back(&additionalData.value);
96 }
97 }
98 }
99 }
100 return values;
101}
102
108 const TagValue &Mp4Tag::value(std::string_view mean, std::string_view name) const
109{
110 auto range = fields().equal_range(Mp4TagAtomIds::Extended);
111 for (auto i = range.first; i != range.second; ++i) {
112 if (i->second.mean() == mean && i->second.name() == name) {
113 return i->second.value();
114 }
115 }
116 return TagValue::empty();
117}
118
119 Mp4Tag::IdentifierType Mp4Tag::internallyGetFieldId(KnownField field) const
120{
121 using namespace Mp4TagAtomIds;
122 switch (field) {
123 case KnownField::Album:
124 return Album;
125 case KnownField::Artist:
126 return Artist;
127 case KnownField::Comment:
128 return Comment;
129 case KnownField::RecordDate:
130 return Year;
131 case KnownField::Title:
132 return Title;
133 case KnownField::Genre:
134 return Genre;
135 case KnownField::TrackPosition:
136 return TrackPosition;
137 case KnownField::DiskPosition:
138 return DiskPosition;
139 case KnownField::Composer:
140 return Composer;
141 case KnownField::Encoder:
142 return Encoder;
143 case KnownField::EncodedBy:
144 return EncodedBy;
145 case KnownField::Bpm:
146 return Bpm;
147 case KnownField::Cover:
148 return Cover;
149 case KnownField::Grouping:
150 return Grouping;
151 case KnownField::Description:
152 return Description;
153 case KnownField::Lyrics:
154 return Lyrics;
155 case KnownField::RecordLabel:
156 return RecordLabel;
157 case KnownField::Performers:
158 return Performers;
159 case KnownField::Lyricist:
160 return Lyricist;
161 case KnownField::AlbumArtist:
162 return AlbumArtist;
163 case KnownField::Copyright:
164 return Copyright;
165 case KnownField::Conductor:
166 return Conductor;
167 case KnownField::Director:
168 return Director;
169 case KnownField::Publisher:
170 return Publisher;
171 case KnownField::SoundEngineer:
172 return SoundEngineer;
173 case KnownField::Producer:
174 return Producer;
175 case KnownField::ExecutiveProducer:
176 return ExecutiveProducer;
177 case KnownField::ArtDirector:
178 return ArtDirector;
179 case KnownField::Arranger:
180 return Arranger;
181 case KnownField::StoreDescription:
182 return StoreDescription;
183 case KnownField::Synopsis:
184 return LongDescription;
185 case KnownField::MediaType:
186 return Mp4TagAtomIds::MediaType;
187 case KnownField::ContentRating:
188 return Rating;
189 default:
190 return 0;
191 }
192 // do not forget to extend Mp4Tag::internallyGetKnownField() and Mp4TagField::appropriateRawDataType() as well
193}
194
195 KnownField Mp4Tag::internallyGetKnownField(const IdentifierType &id) const
196{
197 using namespace Mp4TagAtomIds;
198 switch (id) {
199 case Album:
200 return KnownField::Album;
201 case Artist:
202 return KnownField::Artist;
203 case Comment:
204 return KnownField::Comment;
205 case Year:
206 return KnownField::RecordDate;
207 case Title:
208 return KnownField::Title;
209 case PreDefinedGenre:
210 case Genre:
211 return KnownField::Genre;
212 case TrackPosition:
213 return KnownField::TrackPosition;
214 case DiskPosition:
215 return KnownField::DiskPosition;
216 case Composer:
217 return KnownField::Composer;
218 case Encoder:
219 return KnownField::Encoder;
220 case EncodedBy:
221 return KnownField::EncodedBy;
222 case Bpm:
223 return KnownField::Bpm;
224 case Cover:
225 return KnownField::Cover;
226 case Grouping:
227 return KnownField::Grouping;
228 case Description:
229 return KnownField::Description;
230 case Lyrics:
231 return KnownField::Lyrics;
232 case RecordLabel:
233 return KnownField::RecordLabel;
234 case Performers:
235 return KnownField::Performers;
236 case Lyricist:
237 return KnownField::Lyricist;
238 case AlbumArtist:
239 return KnownField::AlbumArtist;
240 case Copyright:
241 return KnownField::Copyright;
242 case Conductor:
243 return KnownField::Conductor;
244 case Director:
245 return KnownField::Director;
246 case Publisher:
247 return KnownField::Publisher;
248 case SoundEngineer:
249 return KnownField::SoundEngineer;
250 case Producer:
251 return KnownField::Producer;
252 case ExecutiveProducer:
253 return KnownField::ExecutiveProducer;
254 case ArtDirector:
255 return KnownField::ArtDirector;
256 case Arranger:
257 return KnownField::Arranger;
258 case StoreDescription:
259 return KnownField::StoreDescription;
260 case LongDescription:
261 return KnownField::Synopsis;
262 case Mp4TagAtomIds::MediaType:
263 return KnownField::MediaType;
264 case Rating:
265 return KnownField::ContentRating;
266 default:
267 return KnownField::Invalid;
268 }
269 // do not forget to extend Mp4Tag::internallyGetFieldId() and Mp4TagField::appropriateRawDataType() as well
270}
271
275 void Mp4Tag::internallyGetValuesFromField(const Mp4Tag::FieldType &field, std::vector<const TagValue *> &values) const
276{
277 if (!field.value().isEmpty()) {
278 values.emplace_back(&field.value());
279 }
280 for (const auto &value : field.additionalData()) {
281 if (!value.value.isEmpty()) {
282 values.emplace_back(&value.value);
283 }
284 }
285}
286
287 bool Mp4Tag::setValue(KnownField field, const TagValue &value)
288{
289 switch (field) {
290 case KnownField::Genre:
291 switch (value.type()) {
292 case TagDataType::StandardGenreIndex:
293 fields().erase(Mp4TagAtomIds::Genre);
294 return FieldMapBasedTag<Mp4Tag>::setValue(Mp4TagAtomIds::PreDefinedGenre, value);
295 default:
296 fields().erase(Mp4TagAtomIds::PreDefinedGenre);
297 return FieldMapBasedTag<Mp4Tag>::setValue(Mp4TagAtomIds::Genre, value);
298 }
299 case KnownField::EncoderSettings:
300 return setValue(Mp4TagExtendedMeanIds::iTunes, Mp4TagExtendedNameIds::cdec, value);
301 case KnownField::RecordLabel:
302 if (!this->value(Mp4TagExtendedMeanIds::iTunes, Mp4TagExtendedNameIds::label).isEmpty()) {
303 setValue(Mp4TagExtendedMeanIds::iTunes, Mp4TagExtendedNameIds::label, value);
304 }
305 [[fallthrough]];
306 default:
307 return FieldMapBasedTag<Mp4Tag>::setValue(field, value);
308 }
309}
310
311 bool Mp4Tag::setValues(KnownField field, const std::vector<TagValue> &values)
312{
313 if (const auto extendedId = Mp4ExtendedFieldId(field)) {
314 auto valuesIterator = values.cbegin();
315 auto range = fields().equal_range(Mp4TagAtomIds::Extended);
316 for (; valuesIterator != values.cend() && range.first != range.second;) {
317 if (!valuesIterator->isEmpty()) {
318 auto &extendedField = range.first->second;
319 if (extendedId.matches(extendedField) && (!extendedId.updateOnly || !extendedField.value().isEmpty())) {
320 extendedField.clearValue();
321 extendedField.setValue(*valuesIterator);
322 // note: Not sure which extended tag fields support multiple data atoms and which don't. Let's simply use
323 // only one data atom per extended field here and get rid of any possibly assigned additional data
324 // atoms.
325 ++valuesIterator;
326 }
327 ++range.first;
328 } else {
329 ++valuesIterator;
330 }
331 }
332 for (; valuesIterator != values.cend(); ++valuesIterator) {
333 if (valuesIterator->isEmpty()) {
334 fields().emplace(std::piecewise_construct, std::forward_as_tuple(Mp4TagAtomIds::Extended),
335 std::forward_as_tuple(extendedId.mean, extendedId.name, *valuesIterator));
336 }
337 }
338 for (; range.first != range.second; ++range.first) {
339 range.first->second.clearValue();
340 }
341 }
342 return FieldMapBasedTag<Mp4Tag>::setValues(field, values);
343}
344
352 bool Mp4Tag::setValue(std::string_view mean, std::string_view name, const TagValue &value)
353{
354 auto range = fields().equal_range(Mp4TagAtomIds::Extended);
355 for (auto i = range.first; i != range.second; ++i) {
356 if (i->second.mean() == mean && i->second.name() == name) {
357 i->second.setValue(value);
358 return true;
359 }
360 }
361 fields().insert(make_pair(Mp4TagAtomIds::Extended, FieldType(mean, name, value)));
362 return true;
363}
364
365 bool Mp4Tag::hasField(KnownField field) const
366{
367 switch (field) {
368 case KnownField::Genre:
369 return FieldMapBasedTag<Mp4Tag>::hasField(Mp4TagAtomIds::PreDefinedGenre) || FieldMapBasedTag<Mp4Tag>::hasField(Mp4TagAtomIds::Genre);
370 default:
371 return FieldMapBasedTag<Mp4Tag>::hasField(field);
372 }
373}
374
382 void Mp4Tag::parse(Mp4Atom &metaAtom, Diagnostics &diag)
383{
384 static const string context("parsing MP4 tag");
385 m_size = metaAtom.totalSize();
386 istream &stream = metaAtom.container().stream();
387 BinaryReader &reader = metaAtom.container().reader();
388 if (metaAtom.totalSize() > numeric_limits<std::uint32_t>::max()) {
389 diag.emplace_back(DiagLevel::Critical, "Can't handle such big \"meta\" atoms.", context);
390 throw NotImplementedException();
391 }
392 Mp4Atom *subAtom = nullptr;
393 try {
394 metaAtom.childById(Mp4AtomIds::HandlerReference, diag);
395 } catch (const Failure &) {
396 diag.emplace_back(DiagLevel::Critical, "Unable to parse child atoms of meta atom (stores hdlr and ilst atoms).", context);
397 }
398 if (subAtom) {
399 stream.seekg(static_cast<streamoff>(subAtom->startOffset() + subAtom->headerSize()));
400 int versionByte = reader.readByte();
401 if (versionByte != 0) {
402 diag.emplace_back(DiagLevel::Warning, "Version is unknown.", context);
403 }
404 if (reader.readUInt24BE()) {
405 diag.emplace_back(DiagLevel::Warning, "Flags (hdlr atom) aren't set to 0.", context);
406 }
407 if (reader.readInt32BE()) {
408 diag.emplace_back(DiagLevel::Warning, "Predefined 32-bit integer (hdlr atom) isn't set to 0.", context);
409 }
410 std::uint64_t handlerType = reader.readUInt64BE();
411 if (/*(((handlerType & 0xFFFFFFFF00000000) >> 32) != 0x6D647461) && */ (handlerType != 0x6d6469726170706c)) {
412 diag.emplace_back(DiagLevel::Warning, "Handler type (value in hdlr atom) is unknown. Trying to parse meta information anyhow.", context);
413 }
414 m_version = numberToString(versionByte);
415 } else {
416 m_version.clear();
417 }
418 try {
419 subAtom = metaAtom.childById(Mp4AtomIds::ItunesList, diag);
420 } catch (const Failure &) {
421 diag.emplace_back(DiagLevel::Critical, "Unable to parse child atoms of meta atom (stores hdlr and ilst atoms).", context);
422 }
423 if (!subAtom) {
424 diag.emplace_back(DiagLevel::Warning, "No ilst atom found (stores attached meta information).", context);
425 throw NoDataFoundException();
426 }
427 for (auto *child = subAtom->firstChild(); child; child = child->nextSibling()) {
428 Mp4TagField tagField;
429 try {
430 child->parse(diag);
431 tagField.reparse(*child, diag);
432 fields().emplace(child->id(), std::move(tagField));
433 } catch (const Failure &) {
434 }
435 }
436}
437
448 Mp4TagMaker Mp4Tag::prepareMaking(Diagnostics &diag)
449{
450 return Mp4TagMaker(*this, diag);
451}
452
459 void Mp4Tag::make(ostream &stream, Diagnostics &diag)
460{
461 prepareMaking(diag).make(stream, diag);
462}
463
470
475Mp4TagMaker::Mp4TagMaker(Mp4Tag &tag, Diagnostics &diag)
476 : m_tag(tag)
477 ,
478 // meta head, hdlr atom
479 m_metaSize(8 + 37)
480 ,
481 // ilst head
482 m_ilstSize(8)
483 ,
484 // ensure there only one genre atom is written (prefer genre as string)
485 m_omitPreDefinedGenre(m_tag.fields().count(m_tag.hasField(Mp4TagAtomIds::Genre)))
486{
487 m_maker.reserve(m_tag.fields().size());
488 for (auto &field : m_tag.fields()) {
489 if (!field.second.value().isEmpty() && (!m_omitPreDefinedGenre || field.first != Mp4TagAtomIds::PreDefinedGenre)) {
490 try {
491 m_ilstSize += m_maker.emplace_back(field.second.prepareMaking(diag)).requiredSize();
492 } catch (const Failure &) {
493 }
494 }
495 }
496 if (m_ilstSize != 8) {
497 m_metaSize += m_ilstSize;
498 }
499 if (m_metaSize >= numeric_limits<std::uint32_t>::max()) {
500 diag.emplace_back(DiagLevel::Critical, "Making such big tags is not implemented.", "making MP4 tag");
501 throw NotImplementedException();
502 }
503}
504
512 void Mp4TagMaker::make(ostream &stream, Diagnostics &diag)
513{
514 // write meta head
515 BinaryWriter writer(&stream);
516 writer.writeUInt32BE(static_cast<std::uint32_t>(m_metaSize));
517 writer.writeUInt32BE(Mp4AtomIds::Meta);
518 // write hdlr atom
519 static const std::uint8_t hdlrData[37] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x68, 0x64, 0x6C, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,
520 0x00, 0x00, 0x00, 0x6D, 0x64, 0x69, 0x72, 0x61, 0x70, 0x70, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
521 stream.write(reinterpret_cast<const char *>(hdlrData), sizeof(hdlrData));
522 if (m_ilstSize != 8) {
523 // write ilst head
524 writer.writeUInt32BE(static_cast<std::uint32_t>(m_ilstSize));
525 writer.writeUInt32BE(Mp4AtomIds::ItunesList);
526 // write fields
527 for (auto &maker : m_maker) {
528 maker.make(stream);
529 }
530 } else {
531 // no fields to be written -> no ilst to be written
532 diag.emplace_back(DiagLevel::Warning, "Tag is empty.", "making MP4 tag");
533 }
534}
535
536} // namespace TagParser
TagParser::Diagnostics
The Diagnostics class is a container for DiagMessage.
Definition diagnostics.h:156
TagParser::Failure
The class inherits from std::exception and serves as base class for exceptions thrown by the elements...
Definition exceptions.h:11
TagParser::FieldMapBasedTag::setValue
bool setValue(const IdentifierType &id, const TagValue &value)
Assigns the given value to the field with the specified id.
Definition fieldbasedtag.h:253
TagParser::FieldMapBasedTag::hasField
bool hasField(KnownField field) const
Returns an indication whether the specified field is present.
Definition fieldbasedtag.h:291
TagParser::FieldMapBasedTag< Mp4Tag >::IdentifierType
typename FieldMapBasedTagTraits< Mp4Tag >::FieldType::IdentifierType IdentifierType
Definition fieldbasedtag.h:35
TagParser::FieldMapBasedTag::value
const TagValue & value(const IdentifierType &id) const
Returns the value of the field with the specified id.
Definition fieldbasedtag.h:161
TagParser::FieldMapBasedTag< Mp4Tag >::fields
const std::multimap< IdentifierType, FieldType, Compare > & fields() const
Definition fieldbasedtag.h:327
TagParser::FieldMapBasedTag< Mp4Tag >::FieldType
typename FieldMapBasedTagTraits< Mp4Tag >::FieldType FieldType
Definition fieldbasedtag.h:34
TagParser::FieldMapBasedTag::values
std::vector< const TagValue * > values(const IdentifierType &id) const
Returns the values of the field with the specified id.
Definition fieldbasedtag.h:175
TagParser::FieldMapBasedTag::setValues
bool setValues(const IdentifierType &id, const std::vector< TagValue > &values)
Assigns the given values to the field with the specified id.
Definition fieldbasedtag.h:265
TagParser::GenericFileElement::startOffset
std::uint64_t startOffset() const
Returns the start offset in the related stream.
Definition genericfileelement.h:266
TagParser::GenericFileElement::headerSize
std::uint32_t headerSize() const
Returns the header size of the element in byte.
Definition genericfileelement.h:309
TagParser::GenericFileElement::childById
ImplementationType * childById(const IdentifierType &id, Diagnostics &diag)
Returns the first child with the specified id.
Definition genericfileelement.h:610
TagParser::GenericFileElement::nextSibling
ImplementationType * nextSibling()
Returns the next sibling of the element.
Definition genericfileelement.h:439
TagParser::GenericFileElement::firstChild
ImplementationType * firstChild()
Returns the first child of the element.
Definition genericfileelement.h:465
TagParser::GenericFileElement::totalSize
std::uint64_t totalSize() const
Returns the total size of the element.
Definition genericfileelement.h:348
TagParser::GenericFileElement::container
ContainerType & container()
Returns the related container.
Definition genericfileelement.h:225
TagParser::Mp4Atom
The Mp4Atom class helps to parse MP4 files.
Definition mp4atom.h:38
TagParser::Mp4TagField
The Mp4TagField class is used by Mp4Tag to store the fields.
Definition mp4tagfield.h:112
TagParser::Mp4TagField::reparse
void reparse(Mp4Atom &ilstChild, Diagnostics &diag)
Parses field information from the specified Mp4Atom.
Definition mp4tagfield.cpp:104
TagParser::Mp4TagMaker
The Mp4TagMaker class helps writing MP4 tags.
Definition mp4tag.h:54
TagParser::Mp4TagMaker::make
void make(std::ostream &stream, Diagnostics &diag)
Saves the tag (specified when constructing the object) to the specified stream.
Definition mp4tag.cpp:512
TagParser::Mp4Tag
Implementation of TagParser::Tag for the MP4 container.
Definition mp4tag.h:97
TagParser::Mp4Tag::values
std::vector< const TagValue * > values(KnownField field) const override
Returns the values of the specified field.
Definition mp4tag.cpp:85
TagParser::Mp4Tag::value
const TagValue & value(KnownField value) const override
Returns the value of the specified field.
Definition mp4tag.cpp:59
TagParser::Mp4Tag::hasField
bool hasField(KnownField value) const override
Returns an indication whether the specified field is present.
Definition mp4tag.cpp:365
TagParser::Mp4Tag::setValue
bool setValue(KnownField field, const TagValue &value) override
Assigns the given value to the specified field.
Definition mp4tag.cpp:287
TagParser::Mp4Tag::internallyGetFieldId
IdentifierType internallyGetFieldId(KnownField field) const
Definition mp4tag.cpp:119
TagParser::Mp4Tag::prepareMaking
Mp4TagMaker prepareMaking(Diagnostics &diag)
Prepares making.
Definition mp4tag.cpp:448
TagParser::Mp4Tag::setValues
bool setValues(KnownField field, const std::vector< TagValue > &values) override
Assigns the given values to the specified field.
Definition mp4tag.cpp:311
TagParser::Mp4Tag::parse
void parse(Mp4Atom &metaAtom, Diagnostics &diag)
Parses tag information from the specified metaAtom.
Definition mp4tag.cpp:382
TagParser::Mp4Tag::make
void make(std::ostream &stream, Diagnostics &diag)
Writes tag information to the specified stream.
Definition mp4tag.cpp:459
TagParser::Mp4Tag::canEncodingBeUsed
bool canEncodingBeUsed(TagTextEncoding encoding) const override
Returns an indication whether the specified encoding can be used to provide string values for the tag...
Definition mp4tag.cpp:47
TagParser::Mp4Tag::internallyGetKnownField
KnownField internallyGetKnownField(const IdentifierType &id) const
Definition mp4tag.cpp:195
TagParser::Mp4Tag::internallyGetValuesFromField
void internallyGetValuesFromField(const FieldType &field, std::vector< const TagValue * > &values) const
Adds values from additional data atoms as well.
Definition mp4tag.cpp:275
TagParser::NoDataFoundException
The exception that is thrown when the data to be parsed holds no parsable information (e....
Definition exceptions.h:18
TagParser::NotImplementedException
This exception is thrown when the an operation is invoked that has not been implemented yet.
Definition exceptions.h:60
TagParser::TagValue
The TagValue class wraps values of different types.
Definition tagvalue.h:147
TagParser::TagValue::empty
static const TagValue & empty()
Returns a default-constructed TagValue where TagValue::isNull() and TagValue::isEmpty() both return t...
Definition tagvalue.cpp:1432
TagParser::Tag::m_version
std::string m_version
Definition tag.h:216
TagParser::Tag::m_size
std::uint64_t m_size
Definition tag.h:217
exceptions.h
mp4atom.h
mp4container.h
mp4ids.h
mp4tag.h
CppUtilities
Definition abstractcontainer.h:16
TagParser::Mp4AtomIds::ItunesList
@ ItunesList
Definition mp4ids.h:32
TagParser::Mp4AtomIds::Meta
@ Meta
Definition mp4ids.h:38
TagParser::Mp4AtomIds::HandlerReference
@ HandlerReference
Definition mp4ids.h:30
TagParser::Mp4TagAtomIds
Encapsulates IDs of MP4 atoms holding tag information.
Definition mp4ids.h:85
TagParser::Mp4TagAtomIds::Genre
@ Genre
Definition mp4ids.h:103
TagParser::Mp4TagAtomIds::MediaType
@ MediaType
Definition mp4ids.h:108
TagParser::Mp4TagAtomIds::Extended
@ Extended
Definition mp4ids.h:101
TagParser::Mp4TagAtomIds::RecordLabel
@ RecordLabel
Definition mp4ids.h:116
TagParser::Mp4TagAtomIds::PreDefinedGenre
@ PreDefinedGenre
Definition mp4ids.h:112
TagParser::Mp4TagExtendedMeanIds::iTunes
std::string_view iTunes
Definition mp4ids.cpp:28
TagParser::Mp4TagExtendedNameIds::cdec
std::string_view cdec
Definition mp4ids.cpp:35
TagParser::Mp4TagExtendedNameIds::label
std::string_view label
Definition mp4ids.cpp:36
TagParser
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
TagParser::KnownField
KnownField
Specifies the field.
Definition tag.h:37
TagParser::KnownField::StoreDescription
@ StoreDescription
Definition tag.h:138
TagParser::KnownField::Grouping
@ Grouping
Definition tag.h:59
TagParser::KnownField::ContentRating
@ ContentRating
Definition tag.h:141
TagParser::KnownField::Comment
@ Comment
Definition tag.h:43
TagParser::KnownField::Lyricist
@ Lyricist
Definition tag.h:46
TagParser::KnownField::EncodedBy
@ EncodedBy
Definition tag.h:90
TagParser::KnownField::Synopsis
@ Synopsis
Definition tag.h:102
TagParser::KnownField::ArtDirector
@ ArtDirector
Definition tag.h:76
TagParser::KnownField::Performers
@ Performers
Definition tag.h:53
TagParser::KnownField::TrackPosition
@ TrackPosition
Definition tag.h:47
TagParser::KnownField::Publisher
@ Publisher
Definition tag.h:95
TagParser::KnownField::Conductor
@ Conductor
Definition tag.h:71
TagParser::KnownField::Artist
@ Artist
Definition tag.h:41
TagParser::KnownField::EncoderSettings
@ EncoderSettings
Definition tag.h:56
TagParser::KnownField::Invalid
@ Invalid
Definition tag.h:38
TagParser::KnownField::Copyright
@ Copyright
Definition tag.h:133
TagParser::KnownField::Director
@ Director
Definition tag.h:72
TagParser::KnownField::SoundEngineer
@ SoundEngineer
Definition tag.h:75
TagParser::KnownField::Encoder
@ Encoder
Definition tag.h:51
TagParser::KnownField::Genre
@ Genre
Definition tag.h:42
TagParser::KnownField::AlbumArtist
@ AlbumArtist
Definition tag.h:66
TagParser::KnownField::Lyrics
@ Lyrics
Definition tag.h:57
TagParser::KnownField::Bpm
@ Bpm
Definition tag.h:44
TagParser::KnownField::Producer
@ Producer
Definition tag.h:85
TagParser::KnownField::Arranger
@ Arranger
Definition tag.h:70
TagParser::KnownField::Description
@ Description
Definition tag.h:64
TagParser::KnownField::Title
@ Title
Definition tag.h:39
TagParser::KnownField::MediaType
@ MediaType
Definition tag.h:139
TagParser::KnownField::Composer
@ Composer
Definition tag.h:62
TagParser::KnownField::Album
@ Album
Definition tag.h:40
TagParser::KnownField::Cover
@ Cover
Definition tag.h:61
TagParser::KnownField::RecordDate
@ RecordDate
Definition tag.h:52
TagParser::KnownField::Rating
@ Rating
Definition tag.h:63
TagParser::KnownField::ExecutiveProducer
@ ExecutiveProducer
Definition tag.h:87
TagParser::KnownField::DiskPosition
@ DiskPosition
Definition tag.h:48
TagParser::KnownField::RecordLabel
@ RecordLabel
Definition tag.h:60
TagParser::TagTextEncoding
TagTextEncoding
Specifies the text encoding.
Definition tagvalue.h:29
TagParser::TagTextEncoding::Utf16BigEndian
@ Utf16BigEndian
Definition tagvalue.h:33
TagParser::TagTextEncoding::Utf8
@ Utf8
Definition tagvalue.h:31
TagParser::DiagLevel::Warning
@ Warning
Definition diagnostics.h:20
TagParser::DiagLevel::Critical
@ Critical
Definition diagnostics.h:21
TagParser::TagDataType::StandardGenreIndex
@ StandardGenreIndex
Definition tagvalue.h:123
TagParser::Mp4ExtendedFieldId
The Mp4ExtendedFieldId specifies parameter for an extended field denoted via Mp4TagAtomIds::Extended.
Definition mp4tag.h:13
TagParser::Mp4ExtendedFieldId::updateOnly
bool updateOnly
Whether only existing fields should be updated but no new extended field should be created.
Definition mp4tag.h:25
TagParser::Mp4ExtendedFieldId::mean
std::string_view mean
mean parameter, usually Mp4TagExtendedMeanIds::iTunes
Definition mp4tag.h:21
TagParser::Mp4ExtendedFieldId::Mp4ExtendedFieldId
Mp4ExtendedFieldId(std::string_view mean, std::string_view name, bool updateOnly=false)
Constructs a new instance with the specified parameter.
Definition mp4tag.h:31
TagParser::Mp4ExtendedFieldId::name
std::string_view name
name parameter
Definition mp4tag.h:23