changeset 1587:b67f5b6a7978 bqaudiostream

Request metadata from bq audio stream
author Chris Cannam
date Tue, 15 Jan 2019 16:43:23 +0000
parents ff18abb88563
children 0773b34d987f
files data/fileio/BQAFileReader.cpp data/fileio/BQAFileReader.h
diffstat 2 files changed, 8 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/data/fileio/BQAFileReader.cpp	Thu Dec 06 13:37:00 2018 +0000
+++ b/data/fileio/BQAFileReader.cpp	Tue Jan 15 16:43:23 2019 +0000
@@ -60,6 +60,8 @@
 
     m_channelCount = int(m_stream->getChannelCount());
     m_fileRate = sv_samplerate_t(m_stream->getSampleRate());
+    m_title = QString::fromUtf8(m_stream->getTrackName().c_str());
+    m_maker = QString::fromUtf8(m_stream->getArtistName().c_str());
 
     initialiseDecodeCache();
 
@@ -107,8 +109,6 @@
         m_decodeThread = new DecodeThread(this);
         m_decodeThread->start();
     }
-
-//!!! todo metadata - maker, title, tags
 }
 
 BQAFileReader::~BQAFileReader()
--- a/data/fileio/BQAFileReader.h	Thu Dec 06 13:37:00 2018 +0000
+++ b/data/fileio/BQAFileReader.h	Tue Jan 15 16:43:23 2019 +0000
@@ -41,20 +41,19 @@
                   ProgressReporter *reporter = 0);
     virtual ~BQAFileReader();
 
-    virtual QString getError() const { return m_error; }
-    virtual QString getLocation() const { return m_source.getLocation(); }
-    virtual QString getTitle() const { return m_title; }
-    virtual QString getMaker() const { return m_maker; }
-    virtual TagMap getTags() const { return m_tags; }
+    QString getError() const override { return m_error; }
+    QString getLocation() const override { return m_source.getLocation(); }
+    QString getTitle() const override { return m_title; }
+    QString getMaker() const override { return m_maker; }
     
     static void getSupportedExtensions(std::set<QString> &extensions);
     static bool supportsExtension(QString ext);
     static bool supportsContentType(QString type);
     static bool supports(FileSource &source);
 
-    virtual int getDecodeCompletion() const { return m_completion; }
+    int getDecodeCompletion() const override { return m_completion; }
 
-    virtual bool isUpdating() const {
+    bool isUpdating() const override {
         return m_decodeThread && m_decodeThread->isRunning();
     }
 
@@ -67,7 +66,6 @@
     QString m_error;
     QString m_title;
     QString m_maker;
-    TagMap m_tags;
 
     breakfastquay::AudioReadStream *m_stream;