summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/mediaplayer
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/gstreamer/mediaplayer')
-rw-r--r--src/plugins/gstreamer/mediaplayer/CMakeLists.txt44
-rw-r--r--src/plugins/gstreamer/mediaplayer/mediaplayer.json4
-rw-r--r--src/plugins/gstreamer/mediaplayer/mediaplayer.pro24
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp184
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.h73
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp179
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h96
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp93
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h74
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp87
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h71
11 files changed, 0 insertions, 929 deletions
diff --git a/src/plugins/gstreamer/mediaplayer/CMakeLists.txt b/src/plugins/gstreamer/mediaplayer/CMakeLists.txt
deleted file mode 100644
index 5bbb26bb9..000000000
--- a/src/plugins/gstreamer/mediaplayer/CMakeLists.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-# Generated from mediaplayer.pro.
-
-#####################################################################
-## QGstreamerPlayerServicePlugin Plugin:
-#####################################################################
-
-qt_internal_add_plugin(QGstreamerPlayerServicePlugin
- OUTPUT_NAME gstmediaplayer
- TYPE mediaservice
- SOURCES
- qgstreamermetadataprovider.cpp qgstreamermetadataprovider.h
- qgstreamerplayerservice.cpp qgstreamerplayerservice.h
- qgstreamerplayerserviceplugin.cpp qgstreamerplayerserviceplugin.h
- qgstreamerstreamscontrol.cpp qgstreamerstreamscontrol.h
- INCLUDE_DIRECTORIES
- ${CMAKE_CURRENT_SOURCE_DIR}
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::CorePrivate
- Qt::Gui
- Qt::MultimediaPrivate
- Qt::Network
- gstreamer
- Qt::MultimediaPrivate
-)
-
-#### Keys ignored in scope 1:.:.:mediaplayer.pro:<TRUE>:
-# OTHER_FILES = "mediaplayer.json"
-
-## Scopes:
-#####################################################################
-
-qt_internal_extend_target(QGstreamerPlayerServicePlugin CONDITION TARGET Qt::Widgets
- DEFINES
- HAVE_WIDGETS
- PUBLIC_LIBRARIES
- Qt::MultimediaWidgetsPrivate
- Qt::Widgets
-)
-
-qt_internal_extend_target(QGstreamerPlayerServicePlugin CONDITION QT_FEATURE_gstreamer_app
- PUBLIC_LIBRARIES
- gstreamer_app
-)
diff --git a/src/plugins/gstreamer/mediaplayer/mediaplayer.json b/src/plugins/gstreamer/mediaplayer/mediaplayer.json
deleted file mode 100644
index bd1a7e64d..000000000
--- a/src/plugins/gstreamer/mediaplayer/mediaplayer.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Keys": ["gstreamermediaplayer"],
- "Services": ["org.qt-project.qt.mediaplayer"]
-}
diff --git a/src/plugins/gstreamer/mediaplayer/mediaplayer.pro b/src/plugins/gstreamer/mediaplayer/mediaplayer.pro
deleted file mode 100644
index c9dadd979..000000000
--- a/src/plugins/gstreamer/mediaplayer/mediaplayer.pro
+++ /dev/null
@@ -1,24 +0,0 @@
-TARGET = gstmediaplayer
-
-include(../common.pri)
-
-INCLUDEPATH += $$PWD
-
-HEADERS += \
- $$PWD/qgstreamerplayerservice.h \
- $$PWD/qgstreamerstreamscontrol.h \
- $$PWD/qgstreamermetadataprovider.h \
- $$PWD/qgstreamerplayerserviceplugin.h
-
-SOURCES += \
- $$PWD/qgstreamerplayerservice.cpp \
- $$PWD/qgstreamerstreamscontrol.cpp \
- $$PWD/qgstreamermetadataprovider.cpp \
- $$PWD/qgstreamerplayerserviceplugin.cpp
-
-OTHER_FILES += \
- mediaplayer.json
-
-PLUGIN_TYPE = mediaservice
-PLUGIN_CLASS_NAME = QGstreamerPlayerServicePlugin
-load(qt_plugin)
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
deleted file mode 100644
index 191878c9a..000000000
--- a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
+++ /dev/null
@@ -1,184 +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 "qgstreamermetadataprovider.h"
-#include <private/qgstreamerplayersession_p.h>
-#include <QDebug>
-#include <QtMultimedia/qmediametadata.h>
-
-#include <gst/gstversion.h>
-#include <private/qgstutils_p.h>
-
-QT_BEGIN_NAMESPACE
-
-typedef QMap<QByteArray, QString> QGstreamerMetaDataKeyLookup;
-Q_GLOBAL_STATIC(QGstreamerMetaDataKeyLookup, metadataKeys)
-
-static const QGstreamerMetaDataKeyLookup *qt_gstreamerMetaDataKeys()
-{
- if (metadataKeys->isEmpty()) {
- metadataKeys->insert(GST_TAG_TITLE, QMediaMetaData::Title);
- //metadataKeys->insert(0, QMediaMetaData::SubTitle);
- //metadataKeys->insert(0, QMediaMetaData::Author);
- metadataKeys->insert(GST_TAG_COMMENT, QMediaMetaData::Comment);
- metadataKeys->insert(GST_TAG_DESCRIPTION, QMediaMetaData::Description);
- //metadataKeys->insert(0, QMediaMetaData::Category);
- metadataKeys->insert(GST_TAG_GENRE, QMediaMetaData::Genre);
- metadataKeys->insert("year", QMediaMetaData::Year);
- //metadataKeys->insert(0, QMediaMetaData::UserRating);
-
- metadataKeys->insert(GST_TAG_LANGUAGE_CODE, QMediaMetaData::Language);
-
- metadataKeys->insert(GST_TAG_ORGANIZATION, QMediaMetaData::Publisher);
- metadataKeys->insert(GST_TAG_COPYRIGHT, QMediaMetaData::Copyright);
- //metadataKeys->insert(0, QMediaMetaData::ParentalRating);
- //metadataKeys->insert(0, QMediaMetaData::RatingOrganisation);
-
- // Media
- //metadataKeys->insert(0, QMediaMetaData::Size);
- //metadataKeys->insert(0,QMediaMetaData::MediaType );
- metadataKeys->insert(GST_TAG_DURATION, QMediaMetaData::Duration);
-
- // Audio
- metadataKeys->insert(GST_TAG_BITRATE, QMediaMetaData::AudioBitRate);
- metadataKeys->insert(GST_TAG_AUDIO_CODEC, QMediaMetaData::AudioCodec);
- //metadataKeys->insert(0, QMediaMetaData::ChannelCount);
- //metadataKeys->insert(0, QMediaMetaData::SampleRate);
-
- // Music
- metadataKeys->insert(GST_TAG_ALBUM, QMediaMetaData::AlbumTitle);
- metadataKeys->insert(GST_TAG_ALBUM_ARTIST, QMediaMetaData::AlbumArtist);
- metadataKeys->insert(GST_TAG_ARTIST, QMediaMetaData::ContributingArtist);
- //metadataKeys->insert(0, QMediaMetaData::Conductor);
- //metadataKeys->insert(0, QMediaMetaData::Lyrics);
- //metadataKeys->insert(0, QMediaMetaData::Mood);
- metadataKeys->insert(GST_TAG_TRACK_NUMBER, QMediaMetaData::TrackNumber);
-
- //metadataKeys->insert(0, QMediaMetaData::CoverArtUrlSmall);
- //metadataKeys->insert(0, QMediaMetaData::CoverArtUrlLarge);
- metadataKeys->insert(GST_TAG_PREVIEW_IMAGE, QMediaMetaData::ThumbnailImage);
- metadataKeys->insert(GST_TAG_IMAGE, QMediaMetaData::CoverArtImage);
-
- // Image/Video
- metadataKeys->insert("resolution", QMediaMetaData::Resolution);
- metadataKeys->insert("pixel-aspect-ratio", QMediaMetaData::PixelAspectRatio);
- metadataKeys->insert(GST_TAG_IMAGE_ORIENTATION, QMediaMetaData::Orientation);
-
- // Video
- //metadataKeys->insert(0, QMediaMetaData::VideoFrameRate);
- //metadataKeys->insert(0, QMediaMetaData::VideoBitRate);
- metadataKeys->insert(GST_TAG_VIDEO_CODEC, QMediaMetaData::VideoCodec);
-
- //metadataKeys->insert(0, QMediaMetaData::PosterUrl);
-
- // Movie
- //metadataKeys->insert(0, QMediaMetaData::ChapterNumber);
- //metadataKeys->insert(0, QMediaMetaData::Director);
- metadataKeys->insert(GST_TAG_PERFORMER, QMediaMetaData::LeadPerformer);
- //metadataKeys->insert(0, QMediaMetaData::Writer);
-
- // Photos
- //metadataKeys->insert(0, QMediaMetaData::CameraManufacturer);
- //metadataKeys->insert(0, QMediaMetaData::CameraModel);
- //metadataKeys->insert(0, QMediaMetaData::Event);
- //metadataKeys->insert(0, QMediaMetaData::Subject);
- }
-
- return metadataKeys;
-}
-
-QGstreamerMetaDataProvider::QGstreamerMetaDataProvider(QGstreamerPlayerSession *session, QObject *parent)
- :QMetaDataReaderControl(parent), m_session(session)
-{
- connect(m_session, SIGNAL(tagsChanged()), SLOT(updateTags()));
-}
-
-QGstreamerMetaDataProvider::~QGstreamerMetaDataProvider()
-{
-}
-
-bool QGstreamerMetaDataProvider::isMetaDataAvailable() const
-{
- return !m_session->tags().isEmpty();
-}
-
-bool QGstreamerMetaDataProvider::isWritable() const
-{
- return false;
-}
-
-QVariant QGstreamerMetaDataProvider::metaData(const QString &key) const
-{
- if (key == QMediaMetaData::Orientation)
- return QGstUtils::fromGStreamerOrientation(m_tags.value(key));
- return m_tags.value(key);
-}
-
-QStringList QGstreamerMetaDataProvider::availableMetaData() const
-{
- return m_tags.keys();
-}
-
-void QGstreamerMetaDataProvider::updateTags()
-{
- QVariantMap oldTags = m_tags;
- m_tags.clear();
- bool changed = false;
-
- const auto tags = m_session->tags();
- for (auto i = tags.cbegin(), end = tags.cend(); i != end; ++i) {
- //use gstreamer native keys for elements not in our key map
- QString key = qt_gstreamerMetaDataKeys()->value(i.key(), i.key());
- m_tags.insert(key, i.value());
- if (i.value() != oldTags.value(key)) {
- changed = true;
- emit metaDataChanged(key, i.value());
- }
- }
-
- if (oldTags.isEmpty() != m_tags.isEmpty()) {
- emit metaDataAvailableChanged(isMetaDataAvailable());
- changed = true;
- }
-
- if (changed)
- emit metaDataChanged();
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.h b/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.h
deleted file mode 100644
index 6529c3fb1..000000000
--- a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.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 QGSTREAMERMETADATAPROVIDER_H
-#define QGSTREAMERMETADATAPROVIDER_H
-
-#include <qmetadatareadercontrol.h>
-#include <qvariant.h>
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerPlayerSession;
-
-class QGstreamerMetaDataProvider : public QMetaDataReaderControl
-{
- Q_OBJECT
-public:
- QGstreamerMetaDataProvider( QGstreamerPlayerSession *session, QObject *parent );
- virtual ~QGstreamerMetaDataProvider();
-
- bool isMetaDataAvailable() const override;
- bool isWritable() const;
-
- QVariant metaData(const QString &key) const override;
- QStringList availableMetaData() const override;
-
-private slots:
- void updateTags();
-
-private:
- QGstreamerPlayerSession *m_session = nullptr;
- QVariantMap m_tags;
-};
-
-QT_END_NAMESPACE
-
-#endif // QGSTREAMERMETADATAPROVIDER_H
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
deleted file mode 100644
index 3033b04e0..000000000
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
+++ /dev/null
@@ -1,179 +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 <QtMultimedia/private/qtmultimediaglobal_p.h>
-#include <QtCore/qvariant.h>
-#include <QtCore/qdebug.h>
-
-#if defined(HAVE_WIDGETS)
-#include <QtWidgets/qwidget.h>
-#endif
-
-#include "qgstreamerplayerservice.h"
-#include "qgstreamermetadataprovider.h"
-
-#if defined(HAVE_WIDGETS)
-#include <private/qgstreamervideowidget_p.h>
-#endif
-#include <private/qgstreamervideowindow_p.h>
-#include <private/qgstreamervideorenderer_p.h>
-
-#include "qgstreamerstreamscontrol.h"
-#include <private/qgstreameraudioprobecontrol_p.h>
-#include <private/qgstreamervideoprobecontrol_p.h>
-#include <private/qgstreamerplayersession_p.h>
-#include <private/qgstreamerplayercontrol_p.h>
-
-QT_BEGIN_NAMESPACE
-
-QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent)
- : QMediaService(parent)
-{
- m_session = new QGstreamerPlayerSession(this);
- m_control = new QGstreamerPlayerControl(m_session, this);
- m_metaData = new QGstreamerMetaDataProvider(m_session, this);
- m_streamsControl = new QGstreamerStreamsControl(m_session,this);
- m_videoRenderer = new QGstreamerVideoRenderer(this);
- m_videoWindow = new QGstreamerVideoWindow(this);
- // If the GStreamer video sink is not available, don't provide the video window control since
- // it won't work anyway.
- if (!m_videoWindow->videoSink()) {
- delete m_videoWindow;
- m_videoWindow = 0;
- }
-
-#if defined(HAVE_WIDGETS)
- m_videoWidget = new QGstreamerVideoWidgetControl(this);
-
- // If the GStreamer video sink is not available, don't provide the video widget control since
- // it won't work anyway.
- // QVideoWidget will fall back to QVideoRendererControl in that case.
- if (!m_videoWidget->videoSink()) {
- delete m_videoWidget;
- m_videoWidget = 0;
- }
-#endif
-}
-
-QGstreamerPlayerService::~QGstreamerPlayerService()
-{
-}
-
-QObject *QGstreamerPlayerService::requestControl(const char *name)
-{
- if (qstrcmp(name,QMediaPlayerControl_iid) == 0)
- return m_control;
-
- if (qstrcmp(name,QMetaDataReaderControl_iid) == 0)
- return m_metaData;
-
- if (qstrcmp(name,QMediaStreamsControl_iid) == 0)
- return m_streamsControl;
-
- if (qstrcmp(name, QMediaVideoProbeControl_iid) == 0) {
- if (!m_videoProbeControl) {
- increaseVideoRef();
- m_videoProbeControl = new QGstreamerVideoProbeControl(this);
- m_session->addProbe(m_videoProbeControl);
- }
- m_videoProbeControl->ref.ref();
- return m_videoProbeControl;
- }
-
- if (qstrcmp(name, QMediaAudioProbeControl_iid) == 0) {
- if (!m_audioProbeControl) {
- m_audioProbeControl = new QGstreamerAudioProbeControl(this);
- m_session->addProbe(m_audioProbeControl);
- }
- m_audioProbeControl->ref.ref();
- return m_audioProbeControl;
- }
-
- if (!m_videoOutput) {
- if (qstrcmp(name, QVideoRendererControl_iid) == 0)
- m_videoOutput = m_videoRenderer;
- else if (qstrcmp(name, QVideoWindowControl_iid) == 0)
- m_videoOutput = m_videoWindow;
-#if defined(HAVE_WIDGETS)
- else if (qstrcmp(name, QVideoWidgetControl_iid) == 0)
- m_videoOutput = m_videoWidget;
-#endif
-
- if (m_videoOutput) {
- increaseVideoRef();
- m_control->setVideoOutput(m_videoOutput);
- return m_videoOutput;
- }
- }
-
- return 0;
-}
-
-void QGstreamerPlayerService::releaseControl(QObject *control)
-{
- if (!control)
- return;
-
- if (control == m_videoOutput) {
- m_videoOutput = 0;
- m_control->setVideoOutput(0);
- decreaseVideoRef();
- } else if (control == m_videoProbeControl && !m_videoProbeControl->ref.deref()) {
- m_session->removeProbe(m_videoProbeControl);
- delete m_videoProbeControl;
- m_videoProbeControl = 0;
- decreaseVideoRef();
- } else if (control == m_audioProbeControl && !m_audioProbeControl->ref.deref()) {
- m_session->removeProbe(m_audioProbeControl);
- delete m_audioProbeControl;
- m_audioProbeControl = 0;
- }
-}
-
-void QGstreamerPlayerService::increaseVideoRef()
-{
- m_videoReferenceCount++;
-}
-
-void QGstreamerPlayerService::decreaseVideoRef()
-{
- m_videoReferenceCount--;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h
deleted file mode 100644
index e69eb7c04..000000000
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h
+++ /dev/null
@@ -1,96 +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 QGSTREAMERPLAYERSERVICE_H
-#define QGSTREAMERPLAYERSERVICE_H
-
-#include <QtCore/qobject.h>
-#include <QtCore/qiodevice.h>
-
-#include <qmediaservice.h>
-
-QT_BEGIN_NAMESPACE
-class QMediaPlayerControl;
-
-class QGstreamerMetaData;
-class QGstreamerPlayerControl;
-class QGstreamerPlayerSession;
-class QGstreamerMetaDataProvider;
-class QGstreamerStreamsControl;
-class QGstreamerVideoRenderer;
-class QGstreamerVideoWindow;
-class QGstreamerVideoWidgetControl;
-class QGStreamerAvailabilityControl;
-class QGstreamerAudioProbeControl;
-class QGstreamerVideoProbeControl;
-
-class QGstreamerPlayerService : public QMediaService
-{
- Q_OBJECT
-public:
- QGstreamerPlayerService(QObject *parent = 0);
- ~QGstreamerPlayerService();
-
- QObject *requestControl(const char *name) override;
- void releaseControl(QObject *control) override;
-
-private:
- QGstreamerPlayerControl *m_control = nullptr;
- QGstreamerPlayerSession *m_session = nullptr;
- QGstreamerMetaDataProvider *m_metaData = nullptr;
- QGstreamerStreamsControl *m_streamsControl = nullptr;
-
- QGstreamerAudioProbeControl *m_audioProbeControl = nullptr;
- QGstreamerVideoProbeControl *m_videoProbeControl = nullptr;
-
- QObject *m_videoOutput = nullptr;
- QObject *m_videoRenderer = nullptr;
- QGstreamerVideoWindow *m_videoWindow = nullptr;
-#if defined(HAVE_WIDGETS)
- QGstreamerVideoWidgetControl *m_videoWidget = nullptr;
-#endif
-
- void increaseVideoRef();
- void decreaseVideoRef();
- int m_videoReferenceCount = 0;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp
deleted file mode 100644
index 48f23b1f7..000000000
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp
+++ /dev/null
@@ -1,93 +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 <QtMultimedia/private/qtmultimediaglobal_p.h>
-#include <QtCore/qstring.h>
-#include <QtCore/qdebug.h>
-#include <QtCore/QDir>
-#include <QtCore/QDebug>
-
-#include "qgstreamerplayerserviceplugin.h"
-
-//#define QT_SUPPORTEDMIMETYPES_DEBUG
-
-#include "qgstreamerplayerservice.h"
-#include <private/qgstutils_p.h>
-
-QMediaService* QGstreamerPlayerServicePlugin::create(const QString &key)
-{
- QGstUtils::initializeGst();
-
- if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
- return new QGstreamerPlayerService;
-
- qWarning() << "Gstreamer service plugin: unsupported key:" << key;
- return 0;
-}
-
-void QGstreamerPlayerServicePlugin::release(QMediaService *service)
-{
- delete service;
-}
-
-QMultimedia::SupportEstimate QGstreamerPlayerServicePlugin::hasSupport(const QString &mimeType,
- const QStringList &codecs) const
-{
- if (m_supportedMimeTypeSet.isEmpty())
- updateSupportedMimeTypes();
-
- return QGstUtils::hasSupport(mimeType, codecs, m_supportedMimeTypeSet);
-}
-
-static bool isDecoderOrDemuxer(GstElementFactory *factory)
-{
- return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DEMUXER)
- || gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_DECODER);
-}
-
-void QGstreamerPlayerServicePlugin::updateSupportedMimeTypes() const
-{
- m_supportedMimeTypeSet = QGstUtils::supportedMimeTypes(isDecoderOrDemuxer);
-}
-
-QStringList QGstreamerPlayerServicePlugin::supportedMimeTypes() const
-{
- return QStringList();
-}
-
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h
deleted file mode 100644
index a1f7cc293..000000000
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h
+++ /dev/null
@@ -1,74 +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 QGSTREAMERPLAYERSERVICEPLUGIN_H
-#define QGSTREAMERPLAYERSERVICEPLUGIN_H
-
-#include <qmediaserviceproviderplugin.h>
-#include <QtCore/qset.h>
-#include <QtCore/QObject>
-
-QT_BEGIN_NAMESPACE
-
-
-class QGstreamerPlayerServicePlugin
- : public QMediaServiceProviderPlugin
- , public QMediaServiceSupportedFormatsInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedFormatsInterface)
- Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "mediaplayer.json")
-public:
- QMediaService* create(const QString &key) override;
- void release(QMediaService *service) override;
-
- QMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList &codecs) const override;
- QStringList supportedMimeTypes() const override;
-
-private:
- void updateSupportedMimeTypes() const;
-
- mutable QSet<QString> m_supportedMimeTypeSet; //for fast access
-};
-
-QT_END_NAMESPACE
-
-#endif // QGSTREAMERPLAYERSERVICEPLUGIN_H
-
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp
deleted file mode 100644
index 4f5c3f0b2..000000000
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp
+++ /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$
-**
-****************************************************************************/
-
-#include "qgstreamerstreamscontrol.h"
-#include <private/qgstreamerplayersession_p.h>
-
-QGstreamerStreamsControl::QGstreamerStreamsControl(QGstreamerPlayerSession *session, QObject *parent)
- :QMediaStreamsControl(parent), m_session(session)
-{
- connect(m_session, SIGNAL(streamsChanged()), SIGNAL(streamsChanged()));
-}
-
-QGstreamerStreamsControl::~QGstreamerStreamsControl()
-{
-}
-
-int QGstreamerStreamsControl::streamCount()
-{
- return m_session->streamCount();
-}
-
-QMediaStreamsControl::StreamType QGstreamerStreamsControl::streamType(int streamNumber)
-{
- return m_session->streamType(streamNumber);
-}
-
-QVariant QGstreamerStreamsControl::metaData(int streamNumber, const QString &key)
-{
- return m_session->streamProperties(streamNumber).value(key);
-}
-
-bool QGstreamerStreamsControl::isActive(int streamNumber)
-{
- return streamNumber != -1 && streamNumber == m_session->activeStream(streamType(streamNumber));
-}
-
-void QGstreamerStreamsControl::setActive(int streamNumber, bool state)
-{
- QMediaStreamsControl::StreamType type = m_session->streamType(streamNumber);
- if (type == QMediaStreamsControl::UnknownStream)
- return;
-
- if (state)
- m_session->setActiveStream(type, streamNumber);
- else {
- //only one active stream of certain type is supported
- if (m_session->activeStream(type) == streamNumber)
- m_session->setActiveStream(type, -1);
- }
-}
-
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h b/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h
deleted file mode 100644
index 41932095c..000000000
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h
+++ /dev/null
@@ -1,71 +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 QGSTREAMERSTREAMSCONTROL_H
-#define QGSTREAMERSTREAMSCONTROL_H
-
-#include <qmediastreamscontrol.h>
-
-QT_BEGIN_NAMESPACE
-
-class QGstreamerPlayerSession;
-
-class QGstreamerStreamsControl : public QMediaStreamsControl
-{
- Q_OBJECT
-public:
- QGstreamerStreamsControl(QGstreamerPlayerSession *session, QObject *parent);
- virtual ~QGstreamerStreamsControl();
-
- int streamCount() override;
- StreamType streamType(int streamNumber) override;
-
- QVariant metaData(int streamNumber, const QString &key) override;
-
- bool isActive(int streamNumber) override;
- void setActive(int streamNumber, bool state) override;
-
-private:
- QGstreamerPlayerSession *m_session = nullptr;
-};
-
-QT_END_NAMESPACE
-
-#endif // QGSTREAMERSTREAMSCONTROL_H
-