summaryrefslogtreecommitdiffstats
path: root/src/multimedia/audio/qaudiodecoder_p.h
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2024-04-02 13:31:37 +0800
committerTim Blechmann <tim@klingt.org>2024-04-17 08:05:34 +0800
commitd928939dc603d5819f960245b860e749b1f4e3a7 (patch)
tree82dd9c24403de42fa0f43caaa4dbdd6f0ff98ad9 /src/multimedia/audio/qaudiodecoder_p.h
parent30eb2b2417c2658fb324452d1fc76043157ada23 (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/audio/qaudiodecoder_p.h')
-rw-r--r--src/multimedia/audio/qaudiodecoder_p.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/multimedia/audio/qaudiodecoder_p.h b/src/multimedia/audio/qaudiodecoder_p.h
new file mode 100644
index 000000000..fa7311457
--- /dev/null
+++ b/src/multimedia/audio/qaudiodecoder_p.h
@@ -0,0 +1,40 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QAUDIODECODER_P_H
+#define QAUDIODECODER_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtCore/private/qobject_p.h>
+#include <QtMultimedia/private/qplatformaudiodecoder_p.h>
+
+#include <memory.h>
+
+QT_BEGIN_NAMESPACE
+
+class QAudioDecoder;
+
+class QAudioDecoderPrivate : public QObjectPrivate
+{
+ Q_DECLARE_PUBLIC(QAudioDecoder)
+
+public:
+ QAudioDecoderPrivate() = default;
+
+ QUrl unresolvedUrl;
+ std::unique_ptr<QPlatformAudioDecoder> decoder;
+};
+
+QT_END_NAMESPACE
+
+#endif // QAUDIODECODER_P_H