summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2021-02-11 16:29:00 +0100
committerLars Knoll <lars.knoll@qt.io>2021-02-17 08:26:46 +0000
commit3441709ae88b8f373cb834bfceffa4545a50fbad (patch)
treeb1c8e7424b942abf54289ce2dca5ad9ae1c549c6
parentf2607d51bba3076e51ff9f67cdbcee793c4f54d0 (diff)
Remove now unused QVideoSurfaceOutput class
It's not needed anymore now that we pass the QAbstractVideoSurface to the backend. Change-Id: Iea198323193d13c85428d0f2205d1db92fc6931b Reviewed-by: Doris Verria <doris.verria@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/multimedia/CMakeLists.txt1
-rw-r--r--src/multimedia/playback/qmediaplayer.cpp2
-rw-r--r--src/multimedia/video/qvideosurfaceoutput.cpp101
-rw-r--r--src/multimedia/video/qvideosurfaceoutput_p.h91
-rw-r--r--src/multimedia/video/video.pri2
5 files changed, 0 insertions, 197 deletions
diff --git a/src/multimedia/CMakeLists.txt b/src/multimedia/CMakeLists.txt
index eacb25e38..1b59bc192 100644
--- a/src/multimedia/CMakeLists.txt
+++ b/src/multimedia/CMakeLists.txt
@@ -73,7 +73,6 @@ qt_internal_add_module(Multimedia
video/qvideoframeconversionhelper.cpp video/qvideoframeconversionhelper_p.h
video/qvideooutputorientationhandler.cpp video/qvideooutputorientationhandler_p.h
video/qvideosurfaceformat.cpp video/qvideosurfaceformat.h
- video/qvideosurfaceoutput.cpp video/qvideosurfaceoutput_p.h
video/qvideosurfaces.cpp video/qvideosurfaces_p.h
INCLUDE_DIRECTORIES
audio
diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp
index 1892c0aaf..46a45ef3f 100644
--- a/src/multimedia/playback/qmediaplayer.cpp
+++ b/src/multimedia/playback/qmediaplayer.cpp
@@ -39,7 +39,6 @@
#include "qmediaplayer.h"
#include "qvideosurfaces_p.h"
-#include "qvideosurfaceoutput_p.h"
#include "qmediasource_p.h"
#include <qmediaservice.h>
@@ -107,7 +106,6 @@ public:
QString errorString;
QPointer<QObject> videoOutput;
- QVideoSurfaceOutput surfaceOutput;
QUrl qrcMedia;
QScopedPointer<QFile> qrcFile;
QUrl rootMedia;
diff --git a/src/multimedia/video/qvideosurfaceoutput.cpp b/src/multimedia/video/qvideosurfaceoutput.cpp
deleted file mode 100644
index fca578bb7..000000000
--- a/src/multimedia/video/qvideosurfaceoutput.cpp
+++ /dev/null
@@ -1,101 +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 "qvideosurfaceoutput_p.h"
-
-#include <qabstractvideosurface.h>
-#include <qmediaservice.h>
-#include <qvideorenderercontrol.h>
-
-/*!
- * \class QVideoSurfaceOutput
- * \internal
- */
-QVideoSurfaceOutput::QVideoSurfaceOutput(QObject*parent)
- : QObject(parent)
-{
-}
-
-QVideoSurfaceOutput::~QVideoSurfaceOutput()
-{
- if (m_control) {
- m_control.data()->setSurface(nullptr);
- m_service.data()->releaseControl(m_control.data());
- }
-}
-
-QMediaSource *QVideoSurfaceOutput::mediaSource() const
-{
- return m_object.data();
-}
-
-void QVideoSurfaceOutput::setVideoSurface(QAbstractVideoSurface *surface)
-{
- m_surface = surface;
-
- if (m_control)
- m_control.data()->setSurface(surface);
-}
-
-bool QVideoSurfaceOutput::setMediaSource(QMediaSource *object)
-{
- if (m_control) {
- m_control.data()->setSurface(nullptr);
- m_service.data()->releaseControl(m_control.data());
- }
- m_control.clear();
- m_service.clear();
- m_object.clear();
-
- if (object) {
- if (QMediaService *service = object->service()) {
- if (QObject *control = service->requestControl(QVideoRendererControl_iid)) {
- if ((m_control = qobject_cast<QVideoRendererControl *>(control))) {
- m_service = service;
- m_object = object;
- m_control.data()->setSurface(m_surface.data());
-
- return true;
- }
- service->releaseControl(control);
- }
- }
- }
- return false;
-}
diff --git a/src/multimedia/video/qvideosurfaceoutput_p.h b/src/multimedia/video/qvideosurfaceoutput_p.h
deleted file mode 100644
index 55951cd60..000000000
--- a/src/multimedia/video/qvideosurfaceoutput_p.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 QVIDEOSURFACEOUTPUT_P_H
-#define QVIDEOSURFACEOUTPUT_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 <qmediasink.h>
-
-#include <QtCore/qsharedpointer.h>
-#include <QtCore/qpointer.h>
-
-QT_BEGIN_NAMESPACE
-
-
-class QAbstractVideoSurface;
-class QVideoRendererControl;
-
-class QVideoSurfaceOutput : public QObject, public QMediaSink
-{
- Q_OBJECT
- Q_INTERFACES(QMediaSink)
-public:
- QVideoSurfaceOutput(QObject *parent = nullptr);
- ~QVideoSurfaceOutput();
-
- QMediaSource *mediaSource() const override;
- QObject *asObject() override { return this; }
-
- void setVideoSurface(QAbstractVideoSurface *surface);
-
-protected:
- bool setMediaSource(QMediaSource *object) override;
-
-private:
- QPointer<QAbstractVideoSurface> m_surface;
- QPointer<QVideoRendererControl> m_control;
- QPointer<QMediaService> m_service;
- QPointer<QMediaSource> m_object;
-};
-
-QT_END_NAMESPACE
-
-
-#endif
diff --git a/src/multimedia/video/video.pri b/src/multimedia/video/video.pri
index 829442a24..6e9278c0f 100644
--- a/src/multimedia/video/video.pri
+++ b/src/multimedia/video/video.pri
@@ -13,7 +13,6 @@ PRIVATE_HEADERS += \
video/qimagevideobuffer_p.h \
video/qmemoryvideobuffer_p.h \
video/qvideooutputorientationhandler_p.h \
- video/qvideosurfaceoutput_p.h \
video/qvideoframeconversionhelper_p.h \
video/qvideosurfaces_p.h
@@ -25,7 +24,6 @@ SOURCES += \
video/qvideoframe.cpp \
video/qvideooutputorientationhandler.cpp \
video/qvideosurfaceformat.cpp \
- video/qvideosurfaceoutput.cpp \
video/qabstractvideofilter.cpp \
video/qvideoframeconversionhelper.cpp \
video/qvideosurfaces.cpp