Tag Parser
6.5.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
|
The TagTarget class specifies the target of a tag. More...
#include <tagtarget.h>
Public Types | |
typedef uint64 | IdType |
typedef std::vector< IdType > | IdContainerType |
Public Member Functions | |
TagTarget (uint64 level=0, IdContainerType tracks=IdContainerType(), IdContainerType chapters=IdContainerType(), IdContainerType editions=IdContainerType(), IdContainerType attachments=IdContainerType()) | |
Constructs a new TagTarget with the specified level, track, chapter, edition and attachment. More... | |
uint64 | level () const |
Returns the level. More... | |
void | setLevel (uint64 level) |
Sets the level. More... | |
const std::string & | levelName () const |
Returns the level name. More... | |
void | setLevelName (const std::string &levelName) |
Sets the level name. More... | |
const IdContainerType & | tracks () const |
Returns the tracks. More... | |
IdContainerType & | tracks () |
Returns the tracks. More... | |
const IdContainerType & | chapters () const |
Returns the chapters. More... | |
IdContainerType & | chapters () |
Returns the chapters. More... | |
const IdContainerType & | editions () const |
Returns the editions. More... | |
IdContainerType & | editions () |
Returns the editions. More... | |
const IdContainerType & | attachments () const |
Returns the attachments. More... | |
IdContainerType & | attachments () |
Returns the attachments. More... | |
bool | isEmpty () const |
Returns an indication whether the target is empty. More... | |
void | clear () |
Clears the TagTarget. More... | |
std::string | toString (const std::function< TagTargetLevel(uint64)> &tagTargetMapping) const |
Returns the string representation of the current instance. More... | |
std::string | toString (TagTargetLevel tagTargetLevel) const |
Returns the string representation of the current instance. More... | |
bool | operator== (const TagTarget &other) const |
Returns whether the tag targets are equal. More... | |
The TagTarget class specifies the target of a tag.
Tags might only target a specific track, chapter, ...
Specifying a target is currently only fully supported by Matroska.
Since Ogg saves tags at stream level, the stream can be specified by passing a TagTarget instance to OggContainer::createTag(). However, only the first track in the tracks() array is considered and any other values are just ignored.
In any other tag formats, the specified target is (currently) completely ignored.
Definition at line 31 of file tagtarget.h.
typedef std::vector<IdType> Media::TagTarget::IdContainerType |
Definition at line 35 of file tagtarget.h.
typedef uint64 Media::TagTarget::IdType |
Definition at line 34 of file tagtarget.h.
|
inline |
Constructs a new TagTarget with the specified level, track, chapter, edition and attachment.
Definition at line 70 of file tagtarget.h.
|
inline |
Returns the attachments.
Definition at line 161 of file tagtarget.h.
|
inline |
Returns the attachments.
Definition at line 169 of file tagtarget.h.
|
inline |
Returns the chapters.
Definition at line 129 of file tagtarget.h.
|
inline |
Returns the chapters.
Definition at line 137 of file tagtarget.h.
|
inline |
Clears the TagTarget.
Definition at line 190 of file tagtarget.h.
|
inline |
Returns the editions.
Definition at line 145 of file tagtarget.h.
|
inline |
Returns the editions.
Definition at line 153 of file tagtarget.h.
|
inline |
Returns an indication whether the target is empty.
Definition at line 177 of file tagtarget.h.
|
inline |
Returns the level.
Definition at line 81 of file tagtarget.h.
|
inline |
Returns the level name.
Definition at line 97 of file tagtarget.h.
|
inline |
Returns whether the tag targets are equal.
Definition at line 204 of file tagtarget.h.
|
inline |
Sets the level.
Definition at line 89 of file tagtarget.h.
|
inline |
Sets the level name.
Definition at line 105 of file tagtarget.h.
|
inline |
Returns the string representation of the current instance.
Definition at line 218 of file tagtarget.h.
string Media::TagTarget::toString | ( | TagTargetLevel | tagTargetLevel | ) | const |
Returns the string representation of the current instance.
Definition at line 60 of file tagtarget.cpp.
|
inline |
Returns the tracks.
Definition at line 113 of file tagtarget.h.
|
inline |
Returns the tracks.
Definition at line 121 of file tagtarget.h.