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) = default;
24  ~MetaIOTagLib(void) override = 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
MetaIO::getTrackLength
virtual int getTrackLength(const QString &filename)=0
MetaIOTagLib::MetaIOTagLib
MetaIOTagLib(void)=default
MetaIOTagLib::write
bool write(const QString &filename, MusicMetadata *mdata) override=0
Writes all metadata back to a file.
MetaIO
Definition: metaio.h:18
MusicMetadata
Definition: musicmetadata.h:81
build_compdb.file
file
Definition: build_compdb.py:55
MetaIOTagLib::read
MusicMetadata * read(const QString &filename) override=0
Reads MusicMetadata from a file.
filename
QString filename
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:634
MetaIOTagLib
Base for Taglib metadata classes.
Definition: metaiotaglib.h:21
MetaIOTagLib::~MetaIOTagLib
~MetaIOTagLib(void) override=default
metaio.h
META_PUBLIC
#define META_PUBLIC
Definition: mythmetaexp.h:9
musicmetadata.h