diff options
author | Tim Blechmann <tim@klingt.org> | 2024-04-02 13:31:37 +0800 |
---|---|---|
committer | Tim Blechmann <tim@klingt.org> | 2024-04-17 08:05:34 +0800 |
commit | d928939dc603d5819f960245b860e749b1f4e3a7 (patch) | |
tree | 82dd9c24403de42fa0f43caaa4dbdd6f0ff98ad9 /src/multimedia/platform | |
parent | 30eb2b2417c2658fb324452d1fc76043157ada23 (diff) |
QAudioDecoder: fix unit tests for GStreamer
When setting a QUrl with an empty scheme, we need to set the file://
pattern for uridecodebin. This has been done for QMediaPlayer in the
past, but not for QAudioDecoder. Compare:
8a3806f6263f56b5be5b557e321b9b13d1913d5f
To keep consistency with QMediaPlayer, we introduce a
QAudioDecoderPrivate class.
Pick-to: 6.5 6.7
Task-number: QTBUG-96985
Change-Id: If954a04a003aecb0f862a7e5041ead43e4c9d259
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
Diffstat (limited to 'src/multimedia/platform')
-rw-r--r-- | src/multimedia/platform/qplatformaudiodecoder.cpp | 8 | ||||
-rw-r--r-- | src/multimedia/platform/qplatformaudiodecoder_p.h | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/src/multimedia/platform/qplatformaudiodecoder.cpp b/src/multimedia/platform/qplatformaudiodecoder.cpp index 99dfdee98..0bf472410 100644 --- a/src/multimedia/platform/qplatformaudiodecoder.cpp +++ b/src/multimedia/platform/qplatformaudiodecoder.cpp @@ -6,11 +6,9 @@ QT_BEGIN_NAMESPACE -QPlatformAudioDecoder::QPlatformAudioDecoder(QAudioDecoder *parent) - : QObject(parent), - q(parent) -{ -} +QPlatformAudioDecoder::QPlatformAudioDecoder(QAudioDecoder *parent) : q(parent) { } + +QPlatformAudioDecoder::~QPlatformAudioDecoder() = default; void QPlatformAudioDecoder::error(int error, const QString &errorString) { diff --git a/src/multimedia/platform/qplatformaudiodecoder_p.h b/src/multimedia/platform/qplatformaudiodecoder_p.h index 6437d33c6..1159a37ca 100644 --- a/src/multimedia/platform/qplatformaudiodecoder_p.h +++ b/src/multimedia/platform/qplatformaudiodecoder_p.h @@ -15,12 +15,10 @@ // We mean it. // -#include <QtMultimedia/qaudiodecoder.h> - -#include <QtCore/qpair.h> - #include <QtMultimedia/qaudiobuffer.h> #include <QtMultimedia/qaudiodecoder.h> +#include <QtCore/qpair.h> +#include <QtCore/qurl.h> #include <QtCore/private/qglobal_p.h> QT_BEGIN_NAMESPACE @@ -73,8 +71,11 @@ public: QAudioDecoder::Error error() const { return m_error; } QString errorString() const { return m_errorString; } + virtual ~QPlatformAudioDecoder(); + protected: explicit QPlatformAudioDecoder(QAudioDecoder *parent); + private: QAudioDecoder *q = nullptr; |