MythTV  master
metaiomp4.h
Go to the documentation of this file.
1 #ifndef metaioMP4_H_
2 #define metaioMP4_H_
3 
4 // libmythmetadata
5 #include "metaio.h"
6 
7 struct AVFormatContext;
8 
17 {
18  public:
19  MetaIOMP4(void) = default;
20  ~MetaIOMP4(void) override = default;
21 
22  bool write(const QString &filename, MusicMetadata* mdata) override; // MetaIO
23  MusicMetadata* read(const QString &filename) override; // MetaIO
24 
25  private:
26  int getTrackLength(const QString &filename) override; // MetaIO
27  static int getTrackLength(AVFormatContext* pContext);
28  static QString getFieldValue(AVFormatContext* context, const char* tagname);
29  static void metadataSanityCheck(QString *artist, QString *album, QString *title, QString *genre);
30 };
31 
32 #endif
33 
34 
MetaIO::getTrackLength
virtual int getTrackLength(const QString &filename)=0
MetaIO::write
virtual bool write(const QString &filename, MusicMetadata *mdata)=0
Writes all metadata back to a file.
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:636
MetaIOMP4::MetaIOMP4
MetaIOMP4(void)=default
MetaIO
Definition: metaio.h:18
MusicMetadata
Definition: musicmetadata.h:81
MetaIOMP4::~MetaIOMP4
~MetaIOMP4(void) override=default
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:637
metaio.h
MetaIOMP4
Read and write metadata in MP4 container tags.
Definition: metaiomp4.h:17
MetaIO::read
virtual MusicMetadata * read(const QString &filename)=0
Reads MusicMetadata from a file.
META_PUBLIC
#define META_PUBLIC
Definition: mythmetaexp.h:9