summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-02-12 11:44:25 +0100
committerLars Knoll <lars.knoll@qt.io>2021-02-17 08:28:00 +0000
commit762eff8c15aa8cbb6962c2893ff792ab172783ee (patch)
treeab8522cbf35d07aaa3bd1bae84aa894ffd9a0df7
parent33186a09048faef5b9a6585b69e0a9cab4182a3e (diff)
downloadqtmultimedia-762eff8c15aa8cbb6962c2893ff792ab172783ee.tar.gz
And finally kill QMediaService
This removes the past piece of the old service architecture from Qt Multimedia. Change-Id: I607f82a546b2a2e29024b987fed3ba6e3645ae48 Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--examples/multimediawidgets/camera/camera.cpp1
-rw-r--r--examples/multimediawidgets/camera/imagesettings.cpp1
-rw-r--r--examples/multimediawidgets/camera/videosettings.cpp1
-rw-r--r--examples/multimediawidgets/player/player.cpp1
-rw-r--r--src/imports/multimedia/qdeclarativemediametadata_p.h1
-rw-r--r--src/imports/multimedia/qdeclarativetorch.cpp1
-rw-r--r--src/imports/multimedia/qmldir1
-rw-r--r--src/multimedia/CMakeLists.txt1
-rw-r--r--src/multimedia/audio/qaudiodecoder.cpp1
-rw-r--r--src/multimedia/camera/qcameraimagecapture.cpp1
-rw-r--r--src/multimedia/controls/qaudiodecodercontrol.cpp4
-rw-r--r--src/multimedia/controls/qaudiodecodercontrol.h1
-rw-r--r--src/multimedia/controls/qcameracontrol.h1
-rw-r--r--src/multimedia/controls/qcameraexposurecontrol.h1
-rw-r--r--src/multimedia/controls/qcamerafocuscontrol.h1
-rw-r--r--src/multimedia/controls/qcameraimagecapturecontrol.h1
-rw-r--r--src/multimedia/controls/qcameraimageprocessingcontrol.h1
-rw-r--r--src/multimedia/controls/qmediaplayercontrol.cpp16
-rw-r--r--src/multimedia/controls/qmediaplayercontrol.h4
-rw-r--r--src/multimedia/controls/qmediarecordercontrol.cpp7
-rw-r--r--src/multimedia/controls/qmediarecordercontrol.h1
-rw-r--r--src/multimedia/controls/qmediastreamscontrol.cpp15
-rw-r--r--src/multimedia/controls/qmediastreamscontrol.h4
-rw-r--r--src/multimedia/controls/qvideorenderercontrol.cpp18
-rw-r--r--src/multimedia/controls/qvideorenderercontrol.h6
-rw-r--r--src/multimedia/controls/qvideowindowcontrol.cpp17
-rw-r--r--src/multimedia/controls/qvideowindowcontrol.h6
-rw-r--r--src/multimedia/doc/snippets/multimedia-snippets/audiorecorder.cpp1
-rw-r--r--src/multimedia/doc/snippets/multimedia-snippets/media.cpp16
-rw-r--r--src/multimedia/doc/snippets/multimedia-snippets/video.cpp11
-rw-r--r--src/multimedia/doc/src/multimediabackend.qdoc95
-rw-r--r--src/multimedia/multimedia.pro3
-rw-r--r--src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h1
-rw-r--r--src/multimedia/platform/qmediaplatformcaptureinterface_p.h2
-rw-r--r--src/multimedia/platform/qmediaplatformplayerinterface_p.h2
-rw-r--r--src/multimedia/platform/qnx/camera/bbcameraservice.cpp2
-rw-r--r--src/multimedia/platform/qnx/camera/bbcameraservice_p.h5
-rw-r--r--src/multimedia/platform/qnx/mediaplayer/mmrenderermediaplayerservice.cpp2
-rw-r--r--src/multimedia/platform/windows/player/mfplayerservice_p.h1
-rw-r--r--src/multimedia/platform/windows/player/mfplayersession_p.h1
-rw-r--r--src/multimedia/playback/qmediaplayer.cpp1
-rw-r--r--src/multimedia/playback/qmediaplaylist.cpp1
-rw-r--r--src/multimedia/qmediaservice.cpp136
-rw-r--r--src/multimedia/qmediaservice.h87
-rw-r--r--src/multimedia/qmediaservice_p.h73
-rw-r--r--src/multimedia/recording/qmediarecorder.cpp1
-rw-r--r--src/multimediawidgets/doc/snippets/multimedia-snippets/video.cpp11
-rw-r--r--src/multimediawidgets/qgraphicsvideoitem.cpp19
-rw-r--r--src/multimediawidgets/qgraphicsvideoitem.h1
-rw-r--r--src/qtmultimediaquicktools/qdeclarativevideooutput_p.h1
-rw-r--r--src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp1
-rw-r--r--tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp1
-rw-r--r--tests/auto/integration/qdeclarativevideooutput_window/tst_qdeclarativevideooutput_window.cpp32
-rw-r--r--tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp1
-rw-r--r--tests/auto/unit/mockbackend/CMakeLists.txt1
-rw-r--r--tests/auto/unit/mockbackend/common.pri1
-rw-r--r--tests/auto/unit/mockbackend/mockaudiodecodercontrol.h1
-rw-r--r--tests/auto/unit/mockbackend/mockmediarecorderservice.h2
-rw-r--r--tests/auto/unit/mockbackend/mockmediaservice.h65
-rw-r--r--tests/auto/unit/multimedia/CMakeLists.txt1
-rw-r--r--tests/auto/unit/multimedia/multimedia.pro1
-rw-r--r--tests/auto/unit/multimedia/qcamera/tst_qcamera.cpp1
-rw-r--r--tests/auto/unit/multimedia/qcameraimagecapture/tst_qcameraimagecapture.cpp26
-rw-r--r--tests/auto/unit/multimedia/qmediaplayer/tst_qmediaplayer.cpp1
-rw-r--r--tests/auto/unit/multimedia/qmediaplaylist/tst_qmediaplaylist.cpp1
-rw-r--r--tests/auto/unit/multimedia/qmediarecorder/tst_qmediarecorder.cpp1
-rw-r--r--tests/auto/unit/multimedia/qmediaservice/CMakeLists.txt13
-rw-r--r--tests/auto/unit/multimedia/qmediaservice/qmediaservice.pro6
-rw-r--r--tests/auto/unit/multimedia/qmediaservice/tst_qmediaservice.cpp264
-rw-r--r--tests/auto/unit/multimediawidgets/qcamerawidgets/tst_qcamerawidgets.cpp1
-rw-r--r--tests/auto/unit/qml/qdeclarativeaudio/tst_qdeclarativeaudio.cpp1
71 files changed, 22 insertions, 987 deletions
diff --git a/examples/multimediawidgets/camera/camera.cpp b/examples/multimediawidgets/camera/camera.cpp
index 28f4f5071..a17f4301e 100644
--- a/examples/multimediawidgets/camera/camera.cpp
+++ b/examples/multimediawidgets/camera/camera.cpp
@@ -53,7 +53,6 @@
#include "videosettings.h"
#include "imagesettings.h"
-#include <QMediaService>
#include <QMediaRecorder>
#include <QVideoWidget>
#include <QCameraInfo>
diff --git a/examples/multimediawidgets/camera/imagesettings.cpp b/examples/multimediawidgets/camera/imagesettings.cpp
index 6dfcba91e..c8042bb03 100644
--- a/examples/multimediawidgets/camera/imagesettings.cpp
+++ b/examples/multimediawidgets/camera/imagesettings.cpp
@@ -55,7 +55,6 @@
#include <QDebug>
#include <QCameraImageCapture>
#include <QCamera>
-#include <QMediaService>
ImageSettings::ImageSettings(QCameraImageCapture *imageCapture, QWidget *parent) :
diff --git a/examples/multimediawidgets/camera/videosettings.cpp b/examples/multimediawidgets/camera/videosettings.cpp
index 127c21388..3ffb42ed4 100644
--- a/examples/multimediawidgets/camera/videosettings.cpp
+++ b/examples/multimediawidgets/camera/videosettings.cpp
@@ -55,7 +55,6 @@
#include <QSpinBox>
#include <QDebug>
#include <QMediaRecorder>
-#include <QMediaService>
#include <QMediaFormat>
#include <QAudioDeviceInfo>
#include <QCameraInfo>
diff --git a/examples/multimediawidgets/player/player.cpp b/examples/multimediawidgets/player/player.cpp
index ea816bc54..ed04ff75f 100644
--- a/examples/multimediawidgets/player/player.cpp
+++ b/examples/multimediawidgets/player/player.cpp
@@ -55,7 +55,6 @@
#include "histogramwidget.h"
#include "videowidget.h"
-#include <QMediaService>
#include <QMediaPlaylist>
#include <QMediaMetaData>
#include <QMediaDeviceManager>
diff --git a/src/imports/multimedia/qdeclarativemediametadata_p.h b/src/imports/multimedia/qdeclarativemediametadata_p.h
index 3c5313b04..f08c14c68 100644
--- a/src/imports/multimedia/qdeclarativemediametadata_p.h
+++ b/src/imports/multimedia/qdeclarativemediametadata_p.h
@@ -53,7 +53,6 @@
#include <QtQml/qqml.h>
#include <QtMultimedia/qmediametadata.h>
-#include <QtMultimedia/qmediaservice.h>
#include "qmediametadata.h"
QT_BEGIN_NAMESPACE
diff --git a/src/imports/multimedia/qdeclarativetorch.cpp b/src/imports/multimedia/qdeclarativetorch.cpp
index c544c0a4e..21c594e72 100644
--- a/src/imports/multimedia/qdeclarativetorch.cpp
+++ b/src/imports/multimedia/qdeclarativetorch.cpp
@@ -38,7 +38,6 @@
****************************************************************************/
#include <QDebug>
-#include <QMediaService>
#include <private/qmediaplatformcaptureinterface_p.h>
#include <qcameracontrol.h>
diff --git a/src/imports/multimedia/qmldir b/src/imports/multimedia/qmldir
index d68049f63..e7dcc3dd6 100644
--- a/src/imports/multimedia/qmldir
+++ b/src/imports/multimedia/qmldir
@@ -4,3 +4,4 @@ classname QMultimediaDeclarativeModule
typeinfo plugins.qmltypes
typeinfo plugins.qmltypes
Video 5.0 Video.qml
+
diff --git a/src/multimedia/CMakeLists.txt b/src/multimedia/CMakeLists.txt
index c9f7dce35..7681cae2e 100644
--- a/src/multimedia/CMakeLists.txt
+++ b/src/multimedia/CMakeLists.txt
@@ -54,7 +54,6 @@ qt_internal_add_module(Multimedia
qmediaformat.cpp qmediaformat.h
qmediametadata.cpp qmediametadata.h
qmediapluginloader.cpp qmediapluginloader_p.h
- qmediaservice.cpp qmediaservice.h qmediaservice_p.h
qmediastoragelocation.cpp qmediastoragelocation_p.h
qmediatimerange.cpp qmediatimerange.h
qmultimedia.cpp qmultimedia.h
diff --git a/src/multimedia/audio/qaudiodecoder.cpp b/src/multimedia/audio/qaudiodecoder.cpp
index aba7e5f58..33419b85b 100644
--- a/src/multimedia/audio/qaudiodecoder.cpp
+++ b/src/multimedia/audio/qaudiodecoder.cpp
@@ -40,7 +40,6 @@
#include "qtmultimediaglobal_p.h"
#include "qaudiodecoder.h"
-#include <qmediaservice.h>
#include "qaudiodecodercontrol.h"
#include <private/qmediaplatformintegration_p.h>
diff --git a/src/multimedia/camera/qcameraimagecapture.cpp b/src/multimedia/camera/qcameraimagecapture.cpp
index 72f7fb622..af670ae0b 100644
--- a/src/multimedia/camera/qcameraimagecapture.cpp
+++ b/src/multimedia/camera/qcameraimagecapture.cpp
@@ -43,7 +43,6 @@
#include <private/qmediaplatformcaptureinterface_p.h>
#include "private/qobject_p.h"
-#include <qmediaservice.h>
#include <qcamera.h>
#include <qcameracontrol.h>
#include <QtCore/qdebug.h>
diff --git a/src/multimedia/controls/qaudiodecodercontrol.cpp b/src/multimedia/controls/qaudiodecodercontrol.cpp
index bd933dff6..fa3aa1e01 100644
--- a/src/multimedia/controls/qaudiodecodercontrol.cpp
+++ b/src/multimedia/controls/qaudiodecodercontrol.cpp
@@ -50,8 +50,8 @@ QT_BEGIN_NAMESPACE
\ingroup multimedia_control
- \brief The QAudioDecoderControl class provides access to the audio decoding
- functionality of a QMediaService.
+ \brief The QAudioDecoderControl class provides access audio decoding
+ functionality.
\preliminary
*/
diff --git a/src/multimedia/controls/qaudiodecodercontrol.h b/src/multimedia/controls/qaudiodecodercontrol.h
index 945a67000..b77457ce1 100644
--- a/src/multimedia/controls/qaudiodecodercontrol.h
+++ b/src/multimedia/controls/qaudiodecodercontrol.h
@@ -40,7 +40,6 @@
#ifndef QAUDIODECODERCONTROL_H
#define QAUDIODECODERCONTROL_H
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qaudiodecoder.h>
#include <QtCore/qpair.h>
diff --git a/src/multimedia/controls/qcameracontrol.h b/src/multimedia/controls/qcameracontrol.h
index c61e452dc..f306e3e7a 100644
--- a/src/multimedia/controls/qcameracontrol.h
+++ b/src/multimedia/controls/qcameracontrol.h
@@ -42,7 +42,6 @@
#include <QtCore/qobject.h>
#include <QtMultimedia/qtmultimediaglobal.h>
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qcamera.h>
diff --git a/src/multimedia/controls/qcameraexposurecontrol.h b/src/multimedia/controls/qcameraexposurecontrol.h
index 59b448bd8..f0182e8e8 100644
--- a/src/multimedia/controls/qcameraexposurecontrol.h
+++ b/src/multimedia/controls/qcameraexposurecontrol.h
@@ -42,7 +42,6 @@
#include <QtCore/qobject.h>
#include <QtMultimedia/qtmultimediaglobal.h>
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qcameraexposure.h>
#include <QtMultimedia/qcamera.h>
diff --git a/src/multimedia/controls/qcamerafocuscontrol.h b/src/multimedia/controls/qcamerafocuscontrol.h
index 536eb44a7..aafae5b97 100644
--- a/src/multimedia/controls/qcamerafocuscontrol.h
+++ b/src/multimedia/controls/qcamerafocuscontrol.h
@@ -42,7 +42,6 @@
#include <QtCore/qobject.h>
#include <QtMultimedia/qtmultimediaglobal.h>
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qcamerafocus.h>
diff --git a/src/multimedia/controls/qcameraimagecapturecontrol.h b/src/multimedia/controls/qcameraimagecapturecontrol.h
index e04be102f..d59e9c201 100644
--- a/src/multimedia/controls/qcameraimagecapturecontrol.h
+++ b/src/multimedia/controls/qcameraimagecapturecontrol.h
@@ -40,7 +40,6 @@
#ifndef QCAMERAIMAGECAPTURECONTROL_H
#define QCAMERAIMAGECAPTURECONTROL_H
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qcameraimagecapture.h>
QT_BEGIN_NAMESPACE
diff --git a/src/multimedia/controls/qcameraimageprocessingcontrol.h b/src/multimedia/controls/qcameraimageprocessingcontrol.h
index ad7acbd69..1ded5e573 100644
--- a/src/multimedia/controls/qcameraimageprocessingcontrol.h
+++ b/src/multimedia/controls/qcameraimageprocessingcontrol.h
@@ -42,7 +42,6 @@
#include <QtCore/qobject.h>
#include <QtMultimedia/qtmultimediaglobal.h>
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qcamera.h>
#include <QtMultimedia/qmediaenumdebug.h>
diff --git a/src/multimedia/controls/qmediaplayercontrol.cpp b/src/multimedia/controls/qmediaplayercontrol.cpp
index eb188df6b..5eddbf164 100644
--- a/src/multimedia/controls/qmediaplayercontrol.cpp
+++ b/src/multimedia/controls/qmediaplayercontrol.cpp
@@ -53,9 +53,8 @@ QT_BEGIN_NAMESPACE
\brief The QMediaPlayerControl class provides access to the media playing
- functionality of a QMediaService.
+ functionality.
- If a QMediaService can play media is will implement QMediaPlayerControl.
This control provides a means to set the \l {setMedia()}{media} to play,
\l {play()}{start}, \l {pause()} {pause} and \l {stop()}{stop} playback,
\l {setPosition()}{seek}, and control the \l {setVolume()}{volume}.
@@ -66,23 +65,10 @@ QT_BEGIN_NAMESPACE
The functionality provided by this control is exposed to application
code through the QMediaPlayer class.
- The interface name of QMediaPlayerControl is \c org.qt-project.qt.mediaplayercontrol/5.0 as
- defined in QMediaPlayerControl_iid.
-
\sa QMediaPlayer
*/
/*!
- \macro QMediaPlayerControl_iid
-
- \c org.qt-project.qt.mediaplayercontrol/5.0
-
- Defines the interface name of the QMediaPlayerControl class.
-
- \relates QMediaPlayerControl
-*/
-
-/*!
Constructs a new media player control with the given \a parent.
*/
QMediaPlayerControl::QMediaPlayerControl(QObject *parent)
diff --git a/src/multimedia/controls/qmediaplayercontrol.h b/src/multimedia/controls/qmediaplayercontrol.h
index 886311917..ac4404451 100644
--- a/src/multimedia/controls/qmediaplayercontrol.h
+++ b/src/multimedia/controls/qmediaplayercontrol.h
@@ -40,7 +40,6 @@
#ifndef QMEDIAPLAYERCONTROL_H
#define QMEDIAPLAYERCONTROL_H
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qmediaplayer.h>
#include <QtMultimedia/qmediatimerange.h>
#include <QtMultimedia/qaudiodeviceinfo.h>
@@ -127,9 +126,6 @@ protected:
explicit QMediaPlayerControl(QObject *parent = nullptr);
};
-#define QMediaPlayerControl_iid "org.qt-project.qt.mediaplayercontrol/5.0"
-Q_MEDIA_DECLARE_CONTROL(QMediaPlayerControl, QMediaPlayerControl_iid)
-
QT_END_NAMESPACE
diff --git a/src/multimedia/controls/qmediarecordercontrol.cpp b/src/multimedia/controls/qmediarecordercontrol.cpp
index 5778053d5..e6eb1779f 100644
--- a/src/multimedia/controls/qmediarecordercontrol.cpp
+++ b/src/multimedia/controls/qmediarecordercontrol.cpp
@@ -51,13 +51,8 @@ QT_BEGIN_NAMESPACE
\ingroup multimedia_control
\brief The QMediaRecorderControl class provides access to the recording
- functionality of a QMediaService.
+ functionality.
- Generally you will use the QMediaRecorder class in application code - this
- class is mostly used when implementing a new QMediaService or if there is
- access to specific low level functionality not otherwise present in QMediaRecorder.
-
- If a QMediaService can record media it will implement QMediaRecorderControl.
This control provides a means to set the \l {outputLocation()}{output location},
and record, pause and stop recording via the \l setState() method. It also
provides feedback on the \l {duration()}{duration} of the recording.
diff --git a/src/multimedia/controls/qmediarecordercontrol.h b/src/multimedia/controls/qmediarecordercontrol.h
index dfa40f85d..5831b8948 100644
--- a/src/multimedia/controls/qmediarecordercontrol.h
+++ b/src/multimedia/controls/qmediarecordercontrol.h
@@ -40,7 +40,6 @@
#ifndef QMEDIARECORDERCONTROL_H
#define QMEDIARECORDERCONTROL_H
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qmediarecorder.h>
#include <QtMultimedia/qmediametadata.h>
diff --git a/src/multimedia/controls/qmediastreamscontrol.cpp b/src/multimedia/controls/qmediastreamscontrol.cpp
index a948026a9..cef021bc0 100644
--- a/src/multimedia/controls/qmediastreamscontrol.cpp
+++ b/src/multimedia/controls/qmediastreamscontrol.cpp
@@ -62,21 +62,6 @@ Q_CONSTRUCTOR_FUNCTION(qRegisterMediaStreamControlMetaTypes)
The QMediaStreamsControl class provides descriptions of the available media streams
and allows individual streams to be activated and deactivated.
-
- The interface name of QMediaStreamsControl is \c org.qt-project.qt.mediastreamscontrol/5.0 as
- defined in QMediaStreamsControl_iid.
-
- \sa QMediaService::requestControl()
-*/
-
-/*!
- \macro QMediaStreamsControl_iid
-
- \c org.qt-project.qt.mediastreamscontrol/5.0
-
- Defines the interface name of the QMediaStreamsControl class.
-
- \relates QMediaStreamsControl
*/
/*!
diff --git a/src/multimedia/controls/qmediastreamscontrol.h b/src/multimedia/controls/qmediastreamscontrol.h
index 8fedd4995..1755e102d 100644
--- a/src/multimedia/controls/qmediastreamscontrol.h
+++ b/src/multimedia/controls/qmediastreamscontrol.h
@@ -41,7 +41,6 @@
#ifndef QMEDIASTREAMSCONTROL_H
#define QMEDIASTREAMSCONTROL_H
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qmultimedia.h>
#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaenumdebug.h>
@@ -75,9 +74,6 @@ protected:
explicit QMediaStreamsControl(QObject *parent = nullptr);
};
-#define QMediaStreamsControl_iid "org.qt-project.qt.mediastreamscontrol/5.0"
-Q_MEDIA_DECLARE_CONTROL(QMediaStreamsControl, QMediaStreamsControl_iid)
-
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QMediaStreamsControl::StreamType)
diff --git a/src/multimedia/controls/qvideorenderercontrol.cpp b/src/multimedia/controls/qvideorenderercontrol.cpp
index 4683ed3c7..685c4fb29 100644
--- a/src/multimedia/controls/qvideorenderercontrol.cpp
+++ b/src/multimedia/controls/qvideorenderercontrol.cpp
@@ -52,27 +52,13 @@ QT_BEGIN_NAMESPACE
\ingroup multimedia_control
Using the surface() property of QVideoRendererControl a
- QAbstractVideoSurface may be set as the video render target of a
- QMediaService.
+ QAbstractVideoSurface may be set as the video render target.
\snippet multimedia-snippets/video.cpp Video renderer control
QVideoRendererControl is one of a number of possible video output controls.
- The interface name of QVideoRendererControl is \c org.qt-project.qt.videorenderercontrol/5.0 as
- defined in QVideoRendererControl_iid.
-
- \sa QMediaService::requestControl(), QVideoWidget
-*/
-
-/*!
- \macro QVideoRendererControl_iid
-
- \c org.qt-project.qt.videorenderercontrol/5.0
-
- Defines the interface name of the QVideoRendererControl class.
-
- \relates QVideoRendererControl
+ \sa QVideoWidget
*/
/*!
diff --git a/src/multimedia/controls/qvideorenderercontrol.h b/src/multimedia/controls/qvideorenderercontrol.h
index bc2f27fcf..3865b90ce 100644
--- a/src/multimedia/controls/qvideorenderercontrol.h
+++ b/src/multimedia/controls/qvideorenderercontrol.h
@@ -40,7 +40,8 @@
#ifndef QVIDEORENDERERCONTROL_H
#define QVIDEORENDERERCONTROL_H
-#include <QtMultimedia/qmediaservice.h>
+#include <QtCore/qobject.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
QT_BEGIN_NAMESPACE
@@ -57,9 +58,6 @@ protected:
explicit QVideoRendererControl(QObject *parent = nullptr);
};
-#define QVideoRendererControl_iid "org.qt-project.qt.videorenderercontrol/5.0"
-Q_MEDIA_DECLARE_CONTROL(QVideoRendererControl, QVideoRendererControl_iid)
-
QT_END_NAMESPACE
diff --git a/src/multimedia/controls/qvideowindowcontrol.cpp b/src/multimedia/controls/qvideowindowcontrol.cpp
index f5e2259a8..6520b12df 100644
--- a/src/multimedia/controls/qvideowindowcontrol.cpp
+++ b/src/multimedia/controls/qvideowindowcontrol.cpp
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
The winId() property QVideoWindowControl allows a platform specific window
- ID to be set as the video render target of a QMediaService. The
+ ID to be set as the video render target. The
displayRect() property is used to set the region of the window the video
should be rendered to, and the aspectRatioMode() property indicates how the
video should be scaled to fit the displayRect().
@@ -61,20 +61,7 @@ QT_BEGIN_NAMESPACE
QVideoWindowControl is one of a number of possible video output controls.
- The interface name of QVideoWindowControl is \c org.qt-project.qt.videowindowcontrol/5.0 as
- defined in QVideoWindowControl_iid.
-
- \sa QMediaService::requestControl(), QVideoWidget
-*/
-
-/*!
- \macro QVideoWindowControl_iid
-
- \c org.qt-project.qt.videowindowcontrol/5.0
-
- Defines the interface name of the QVideoWindowControl class.
-
- \relates QVideoWindowControl
+ \sa QVideoWidget
*/
/*!
diff --git a/src/multimedia/controls/qvideowindowcontrol.h b/src/multimedia/controls/qvideowindowcontrol.h
index 7f7012494..f8222fdf9 100644
--- a/src/multimedia/controls/qvideowindowcontrol.h
+++ b/src/multimedia/controls/qvideowindowcontrol.h
@@ -40,7 +40,8 @@
#ifndef QVIDEOWINDOWCONTROL_H
#define QVIDEOWINDOWCONTROL_H
-#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
+#include <QtCore/qobject.h>
#include <QtCore/qrect.h>
#include <QtCore/qsize.h>
#include <QtGui/qwindowdefs.h>
@@ -95,9 +96,6 @@ protected:
explicit QVideoWindowControl(QObject *parent = nullptr);
};
-#define QVideoWindowControl_iid "org.qt-project.qt.videowindowcontrol/5.0"
-Q_MEDIA_DECLARE_CONTROL(QVideoWindowControl, QVideoWindowControl_iid)
-
QT_END_NAMESPACE
diff --git a/src/multimedia/doc/snippets/multimedia-snippets/audiorecorder.cpp b/src/multimedia/doc/snippets/multimedia-snippets/audiorecorder.cpp
index 7f311e1ab..bf4a321ea 100644
--- a/src/multimedia/doc/snippets/multimedia-snippets/audiorecorder.cpp
+++ b/src/multimedia/doc/snippets/multimedia-snippets/audiorecorder.cpp
@@ -40,7 +40,6 @@
#include <QtWidgets>
#include <qaudiorecorder.h>
-#include <qmediaservice.h>
#include <QtMultimedia/qaudioformat.h>
diff --git a/src/multimedia/doc/snippets/multimedia-snippets/media.cpp b/src/multimedia/doc/snippets/multimedia-snippets/media.cpp
index f72679606..6b417cc74 100644
--- a/src/multimedia/doc/snippets/multimedia-snippets/media.cpp
+++ b/src/multimedia/doc/snippets/multimedia-snippets/media.cpp
@@ -44,7 +44,6 @@
#include "qmediaplaylist.h"
#include "qmediarecorder.h"
-#include "qmediaservice.h"
#include "qmediaplayercontrol.h"
#include "qmediaplayer.h"
#include "qvideowidget.h"
@@ -66,7 +65,6 @@ class MediaExample : public QObject {
private:
// Common naming
- QMediaService *mediaService;
QVideoWidget *videoWidget;
QWidget *widget;
QMediaPlayer *player;
@@ -86,20 +84,6 @@ private:
void MediaExample::MediaControl()
{
- {
- //! [Request control]
- QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
- mediaService->requestControl("org.qt-project.qt.mediaplayercontrol/5.0"));
- //! [Request control]
- Q_UNUSED(control);
- }
-
- {
- //! [Request control templated]
- QMediaPlayerControl *control = mediaService->requestControl<QMediaPlayerControl *>();
- //! [Request control templated]
- Q_UNUSED(control);
- }
}
diff --git a/src/multimedia/doc/snippets/multimedia-snippets/video.cpp b/src/multimedia/doc/snippets/multimedia-snippets/video.cpp
index 6308b5eb0..2e290408f 100644
--- a/src/multimedia/doc/snippets/multimedia-snippets/video.cpp
+++ b/src/multimedia/doc/snippets/multimedia-snippets/video.cpp
@@ -39,7 +39,6 @@
/* Video related snippets */
#include "qvideorenderercontrol.h"
-#include "qmediaservice.h"
#include "qmediaplayer.h"
#include "qabstractvideosurface.h"
#include "qvideowindowcontrol.h"
@@ -112,7 +111,6 @@ class VideoExample : public QObject {
Q_OBJECT
public:
void VideoGraphicsItem();
- void VideoRendererControl();
void VideoWidget();
void VideoWindowControl();
void VideoWidgetControl();
@@ -120,7 +118,6 @@ public:
private:
// Common naming
- QMediaService *mediaService;
QMediaPlaylist *playlist;
QVideoWidget *videoWidget;
QWidget *widget;
@@ -131,14 +128,6 @@ private:
QGraphicsView *graphicsView;
};
-void VideoExample::VideoRendererControl()
-{
- //! [Video renderer control]
- QVideoRendererControl *rendererControl = mediaService->requestControl<QVideoRendererControl *>();
- rendererControl->setSurface(myVideoSurface);
- //! [Video renderer control]
-}
-
void VideoExample::VideoWidget()
{
//! [Video widget]
diff --git a/src/multimedia/doc/src/multimediabackend.qdoc b/src/multimedia/doc/src/multimediabackend.qdoc
index 48d598999..39b2841a2 100644
--- a/src/multimedia/doc/src/multimediabackend.qdoc
+++ b/src/multimedia/doc/src/multimediabackend.qdoc
@@ -40,100 +40,7 @@
A multimedia backend provides the glue between platform-specific libraries, and
Qt Multimedia. In some cases the available cross-platform Multimedia APIs or
implementations are not sufficient, or not immediately available on a certain
-platform. Alternatively, the multimedia implementation on a platform might expose
-certain extra properties or functionality that other platforms do not, or a finer
-degree of control might be possible. For these cases, it is possible to use
-extended controls directly.
-\omit
-In addition, if you plan to port the Qt Multimedia APIs to a new platform, you do
-this by implementing certain control and service classes, as detailed below.
-
-\section1 Extending the API
-
-For the developer who wishes to extend the functionality of the Qt Multimedia
-classes there are several classes of particular importance. The classes
-providing default functionality are QMediaService, QMediaServiceProvider and
-QMediaControl. Some of these classes are not in the public API since they
-are very seldom useful to application developers.
-
-To extend the Multimedia API you would use the following three classes or
-classes derived from them.
-
- \list
- \li QMediaServiceProvider is used by the top level client class to
- request a service. The top level class knowing what kind of service it needs.
-
- \li \l QMediaService provides a service and when asked by the top level
- object, say a component, will return a QMediaControl object.
-
- \li \l QMediaControl allows the control of the service using a known interface.
- \endlist
-
-Consider a developer creating, for example, a media player class called MyPlayer.
-It may have special requirements beyond ordinary media players and so may
-need a custom service and a custom control. We can subclass QMediaServiceProvider
-to create our MyServiceProvider class. Also we will create a
-MyMediaService, and the MyMediaControl to manipulate the media service.
-
-The MyPlayer object calls MyServiceProvider::requestService() to get an
-instance of MyMediaService. Then the MyPlayer object calls this service
-object it has just received and calling \l {QMediaService::requestControl()}{requestControl()}
-it will receive the control object derived from QMediaControl.
-
-Now we have all the parts necessary for our media application. We have the service
-provider, the service it provides and the control used to manipulate the
-service. Since our MyPlayer object has instances of the service and its
-control then it would be possible for these to be used by associated classes
-that could do additional actions, perhaps with their own control since the
-parameter to requestControl() is a zero-terminated string, \e {const char *},
-for the interface.
-
-\section2 Adding a Media Service Provider
-
-In general, adding a new media service provider is outside the scope of this documentation.
-For best results, consult the existing provider source code, and seek assistance on the relevant
-mailing lists and IRC channels.
-
-The base class for creating new service providers is \l{QMediaServiceProvider}.
-The user must implement the \l{QMediaServiceProvider::requestService()}{requestService()}
-function
-
-\code
- QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint);
-\endcode
-
-The details of implementation will depend on the provider. Looking at the
-class \l QMediaServiceProvider for the default implementation. Notice that
-\l {QMediaServiceProvider::requestService()}{requestService()} uses the
-\l QMediaServiceProviderHint to look for the appropriate plugin and then to
-insert it into the plugin map. However, for a specific service provider there
-is probably no need for this approach, it will simply depend on what the
-developer wants to implement.
-
-Other methods that may be overloaded
-\code
- void releaseService(QMediaService *service);
-
- QtMediaServices::SupportEstimate hasSupport(const QByteArray &serviceType,
- const QString &mimeType,
- const QStringList& codecs,
- int flags) const;
-
- QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const;
-
- QList<QByteArray> devices(const QByteArray &serviceType) const;
-
- QString deviceDescription(const QByteArray &serviceType, const QByteArray &device);
-\endcode
-
-The choice of what needs to be done depends on what the developer wishes to do with the service.
-
-\endomit
-
-\section2 Classes for service implementers.
-
-\annotatedlist multimedia_control
-
+platform.
*/
diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro
index 47ed2414c..1cd190c4d 100644
--- a/src/multimedia/multimedia.pro
+++ b/src/multimedia/multimedia.pro
@@ -12,7 +12,6 @@ INCLUDEPATH *= .
PRIVATE_HEADERS += \
qtmultimediaglobal_p.h \
qmediapluginloader_p.h \
- qmediaservice_p.h \
qmediastoragelocation_p.h \
qmultimediautils_p.h \
@@ -21,7 +20,6 @@ PUBLIC_HEADERS += \
qmediadevicemanager.h \
qmediaenumdebug.h \
qmediametadata.h \
- qmediaservice.h \
qmediatimerange.h \
qmultimedia.h \
qmediaformat.h
@@ -30,7 +28,6 @@ SOURCES += \
qmediadevicemanager.cpp \
qmediametadata.cpp \
qmediapluginloader.cpp \
- qmediaservice.cpp \
qmediatimerange.cpp \
qmediastoragelocation.cpp \
qmultimedia.cpp \
diff --git a/src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h b/src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h
index c5d6fb238..998015d35 100644
--- a/src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h
+++ b/src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h
@@ -52,7 +52,6 @@
// We mean it.
//
-#include <qmediaservice.h>
#include <private/qmediaplatformcaptureinterface_p.h>
#include <private/qmediaplatformintegration_p.h>
diff --git a/src/multimedia/platform/qmediaplatformcaptureinterface_p.h b/src/multimedia/platform/qmediaplatformcaptureinterface_p.h
index 570f83da1..a18619574 100644
--- a/src/multimedia/platform/qmediaplatformcaptureinterface_p.h
+++ b/src/multimedia/platform/qmediaplatformcaptureinterface_p.h
@@ -51,7 +51,7 @@
//
#include <private/qtmultimediaglobal_p.h>
-#include <qmediaservice.h>
+#include <QtCore/qobject.h>
QT_BEGIN_NAMESPACE
class QCameraControl;
diff --git a/src/multimedia/platform/qmediaplatformplayerinterface_p.h b/src/multimedia/platform/qmediaplatformplayerinterface_p.h
index 21e762131..ac728341d 100644
--- a/src/multimedia/platform/qmediaplatformplayerinterface_p.h
+++ b/src/multimedia/platform/qmediaplatformplayerinterface_p.h
@@ -51,7 +51,7 @@
//
#include <private/qtmultimediaglobal_p.h>
-#include <qmediaservice.h>
+#include <QtCore/qobject.h>
QT_BEGIN_NAMESPACE
diff --git a/src/multimedia/platform/qnx/camera/bbcameraservice.cpp b/src/multimedia/platform/qnx/camera/bbcameraservice.cpp
index d8e752f66..185964400 100644
--- a/src/multimedia/platform/qnx/camera/bbcameraservice.cpp
+++ b/src/multimedia/platform/qnx/camera/bbcameraservice.cpp
@@ -55,7 +55,7 @@
QT_BEGIN_NAMESPACE
BbCameraService::BbCameraService(QObject *parent)
- : QMediaService(parent)
+ : QObject(parent)
, m_cameraSession(new BbCameraSession(this))
, m_cameraAudioEncoderSettingsControl(new BbCameraAudioEncoderSettingsControl(m_cameraSession, this))
, m_cameraControl(new BbCameraControl(m_cameraSession, this))
diff --git a/src/multimedia/platform/qnx/camera/bbcameraservice_p.h b/src/multimedia/platform/qnx/camera/bbcameraservice_p.h
index 70d6c37a4..5bfc92b6d 100644
--- a/src/multimedia/platform/qnx/camera/bbcameraservice_p.h
+++ b/src/multimedia/platform/qnx/camera/bbcameraservice_p.h
@@ -75,8 +75,9 @@ public:
explicit BbCameraService(QObject *parent = 0);
~BbCameraService();
- virtual QMediaControl* requestControl(const char *name);
- virtual void releaseControl(QMediaControl *control);
+ QCameraControl *cameraControl() override;
+ QCameraImageCaptureControl *imageCaptureControl() override;
+ QMediaRecorderControl *mediaRecorderControl() override;
private:
BbCameraSession* m_cameraSession;
diff --git a/src/multimedia/platform/qnx/mediaplayer/mmrenderermediaplayerservice.cpp b/src/multimedia/platform/qnx/mediaplayer/mmrenderermediaplayerservice.cpp
index fe111aca0..e76da2b38 100644
--- a/src/multimedia/platform/qnx/mediaplayer/mmrenderermediaplayerservice.cpp
+++ b/src/multimedia/platform/qnx/mediaplayer/mmrenderermediaplayerservice.cpp
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
MmRendererMediaPlayerService::MmRendererMediaPlayerService(QObject *parent)
- : QMediaService(parent),
+ : QObject(parent),
m_videoRendererControl(0),
m_videoWindowControl(0),
m_mediaPlayerControl(0),
diff --git a/src/multimedia/platform/windows/player/mfplayerservice_p.h b/src/multimedia/platform/windows/player/mfplayerservice_p.h
index 938218cbb..e986c2111 100644
--- a/src/multimedia/platform/windows/player/mfplayerservice_p.h
+++ b/src/multimedia/platform/windows/player/mfplayerservice_p.h
@@ -55,7 +55,6 @@
#include <mfidl.h>
#include "qmediaplayer.h"
-#include "qmediaservice.h"
#include "qmediatimerange.h"
#include <private/qmediaplatformplayerinterface_p.h>
diff --git a/src/multimedia/platform/windows/player/mfplayersession_p.h b/src/multimedia/platform/windows/player/mfplayersession_p.h
index 90f17adfb..d44ca61f7 100644
--- a/src/multimedia/platform/windows/player/mfplayersession_p.h
+++ b/src/multimedia/platform/windows/player/mfplayersession_p.h
@@ -55,7 +55,6 @@
#include <mfidl.h>
#include "qmediaplayer.h"
-#include "qmediaservice.h"
#include "qmediatimerange.h"
#include <QtCore/qcoreevent.h>
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp
index b0b978388..e2d51a2d9 100644
--- a/src/multimedia/playback/qmediaplayer.cpp
+++ b/src/multimedia/playback/qmediaplayer.cpp
@@ -41,7 +41,6 @@
#include "qvideosurfaces_p.h"
#include "private/qobject_p.h"
-#include <qmediaservice.h>
#include <qmediaplayercontrol.h>
#include <private/qmediaplatformplayerinterface_p.h>
#include <private/qmediaplatformintegration_p.h>
diff --git a/src/multimedia/playback/qmediaplaylist.cpp b/src/multimedia/playback/qmediaplaylist.cpp
index d1e780104..73b8bfe27 100644
--- a/src/multimedia/playback/qmediaplaylist.cpp
+++ b/src/multimedia/playback/qmediaplaylist.cpp
@@ -39,7 +39,6 @@
#include "qmediaplaylist.h"
#include "qmediaplaylist_p.h"
-#include "qmediaservice.h"
#include "qmediaplayercontrol.h"
#include "qplaylistfileparser_p.h"
diff --git a/src/multimedia/qmediaservice.cpp b/src/multimedia/qmediaservice.cpp
deleted file mode 100644
index 197bda445..000000000
--- a/src/multimedia/qmediaservice.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qmediaservice.h"
-#include "qmediaservice_p.h"
-
-#include <QtCore/qtimer.h>
-
-
-
-QT_BEGIN_NAMESPACE
-
-
-/*!
- \class QMediaService
- \obsolete
- \brief The QMediaService class provides a common base class for media
- service implementations.
- \ingroup multimedia
- \ingroup multimedia_control
- \ingroup multimedia_core
- \inmodule QtMultimedia
-
- Media services provide implementations of the functionality promised
- by media objects, and allow multiple providers to implement a QMediaSource.
-
- To provide the functionality of a QMediaSource media services implement
- QMediaControl interfaces. Services typically implement one core media
- control which provides the core feature of a media object, and some
- number of additional controls which provide either optional features of
- the media object, or features of a secondary media object or peripheral
- object.
-
- A pointer to media service's QMediaControl implementation can be obtained
- by passing the control's interface name to the requestControl() function.
-
- \snippet multimedia-snippets/media.cpp Request control
-
- \sa QMediaSource, QMediaControl
-*/
-
-/*!
- Construct a media service with the given \a parent. This class is meant as a
- base class for Multimedia services so this constructor is protected.
-*/
-
-QMediaService::QMediaService(QObject *parent)
- : QObject(*new QMediaServicePrivate, parent)
-{
-}
-
-/*!
- \internal
-*/
-QMediaService::QMediaService(QMediaServicePrivate &dd, QObject *parent)
- : QObject(dd, parent)
-{
-}
-
-/*!
- Destroys a media service.
-*/
-
-QMediaService::~QMediaService()
-{
-}
-
-/*!
- \fn QObject *QMediaService::requestControl(const char *interface)
-
- Returns a pointer to the media control implementing \a interface.
-
- If the service does not implement the control, or if it is unavailable a
- null pointer is returned instead.
-
- Controls must be returned to the service when no longer needed using the
- releaseControl() function.
-*/
-
-/*!
- \fn T QMediaService::requestControl()
-
- Returns a pointer to the media control of type T implemented by a media service.
-
- If the service does not implement the control, or if it is unavailable a
- null pointer is returned instead.
-
- Controls must be returned to the service when no longer needed using the
- releaseControl() function.
-*/
-
-/*!
- \fn void QMediaService::releaseControl(QObject *control);
-
- Releases a \a control back to the service.
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qmediaservice.cpp"
diff --git a/src/multimedia/qmediaservice.h b/src/multimedia/qmediaservice.h
deleted file mode 100644
index d28037baf..000000000
--- a/src/multimedia/qmediaservice.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QABSTRACTMEDIASERVICE_H
-#define QABSTRACTMEDIASERVICE_H
-
-#include <QtMultimedia/qtmultimediaglobal.h>
-#include <QtCore/qobject.h>
-#include <QtCore/qstringlist.h>
-
-QT_BEGIN_NAMESPACE
-
-template <typename T> const char *qmediacontrol_iid() { return nullptr; }
-
-#define Q_MEDIA_DECLARE_CONTROL(Class, IId) \
- template <> inline const char *qmediacontrol_iid<Class *>() { return IId; }
-
-class QMediaServicePrivate;
-class Q_MULTIMEDIA_EXPORT QMediaService : public QObject
-{
- Q_OBJECT
-
-public:
- ~QMediaService();
-
- virtual QObject* requestControl(const char *name) = 0;
-
- template <typename T> inline T requestControl() {
- if (QObject *control = requestControl(qmediacontrol_iid<T>())) {
- if (T typedControl = qobject_cast<T>(control))
- return typedControl;
- releaseControl(control);
- }
- return 0;
- }
-
- virtual void releaseControl(QObject *control) = 0;
-
-protected:
- QMediaService(QObject* parent);
- QMediaService(QMediaServicePrivate &dd, QObject *parent);
-
-private:
- Q_DECLARE_PRIVATE(QMediaService)
-};
-
-QT_END_NAMESPACE
-
-
-#endif // QABSTRACTMEDIASERVICE_H
-
diff --git a/src/multimedia/qmediaservice_p.h b/src/multimedia/qmediaservice_p.h
deleted file mode 100644
index a9dbd5d29..000000000
--- a/src/multimedia/qmediaservice_p.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QABSTRACTMEDIASERVICE_P_H
-#define QABSTRACTMEDIASERVICE_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 "private/qobject_p.h"
-
-QT_BEGIN_NAMESPACE
-
-
-class QAudioDeviceControl;
-
-class QMediaServicePrivate : public QObjectPrivate
-{
- Q_DECLARE_PUBLIC(QMediaService)
-public:
- QMediaServicePrivate() {}
- virtual ~QMediaServicePrivate() {}
-};
-
-QT_END_NAMESPACE
-
-
-
-#endif
diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp
index 031d9a765..4f4cf8051 100644
--- a/src/multimedia/recording/qmediarecorder.cpp
+++ b/src/multimedia/recording/qmediarecorder.cpp
@@ -41,7 +41,6 @@
#include "qmediarecorder_p.h"
#include <qmediarecordercontrol.h>
-#include <qmediaservice.h>
#include <qaudiodeviceinfo.h>
#include <qcamera.h>
#include <qcameracontrol.h>
diff --git a/src/multimediawidgets/doc/snippets/multimedia-snippets/video.cpp b/src/multimediawidgets/doc/snippets/multimedia-snippets/video.cpp
index 917d1e318..434d7b8c6 100644
--- a/src/multimediawidgets/doc/snippets/multimedia-snippets/video.cpp
+++ b/src/multimediawidgets/doc/snippets/multimedia-snippets/video.cpp
@@ -39,7 +39,6 @@
// Video related snippets
// Extracted from src/multimedia/doc/snippets/multimedia-snippets/video.cpp
-#include "qmediaservice.h"
#include "qmediaplayer.h"
#include "qvideowidgetcontrol.h"
#include "qvideowindowcontrol.h"
@@ -54,11 +53,9 @@ class VideoExample : public QObject {
public:
void VideoGraphicsItem();
void VideoWidget();
- void VideoWidgetControl();
private:
// Common naming
- QMediaService *mediaService;
QMediaPlaylist *playlist;
QVideoWidget *videoWidget;
QFormLayout *layout;
@@ -86,14 +83,6 @@ void VideoExample::VideoWidget()
player->stop();
}
-void VideoExample::VideoWidgetControl()
-{
- //! [Video widget control]
- QVideoWidgetControl *widgetControl = mediaService->requestControl<QVideoWidgetControl *>();
- layout->addWidget(widgetControl->videoWidget());
- //! [Video widget control]
-}
-
void VideoExample::VideoGraphicsItem()
{
//! [Video graphics item]
diff --git a/src/multimediawidgets/qgraphicsvideoitem.cpp b/src/multimediawidgets/qgraphicsvideoitem.cpp
index 66f09d672..81c9de716 100644
--- a/src/multimediawidgets/qgraphicsvideoitem.cpp
+++ b/src/multimediawidgets/qgraphicsvideoitem.cpp
@@ -63,30 +63,19 @@ public:
QGraphicsVideoItem *q_ptr = nullptr;
QPainterVideoSurface *surface = nullptr;
- QMediaService *service = nullptr;
Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio;
QRectF rect;
QRectF boundingRect;
QRectF sourceRect;
QSizeF nativeSize;
- void clearService();
void updateRects();
void _q_present();
void _q_formatChanged(const QVideoSurfaceFormat &format);
void _q_updateNativeSize();
- void _q_serviceDestroyed();
};
-void QGraphicsVideoItemPrivate::clearService()
-{
- if (service) {
- QObject::disconnect(service, SIGNAL(destroyed()), q_ptr, SLOT(_q_serviceDestroyed()));
- service = nullptr;
- }
-}
-
void QGraphicsVideoItemPrivate::updateRects()
{
q_ptr->prepareGeometryChange();
@@ -139,14 +128,6 @@ void QGraphicsVideoItemPrivate::_q_updateNativeSize()
}
}
-void QGraphicsVideoItemPrivate::_q_serviceDestroyed()
-{
- service = nullptr;
-
- surface->stop();
-}
-
-
/*!
\class QGraphicsVideoItem
diff --git a/src/multimediawidgets/qgraphicsvideoitem.h b/src/multimediawidgets/qgraphicsvideoitem.h
index ab193b327..23d729057 100644
--- a/src/multimediawidgets/qgraphicsvideoitem.h
+++ b/src/multimediawidgets/qgraphicsvideoitem.h
@@ -99,7 +99,6 @@ private:
Q_DECLARE_PRIVATE(QGraphicsVideoItem)
Q_PRIVATE_SLOT(d_func(), void _q_present())
Q_PRIVATE_SLOT(d_func(), void _q_updateNativeSize())
- Q_PRIVATE_SLOT(d_func(), void _q_serviceDestroyed())
};
QT_END_NAMESPACE
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_p.h b/src/qtmultimediaquicktools/qdeclarativevideooutput_p.h
index 9686aacf9..7a4111602 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput_p.h
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_p.h
@@ -64,7 +64,6 @@ Q_MOC_INCLUDE("QtMultimedia/qabstractvideosurface.h")
QT_BEGIN_NAMESPACE
-class QMediaService;
class QDeclarativeVideoBackend;
class QVideoOutputOrientationHandler;
class QAbstractVideoSurface;
diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
index cd36c3537..e265f85a4 100644
--- a/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
+++ b/src/qtmultimediaquicktools/qdeclarativevideooutput_render.cpp
@@ -42,7 +42,6 @@
#include "qdeclarativevideooutput_p.h"
#include <QtMultimedia/qabstractvideofilter.h>
#include <QtMultimedia/qvideorenderercontrol.h>
-#include <QtMultimedia/qmediaservice.h>
#include <QtCore/qloggingcategory.h>
#include <private/qmediapluginloader_p.h>
#include <private/qsgvideonode_p.h>
diff --git a/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp b/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp
index 8fe80e4dd..170c25c5b 100644
--- a/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp
+++ b/tests/auto/integration/qcamerabackend/tst_qcamerabackend.cpp
@@ -38,7 +38,6 @@
#include <qcamerafocuscontrol.h>
#include <qcameraimagecapturecontrol.h>
#include <qcameraimageprocessingcontrol.h>
-#include <qmediaservice.h>
#include <qcamera.h>
#include <qcamerainfo.h>
#include <qcameraimagecapture.h>
diff --git a/tests/auto/integration/qdeclarativevideooutput_window/tst_qdeclarativevideooutput_window.cpp b/tests/auto/integration/qdeclarativevideooutput_window/tst_qdeclarativevideooutput_window.cpp
index 2bdace79e..126f07a1a 100644
--- a/tests/auto/integration/qdeclarativevideooutput_window/tst_qdeclarativevideooutput_window.cpp
+++ b/tests/auto/integration/qdeclarativevideooutput_window/tst_qdeclarativevideooutput_window.cpp
@@ -36,7 +36,6 @@
#include <QtQml/qqmlcomponent.h>
#include <QtQuick/qquickitem.h>
#include <QtQuick/qquickview.h>
-#include <QtMultimedia/qmediaservice.h>
#include <QtMultimedia/qvideowindowcontrol.h>
Q_DECLARE_METATYPE(QDeclarativeVideoOutput::FillMode)
@@ -104,35 +103,11 @@ private:
bool m_fullScreen = 0;
};
-class QtTestVideoService : public QMediaService
-{
- Q_OBJECT
-public:
- QtTestVideoService(QtTestWindowControl *window)
- : QMediaService(nullptr)
- , windowControl(window)
- {}
-
- QObject *requestControl(const char *name) override
- {
- if (qstrcmp(name, QVideoWindowControl_iid) == 0)
- return windowControl;
- return nullptr;
- }
-
- void releaseControl(QObject *control) override
- {
- Q_ASSERT(control);
- }
-
- QtTestWindowControl *windowControl;
-};
-
class QtTestVideoObject : public QObject
{
Q_OBJECT
public:
- explicit QtTestVideoObject(QtTestVideoService */*service*/)
+ explicit QtTestVideoObject()
: QObject(nullptr)
{
}
@@ -144,8 +119,6 @@ class tst_QDeclarativeVideoOutputWindow : public QObject
public:
tst_QDeclarativeVideoOutputWindow()
: QObject(nullptr)
- , m_service(new QtTestVideoService(&m_windowControl))
- , m_videoObject(m_service)
, m_sourceObject(&m_videoObject)
{
}
@@ -170,7 +143,6 @@ private:
QQuickItem *m_videoItem;
QScopedPointer<QQuickItem> m_rootItem;
QtTestWindowControl m_windowControl;
- QtTestVideoService *m_service;
QtTestVideoObject m_videoObject;
SourceObject m_sourceObject;
QQuickView m_view;
@@ -198,8 +170,6 @@ void tst_QDeclarativeVideoOutputWindow::cleanupTestCase()
{
// Make sure that QDeclarativeVideoOutput doesn't segfault when it is being destroyed after
// the service is already gone
- delete m_service;
- m_service = nullptr;
m_view.setSource(QUrl());
m_rootItem.reset();
}
diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
index 259ccaceb..2231daddc 100644
--- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
+++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp
@@ -29,7 +29,6 @@
#include <QtTest/QtTest>
#include <QDebug>
#include <qabstractvideosurface.h>
-#include "qmediaservice.h"
#include "qmediaplayer.h"
#include <qmediaplaylist.h>
#include <qmediametadata.h>
diff --git a/tests/auto/unit/mockbackend/CMakeLists.txt b/tests/auto/unit/mockbackend/CMakeLists.txt
index a8fd501d5..28d16108b 100644
--- a/tests/auto/unit/mockbackend/CMakeLists.txt
+++ b/tests/auto/unit/mockbackend/CMakeLists.txt
@@ -23,7 +23,6 @@ target_sources(QtMultimediaMockBackend INTERFACE
mockmediaplayerservice.h
mockmediarecordercontrol.h
mockmediarecorderservice.h
- mockmediaservice.h
mockmediastreamscontrol.h
mockvideosurface.h
qmockdevicemanager.cpp
diff --git a/tests/auto/unit/mockbackend/common.pri b/tests/auto/unit/mockbackend/common.pri
index fd64fe21b..72532a53a 100644
--- a/tests/auto/unit/mockbackend/common.pri
+++ b/tests/auto/unit/mockbackend/common.pri
@@ -1,4 +1,3 @@
INCLUDEPATH += $$PWD
HEADERS += \
- $$PWD/mockmediaservice.h \
$$PWD/mockvideosurface.h
diff --git a/tests/auto/unit/mockbackend/mockaudiodecodercontrol.h b/tests/auto/unit/mockbackend/mockaudiodecodercontrol.h
index 4216bde86..9cc1e7559 100644
--- a/tests/auto/unit/mockbackend/mockaudiodecodercontrol.h
+++ b/tests/auto/unit/mockbackend/mockaudiodecodercontrol.h
@@ -29,7 +29,6 @@
#ifndef MOCKAUDIODECODERCONTROL_H
#define MOCKAUDIODECODERCONTROL_H
-#include "qmediaservice.h"
#include "qaudiodecodercontrol.h"
#include <QtCore/qpair.h>
diff --git a/tests/auto/unit/mockbackend/mockmediarecorderservice.h b/tests/auto/unit/mockbackend/mockmediarecorderservice.h
index 540cc1b14..8ef815a09 100644
--- a/tests/auto/unit/mockbackend/mockmediarecorderservice.h
+++ b/tests/auto/unit/mockbackend/mockmediarecorderservice.h
@@ -29,8 +29,6 @@
#ifndef MOCKSERVICE_H
#define MOCKSERVICE_H
-#include "qmediaservice.h"
-
#include "mockmediarecordercontrol.h"
#include "mockcamerafocuscontrol.h"
#include "mockcameraimageprocessingcontrol.h"
diff --git a/tests/auto/unit/mockbackend/mockmediaservice.h b/tests/auto/unit/mockbackend/mockmediaservice.h
deleted file mode 100644
index 977ef7237..000000000
--- a/tests/auto/unit/mockbackend/mockmediaservice.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef MOCKMEDIASERVICE_H
-#define MOCKMEDIASERVICE_H
-
-#include "qmediaservice.h"
-#include <QtCore/QMap>
-
-Q_DECLARE_METATYPE(QObject *)
-
-class MockMediaService : public QMediaService
-{
- Q_OBJECT
-public:
- MockMediaService(QObject *parent, QObject *control):
- QMediaService(parent),
- mockControl(control) {}
-
- MockMediaService(QObject *parent, QMap<QString, QObject *> controls):
- QMediaService(parent),
- mockControl(0),
- mockControls(controls) {}
-
- QObject *requestControl(const char *key)
- {
- if (mockControl)
- return mockControl;
- else
- return mockControls.value(key);
- }
-
- void releaseControl(QObject *) {}
-
- QObject *mockControl;
- QMap<QString, QObject *> mockControls;
-};
-
-
-#endif // MOCKMEDIASERVICE_H
diff --git a/tests/auto/unit/multimedia/CMakeLists.txt b/tests/auto/unit/multimedia/CMakeLists.txt
index d41004d59..4866bff33 100644
--- a/tests/auto/unit/multimedia/CMakeLists.txt
+++ b/tests/auto/unit/multimedia/CMakeLists.txt
@@ -12,7 +12,6 @@ add_subdirectory(qmediaplayer)
add_subdirectory(qmediaplaylist)
add_subdirectory(qmediapluginloader)
add_subdirectory(qmediarecorder)
-add_subdirectory(qmediaservice)
add_subdirectory(qmediatimerange)
add_subdirectory(qvideoframe)
add_subdirectory(qvideosurfaceformat)
diff --git a/tests/auto/unit/multimedia/multimedia.pro b/tests/auto/unit/multimedia/multimedia.pro
index 6c7906202..a8bd3c436 100644
--- a/tests/auto/unit/multimedia/multimedia.pro
+++ b/tests/auto/unit/multimedia/multimedia.pro
@@ -13,7 +13,6 @@ SUBDIRS += \
qmediaplaylist \
qmediapluginloader \
qmediarecorder \
- qmediaservice \
qmediatimerange \
qvideoframe \
qvideosurfaceformat \
diff --git a/tests/auto/unit/multimedia/qcamera/tst_qcamera.cpp b/tests/auto/unit/multimedia/qcamera/tst_qcamera.cpp
index 4f7cfc705..e7fc614d3 100644
--- a/tests/auto/unit/multimedia/qcamera/tst_qcamera.cpp
+++ b/tests/auto/unit/multimedia/qcamera/tst_qcamera.cpp
@@ -37,7 +37,6 @@
#include <qcamerafocuscontrol.h>
#include <qcameraimagecapturecontrol.h>
#include <qcameraimageprocessingcontrol.h>
-#include <qmediaservice.h>
#include <qcamera.h>
#include <qcamerainfo.h>
#include <qcameraimagecapture.h>
diff --git a/tests/auto/unit/multimedia/qcameraimagecapture/tst_qcameraimagecapture.cpp b/tests/auto/unit/multimedia/qcameraimagecapture/tst_qcameraimagecapture.cpp
index dfae2c5d4..71761b3e8 100644
--- a/tests/auto/unit/multimedia/qcameraimagecapture/tst_qcameraimagecapture.cpp
+++ b/tests/auto/unit/multimedia/qcameraimagecapture/tst_qcameraimagecapture.cpp
@@ -44,7 +44,6 @@ Reviewer Name Date Coverage ( Full / Test Case IDs ).
#include <qcamerafocuscontrol.h>
#include <qcameraimagecapturecontrol.h>
#include <qcameraimageprocessingcontrol.h>
-#include <qmediaservice.h>
#include <qcamera.h>
#include <qcameraimagecapture.h>
@@ -53,31 +52,6 @@ Reviewer Name Date Coverage ( Full / Test Case IDs ).
QT_USE_NAMESPACE
-class NullService: public QMediaService
-{
- Q_OBJECT
-
-public:
- NullService(): QMediaService(nullptr)
- {
-
- }
-
- ~NullService() override
- {
-
- }
-
- QObject *requestControl(const char *iid) override
- {
- Q_UNUSED(iid);
- return nullptr;
- }
-
- void releaseControl(QObject *) override {}
-
-};
-
class tst_QCameraImageCapture: public QObject
{
Q_OBJECT
diff --git a/tests/auto/unit/multimedia/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/unit/multimedia/qmediaplayer/tst_qmediaplayer.cpp
index bfc8d8525..02283359e 100644
--- a/tests/auto/unit/multimedia/qmediaplayer/tst_qmediaplayer.cpp
+++ b/tests/auto/unit/multimedia/qmediaplayer/tst_qmediaplayer.cpp
@@ -37,7 +37,6 @@
#include <qmediaplayer.h>
#include <qmediaplayercontrol.h>
#include <qmediaplaylist.h>
-#include <qmediaservice.h>
#include <qmediastreamscontrol.h>
#include <qvideorenderercontrol.h>
diff --git a/tests/auto/unit/multimedia/qmediaplaylist/tst_qmediaplaylist.cpp b/tests/auto/unit/multimedia/qmediaplaylist/tst_qmediaplaylist.cpp
index e1f25446e..29f1695cb 100644
--- a/tests/auto/unit/multimedia/qmediaplaylist/tst_qmediaplaylist.cpp
+++ b/tests/auto/unit/multimedia/qmediaplaylist/tst_qmediaplaylist.cpp
@@ -28,7 +28,6 @@
#include <QtTest/QtTest>
#include <QDebug>
-#include "qmediaservice.h"
#include "qmediaplaylist.h"
//TESTED_COMPONENT=src/multimedia
diff --git a/tests/auto/unit/multimedia/qmediarecorder/tst_qmediarecorder.cpp b/tests/auto/unit/multimedia/qmediarecorder/tst_qmediarecorder.cpp
index f9066d037..4c04019d4 100644
--- a/tests/auto/unit/multimedia/qmediarecorder/tst_qmediarecorder.cpp
+++ b/tests/auto/unit/multimedia/qmediarecorder/tst_qmediarecorder.cpp
@@ -31,7 +31,6 @@
#include <QtTest/QtTest>
#include <QDebug>
#include <QtMultimedia/qmediametadata.h>
-#include <qmediaservice.h>
#include <qmediarecordercontrol.h>
#include <qmediarecorder.h>
#include <qaudioformat.h>
diff --git a/tests/auto/unit/multimedia/qmediaservice/CMakeLists.txt b/tests/auto/unit/multimedia/qmediaservice/CMakeLists.txt
deleted file mode 100644
index a227f1ca4..000000000
--- a/tests/auto/unit/multimedia/qmediaservice/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Generated from qmediaservice.pro.
-
-#####################################################################
-## tst_qmediaservice Test:
-#####################################################################
-
-qt_add_test(tst_qmediaservice
- SOURCES
- tst_qmediaservice.cpp
- PUBLIC_LIBRARIES
- Qt::Gui
- Qt::MultimediaPrivate
-)
diff --git a/tests/auto/unit/multimedia/qmediaservice/qmediaservice.pro b/tests/auto/unit/multimedia/qmediaservice/qmediaservice.pro
deleted file mode 100644
index b95554807..000000000
--- a/tests/auto/unit/multimedia/qmediaservice/qmediaservice.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-CONFIG += testcase
-TARGET = tst_qmediaservice
-
-QT += multimedia-private testlib
-
-SOURCES += tst_qmediaservice.cpp
diff --git a/tests/auto/unit/multimedia/qmediaservice/tst_qmediaservice.cpp b/tests/auto/unit/multimedia/qmediaservice/tst_qmediaservice.cpp
deleted file mode 100644
index c3860930d..000000000
--- a/tests/auto/unit/multimedia/qmediaservice/tst_qmediaservice.cpp
+++ /dev/null
@@ -1,264 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//TESTED_COMPONENT=src/multimedia
-
-#include <QtTest/QtTest>
-
-#include <qmediaservice.h>
-#include <qmediaservice.h>
-
-#include <QtCore/qcoreapplication.h>
-
-QT_BEGIN_NAMESPACE
-
-class QtTestMediaService;
-
-class QtTestMediaControlA : public QObject
-{
- Q_OBJECT
-};
-
-#define QtTestMediaControlA_iid "com.nokia.QtTestMediaControlA"
-Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlA, QtTestMediaControlA_iid)
-
-class QtTestMediaControlB : public QObject
-{
- Q_OBJECT
-};
-
-#define QtTestMediaControlB_iid "com.nokia.QtTestMediaControlB"
-Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlB, QtTestMediaControlB_iid)
-
-
-class QtTestMediaControlC : public QObject
-{
- Q_OBJECT
-};
-
-#define QtTestMediaControlC_iid "com.nokia.QtTestMediaControlC"
-Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlC, QtTestMediaControlA_iid) // Yes A.
-
-class QtTestMediaControlD : public QObject
-{
- Q_OBJECT
-};
-
-#define QtTestMediaControlD_iid "com.nokia.QtTestMediaControlD"
-Q_MEDIA_DECLARE_CONTROL(QtTestMediaControlD, QtTestMediaControlD_iid)
-
-//unimplemented service
-#define QtTestMediaControlE_iid "com.nokia.QtTestMediaControlF"
-class QtTestMediaControlE : public QObject
-{
- Q_OBJECT
-};
-
-/* implementation of child class by inheriting The QMediaService base class for media service implementations. */
-class QtTestMediaService : public QMediaService
-{
- Q_OBJECT
-public:
- int refA = 0;
- int refB = 0;
- int refC = 0;
- QtTestMediaControlA controlA;
- QtTestMediaControlB controlB;
- QtTestMediaControlC controlC;
-
- QtTestMediaService() : QMediaService(nullptr) {}
-
- //requestControl() pure virtual function of QMediaService class.
- QObject *requestControl(const char *name) override
- {
- if (strcmp(name, QtTestMediaControlA_iid) == 0) {
- refA += 1;
- return &controlA;
- }
-
- if (strcmp(name, QtTestMediaControlB_iid) == 0) {
- refB += 1;
- return &controlB;
- }
-
- if (strcmp(name, QtTestMediaControlC_iid) == 0) {
- refA += 1;
- return &controlA;
- }
-
- return nullptr;
- }
-
- //releaseControl() pure virtual function of QMediaService class.
- void releaseControl(QObject *control) override
- {
- if (control == &controlA)
- refA -= 1;
- else if (control == &controlB)
- refB -= 1;
- else if (control == &controlC)
- refC -= 1;
- }
-
- //requestControl() function of QMediaService class.
- using QMediaService::requestControl;
-};
-
-/* Test case implementation for QMediaService class which provides a common base class for media service implementations.*/
-class tst_QMediaService : public QObject
-{
- Q_OBJECT
-private slots:
- void tst_destructor();
- void tst_releaseControl();
- void tst_requestControl();
- void tst_requestControlTemplate();
-
- void initTestCase();
-
- void control_iid();
- void control();
-
-};
-
-/*MaemoAPI-1668 :destructor property test. */
-void tst_QMediaService::tst_destructor()
-{
- QtTestMediaService *service = new QtTestMediaService;
- delete service;
-}
-
-void tst_QMediaService::initTestCase()
-{
-}
-
-/*MaemoAPI-1669 :releaseControl() API property test. */
-void tst_QMediaService::tst_releaseControl()
-{
- //test class instance creation
- QtTestMediaService service;
-
- //Get a pointer to the media control implementing interface and verify.
- QObject *controlA = service.requestControl(QtTestMediaControlA_iid);
- QCOMPARE(controlA, &service.controlA);
- service.releaseControl(controlA); //Controls must be returned to the service when no longer needed
- QVERIFY(service.refA == 0);
-
- //Get a pointer to the media control implementing interface and verify.
- QObject *controlB = service.requestControl(QtTestMediaControlB_iid);
- QCOMPARE(controlB, &service.controlB);
- service.releaseControl(controlB); //Controls must be returned to the service when no longer needed
- QVERIFY(service.refB == 0);
-}
-
-/*MaemoAPI-1670 :requestControl() API property test. */
-void tst_QMediaService::tst_requestControl()
-{
- //test class instance creation
- QtTestMediaService service;
-
- //Get a pointer to the media control implementing interface and verify.
- QObject *controlA = service.requestControl(QtTestMediaControlA_iid);
- QCOMPARE(controlA, &service.controlA);
- service.releaseControl(controlA); //Controls must be returned to the service when no longer needed
-
- //Get a pointer to the media control implementing interface and verify.
- QObject *controlB = service.requestControl(QtTestMediaControlB_iid);
- QCOMPARE(controlB, &service.controlB);
- service.releaseControl(controlB); //Controls must be returned to the service when no longer needed
-
- //If the service does not implement the control, a null pointer is returned instead.
- QObject *controlE = service.requestControl(QtTestMediaControlE_iid);
- QVERIFY(!controlE); //should return null pointer
- service.releaseControl(controlE); //Controls must be returned to the service when no longer needed
-
- //If the service is unavailable a null pointer is returned instead.
- QObject *control = service.requestControl("");
- QVERIFY(!control); //should return null pointer
- service.releaseControl(control); //Controls must be returned to the service when no longer needed
-}
-
-/*MaemoAPI-1671 :requestControl() API property test. */
-void tst_QMediaService::tst_requestControlTemplate()
-{
- //test class instance creation
- QtTestMediaService service;
-
- //Get a pointer to the media control of type T implemented by a media service.
- QtTestMediaControlA *controlA = service.requestControl<QtTestMediaControlA *>();
- QCOMPARE(controlA, &service.controlA);
- service.releaseControl(controlA);
-
- //Get a pointer to the media control of type T implemented by a media service.
- QtTestMediaControlB *controlB = service.requestControl<QtTestMediaControlB *>();
- QCOMPARE(controlB, &service.controlB);
- service.releaseControl(controlB);
-
- QVERIFY(!service.requestControl<QtTestMediaControlC *>()); // Faulty implementation returns A.
- QCOMPARE(service.refA, 0); // Verify the control was released.
-
- QVERIFY(!service.requestControl<QtTestMediaControlD *>()); // No control of that type.
-}
-
-
-void tst_QMediaService::control_iid()
-{
- const char *nullString = nullptr;
-
- // Default implementation.
- QCOMPARE(qmediacontrol_iid<QtTestMediaControlE *>(), nullString);
-
- // Partial template.
- QVERIFY(qstrcmp(qmediacontrol_iid<QtTestMediaControlA *>(), QtTestMediaControlA_iid) == 0);
-}
-
-void tst_QMediaService::control()
-{
- QtTestMediaService service;
-
- QtTestMediaControlA *controlA = service.requestControl<QtTestMediaControlA *>();
- QCOMPARE(controlA, &service.controlA);
- service.releaseControl(controlA);
-
- QtTestMediaControlB *controlB = service.requestControl<QtTestMediaControlB *>();
- QCOMPARE(controlB, &service.controlB);
- service.releaseControl(controlB);
-
- QVERIFY(!service.requestControl<QtTestMediaControlC *>()); // Faulty implementation returns A, but is wrong class
- QCOMPARE(service.refA, 0); // Verify the control was released.
-
- QVERIFY(!service.requestControl<QtTestMediaControlD *>()); // No control of that type.
-}
-
-QT_END_NAMESPACE
-
-QT_USE_NAMESPACE
-
-QTEST_MAIN(tst_QMediaService)
-
-#include "tst_qmediaservice.moc"
diff --git a/tests/auto/unit/multimediawidgets/qcamerawidgets/tst_qcamerawidgets.cpp b/tests/auto/unit/multimediawidgets/qcamerawidgets/tst_qcamerawidgets.cpp
index 724769532..c14121dff 100644
--- a/tests/auto/unit/multimediawidgets/qcamerawidgets/tst_qcamerawidgets.cpp
+++ b/tests/auto/unit/multimediawidgets/qcamerawidgets/tst_qcamerawidgets.cpp
@@ -37,7 +37,6 @@
#include <qcamerafocuscontrol.h>
#include <qcameraimagecapturecontrol.h>
#include <qcameraimageprocessingcontrol.h>
-#include <qmediaservice.h>
#include <qcamera.h>
#include <qcameraimagecapture.h>
#include <qgraphicsvideoitem.h>
diff --git a/tests/auto/unit/qml/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/unit/qml/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
index 24e53712c..f93b5eb43 100644
--- a/tests/auto/unit/qml/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
+++ b/tests/auto/unit/qml/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
@@ -38,7 +38,6 @@
#include <QtMultimedia/qmediametadata.h>
#include <qmediaplayercontrol.h>
-#include <qmediaservice.h>
#include <private/qdeclarativevideooutput_p.h>
#include <QAbstractVideoSurface>