diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-01-21 18:06:33 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-01-29 08:50:20 +0000 |
commit | a5bfe043139ae40fa9f7ffc01b71ec37668a5534 (patch) | |
tree | e7088c696cc4e850a4f0404495d033dbae0e1462 /src/multimedia/platform | |
parent | 76f97643c74fb80e330f80ee8abd830ea8dbeff4 (diff) |
Completely remove the old plugin infrastructure
Now that nothing relies on QMediaServiceProvider* anymore,
get rid of those classes.
Change-Id: I30d4e878598b7af63f9a5b8cc3cf7cf3daa37f6a
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/multimedia/platform')
29 files changed, 81 insertions, 866 deletions
diff --git a/src/multimedia/platform/android/android.pri b/src/multimedia/platform/android/android.pri index 0806d0538..555d8bec0 100644 --- a/src/multimedia/platform/android/android.pri +++ b/src/multimedia/platform/android/android.pri @@ -1,12 +1,10 @@ QT += opengl core-private network HEADERS += \ - $$PWD/qandroidmediaserviceplugin_p.h \ $$PWD/qandroidintegration_p.h \ $$PWD/qandroiddevicemanager_p.h SOURCES += \ - $$PWD/qandroidmediaserviceplugin.cpp \ $$PWD/qandroidintegration.cpp \ $$PWD/qandroiddevicemanager.cpp diff --git a/src/multimedia/platform/android/mediacapture/qandroidcaptureservice.cpp b/src/multimedia/platform/android/mediacapture/qandroidcaptureservice.cpp index 2f124f7e8..c34de30af 100644 --- a/src/multimedia/platform/android/mediacapture/qandroidcaptureservice.cpp +++ b/src/multimedia/platform/android/mediacapture/qandroidcaptureservice.cpp @@ -56,16 +56,13 @@ #include "qandroidmediacontainercontrol_p.h" #include "qandroidmediavideoprobecontrol_p.h" -#include <qmediaserviceproviderplugin.h> - QT_BEGIN_NAMESPACE -QAndroidCaptureService::QAndroidCaptureService(const QString &service, QObject *parent) - : QMediaService(parent) - , m_service(service) +QAndroidCaptureService::QAndroidCaptureService(QMediaRecorder::CaptureMode mode) + : m_videoEnabled(mode == QMediaRecorder::AudioAndVideo) , m_videoRendererControl(0) { - if (m_service == QLatin1String(Q_MEDIASERVICE_CAMERA)) { + if (m_videoEnabled) { m_cameraSession = new QAndroidCameraSession; m_cameraControl = new QAndroidCameraControl(m_cameraSession); m_videoInputControl = new QAndroidVideoDeviceSelectorControl(m_cameraSession); @@ -91,7 +88,7 @@ QAndroidCaptureService::QAndroidCaptureService(const QString &service, QObject * m_audioEncoderSettingsControl = new QAndroidAudioEncoderSettingsControl(m_captureSession); m_mediaContainerControl = new QAndroidMediaContainerControl(m_captureSession); - if (m_service == QLatin1String(Q_MEDIASERVICE_CAMERA)) + if (m_videoEnabled) m_videoEncoderSettingsControl = new QAndroidVideoEncoderSettingsControl(m_captureSession); } @@ -149,7 +146,7 @@ QObject *QAndroidCaptureService::requestControl(const char *name) return m_imageCaptureControl; if (qstrcmp(name, QVideoRendererControl_iid) == 0 - && m_service == QLatin1String(Q_MEDIASERVICE_CAMERA) + && m_videoEnabled && !m_videoRendererControl) { m_videoRendererControl = new QAndroidCameraVideoRendererControl(m_cameraSession); return m_videoRendererControl; diff --git a/src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h b/src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h index 2ed755029..f3150e2a0 100644 --- a/src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h +++ b/src/multimedia/platform/android/mediacapture/qandroidcaptureservice_p.h @@ -53,6 +53,8 @@ // #include <qmediaservice.h> +#include <private/qmediaplatformcaptureinterface_p.h> +#include <private/qmediaplatformintegration_p.h> QT_BEGIN_NAMESPACE @@ -71,19 +73,19 @@ class QAndroidAudioEncoderSettingsControl; class QAndroidVideoEncoderSettingsControl; class QAndroidMediaContainerControl; -class QAndroidCaptureService : public QMediaService +class QAndroidCaptureService : public QMediaPlatformCaptureInterface { Q_OBJECT public: - explicit QAndroidCaptureService(const QString &service, QObject *parent = 0); + explicit QAndroidCaptureService(QMediaRecorder::CaptureMode mode); virtual ~QAndroidCaptureService(); QObject *requestControl(const char *name); void releaseControl(QObject *); private: - QString m_service; + bool m_videoEnabled = false; QAndroidMediaRecorderControl *m_recorderControl; QAndroidCaptureSession *m_captureSession; diff --git a/src/multimedia/platform/android/qandroidintegration.cpp b/src/multimedia/platform/android/qandroidintegration.cpp index ad8ca6b13..76102a476 100644 --- a/src/multimedia/platform/android/qandroidintegration.cpp +++ b/src/multimedia/platform/android/qandroidintegration.cpp @@ -40,9 +40,19 @@ #include "qandroidintegration_p.h" #include "qandroiddevicemanager_p.h" #include "private/qandroidmediaservice_p.h" +#include "private/qandroidglobal_p.h" +#include "private/qandroidcaptureservice_p.h" +#include "private/androidmediaplayer_p.h" +#include "private/qandroidcamerasession_p.h" +#include "private/androidsurfacetexture_p.h" +#include "private/androidsurfaceview_p.h" +#include "private/androidcamera_p.h" +#include "private/androidmediarecorder_p.h" QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(qtAndroidMediaPlugin, "qt.multimedia.android") + QAndroidIntegration::QAndroidIntegration() { @@ -60,9 +70,47 @@ QMediaPlatformDeviceManager *QAndroidIntegration::deviceManager() return m_manager; } +QMediaPlatformCaptureInterface *QAndroidIntegration::createCaptureInterface(QMediaRecorder::CaptureMode mode) +{ + return new QAndroidCaptureService(mode); +} + QMediaPlatformPlayerInterface *QAndroidIntegration::createPlayerInterface() { return new QAndroidMediaService(); } +Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void * /*reserved*/) +{ + static bool initialized = false; + if (initialized) + return JNI_VERSION_1_6; + initialized = true; + + QT_USE_NAMESPACE + typedef union { + JNIEnv *nativeEnvironment; + void *venv; + } UnionJNIEnvToVoid; + + UnionJNIEnvToVoid uenv; + uenv.venv = NULL; + + if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_6) != JNI_OK) + return JNI_ERR; + + JNIEnv *jniEnv = uenv.nativeEnvironment; + + if (!AndroidMediaPlayer::initJNI(jniEnv) || + !AndroidCamera::initJNI(jniEnv) || + !AndroidMediaRecorder::initJNI(jniEnv) || + !AndroidSurfaceHolder::initJNI(jniEnv)) { + return JNI_ERR; + } + + AndroidSurfaceTexture::initJNI(jniEnv); + + return JNI_VERSION_1_6; +} + QT_END_NAMESPACE diff --git a/src/multimedia/platform/android/qandroidintegration_p.h b/src/multimedia/platform/android/qandroidintegration_p.h index d7e62242f..d4cf5bb6a 100644 --- a/src/multimedia/platform/android/qandroidintegration_p.h +++ b/src/multimedia/platform/android/qandroidintegration_p.h @@ -66,6 +66,7 @@ public: QMediaPlatformDeviceManager *deviceManager() override; + QMediaPlatformCaptureInterface *createCaptureInterface(QMediaRecorder::CaptureMode mode) override; QMediaPlatformPlayerInterface *createPlayerInterface() override; QAndroidDeviceManager *m_manager = nullptr; diff --git a/src/multimedia/platform/android/qandroidmediaserviceplugin.cpp b/src/multimedia/platform/android/qandroidmediaserviceplugin.cpp deleted file mode 100644 index bc5a54acb..000000000 --- a/src/multimedia/platform/android/qandroidmediaserviceplugin.cpp +++ /dev/null @@ -1,112 +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 "qandroidmediaserviceplugin_p.h" - -#include "qandroidmediaservice_p.h" -#include "qandroidcaptureservice_p.h" -#include "qandroidcamerasession_p.h" -#include "androidmediaplayer_p.h" -#include "androidsurfacetexture_p.h" -#include "androidcamera_p.h" -#include "androidmultimediautils_p.h" -#include "androidmediarecorder_p.h" -#include "androidsurfaceview_p.h" -#include "qandroidglobal_p.h" - -QT_BEGIN_NAMESPACE - -Q_LOGGING_CATEGORY(qtAndroidMediaPlugin, "qt.multimedia.android") - -QAndroidMediaServicePlugin::QAndroidMediaServicePlugin() -{ -} - -QAndroidMediaServicePlugin::~QAndroidMediaServicePlugin() -{ -} - -QMediaService *QAndroidMediaServicePlugin::create(const QString &key) -{ - if (key == QLatin1String(Q_MEDIASERVICE_CAMERA) - return new QAndroidCaptureService(key); - - qCWarning(qtAndroidMediaPlugin) << "Android service plugin: unsupported key:" << key; - return 0; -} - -void QAndroidMediaServicePlugin::release(QMediaService *service) -{ - delete service; -} - -QT_END_NAMESPACE - -Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void * /*reserved*/) -{ - static bool initialized = false; - if (initialized) - return JNI_VERSION_1_6; - initialized = true; - - QT_USE_NAMESPACE - typedef union { - JNIEnv *nativeEnvironment; - void *venv; - } UnionJNIEnvToVoid; - - UnionJNIEnvToVoid uenv; - uenv.venv = NULL; - - if (vm->GetEnv(&uenv.venv, JNI_VERSION_1_6) != JNI_OK) - return JNI_ERR; - - JNIEnv *jniEnv = uenv.nativeEnvironment; - - if (!AndroidMediaPlayer::initJNI(jniEnv) || - !AndroidCamera::initJNI(jniEnv) || - !AndroidMediaRecorder::initJNI(jniEnv) || - !AndroidSurfaceHolder::initJNI(jniEnv)) { - return JNI_ERR; - } - - AndroidSurfaceTexture::initJNI(jniEnv); - - return JNI_VERSION_1_6; -} diff --git a/src/multimedia/platform/android/qandroidmediaserviceplugin_p.h b/src/multimedia/platform/android/qandroidmediaserviceplugin_p.h deleted file mode 100644 index 4beff309b..000000000 --- a/src/multimedia/platform/android/qandroidmediaserviceplugin_p.h +++ /dev/null @@ -1,72 +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 QANDROIDMEDIASERVICEPLUGIN_H -#define QANDROIDMEDIASERVICEPLUGIN_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 <QMediaServiceProviderPlugin> - -QT_BEGIN_NAMESPACE - -class QAndroidMediaServicePlugin - : public QMediaServiceProviderPlugin -{ - Q_OBJECT -public: - QAndroidMediaServicePlugin(); - ~QAndroidMediaServicePlugin(); - - QMediaService* create(QString const& key) override; - void release(QMediaService *service) override; -}; - -QT_END_NAMESPACE - -#endif // QANDROIDMEDIASERVICEPLUGIN_H diff --git a/src/multimedia/platform/darwin/camera/avfcameraservice.mm b/src/multimedia/platform/darwin/camera/avfcameraservice.mm index 80e8a154d..670167d45 100644 --- a/src/multimedia/platform/darwin/camera/avfcameraservice.mm +++ b/src/multimedia/platform/darwin/camera/avfcameraservice.mm @@ -65,10 +65,9 @@ QT_USE_NAMESPACE -AVFCameraService::AVFCameraService(QObject *parent): - QMediaService(parent), - m_videoOutput(nullptr), - m_captureWindowControl(nullptr) +AVFCameraService::AVFCameraService() + : m_videoOutput(nullptr), + m_captureWindowControl(nullptr) { m_session = new AVFCameraSession(this); m_cameraControl = new AVFCameraControl(this); diff --git a/src/multimedia/platform/darwin/camera/avfcameraservice_p.h b/src/multimedia/platform/darwin/camera/avfcameraservice_p.h index f4e8fba50..27d10ba25 100644 --- a/src/multimedia/platform/darwin/camera/avfcameraservice_p.h +++ b/src/multimedia/platform/darwin/camera/avfcameraservice_p.h @@ -53,7 +53,7 @@ #include <QtCore/qobject.h> #include <QtCore/qset.h> -#include <qmediaservice.h> +#include <private/qmediaplatformcaptureinterface_p.h> QT_BEGIN_NAMESPACE @@ -77,11 +77,11 @@ class AVFVideoEncoderSettingsControl; class AVFMediaContainerControl; class AVFCameraWindowControl; -class AVFCameraService : public QMediaService +class AVFCameraService : public QMediaPlatformCaptureInterface { Q_OBJECT public: - AVFCameraService(QObject *parent = nullptr); + AVFCameraService(); ~AVFCameraService(); QObject *requestControl(const char *name); diff --git a/src/multimedia/platform/darwin/camera/avfcameraserviceplugin.mm b/src/multimedia/platform/darwin/camera/avfcameraserviceplugin.mm deleted file mode 100644 index 129f3d334..000000000 --- a/src/multimedia/platform/darwin/camera/avfcameraserviceplugin.mm +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** 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/qstring.h> -#include <QtCore/qdebug.h> - -#include "avfcameraserviceplugin_p.h" -#include "avfcameraservice_p.h" -#include "avfcamerasession_p.h" - -#include <qmediaserviceproviderplugin.h> - -QT_BEGIN_NAMESPACE - -AVFServicePlugin::AVFServicePlugin() -{ -} - -QMediaService* AVFServicePlugin::create(QString const& key) -{ - if (key == QLatin1String(Q_MEDIASERVICE_CAMERA)) - return new AVFCameraService; - else - qWarning() << "unsupported key:" << key; - - return nullptr; -} - -void AVFServicePlugin::release(QMediaService *service) -{ - delete service; -} - -QT_END_NAMESPACE diff --git a/src/multimedia/platform/darwin/camera/avfcameraserviceplugin_p.h b/src/multimedia/platform/darwin/camera/avfcameraserviceplugin_p.h deleted file mode 100644 index 499fe5836..000000000 --- a/src/multimedia/platform/darwin/camera/avfcameraserviceplugin_p.h +++ /dev/null @@ -1,72 +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 AVFSERVICEPLUGIN_H -#define AVFSERVICEPLUGIN_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 <qmediaserviceproviderplugin.h> -#include <QtCore/qmap.h> - -QT_BEGIN_NAMESPACE - -class AVFServicePlugin : public QMediaServiceProviderPlugin, -{ - Q_OBJECT -public: - AVFServicePlugin(); - - QMediaService* create(QString const &key) override; - void release(QMediaService *service) override; -}; - -QT_END_NAMESPACE - -#endif diff --git a/src/multimedia/platform/darwin/camera/camera.pri b/src/multimedia/platform/darwin/camera/camera.pri index 94bbbc8f2..49bd35ba1 100644 --- a/src/multimedia/platform/darwin/camera/camera.pri +++ b/src/multimedia/platform/darwin/camera/camera.pri @@ -1,6 +1,5 @@ HEADERS += \ $$PWD/avfcameradebug_p.h \ - $$PWD/avfcameraserviceplugin_p.h \ $$PWD/avfcameracontrol_p.h \ $$PWD/avfcamerametadatacontrol_p.h \ $$PWD/avfimagecapturecontrol_p.h \ @@ -20,7 +19,6 @@ HEADERS += \ $$PWD/avfcamerawindowcontrol_p.h \ SOURCES += \ - $$PWD/avfcameraserviceplugin.mm \ $$PWD/avfcameracontrol.mm \ $$PWD/avfcamerametadatacontrol.mm \ $$PWD/avfimagecapturecontrol.mm \ diff --git a/src/multimedia/platform/darwin/qdarwinintegration.cpp b/src/multimedia/platform/darwin/qdarwinintegration.cpp index ed38141e1..3f969a43a 100644 --- a/src/multimedia/platform/darwin/qdarwinintegration.cpp +++ b/src/multimedia/platform/darwin/qdarwinintegration.cpp @@ -40,6 +40,7 @@ #include "qdarwinintegration_p.h" #include "qdarwindevicemanager_p.h" #include <private/avfmediaplayerservice_p.h> +#include <private/avfcameraservice_p.h> QT_BEGIN_NAMESPACE @@ -60,6 +61,11 @@ QMediaPlatformDeviceManager *QDarwinIntegration::deviceManager() return m_manager; } +QMediaPlatformCaptureInterface *QDarwinIntegration::createCaptureInterface(QMediaRecorder::CaptureMode) +{ + return new AVFCameraService; +} + QMediaPlatformPlayerInterface *QDarwinIntegration::createPlayerInterface() { return new AVFMediaPlayerService; diff --git a/src/multimedia/platform/darwin/qdarwinintegration_p.h b/src/multimedia/platform/darwin/qdarwinintegration_p.h index af59fb093..ec9e33b78 100644 --- a/src/multimedia/platform/darwin/qdarwinintegration_p.h +++ b/src/multimedia/platform/darwin/qdarwinintegration_p.h @@ -65,6 +65,7 @@ public: QMediaPlatformDeviceManager *deviceManager() override; + QMediaPlatformCaptureInterface *createCaptureInterface(QMediaRecorder::CaptureMode /*mode*/) override; QMediaPlatformPlayerInterface *createPlayerInterface() override; QDarwinDeviceManager *m_manager = nullptr; diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabin.pri b/src/multimedia/platform/gstreamer/camerabin/camerabin.pri index 2cacd56b0..d4d661110 100644 --- a/src/multimedia/platform/gstreamer/camerabin/camerabin.pri +++ b/src/multimedia/platform/gstreamer/camerabin/camerabin.pri @@ -1,6 +1,5 @@ HEADERS += \ - $$PWD/camerabinserviceplugin_p.h \ $$PWD/camerabinservice_p.h \ $$PWD/camerabinsession_p.h \ $$PWD/camerabincontrol_p.h \ @@ -14,7 +13,6 @@ HEADERS += \ $$PWD/camerabinvideoencoder_p.h \ SOURCES += \ - $$PWD/camerabinserviceplugin.cpp \ $$PWD/camerabinservice.cpp \ $$PWD/camerabinsession.cpp \ $$PWD/camerabincontrol.cpp \ diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinservice.cpp b/src/multimedia/platform/gstreamer/camerabin/camerabinservice.cpp index 8359b5f59..c48207396 100644 --- a/src/multimedia/platform/gstreamer/camerabin/camerabinservice.cpp +++ b/src/multimedia/platform/gstreamer/camerabin/camerabinservice.cpp @@ -62,7 +62,6 @@ #include <private/qgstreamervideowindow_p.h> #include <private/qgstreamervideorenderer_p.h> -#include <private/qmediaserviceprovider_p.h> #include <QtCore/qdebug.h> diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin.cpp b/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin.cpp deleted file mode 100644 index d15c424c7..000000000 --- a/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin.cpp +++ /dev/null @@ -1,114 +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/qstring.h> -#include <QtCore/qdebug.h> -#include <QtCore/QDir> -#include <QtCore/QDebug> - -#include "camerabinserviceplugin.h" - -#include "camerabinservice.h" -#include <private/qgstutils_p.h> - -QT_BEGIN_NAMESPACE - -template <typename T, int N> static int lengthOf(const T(&)[N]) { return N; } - -CameraBinServicePlugin::CameraBinServicePlugin() - : m_sourceFactory(0) -{ -} - -CameraBinServicePlugin::~CameraBinServicePlugin() -{ - if (m_sourceFactory) - gst_object_unref(GST_OBJECT(m_sourceFactory)); -} - -QMediaService* CameraBinServicePlugin::create(const QString &key) -{ - QGstUtils::initializeGst(); - - if (key == QLatin1String(Q_MEDIASERVICE_CAMERA)) { - if (!CameraBinService::isCameraBinAvailable()) { - guint major, minor, micro, nano; - gst_version(&major, &minor, µ, &nano); - qWarning("Error: cannot create camera service, the 'camerabin' plugin is missing for " - "GStreamer %u.%u." - "\nPlease install the 'bad' GStreamer plugin package.", - major, minor); - return nullptr; - } - - return new CameraBinService(sourceFactory()); - } - - qWarning() << "Gstreamer camerabin service plugin: unsupported key:" << key; - return 0; -} - -void CameraBinServicePlugin::release(QMediaService *service) -{ - delete service; -} - -GstElementFactory *CameraBinServicePlugin::sourceFactory() const -{ - if (!m_sourceFactory) { - GstElementFactory *factory = 0; - const QByteArray envCandidate = qgetenv("QT_GSTREAMER_CAMERABIN_SRC"); - if (!envCandidate.isEmpty()) - factory = gst_element_factory_find(envCandidate.constData()); - - static const char *candidates[] = { "subdevsrc", "wrappercamerabinsrc" }; - for (int i = 0; !factory && i < lengthOf(candidates); ++i) - factory = gst_element_factory_find(candidates[i]); - - if (factory) { - m_sourceFactory = GST_ELEMENT_FACTORY(gst_plugin_feature_load( - GST_PLUGIN_FEATURE(factory))); - gst_object_unref((GST_OBJECT(factory))); - } - } - - return m_sourceFactory; -} - -QT_END_NAMESPACE diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin_p.h b/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin_p.h deleted file mode 100644 index 05661e3d5..000000000 --- a/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin_p.h +++ /dev/null @@ -1,81 +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 CAMERABINSERVICEPLUGIN_H -#define CAMERABINSERVICEPLUGIN_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 <qmediaserviceproviderplugin.h> -#include <private/qgstreamervideoinputdevicecontrol_p.h> - -#include <gst/gst.h> - -QT_BEGIN_NAMESPACE - -class CameraBinServicePlugin - : public QMediaServiceProviderPlugin -{ - Q_OBJECT -public: - CameraBinServicePlugin(); - ~CameraBinServicePlugin(); - - QMediaService* create(const QString &key) override; - void release(QMediaService *service) override; - -private: - GstElementFactory *sourceFactory() const; - - mutable GstElementFactory *m_sourceFactory; -}; - -QT_END_NAMESPACE - -#endif // QGSTREAMERCAPTURESERVICEPLUGIN_H diff --git a/src/multimedia/platform/gstreamer/mediacapture/mediacapture.pri b/src/multimedia/platform/gstreamer/mediacapture/mediacapture.pri index f87e95200..a8a4d2d47 100644 --- a/src/multimedia/platform/gstreamer/mediacapture/mediacapture.pri +++ b/src/multimedia/platform/gstreamer/mediacapture/mediacapture.pri @@ -9,8 +9,7 @@ HEADERS += $$PWD/qgstreamercaptureservice_p.h \ $$PWD/qgstreamercameracontrol_p.h \ $$PWD/qgstreamercapturemetadatacontrol_p.h \ $$PWD/qgstreamerimagecapturecontrol_p.h \ - $$PWD/qgstreamerimageencode_p.h \ - $$PWD/qgstreamercaptureserviceplugin_p.h + $$PWD/qgstreamerimageencode_p.h SOURCES += $$PWD/qgstreamercaptureservice.cpp \ $$PWD/qgstreamercapturesession.cpp \ @@ -21,8 +20,7 @@ SOURCES += $$PWD/qgstreamercaptureservice.cpp \ $$PWD/qgstreamercameracontrol.cpp \ $$PWD/qgstreamercapturemetadatacontrol.cpp \ $$PWD/qgstreamerimagecapturecontrol.cpp \ - $$PWD/qgstreamerimageencode.cpp \ - $$PWD/qgstreamercaptureserviceplugin.cpp + $$PWD/qgstreamerimageencode.cpp # Camera usage with gstreamer needs to have CONFIG += use_gstreamer_camera diff --git a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureservice.cpp b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureservice.cpp index 1d1cfd480..f841665c2 100644 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureservice.cpp +++ b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureservice.cpp @@ -59,11 +59,9 @@ #include <private/qgstreamervideorenderer_p.h> #include <private/qgstreamervideowindow_p.h> -#include <qmediaserviceproviderplugin.h> - QT_BEGIN_NAMESPACE -QGstreamerCaptureService::QGstreamerCaptureService(QMediaPlatformIntegration::CaptureMode mode) +QGstreamerCaptureService::QGstreamerCaptureService(QMediaRecorder::CaptureMode mode) : QMediaPlatformCaptureInterface() , m_captureSession(0) , m_cameraControl(0) @@ -78,7 +76,7 @@ QGstreamerCaptureService::QGstreamerCaptureService(QMediaPlatformIntegration::Ca , m_imageCaptureControl(0) , m_audioProbeControl(0) { - if (mode == QMediaPlatformIntegration::AudioOnly) { + if (mode == QMediaRecorder::AudioOnly) { m_captureSession = new QGstreamerCaptureSession(QGstreamerCaptureSession::Audio, this); } diff --git a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureservice_p.h b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureservice_p.h index 8b89d4ea4..f768f63ac 100644 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureservice_p.h +++ b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureservice_p.h @@ -76,7 +76,7 @@ class QGstreamerCaptureService : public QMediaPlatformCaptureInterface Q_OBJECT public: - QGstreamerCaptureService(QMediaPlatformIntegration::CaptureMode mode); + QGstreamerCaptureService(QMediaRecorder::CaptureMode mode); virtual ~QGstreamerCaptureService(); QObject *requestControl(const char *name) override; diff --git a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp deleted file mode 100644 index b056dec18..000000000 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp +++ /dev/null @@ -1,100 +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/qstring.h> -#include <QtCore/qdebug.h> -#include <QtCore/QDir> -#include <QtCore/QDebug> - -#include "qgstreamercaptureserviceplugin_p.h" -#include "private/qmediaplatformintegration_p.h" -#include "private/qmediaplatformdevicemanager_p.h" -#include "qcamerainfo.h" - -//#define QT_SUPPORTEDMIMETYPES_DEBUG - -#include "qgstreamercaptureservice_p.h" -#include <private/qgstutils_p.h> - -QMediaService* QGstreamerCaptureServicePlugin::create(const QString &key) -{ - QGstUtils::initializeGst(); - -#if defined(USE_GSTREAMER_CAMERA) - if (key == QLatin1String(Q_MEDIASERVICE_CAMERA)) - return new QGstreamerCaptureService(QMediaPlatformIntegration::AudioAndVideo); -#endif - - qWarning() << "Gstreamer capture service plugin: unsupported key:" << key; - return 0; -} - -void QGstreamerCaptureServicePlugin::release(QMediaService *service) -{ - delete service; -} - -#if 0 -// #### Find a better way to enumerate supported formats -QMultimedia::SupportEstimate QGstreamerCaptureServicePlugin::hasSupport(const QString &mimeType, - const QStringList& codecs) const -{ - if (m_supportedMimeTypeSet.isEmpty()) - updateSupportedMimeTypes(); - - return QGstUtils::hasSupport(mimeType, codecs, m_supportedMimeTypeSet); -} - - -static bool isEncoderOrMuxer(GstElementFactory *factory) -{ - return gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_MUXER) - || gst_element_factory_list_is_type(factory, GST_ELEMENT_FACTORY_TYPE_ENCODER); -} - -void QGstreamerCaptureServicePlugin::updateSupportedMimeTypes() const -{ - m_supportedMimeTypeSet = QGstUtils::supportedMimeTypes(isEncoderOrMuxer); -} - -QStringList QGstreamerCaptureServicePlugin::supportedMimeTypes() const -{ - return QStringList(); -} -#endif diff --git a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin_p.h b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin_p.h deleted file mode 100644 index acfd4f27c..000000000 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin_p.h +++ /dev/null @@ -1,72 +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 QGSTREAMERCAPTURESERVICEPLUGIN_H -#define QGSTREAMERCAPTURESERVICEPLUGIN_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 <qmediaserviceproviderplugin.h> -#include <QtCore/qset.h> -#include <QtCore/QObject> - -QT_BEGIN_NAMESPACE - -class QGstreamerCaptureServicePlugin - : public QMediaServiceProviderPlugin -{ - Q_OBJECT -public: - QMediaService* create(const QString &key) override; - void release(QMediaService *service) override; -}; - -QT_END_NAMESPACE - -#endif // QGSTREAMERCAPTURESERVICEPLUGIN_H diff --git a/src/multimedia/platform/gstreamer/qgstreamerintegration.cpp b/src/multimedia/platform/gstreamer/qgstreamerintegration.cpp index 4ba8f1d43..f31133f21 100644 --- a/src/multimedia/platform/gstreamer/qgstreamerintegration.cpp +++ b/src/multimedia/platform/gstreamer/qgstreamerintegration.cpp @@ -68,7 +68,7 @@ QAudioDecoderControl *QGstreamerIntegration::createAudioDecoder() return new QGstreamerAudioDecoderControl(nullptr); } -QMediaPlatformCaptureInterface *QGstreamerIntegration::createCaptureInterface(CaptureMode mode) +QMediaPlatformCaptureInterface *QGstreamerIntegration::createCaptureInterface(QMediaRecorder::CaptureMode mode) { return new QGstreamerCaptureService(mode); } diff --git a/src/multimedia/platform/gstreamer/qgstreamerintegration_p.h b/src/multimedia/platform/gstreamer/qgstreamerintegration_p.h index 5f79c8c09..54c51748f 100644 --- a/src/multimedia/platform/gstreamer/qgstreamerintegration_p.h +++ b/src/multimedia/platform/gstreamer/qgstreamerintegration_p.h @@ -67,7 +67,7 @@ public: QMediaPlatformDeviceManager *deviceManager() override; QAudioDecoderControl *createAudioDecoder() override; - QMediaPlatformCaptureInterface *createCaptureInterface(CaptureMode mode) override; + QMediaPlatformCaptureInterface *createCaptureInterface(QMediaRecorder::CaptureMode mode) override; QMediaPlatformPlayerInterface *createPlayerInterface() override; QGstreamerDeviceManager *m_manager = nullptr; diff --git a/src/multimedia/platform/qmediaplatformintegration_p.h b/src/multimedia/platform/qmediaplatformintegration_p.h index ed0be7959..a049c704b 100644 --- a/src/multimedia/platform/qmediaplatformintegration_p.h +++ b/src/multimedia/platform/qmediaplatformintegration_p.h @@ -51,6 +51,7 @@ // #include <private/qtmultimediaglobal_p.h> +#include <qmediarecorder.h> QT_BEGIN_NAMESPACE @@ -71,13 +72,8 @@ public: virtual ~QMediaPlatformIntegration(); virtual QMediaPlatformDeviceManager *deviceManager() = 0; - enum CaptureMode { - AudioOnly, - AudioAndVideo - }; - virtual QAudioDecoderControl *createAudioDecoder() { return nullptr; } - virtual QMediaPlatformCaptureInterface *createCaptureInterface(CaptureMode /*mode*/) { return nullptr; } + virtual QMediaPlatformCaptureInterface *createCaptureInterface(QMediaRecorder::CaptureMode /*mode*/) { return nullptr; } virtual QMediaPlatformPlayerInterface *createPlayerInterface() { return nullptr; } }; diff --git a/src/multimedia/platform/qnx/audio/audio.pri b/src/multimedia/platform/qnx/audio/audio.pri index eac9316b0..c9a345722 100644 --- a/src/multimedia/platform/qnx/audio/audio.pri +++ b/src/multimedia/platform/qnx/audio/audio.pri @@ -5,11 +5,9 @@ HEADERS += \ $$PWD/qnxaudioinput_p.h \ $$PWD/qnxaudiooutput_p.h \ $$PWD/qnxaudioutils_p.h \ - $$PWD/neutrinoserviceplugin_p.h SOURCES += \ $$PWD/qnxaudiodeviceinfo.cpp \ $$PWD/qnxaudioinput.cpp \ $$PWD/qnxaudiooutput.cpp \ $$PWD/qnxaudioutils.cpp \ - $$PWD/neutrinoserviceplugin.cpp diff --git a/src/multimedia/platform/qnx/neutrinoserviceplugin.cpp b/src/multimedia/platform/qnx/neutrinoserviceplugin.cpp deleted file mode 100644 index effde472a..000000000 --- a/src/multimedia/platform/qnx/neutrinoserviceplugin.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** 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 "neutrinoserviceplugin.h" - -#include "mmrenderermediaplayerservice.h" - -QT_BEGIN_NAMESPACE - -NeutrinoServicePlugin::NeutrinoServicePlugin() -{ -} - -QMediaService *NeutrinoServicePlugin::create(const QString &key) -{ - return 0; -} - -void NeutrinoServicePlugin::release(QMediaService *service) -{ - delete service; -} - -QT_END_NAMESPACE diff --git a/src/multimedia/platform/qnx/neutrinoserviceplugin_p.h b/src/multimedia/platform/qnx/neutrinoserviceplugin_p.h deleted file mode 100644 index f35fdf1a8..000000000 --- a/src/multimedia/platform/qnx/neutrinoserviceplugin_p.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 Research In Motion -** 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 NEUTRINOSERVICEPLUGIN_H -#define NEUTRINOSERVICEPLUGIN_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 <qmediaserviceproviderplugin.h> - -QT_BEGIN_NAMESPACE - -class NeutrinoServicePlugin - : public QMediaServiceProviderPlugin -{ - Q_OBJECT -public: - NeutrinoServicePlugin(); - - QMediaService *create(const QString &key) override; - void release(QMediaService *service) override; -}; - -QT_END_NAMESPACE - -#endif |