summaryrefslogtreecommitdiff
path: root/src/multimedia
diff options
context:
space:
mode:
authorArtem Dyomin <artem.dyomin@qt.io>2022-12-12 14:38:47 +0100
committerArtem Dyomin <artem.dyomin@qt.io>2022-12-13 12:01:44 +0000
commit49e1615c98816d8e19fd364a493478d1d6e42eb1 (patch)
tree9cefb6d71bb813aa5865eb0f7bf73dd2081078fa /src/multimedia
parenta3c36e681d6036f053fed01526ed5db4ba6d713a (diff)
downloadqtmultimedia-49e1615c98816d8e19fd364a493478d1d6e42eb1.tar.gz
Include moc_*.cpp files in main QtMM code
The reason of the refactoring is following the common approach that leads to reducing compilation time and binary size. - logic hasn't been touched - some headers have been decoupled into header and cpp - the same refactorings of examples, tests, plugins are coming in the next commits Task-number: QTBUG-103290 Pick-to: 6.5 6.4 Change-Id: I6716cef5116769230c36e8d584d9ba6ec40aabb2 Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/CMakeLists.txt4
-rw-r--r--src/multimedia/audio/qaudiodevice.cpp2
-rw-r--r--src/multimedia/audio/qaudiosystem.cpp19
-rw-r--r--src/multimedia/audio/qaudiosystem_p.h6
-rw-r--r--src/multimedia/camera/qcameradevice.cpp2
-rw-r--r--src/multimedia/platform/qplatformaudiodecoder.cpp2
-rw-r--r--src/multimedia/platform/qplatformmediacapture.cpp1
-rw-r--r--src/multimedia/platform/qplatformmediaplugin.cpp14
-rw-r--r--src/multimedia/platform/qplatformmediaplugin_p.h6
-rw-r--r--src/multimedia/qmediaformat.cpp2
-rw-r--r--src/multimedia/qmediametadata.cpp2
-rw-r--r--src/multimedia/recording/qscreencapture.cpp2
-rw-r--r--src/multimedia/video/qvideooutputorientationhandler.cpp2
-rw-r--r--src/multimedia/video/qvideowindow.cpp2
14 files changed, 57 insertions, 9 deletions
diff --git a/src/multimedia/CMakeLists.txt b/src/multimedia/CMakeLists.txt
index 6f16d37b2..2c059b9dc 100644
--- a/src/multimedia/CMakeLists.txt
+++ b/src/multimedia/CMakeLists.txt
@@ -28,7 +28,7 @@ qt_internal_add_module(Multimedia
audio/qaudiohelpers.cpp audio/qaudiohelpers_p.h
audio/qaudiosource.cpp audio/qaudiosource.h
audio/qaudiosink.cpp audio/qaudiosink.h
- audio/qaudiosystem_p.h
+ audio/qaudiosystem.cpp audio/qaudiosystem_p.h
audio/qsamplecache_p.cpp audio/qsamplecache_p.h
audio/qsoundeffect.cpp audio/qsoundeffect.h
audio/qwavedecoder.cpp audio/qwavedecoder.h
@@ -47,7 +47,7 @@ qt_internal_add_module(Multimedia
platform/qplatformmediaformatinfo.cpp platform/qplatformmediaformatinfo_p.h
platform/qplatformmediaintegration.cpp platform/qplatformmediaintegration_p.h
platform/qplatformmediaplayer.cpp platform/qplatformmediaplayer_p.h
- platform/qplatformmediaplugin_p.h
+ platform/qplatformmediaplugin.cpp platform/qplatformmediaplugin_p.h
platform/qplatformvideodevices.cpp platform/qplatformvideodevices_p.h
platform/qplatformvideosink.cpp platform/qplatformvideosink_p.h
playback/qmediaplayer.cpp playback/qmediaplayer.h playback/qmediaplayer_p.h
diff --git a/src/multimedia/audio/qaudiodevice.cpp b/src/multimedia/audio/qaudiodevice.cpp
index ce7d80f6d..f4f51d5a2 100644
--- a/src/multimedia/audio/qaudiodevice.cpp
+++ b/src/multimedia/audio/qaudiodevice.cpp
@@ -369,3 +369,5 @@ QDebug operator<<(QDebug dbg, QAudioDevice::Mode mode)
#endif
QT_END_NAMESPACE
+
+#include "moc_qaudiodevice.cpp"
diff --git a/src/multimedia/audio/qaudiosystem.cpp b/src/multimedia/audio/qaudiosystem.cpp
new file mode 100644
index 000000000..ef7552492
--- /dev/null
+++ b/src/multimedia/audio/qaudiosystem.cpp
@@ -0,0 +1,19 @@
+// Copyright (C) 2022 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
+
+#include "qaudiosystem_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QPlatformAudioSink::QPlatformAudioSink(QObject *parent) : QObject(parent) { }
+
+qreal QPlatformAudioSink::volume() const
+{
+ return 1.0;
+}
+
+QPlatformAudioSource::QPlatformAudioSource(QObject *parent) : QObject(parent) { }
+
+QT_END_NAMESPACE
+
+#include "moc_qaudiosystem_p.cpp"
diff --git a/src/multimedia/audio/qaudiosystem_p.h b/src/multimedia/audio/qaudiosystem_p.h
index cfb21fd22..e85968b86 100644
--- a/src/multimedia/audio/qaudiosystem_p.h
+++ b/src/multimedia/audio/qaudiosystem_p.h
@@ -33,7 +33,7 @@ class Q_MULTIMEDIA_EXPORT QPlatformAudioSink : public QObject
Q_OBJECT
public:
- QPlatformAudioSink(QObject *parent) : QObject(parent) {}
+ QPlatformAudioSink(QObject *parent);
virtual void start(QIODevice *device) = 0;
virtual QIODevice* start() = 0;
virtual void stop() = 0;
@@ -49,7 +49,7 @@ public:
virtual void setFormat(const QAudioFormat& fmt) = 0;
virtual QAudioFormat format() const = 0;
virtual void setVolume(qreal) {}
- virtual qreal volume() const { return 1.0; }
+ virtual qreal volume() const;
QElapsedTimer elapsedTime;
@@ -63,7 +63,7 @@ class Q_MULTIMEDIA_EXPORT QPlatformAudioSource : public QObject
Q_OBJECT
public:
- QPlatformAudioSource(QObject *parent) : QObject(parent) {}
+ QPlatformAudioSource(QObject *parent);
virtual void start(QIODevice *device) = 0;
virtual QIODevice* start() = 0;
virtual void stop() = 0;
diff --git a/src/multimedia/camera/qcameradevice.cpp b/src/multimedia/camera/qcameradevice.cpp
index 1cef724dc..c94860963 100644
--- a/src/multimedia/camera/qcameradevice.cpp
+++ b/src/multimedia/camera/qcameradevice.cpp
@@ -432,3 +432,5 @@ QDebug operator<<(QDebug d, const QCameraDevice &camera)
#endif
QT_END_NAMESPACE
+
+#include "moc_qcameradevice.cpp"
diff --git a/src/multimedia/platform/qplatformaudiodecoder.cpp b/src/multimedia/platform/qplatformaudiodecoder.cpp
index ea4dbfaa6..99dfdee98 100644
--- a/src/multimedia/platform/qplatformaudiodecoder.cpp
+++ b/src/multimedia/platform/qplatformaudiodecoder.cpp
@@ -79,3 +79,5 @@ void QPlatformAudioDecoder::durationChanged(qint64 duration)
}
QT_END_NAMESPACE
+
+#include "moc_qplatformaudiodecoder_p.cpp"
diff --git a/src/multimedia/platform/qplatformmediacapture.cpp b/src/multimedia/platform/qplatformmediacapture.cpp
index effa82adf..b9b271942 100644
--- a/src/multimedia/platform/qplatformmediacapture.cpp
+++ b/src/multimedia/platform/qplatformmediacapture.cpp
@@ -14,3 +14,4 @@ QPlatformMediaCaptureSession::~QPlatformMediaCaptureSession()
QT_END_NAMESPACE
+#include "moc_qplatformmediacapture_p.cpp"
diff --git a/src/multimedia/platform/qplatformmediaplugin.cpp b/src/multimedia/platform/qplatformmediaplugin.cpp
new file mode 100644
index 000000000..7828fa08e
--- /dev/null
+++ b/src/multimedia/platform/qplatformmediaplugin.cpp
@@ -0,0 +1,14 @@
+// Copyright (C) 2022 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
+
+#include "qplatformmediaplugin_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QPlatformMediaPlugin::QPlatformMediaPlugin(QObject *parent) : QObject(parent) { }
+
+QPlatformMediaPlugin::~QPlatformMediaPlugin() = default;
+
+QT_END_NAMESPACE
+
+#include "moc_qplatformmediaplugin_p.cpp"
diff --git a/src/multimedia/platform/qplatformmediaplugin_p.h b/src/multimedia/platform/qplatformmediaplugin_p.h
index c14f799fa..4c8b9e458 100644
--- a/src/multimedia/platform/qplatformmediaplugin_p.h
+++ b/src/multimedia/platform/qplatformmediaplugin_p.h
@@ -30,10 +30,8 @@ class Q_MULTIMEDIA_EXPORT QPlatformMediaPlugin : public QObject
{
Q_OBJECT
public:
- explicit QPlatformMediaPlugin(QObject *parent = nullptr)
- : QObject(parent)
- {}
- ~QPlatformMediaPlugin() = default;
+ explicit QPlatformMediaPlugin(QObject *parent = nullptr);
+ ~QPlatformMediaPlugin() override;
virtual QPlatformMediaIntegration *create(const QString &key) = 0;
diff --git a/src/multimedia/qmediaformat.cpp b/src/multimedia/qmediaformat.cpp
index e70f87f4f..275cdf8b8 100644
--- a/src/multimedia/qmediaformat.cpp
+++ b/src/multimedia/qmediaformat.cpp
@@ -890,3 +890,5 @@ void QMediaFormat::resolveForEncoding(ResolveFlags flags)
\internal
*/
QT_END_NAMESPACE
+
+#include "moc_qmediaformat.cpp"
diff --git a/src/multimedia/qmediametadata.cpp b/src/multimedia/qmediametadata.cpp
index 2ebf18ca3..96568f167 100644
--- a/src/multimedia/qmediametadata.cpp
+++ b/src/multimedia/qmediametadata.cpp
@@ -512,3 +512,5 @@ QString QMediaMetaData::metaDataKeyToString(QMediaMetaData::Key key)
*/
QT_END_NAMESPACE
+
+#include "moc_qmediametadata.cpp"
diff --git a/src/multimedia/recording/qscreencapture.cpp b/src/multimedia/recording/qscreencapture.cpp
index 9357bb5b1..08460d217 100644
--- a/src/multimedia/recording/qscreencapture.cpp
+++ b/src/multimedia/recording/qscreencapture.cpp
@@ -254,3 +254,5 @@ class QPlatformScreenCapture *QScreenCapture::platformScreenCapture() const
}
QT_END_NAMESPACE
+
+#include "moc_qscreencapture.cpp"
diff --git a/src/multimedia/video/qvideooutputorientationhandler.cpp b/src/multimedia/video/qvideooutputorientationhandler.cpp
index 7cc8b7e33..c34e9e92a 100644
--- a/src/multimedia/video/qvideooutputorientationhandler.cpp
+++ b/src/multimedia/video/qvideooutputorientationhandler.cpp
@@ -48,3 +48,5 @@ void QVideoOutputOrientationHandler::screenOrientationChanged(Qt::ScreenOrientat
}
QT_END_NAMESPACE
+
+#include "moc_qvideooutputorientationhandler_p.cpp"
diff --git a/src/multimedia/video/qvideowindow.cpp b/src/multimedia/video/qvideowindow.cpp
index 70a6cb865..acf7ee639 100644
--- a/src/multimedia/video/qvideowindow.cpp
+++ b/src/multimedia/video/qvideowindow.cpp
@@ -517,3 +517,5 @@ void QVideoWindow::setVideoFrame(const QVideoFrame &frame)
}
QT_END_NAMESPACE
+
+#include "moc_qvideowindow_p.cpp"