|
static MP4::AtomDataList | parseData2 (const MP4::Atom *atom, const ByteVector &data, int expectedFlags=-1, bool freeForm=false) |
|
static ByteVectorList | parseData (const MP4::Atom *atom, const ByteVector &bytes, int expectedFlags=-1, bool freeForm=false) |
|
static std::pair< String, Item > | parseText (const MP4::Atom *atom, const ByteVector &bytes, int expectedFlags=1) |
|
static std::pair< String, Item > | parseFreeForm (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseInt (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseByte (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseTextOrInt (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseUInt (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseLongLong (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseGnre (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseIntPair (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseBool (const MP4::Atom *atom, const ByteVector &bytes) |
|
static std::pair< String, Item > | parseCovr (const MP4::Atom *atom, const ByteVector &data) |
|
static ByteVector | renderAtom (const ByteVector &name, const ByteVector &data) |
|
static ByteVector | renderData (const ByteVector &name, int flags, const ByteVectorList &data) |
|
static ByteVector | renderText (const ByteVector &name, const MP4::Item &item, int flags=TypeUTF8) |
|
static ByteVector | renderFreeForm (const String &name, const MP4::Item &item) |
|
static ByteVector | renderBool (const ByteVector &name, const MP4::Item &item) |
|
static ByteVector | renderInt (const ByteVector &name, const MP4::Item &item) |
|
static ByteVector | renderTextOrInt (const ByteVector &name, const MP4::Item &item) |
|
static ByteVector | renderByte (const ByteVector &name, const MP4::Item &item) |
|
static ByteVector | renderUInt (const ByteVector &name, const MP4::Item &item) |
|
static ByteVector | renderLongLong (const ByteVector &name, const MP4::Item &item) |
|
static ByteVector | renderIntPair (const ByteVector &name, const MP4::Item &item) |
|
static ByteVector | renderIntPairNoTrailing (const ByteVector &name, const MP4::Item &item) |
|
static ByteVector | renderCovr (const ByteVector &name, const MP4::Item &item) |
|
A factory for creating MP4 items during parsing.
This factory abstracts away the parsing and rendering between atom data and MP4 items.
Reimplementing this factory is the key to adding support for atom types not directly supported by TagLib to your application. To do so you would subclass this factory and reimplement nameHandlerMap() to add support for new atoms. If the new atoms do not have the same behavior as other supported atoms, it may be necessary to reimplement parseItem() and renderItem(). Then by setting your factory in the MP4::Tag constructor you can implement behavior that will allow for new atom types to be used.
A custom item factory adding support for a "tsti" integer atom and a "tstt" text atom can be implemented like this:
protected:
{
return MP4::ItemFactory::nameHandlerMap()
.
insert(
"tsti", ItemHandlerType::Int)
.
insert(
"tstt", ItemHandlerType::Text);
}
};
A generic, implicitly shared list.
Definition tlist.h:54
Iterator insert(Iterator it, const T &item)
A factory for creating MP4 items during parsing.
Definition mp4itemfactory.h:70
A generic, implicitly shared map.
Definition tmap.h:45
Map< Key, T > & insert(const Key &key, const T &value)
If the custom item shall also be accessible via a property, namePropertyMap() can be overridden in the same way.