diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-02-11 20:30:38 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-02-17 08:27:22 +0000 |
commit | 0b89496b68e077b3a761b6d5dea41006b9fb5d38 (patch) | |
tree | 4d3b74b0faa94a253af6eb3692b4b892ba61a47e /src/multimedia/audio/qaudiodecoder.cpp | |
parent | 0d5527ba1ed568abc1f3ffe943d0def9929d2123 (diff) |
Remove QMediaSource dependency from QAudioDecoder
Nothing needs this here.
Change-Id: I66d5a7f22495dd24d2fdebd780f1c0ad574b55de
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/audio/qaudiodecoder.cpp')
-rw-r--r-- | src/multimedia/audio/qaudiodecoder.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/multimedia/audio/qaudiodecoder.cpp b/src/multimedia/audio/qaudiodecoder.cpp index b192ddce2..94cca780a 100644 --- a/src/multimedia/audio/qaudiodecoder.cpp +++ b/src/multimedia/audio/qaudiodecoder.cpp @@ -120,9 +120,7 @@ void QAudioDecoderPrivate::_q_error(int error, const QString &errorString) parented to \a parent. */ QAudioDecoder::QAudioDecoder(QObject *parent) - : QMediaSource(*new QAudioDecoderPrivate, - parent, - nullptr) + : QObject(*new QAudioDecoderPrivate, parent) { Q_D(QAudioDecoder); @@ -156,6 +154,11 @@ QAudioDecoder::~QAudioDecoder() delete d->control; } +bool QAudioDecoder::isAvailable() const +{ + return d_func()->control != nullptr; +} + QAudioDecoder::State QAudioDecoder::state() const { return d_func()->state; |