MythTV  master
metaiotaglib.h
Go to the documentation of this file.
1 #ifndef METAIOTAGLIB_H_
2 #define METAIOTAGLIB_H_
3 
4 // libmythmetadata
5 #include "metaio.h"
6 #include "musicmetadata.h"
7 
8 // Taglib
9 #include <tfile.h>
10 
11 using TagLib::File;
12 using TagLib::Tag;
13 using TagLib::String;
14 
21 {
22  public:
23  MetaIOTagLib(void) : MetaIO() {}
24  virtual ~MetaIOTagLib(void) = default;
25 
26  bool write(const QString &filename, MusicMetadata* mdata) override = 0; // MetaIO
27  MusicMetadata* read(const QString &filename) override = 0; // MetaIO
28 
29  protected:
30  static int getTrackLength(TagLib::File *file);
31  int getTrackLength(const QString &filename) override; // MetaIO
32  void ReadGenericMetadata(TagLib::Tag *tag, MusicMetadata *metadata);
33  static void WriteGenericMetadata(TagLib::Tag *tag, const MusicMetadata *metadata);
34 };
35 
36 #endif
MetaIOTagLib(void)
Definition: metaiotaglib.h:23
Definition: metaio.h:17
virtual MusicMetadata * read(const QString &filename)=0
Reads MusicMetadata from a file.
virtual int getTrackLength(const QString &filename)=0
#define META_PUBLIC
Definition: mythmetaexp.h:9
virtual bool write(const QString &filename, MusicMetadata *mdata)=0
Writes all metadata back to a file.
Base for Taglib metadata classes.
Definition: metaiotaglib.h:20