Read and write metadata in MP4 container tags. More...
#include <metaiomp4.h>
Public Member Functions | |
| MetaIOMP4 (void) | |
| virtual | ~MetaIOMP4 (void) |
| bool | write (const Metadata *mdata) |
| Metadata * | read (const QString &filename) |
Private Member Functions | |
| int | getTrackLength (const QString &filename) |
| Find the length of the track (in seconds). | |
| int | getTrackLength (AVFormatContext *p_context) |
| Find the length of the track (in seconds). | |
| QString | getFieldValue (AVFormatContext *context, const char *tagname) |
| Retrieve the value of a named metadata field. | |
| void | metadataSanityCheck (QString *artist, QString *album, QString *title, QString *genre) |
| Replace any empty strings in extracted metadata with sane defaults. | |
Read and write metadata in MP4 container tags.
Definition at line 16 of file metaiomp4.h.
| MetaIOMP4::MetaIOMP4 | ( | void | ) |
Definition at line 16 of file metaiomp4.cpp.
| MetaIOMP4::~MetaIOMP4 | ( | void | ) | [virtual] |
Definition at line 23 of file metaiomp4.cpp.
Writes all metadata back to a file.
| mdata | A pointer to a Metadata object |
Implements MetaIO.
Definition at line 30 of file metaiomp4.cpp.
| Metadata * MetaIOMP4::read | ( | const QString & | filename | ) | [virtual] |
Reads Metadata from a file.
| filename | The filename to read metadata from. |
Implements MetaIO.
Definition at line 82 of file metaiomp4.cpp.
| int MetaIOMP4::getTrackLength | ( | const QString & | filename | ) | [private, virtual] |
Find the length of the track (in seconds).
| filename | The filename for which we want to find the length. |
Implements MetaIO.
Definition at line 181 of file metaiomp4.cpp.
Referenced by read().
| int MetaIOMP4::getTrackLength | ( | AVFormatContext * | pContext | ) | [private] |
Find the length of the track (in seconds).
| pContext | The AV Format Context. |
Definition at line 210 of file metaiomp4.cpp.
| QString MetaIOMP4::getFieldValue | ( | AVFormatContext * | context, | |
| const char * | tagname | |||
| ) | [private] |
Retrieve the value of a named metadata field.
| context | AVFormatContext of the file | |
| tagname | The name of the field |
Definition at line 163 of file metaiomp4.cpp.
Referenced by read().
| void MetaIOMP4::metadataSanityCheck | ( | QString * | artist, | |
| QString * | album, | |||
| QString * | title, | |||
| QString * | genre | |||
| ) | [private] |
Replace any empty strings in extracted metadata with sane defaults.
| artist | Artist | |
| album | Album | |
| title | Title | |
| genre | Genre |
Definition at line 228 of file metaiomp4.cpp.
Referenced by read().
1.6.3