summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-02-12 08:53:01 +0100
committerLars Knoll <lars.knoll@qt.io>2021-02-17 08:27:44 +0000
commitb94b47d472c70124c38d4feb546df26d8015b3be (patch)
treeab744206fb98b100a4bcfcaa6a2d55c8b9f7ed3f /src/multimedia
parent4b45c95b5601acbdcd8aee52cf0d8af136b982e3 (diff)
Kill QMediaSource and QMediaSink
Those aren't used anymore, get rid of them. Change-Id: I5a17f18a3c87c2c13a9009b1f99ef9e708f7636a Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/CMakeLists.txt2
-rw-r--r--src/multimedia/audio/qaudiodecoder.cpp16
-rw-r--r--src/multimedia/camera/qcamera.cpp6
-rw-r--r--src/multimedia/camera/qcamera.h2
-rw-r--r--src/multimedia/camera/qcamera_p.h5
-rw-r--r--src/multimedia/camera/qcameraexposure.cpp5
-rw-r--r--src/multimedia/camera/qcameraexposure.h3
-rw-r--r--src/multimedia/camera/qcamerafocus.cpp8
-rw-r--r--src/multimedia/camera/qcamerafocus.h3
-rw-r--r--src/multimedia/camera/qcameraimagecapture.cpp4
-rw-r--r--src/multimedia/camera/qcameraimagecapture.h3
-rw-r--r--src/multimedia/camera/qcameraimageprocessing.cpp4
-rw-r--r--src/multimedia/camera/qcameraimageprocessing.h5
-rw-r--r--src/multimedia/controls/qcameracontrol.h3
-rw-r--r--src/multimedia/controls/qcameraexposurecontrol.h3
-rw-r--r--src/multimedia/controls/qcamerafocuscontrol.h3
-rw-r--r--src/multimedia/controls/qcameraimageprocessingcontrol.h3
-rw-r--r--src/multimedia/multimedia.pro5
-rw-r--r--src/multimedia/playback/qmediaplayer.cpp18
-rw-r--r--src/multimedia/playback/qmediaplaylist.h3
-rw-r--r--src/multimedia/playback/qmediaplaylist_p.h1
-rw-r--r--src/multimedia/playback/qplaylistfileparser.cpp2
-rw-r--r--src/multimedia/qmediasink.cpp89
-rw-r--r--src/multimedia/qmediasink.h69
-rw-r--r--src/multimedia/qmediasource.cpp216
-rw-r--r--src/multimedia/qmediasource.h91
-rw-r--r--src/multimedia/qmediasource_p.h82
-rw-r--r--src/multimedia/recording/qmediarecorder.cpp19
-rw-r--r--src/multimedia/recording/qmediarecorder.h4
29 files changed, 53 insertions, 624 deletions
diff --git a/src/multimedia/CMakeLists.txt b/src/multimedia/CMakeLists.txt
index 1b59bc192..c9f7dce35 100644
--- a/src/multimedia/CMakeLists.txt
+++ b/src/multimedia/CMakeLists.txt
@@ -55,8 +55,6 @@ qt_internal_add_module(Multimedia
qmediametadata.cpp qmediametadata.h
qmediapluginloader.cpp qmediapluginloader_p.h
qmediaservice.cpp qmediaservice.h qmediaservice_p.h
- qmediasink.cpp qmediasink.h
- qmediasource.cpp qmediasource.h qmediasource_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 94cca780a..aba7e5f58 100644
--- a/src/multimedia/audio/qaudiodecoder.cpp
+++ b/src/multimedia/audio/qaudiodecoder.cpp
@@ -40,11 +40,11 @@
#include "qtmultimediaglobal_p.h"
#include "qaudiodecoder.h"
-#include "qmediasource_p.h"
#include <qmediaservice.h>
#include "qaudiodecodercontrol.h"
#include <private/qmediaplatformintegration_p.h>
+#include <private/qobject_p.h>
#include <QtCore/qcoreevent.h>
#include <QtCore/qmetaobject.h>
@@ -72,15 +72,11 @@ QT_BEGIN_NAMESPACE
\sa QAudioBuffer
*/
-static void qRegisterAudioDecoderMetaTypes()
-{
- qRegisterMetaType<QAudioDecoder::State>("QAudioDecoder::State");
- qRegisterMetaType<QAudioDecoder::Error>("QAudioDecoder::Error");
-}
+#define Q_DECLARE_NON_CONST_PUBLIC(Class) \
+ inline Class* q_func() { return static_cast<Class *>(q_ptr); } \
+ friend class Class;
-Q_CONSTRUCTOR_FUNCTION(qRegisterAudioDecoderMetaTypes)
-
-class QAudioDecoderPrivate : public QMediaSourcePrivate
+class QAudioDecoderPrivate : public QObjectPrivate
{
Q_DECLARE_NON_CONST_PUBLIC(QAudioDecoder)
@@ -94,6 +90,8 @@ public:
void _q_error(int error, const QString &errorString);
};
+#undef Q_DECLARE_NON_CONST_PUBLIC
+
void QAudioDecoderPrivate::_q_stateChanged(QAudioDecoder::State ps)
{
Q_Q(QAudioDecoder);
diff --git a/src/multimedia/camera/qcamera.cpp b/src/multimedia/camera/qcamera.cpp
index a1928bfb2..40f0b24fd 100644
--- a/src/multimedia/camera/qcamera.cpp
+++ b/src/multimedia/camera/qcamera.cpp
@@ -289,7 +289,11 @@ QCameraImageProcessing *QCamera::imageProcessing() const
}
/*!
- Sets the QMediaSink based camera \a viewfinder.
+ Sets a QObject based camera \a viewfinder.
+
+ A QObject based viewfinder is expected to have an invokable videoSurface()
+ method that returns a QAbstractVideoSurface.
+
The previously set viewfinder is detached.
*/
void QCamera::setViewfinder(QObject *viewfinder)
diff --git a/src/multimedia/camera/qcamera.h b/src/multimedia/camera/qcamera.h
index 8946aabf3..44afdbd03 100644
--- a/src/multimedia/camera/qcamera.h
+++ b/src/multimedia/camera/qcamera.h
@@ -46,7 +46,7 @@
#include <QtCore/qpoint.h>
#include <QtCore/qrect.h>
-#include <QtMultimedia/qmediasource.h>
+#include <QtCore/qobject.h>
#include <QtMultimedia/qcameraexposure.h>
#include <QtMultimedia/qcamerafocus.h>
diff --git a/src/multimedia/camera/qcamera_p.h b/src/multimedia/camera/qcamera_p.h
index fc80540b4..ec61a002b 100644
--- a/src/multimedia/camera/qcamera_p.h
+++ b/src/multimedia/camera/qcamera_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include "qmediasource_p.h"
+#include "private/qobject_p.h"
#include "qcamera.h"
#include "qcamerainfo.h"
@@ -62,7 +62,7 @@ class QMediaPlatformCaptureInterface;
class QCameraPrivate : public QObjectPrivate
{
- Q_DECLARE_NON_CONST_PUBLIC(QCamera)
+ Q_DECLARE_PUBLIC(QCamera)
public:
QCameraPrivate()
: QObjectPrivate(),
@@ -85,7 +85,6 @@ public:
QCameraFocus *cameraFocus = nullptr;
QCameraImageProcessing *imageProcessing = nullptr;
- QMediaSink *viewfinder = nullptr;
QObject *capture = nullptr;
QCamera::State state;
diff --git a/src/multimedia/camera/qcameraexposure.cpp b/src/multimedia/camera/qcameraexposure.cpp
index 0c8668c60..b18337792 100644
--- a/src/multimedia/camera/qcameraexposure.cpp
+++ b/src/multimedia/camera/qcameraexposure.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qcameraexposure.h"
-#include "qmediasource_p.h"
+#include "private/qobject_p.h"
#include <qcamera.h>
#include <qcameraexposurecontrol.h>
@@ -63,10 +63,9 @@ QT_BEGIN_NAMESPACE
//#define DEBUG_EXPOSURE_CHANGES 1
-
class QCameraExposurePrivate
{
- Q_DECLARE_NON_CONST_PUBLIC(QCameraExposure)
+ Q_DECLARE_PUBLIC(QCameraExposure)
public:
void init(QCameraControl *cameraControl);
QCameraExposure *q_ptr;
diff --git a/src/multimedia/camera/qcameraexposure.h b/src/multimedia/camera/qcameraexposure.h
index d6550c6e3..9c3e8cbff 100644
--- a/src/multimedia/camera/qcameraexposure.h
+++ b/src/multimedia/camera/qcameraexposure.h
@@ -40,7 +40,8 @@
#ifndef QCAMERAEXPOSURE_H
#define QCAMERAEXPOSURE_H
-#include <QtMultimedia/qmediasource.h>
+#include <QtCore/qobject.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaenumdebug.h>
QT_BEGIN_NAMESPACE
diff --git a/src/multimedia/camera/qcamerafocus.cpp b/src/multimedia/camera/qcamerafocus.cpp
index badc765c3..6fbec82e9 100644
--- a/src/multimedia/camera/qcamerafocus.cpp
+++ b/src/multimedia/camera/qcamerafocus.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qcamerafocus.h"
-#include "qmediasource_p.h"
+#include "private/qobject_p.h"
#include <qcamera.h>
#include <qcameracontrol.h>
@@ -247,8 +247,11 @@ void QCameraFocusZone::setStatus(QCameraFocusZone::FocusZoneStatus status)
\sa QCameraFocusZone
*/
+#define Q_DECLARE_NON_CONST_PUBLIC(Class) \
+ inline Class* q_func() { return static_cast<Class *>(q_ptr); } \
+ friend class Class;
-class QCameraFocusPrivate : public QMediaSourcePrivate
+class QCameraFocusPrivate : public QObjectPrivate
{
Q_DECLARE_NON_CONST_PUBLIC(QCameraFocus)
public:
@@ -261,6 +264,7 @@ public:
float zoomFactor = 1.;
};
+#undef Q_DECLARE_NON_CONST_PUBLIC
void QCameraFocusPrivate::init(QCameraControl *cameraControl)
{
diff --git a/src/multimedia/camera/qcamerafocus.h b/src/multimedia/camera/qcamerafocus.h
index ecdb7b623..92946e1ae 100644
--- a/src/multimedia/camera/qcamerafocus.h
+++ b/src/multimedia/camera/qcamerafocus.h
@@ -46,8 +46,9 @@
#include <QtCore/qpoint.h>
#include <QtCore/qrect.h>
#include <QtCore/qshareddata.h>
+#include <QtCore/qobject.h>
-#include <QtMultimedia/qmediasource.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaenumdebug.h>
QT_BEGIN_NAMESPACE
diff --git a/src/multimedia/camera/qcameraimagecapture.cpp b/src/multimedia/camera/qcameraimagecapture.cpp
index 6f1d610f5..6b0d4cb9e 100644
--- a/src/multimedia/camera/qcameraimagecapture.cpp
+++ b/src/multimedia/camera/qcameraimagecapture.cpp
@@ -42,7 +42,7 @@
#include <qmediametadata.h>
#include <private/qmediaplatformcaptureinterface_p.h>
-#include "qmediasource_p.h"
+#include "private/qobject_p.h"
#include <qmediaservice.h>
#include <qcamera.h>
#include <qcameracontrol.h>
@@ -82,7 +82,7 @@ QT_BEGIN_NAMESPACE
class QCameraImageCapturePrivate
{
- Q_DECLARE_NON_CONST_PUBLIC(QCameraImageCapture)
+ Q_DECLARE_PUBLIC(QCameraImageCapture)
public:
QCamera *camera = nullptr;
diff --git a/src/multimedia/camera/qcameraimagecapture.h b/src/multimedia/camera/qcameraimagecapture.h
index 4b7684ca4..1ca4111bc 100644
--- a/src/multimedia/camera/qcameraimagecapture.h
+++ b/src/multimedia/camera/qcameraimagecapture.h
@@ -40,9 +40,8 @@
#ifndef QCAMERAIMAGECAPTURE_H
#define QCAMERAIMAGECAPTURE_H
-#include <QtMultimedia/qmediasource.h>
+#include <QtCore/qobject.h>
#include <QtMultimedia/qmediaencodersettings.h>
-#include <QtMultimedia/qmediasink.h>
#include <QtMultimedia/qvideoframe.h>
#include <QtMultimedia/qmediaenumdebug.h>
diff --git a/src/multimedia/camera/qcameraimageprocessing.cpp b/src/multimedia/camera/qcameraimageprocessing.cpp
index 502bcf07a..49e77b023 100644
--- a/src/multimedia/camera/qcameraimageprocessing.cpp
+++ b/src/multimedia/camera/qcameraimageprocessing.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qcameraimageprocessing.h"
-#include "qmediasource_p.h"
+#include "private/qobject_p.h"
#include <qcameracontrol.h>
#include <qcameraimageprocessingcontrol.h>
@@ -81,7 +81,7 @@ QT_BEGIN_NAMESPACE
\sa QCameraImageProcessingControl
*/
-class QCameraImageProcessingPrivate : public QMediaSourcePrivate
+class QCameraImageProcessingPrivate : public QObjectPrivate
{
public:
void init(QCameraControl *cameraControl);
diff --git a/src/multimedia/camera/qcameraimageprocessing.h b/src/multimedia/camera/qcameraimageprocessing.h
index d77e9a694..b2e31536d 100644
--- a/src/multimedia/camera/qcameraimageprocessing.h
+++ b/src/multimedia/camera/qcameraimageprocessing.h
@@ -45,10 +45,9 @@
#include <QtCore/qsize.h>
#include <QtCore/qpoint.h>
#include <QtCore/qrect.h>
+#include <QtCore/qobject.h>
-#include <QtMultimedia/qmediaservice.h>
-#include <QtMultimedia/qmediasource.h>
-#include <QtMultimedia/qmediaservice.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaenumdebug.h>
QT_BEGIN_NAMESPACE
diff --git a/src/multimedia/controls/qcameracontrol.h b/src/multimedia/controls/qcameracontrol.h
index 0541e26aa..f542eefbe 100644
--- a/src/multimedia/controls/qcameracontrol.h
+++ b/src/multimedia/controls/qcameracontrol.h
@@ -40,8 +40,9 @@
#ifndef QCAMERACONTROL_H
#define QCAMERACONTROL_H
+#include <QtCore/qobject.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaservice.h>
-#include <QtMultimedia/qmediasource.h>
#include <QtMultimedia/qcamera.h>
diff --git a/src/multimedia/controls/qcameraexposurecontrol.h b/src/multimedia/controls/qcameraexposurecontrol.h
index 7fc8ae93b..862355bdb 100644
--- a/src/multimedia/controls/qcameraexposurecontrol.h
+++ b/src/multimedia/controls/qcameraexposurecontrol.h
@@ -40,8 +40,9 @@
#ifndef QCAMERAEXPOSURECONTROL_H
#define QCAMERAEXPOSURECONTROL_H
+#include <QtCore/qobject.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaservice.h>
-#include <QtMultimedia/qmediasource.h>
#include <QtMultimedia/qcameraexposure.h>
#include <QtMultimedia/qcamera.h>
diff --git a/src/multimedia/controls/qcamerafocuscontrol.h b/src/multimedia/controls/qcamerafocuscontrol.h
index cf5c391bd..1d066a1cb 100644
--- a/src/multimedia/controls/qcamerafocuscontrol.h
+++ b/src/multimedia/controls/qcamerafocuscontrol.h
@@ -40,8 +40,9 @@
#ifndef QCAMERAFOCUSCONTROL_H
#define QCAMERAFOCUSCONTROL_H
+#include <QtCore/qobject.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaservice.h>
-#include <QtMultimedia/qmediasource.h>
#include <QtMultimedia/qcamerafocus.h>
diff --git a/src/multimedia/controls/qcameraimageprocessingcontrol.h b/src/multimedia/controls/qcameraimageprocessingcontrol.h
index ee5aa1c0e..ce8ed50ad 100644
--- a/src/multimedia/controls/qcameraimageprocessingcontrol.h
+++ b/src/multimedia/controls/qcameraimageprocessingcontrol.h
@@ -40,8 +40,9 @@
#ifndef QCAMERAIMAGEPROCESSINGCONTROL_H
#define QCAMERAIMAGEPROCESSINGCONTROL_H
+#include <QtCore/qobject.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaservice.h>
-#include <QtMultimedia/qmediasource.h>
#include <QtMultimedia/qcamera.h>
#include <QtMultimedia/qmediaenumdebug.h>
diff --git a/src/multimedia/multimedia.pro b/src/multimedia/multimedia.pro
index 7657fec00..47ed2414c 100644
--- a/src/multimedia/multimedia.pro
+++ b/src/multimedia/multimedia.pro
@@ -11,7 +11,6 @@ INCLUDEPATH *= .
PRIVATE_HEADERS += \
qtmultimediaglobal_p.h \
- qmediasource_p.h \
qmediapluginloader_p.h \
qmediaservice_p.h \
qmediastoragelocation_p.h \
@@ -20,22 +19,18 @@ PRIVATE_HEADERS += \
PUBLIC_HEADERS += \
qtmultimediaglobal.h \
qmediadevicemanager.h \
- qmediasink.h \
qmediaenumdebug.h \
qmediametadata.h \
- qmediasource.h \
qmediaservice.h \
qmediatimerange.h \
qmultimedia.h \
qmediaformat.h
SOURCES += \
- qmediasink.cpp \
qmediadevicemanager.cpp \
qmediametadata.cpp \
qmediapluginloader.cpp \
qmediaservice.cpp \
- qmediasource.cpp \
qmediatimerange.cpp \
qmediastoragelocation.cpp \
qmultimedia.cpp \
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp
index 5dbe9aa2a..b0b978388 100644
--- a/src/multimedia/playback/qmediaplayer.cpp
+++ b/src/multimedia/playback/qmediaplayer.cpp
@@ -40,7 +40,7 @@
#include "qmediaplayer.h"
#include "qvideosurfaces_p.h"
-#include "qmediasource_p.h"
+#include "private/qobject_p.h"
#include <qmediaservice.h>
#include <qmediaplayercontrol.h>
#include <private/qmediaplatformplayerinterface_p.h>
@@ -75,15 +75,7 @@ QT_BEGIN_NAMESPACE
QVideoWidget can be used with QMediaPlayer for video rendering.
- Since QMediaPlayer is a QMediaSource, you can use several of the QMediaSource
- functions for things like:
-
- \list
- \li Accessing the currently playing media's metadata (\l {QMediaSource::metaData()} and \l {QMediaMetaData}{predefined meta-data keys})
- \li Checking to see if the media playback service is currently available (\l {QMediaSource::availability()})
- \endlist
-
- \sa QMediaSource, QMediaService, QVideoWidget
+ \sa QVideoWidget
*/
static void qRegisterMediaPlayerMetaTypes()
@@ -95,9 +87,9 @@ static void qRegisterMediaPlayerMetaTypes()
Q_CONSTRUCTOR_FUNCTION(qRegisterMediaPlayerMetaTypes)
-class QMediaPlayerPrivate : public QMediaSourcePrivate
+class QMediaPlayerPrivate : public QObjectPrivate
{
- Q_DECLARE_NON_CONST_PUBLIC(QMediaPlayer)
+ Q_DECLARE_PUBLIC(QMediaPlayer)
public:
QMediaPlayerPrivate() : notifyTimer(nullptr) {}
@@ -1030,7 +1022,7 @@ QStringList QMediaPlayer::supportedCustomAudioRoles() const
The value is the current playback position, expressed in milliseconds since
the beginning of the media. Periodically changes in the position will be
indicated with the signal positionChanged(), the interval between updates
- can be set with QMediaSource's method setNotifyInterval().
+ can be set with setNotifyInterval().
*/
/*!
diff --git a/src/multimedia/playback/qmediaplaylist.h b/src/multimedia/playback/qmediaplaylist.h
index 506a3348a..aada813de 100644
--- a/src/multimedia/playback/qmediaplaylist.h
+++ b/src/multimedia/playback/qmediaplaylist.h
@@ -42,8 +42,7 @@
#include <QtCore/qobject.h>
-#include <QtMultimedia/qmediasource.h>
-#include <QtMultimedia/qmediasink.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmediaenumdebug.h>
diff --git a/src/multimedia/playback/qmediaplaylist_p.h b/src/multimedia/playback/qmediaplaylist_p.h
index 958d925d0..2a789aec0 100644
--- a/src/multimedia/playback/qmediaplaylist_p.h
+++ b/src/multimedia/playback/qmediaplaylist_p.h
@@ -54,7 +54,6 @@
#include "qmediaplaylist.h"
#include "qmediaplayer.h"
#include "qmediaplayercontrol.h"
-#include "qmediasource_p.h"
#include "qplaylistfileparser_p.h"
#include <QtCore/qdebug.h>
diff --git a/src/multimedia/playback/qplaylistfileparser.cpp b/src/multimedia/playback/qplaylistfileparser.cpp
index 885129823..42e8a7601 100644
--- a/src/multimedia/playback/qplaylistfileparser.cpp
+++ b/src/multimedia/playback/qplaylistfileparser.cpp
@@ -41,10 +41,10 @@
#include <qfileinfo.h>
#include <QtCore/QDebug>
#include <QtCore/qiodevice.h>
+#include <QtCore/qpointer.h>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QNetworkRequest>
#include "qmediaplayer.h"
-#include "qmediasource_p.h"
#include "qmediametadata.h"
QT_BEGIN_NAMESPACE
diff --git a/src/multimedia/qmediasink.cpp b/src/multimedia/qmediasink.cpp
deleted file mode 100644
index 0ad0abf1e..000000000
--- a/src/multimedia/qmediasink.cpp
+++ /dev/null
@@ -1,89 +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 <qmediasink.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMediaSink
- \inmodule QtMultimedia
-
- \ingroup multimedia
- \ingroup multimedia_core
-
-
- \brief The QMediaSink class is the base class for objects extending media objects functionality.
-
- \sa
-*/
-
-/*!
- Destroys a media helper object.
-*/
-
-QMediaSink::~QMediaSink()
-{
-}
-
-/*!
- \fn QMediaSink::mediaSource() const
-
- Return the currently attached media object.
-*/
-
-
-/*!
- \fn QMediaSink::setMediaSource(QMediaSource *object)
-
- Attaches to the media \a object.
- Returns true if attached successfully, otherwise returns false.
-*/
-
-/*!
- \fn QObject *QMediaSink::asObject()
-
- returns this QMediaSink cast to a QObject
-
- Reimplement this method to simply return the object that implements the QMediaSink interface.
- This is required so Qt can operate with QObjects when connecting QMediaSource's to QMediaSink's.
-*/
-
-QT_END_NAMESPACE
-
diff --git a/src/multimedia/qmediasink.h b/src/multimedia/qmediasink.h
deleted file mode 100644
index 062f3048c..000000000
--- a/src/multimedia/qmediasink.h
+++ /dev/null
@@ -1,69 +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 QMEDIASINK_H
-#define QMEDIASINK_H
-
-#include <QtMultimedia/qmediasource.h>
-
-QT_BEGIN_NAMESPACE
-
-
-class QMediaSource;
-
-class Q_MULTIMEDIA_EXPORT QMediaSink
-{
-public:
- virtual ~QMediaSink();
-
- virtual QMediaSource *mediaSource() const = 0;
- virtual QObject *asObject() = 0;
-
-protected:
- friend class QMediaSource;
- virtual bool setMediaSource(QMediaSource *object) = 0;
-};
-
-#define QMediaSink_iid "org.qt-project.qt.mediasink/5.0"
-Q_DECLARE_INTERFACE(QMediaSink, QMediaSink_iid)
-
-QT_END_NAMESPACE
-
-
-#endif // QMEDIASINK_H
diff --git a/src/multimedia/qmediasource.cpp b/src/multimedia/qmediasource.cpp
deleted file mode 100644
index 5015f7e77..000000000
--- a/src/multimedia/qmediasource.cpp
+++ /dev/null
@@ -1,216 +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 <QtCore/qmetaobject.h>
-#include <QtCore/qdebug.h>
-
-#include "qmediasource_p.h"
-
-#include <qmediaservice.h>
-#include <qmediasink.h>
-#include <qmediametadata.h>
-
-QT_BEGIN_NAMESPACE
-
-/*!
- \class QMediaSource
-
- \brief The QMediaSource class provides a common base for multimedia objects.
- \inmodule QtMultimedia
-
- \ingroup multimedia
- \ingroup multimedia_core
-
- It provides some basic functionality that is common to other high level classes
- like \l QMediaPlayer, \l QAudioDecoder and \l QCamera, including availability
- and meta-data functionality.
-
- The higher level QMediaSource derived classes provide the actual multimedia
- functionality, by internally using a QMediaService. Each media object
- hosts a QMediaService and uses the QMediaControl interfaces implemented by the service to implement its
- API. These controls can be accessed from the media object if necessary, but in general
- the useful functionality can be accessed from the higher level classes.
-
- Most media objects when constructed will request a new
- QMediaService instance, but some like
- QMediaRecorder and QMediaRecorder will share a service with another object.
-
- \sa QMediaService, QMediaControl
-*/
-
-/*!
- Destroys this media object.
-*/
-
-QMediaSource::~QMediaSource()
-{
-}
-
-/*!
- Returns the availability of the functionality offered by this object.
-
- In some cases the functionality may not be available (for example, if
- the current operating system or platform does not provide the required
- functionality), or it may be temporarily unavailable (for example,
- audio playback during a phone call or similar).
-*/
-
-QMultimedia::AvailabilityStatus QMediaSource::availability() const
-{
- if (d_func()->service == nullptr)
- return QMultimedia::ServiceMissing;
-
- return QMultimedia::Available;
-}
-
-/*!
- \fn bool QMediaSource::isAvailable() const
-
- Returns true if the service is available for use.
-*/
-
-/*!
- Returns the media service that provides the functionality of this multimedia object.
-*/
-
-QMediaService* QMediaSource::service() const
-{
- return d_func()->service;
-}
-
-/*!
- Bind \a object to this QMediaSource instance.
-
- This method establishes a relationship between this media object and a
- helper object. The nature of the relationship depends on both parties. This
- methods returns true if the helper was successfully bound, false otherwise.
-
- Most subclasses of QMediaSource provide more convenient functions
- that wrap this functionality, so this function rarely needs to be
- called directly.
-
- The object passed must implement the QMediaSink interface.
-
- \sa QMediaSink
-*/
-bool QMediaSource::bind(QMediaSink *sink)
-{
- if (!sink)
- return false;
-
- QMediaSource *currentObject = sink->mediaSource();
-
- if (currentObject == this)
- return true;
-
- if (currentObject)
- currentObject->unbind(sink);
-
- return sink->setMediaSource(this);
-}
-
-/*!
- Detach \a object from the QMediaSource instance.
-
- Unbind the helper object from this media object. A warning
- will be generated if the object was not previously bound to this
- object.
-
- \sa QMediaSink
-*/
-void QMediaSource::unbind(QMediaSink *sink)
-{
- if (sink && sink->mediaSource() == this)
- sink->setMediaSource(nullptr);
- else
- qWarning() << "QMediaSource: Trying to unbind not connected helper object";
-}
-
-/*!
- Constructs a media object which uses the functionality provided by a media \a service.
-
- The \a parent is passed to QObject.
-
- This class is meant as a base class for multimedia objects so this
- constructor is protected.
-*/
-
-QMediaSource::QMediaSource(QObject *parent, QMediaService *service)
- : QObject(*new QMediaSourcePrivate, parent)
-{
- Q_D(QMediaSource);
-
- d->service = service;
-}
-
-/*!
- \internal
-*/
-
-QMediaSource::QMediaSource(QMediaSourcePrivate &dd, QObject *parent, QMediaService *service)
- : QObject(dd, parent)
-{
- Q_D(QMediaSource);
-
- d->service = service;
-}
-
-/*!
- Returns the value associated with a meta-data \a key.
-
- See the list of predefined \l {QMediaMetaData}{meta-data keys}.
-*/
-QMediaMetaData QMediaSource::metaData() const
-{
- return QMediaMetaData();
-}
-
-/*!
- \fn QMediaSource::metaDataChanged()
-
- Signals that this media object's meta-data has changed.
-
- If multiple meta-data elements are changed,
- metaDataChanged(const QString &key, const QVariant &value) signal is emitted
- for each of them with metaDataChanged() changed emitted once.
-*/
-
-QT_END_NAMESPACE
-
-#include "moc_qmediasource.cpp"
diff --git a/src/multimedia/qmediasource.h b/src/multimedia/qmediasource.h
deleted file mode 100644
index 42db044f1..000000000
--- a/src/multimedia/qmediasource.h
+++ /dev/null
@@ -1,91 +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 QABSTRACTMEDIASOURCE_H
-#define QABSTRACTMEDIASOURCE_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qstringlist.h>
-
-#include <QtMultimedia/qtmultimediaglobal.h>
-#include <QtMultimedia/qmultimedia.h>
-
-QT_BEGIN_NAMESPACE
-
-
-class QMediaService;
-class QMediaSink;
-class QMediaMetaData;
-
-class QMediaSourcePrivate;
-class Q_MULTIMEDIA_EXPORT QMediaSource : public QObject
-{
- Q_OBJECT
-public:
- ~QMediaSource();
-
- virtual QMultimedia::AvailabilityStatus availability() const;
- bool isAvailable() const
- {
- return availability() == QMultimedia::Available;
- }
-
- virtual QMediaService* service() const;
-
- bool bind(QMediaSink *);
- void unbind(QMediaSink *);
-
- virtual QMediaMetaData metaData() const;
-
-Q_SIGNALS:
- void metaDataChanged();
-
-protected:
- QMediaSource(QObject *parent, QMediaService *service);
- QMediaSource(QMediaSourcePrivate &dd, QObject *parent, QMediaService *service);
-
-private:
- Q_DECLARE_PRIVATE(QMediaSource)
-};
-
-
-QT_END_NAMESPACE
-
-
-#endif // QABSTRACTMEDIASOURCE_H
diff --git a/src/multimedia/qmediasource_p.h b/src/multimedia/qmediasource_p.h
deleted file mode 100644
index 756c86955..000000000
--- a/src/multimedia/qmediasource_p.h
+++ /dev/null
@@ -1,82 +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 QABSTRACTMEDIAOBJECT_P_H
-#define QABSTRACTMEDIAOBJECT_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/qbytearray.h>
-#include <QtCore/qset.h>
-#include <QtCore/qtimer.h>
-
-#include "qmediasource.h"
-#include "private/qobject_p.h"
-
-QT_BEGIN_NAMESPACE
-
-#define Q_DECLARE_NON_CONST_PUBLIC(Class) \
- inline Class* q_func() { return static_cast<Class *>(q_ptr); } \
- friend class Class;
-
-
-class QMediaSourcePrivate : public QObjectPrivate
-{
- Q_DECLARE_PUBLIC(QMediaSource)
-
-public:
- QMediaSourcePrivate() : service(nullptr) {}
- virtual ~QMediaSourcePrivate() {}
-
- QMediaService *service;
-};
-
-QT_END_NAMESPACE
-
-
-#endif
diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp
index 6097752df..5190afa8d 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 "qmediasource_p.h"
#include <qmediaservice.h>
#include <qaudiodeviceinfo.h>
#include <qcamera.h>
@@ -53,6 +52,7 @@
#include <QtCore/qurl.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qmetaobject.h>
+#include <QtCore/qtimer.h>
#include <qaudioformat.h>
@@ -149,23 +149,8 @@ void QMediaRecorderPrivate::restartCamera()
}
}
-class QAudioRecorderObject : public QMediaSource
-{
-public:
- QAudioRecorderObject(QObject *parent, QMediaService *service)
- : QMediaSource(parent, service)
- {
- }
-
- ~QAudioRecorderObject() override
- {
- }
-};
-
/*!
- Constructs a media recorder which records the media produced by \a mediaSource.
-
- The \a parent is passed to QMediaSource.
+ Constructs a media recorder which records the media produced by a microphone and camera.
*/
QMediaRecorder::QMediaRecorder(QMediaRecorder::CaptureMode mode, QObject *parent)
diff --git a/src/multimedia/recording/qmediarecorder.h b/src/multimedia/recording/qmediarecorder.h
index 1d1c815a3..4b7cfa109 100644
--- a/src/multimedia/recording/qmediarecorder.h
+++ b/src/multimedia/recording/qmediarecorder.h
@@ -40,10 +40,10 @@
#ifndef QMEDIARECORDER_H
#define QMEDIARECORDER_H
+#include <QtCore/qobject.h>
+#include <QtMultimedia/qtmultimediaglobal.h>
#include <QtMultimedia/qmultimedia.h>
-#include <QtMultimedia/qmediasource.h>
#include <QtMultimedia/qmediaencodersettings.h>
-#include <QtMultimedia/qmediasink.h>
#include <QtMultimedia/qmediaenumdebug.h>
#include <QtMultimedia/qmediametadata.h>