MythTV
master
|
Read and write metadata in MP4 container tags. More...
#include <metaiomp4.h>
Public Member Functions | |
MetaIOMP4 (void)=default | |
~MetaIOMP4 (void) override=default | |
bool | write (const QString &filename, MusicMetadata *mdata) override |
Writes all metadata back to a file. More... | |
MusicMetadata * | read (const QString &filename) override |
Reads MusicMetadata from a file. More... | |
![]() | |
MetaIO (void) | |
virtual | ~MetaIO (void)=default |
virtual bool | writeVolatileMetadata (const QString &filename, MusicMetadata *mdata) |
Writes rating and playcount back to a file. More... | |
virtual bool | supportsEmbeddedImages (void) |
Does the tag support embedded cover art. More... | |
virtual AlbumArtList | getAlbumArtList (const QString &filename) |
Reads the list of embedded images in the tag. More... | |
virtual bool | writeAlbumArt (const QString &filename, const AlbumArtImage *albumart) |
virtual bool | removeAlbumArt (const QString &filename, const AlbumArtImage *albumart) |
virtual bool | changeImageType (const QString &filename, const AlbumArtImage *albumart, ImageType newType) |
virtual QImage * | getAlbumArt (const QString &filename, ImageType type) |
void | readFromFilename (const QString &filename, QString &artist, QString &album, QString &title, QString &genre, int &tracknum) |
Reads MusicMetadata based on the folder/filename. More... | |
MusicMetadata * | readFromFilename (const QString &filename, bool blnLength=false) |
Reads MusicMetadata based on the folder/filename. More... | |
void | readFromFilename (MusicMetadata *metadata) |
Reads MusicMetadata based on the folder/filename. More... | |
virtual bool | TagExists (const QString &filename) |
Private Member Functions | |
std::chrono::milliseconds | getTrackLength (const QString &filename) override |
Find the length of the track (in milliseconds) More... | |
Static Private Member Functions | |
static QString | getFieldValue (AVFormatContext *context, const char *tagname) |
Retrieve the value of a named metadata field. More... | |
static void | metadataSanityCheck (QString *artist, QString *album, QString *title, QString *genre) |
Replace any empty strings in extracted metadata with sane defaults. More... | |
Additional Inherited Members | |
![]() | |
static MetaIO * | createTagger (const QString &filename) |
Finds an appropriate tagger for the given file. More... | |
static MusicMetadata * | readMetadata (const QString &filename) |
Read the metadata from filename directly. More... | |
static MusicMetadata * | getMetadata (const QString &filename) |
Get the metadata for filename . More... | |
![]() | |
static const QString | kValidFileExtensions |
![]() | |
void | saveTimeStamps (void) |
void | restoreTimeStamps (void) |
![]() | |
QString | m_filename |
QString | m_filenameFormat |
Read and write metadata in MP4 container tags.
Definition at line 16 of file metaiomp4.h.
|
default |
|
overridedefault |
|
overridevirtual |
Writes all metadata back to a file.
filename | The filename to write metadata to |
mdata | A pointer to a MusicMetadata object |
Implements MetaIO.
Definition at line 19 of file metaiomp4.cpp.
|
overridevirtual |
Reads MusicMetadata from a file.
filename | The filename to read metadata from. |
Implements MetaIO.
Definition at line 70 of file metaiomp4.cpp.
|
overrideprivatevirtual |
Find the length of the track (in milliseconds)
filename | The filename for which we want to find the length. |
Implements MetaIO.
Definition at line 169 of file metaiomp4.cpp.
|
staticprivate |
Retrieve the value of a named metadata field.
context | AVFormatContext of the file |
tagname | The name of the field |
Definition at line 151 of file metaiomp4.cpp.
Referenced by read().
|
staticprivate |
Replace any empty strings in extracted metadata with sane defaults.
artist | Artist |
album | Album |
title | Title |
genre | Genre |
Definition at line 201 of file metaiomp4.cpp.
Referenced by read().