# HG changeset patch # User Chris Cannam # Date 1547570603 0 # Node ID b67f5b6a797863b339abc1dedd6b3aee81da4faf # Parent ff18abb885637889dbf064f63de3da475bb871fe Request metadata from bq audio stream diff -r ff18abb88563 -r b67f5b6a7978 data/fileio/BQAFileReader.cpp --- 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() diff -r ff18abb88563 -r b67f5b6a7978 data/fileio/BQAFileReader.h --- 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 &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;