comparison data/fileio/MP3FileReader.h @ 271:822bd7fd526c

* Add support for reading mp3 and Ogg file title tags
author Chris Cannam
date Mon, 02 Jul 2007 13:53:38 +0000
parents e08f486e8d8c
children 20028c634494
comparison
equal deleted inserted replaced
270:840dd5e6400f 271:822bd7fd526c
38 MP3FileReader(QString path, DecodeMode decodeMode, CacheMode cacheMode); 38 MP3FileReader(QString path, DecodeMode decodeMode, CacheMode cacheMode);
39 virtual ~MP3FileReader(); 39 virtual ~MP3FileReader();
40 40
41 virtual QString getError() const { return m_error; } 41 virtual QString getError() const { return m_error; }
42 42
43 virtual QString getTitle() const { return m_title; }
44
43 static void getSupportedExtensions(std::set<QString> &extensions); 45 static void getSupportedExtensions(std::set<QString> &extensions);
44 46
45 virtual int getDecodeCompletion() const { return m_completion; } 47 virtual int getDecodeCompletion() const { return m_completion; }
46 48
47 virtual bool isUpdating() const { 49 virtual bool isUpdating() const {
49 } 51 }
50 52
51 protected: 53 protected:
52 QString m_path; 54 QString m_path;
53 QString m_error; 55 QString m_error;
56 QString m_title;
54 size_t m_fileSize; 57 size_t m_fileSize;
55 double m_bitrateNum; 58 double m_bitrateNum;
56 size_t m_bitrateDenom; 59 size_t m_bitrateDenom;
57 int m_completion; 60 int m_completion;
58 bool m_done; 61 bool m_done;
85 protected: 88 protected:
86 MP3FileReader *m_reader; 89 MP3FileReader *m_reader;
87 }; 90 };
88 91
89 DecodeThread *m_decodeThread; 92 DecodeThread *m_decodeThread;
93
94 void loadTags();
90 }; 95 };
91 96
92 #endif 97 #endif
93 98
94 #endif 99 #endif