From bf1eb37ac8e569ab929c0c2ab8655f07594ef4e9 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 12 Jan 2021 09:37:27 +0100 Subject: Get rid of the QMediaServiceFeaturesInterface Replace it by one virtual method in the media player control. Change-Id: I18778d2f56b9af8a16418c30c75c973e54b6add8 Reviewed-by: Doris Verria Reviewed-by: Lars Knoll --- src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp | 9 --------- src/plugins/gstreamer/camerabin/camerabinserviceplugin.h | 4 ---- .../mediacapture/qgstreamercaptureserviceplugin.cpp | 9 --------- .../gstreamer/mediacapture/qgstreamercaptureserviceplugin.h | 4 ---- .../gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp | 13 ------------- .../gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h | 4 ---- 6 files changed, 43 deletions(-) (limited to 'src/plugins/gstreamer') diff --git a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp index c54dc16d4..f8d9b5a37 100644 --- a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp @@ -89,15 +89,6 @@ void CameraBinServicePlugin::release(QMediaService *service) delete service; } -QMediaServiceFeaturesInterface::Features CameraBinServicePlugin::supportedFeatures( - const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_CAMERA) - return QMediaServiceFeaturesInterface::VideoSurface; - - return QMediaServiceFeaturesInterface::Features(); -} - QByteArray CameraBinServicePlugin::defaultDevice(const QByteArray &service) const { return service == Q_MEDIASERVICE_CAMERA diff --git a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h index 79ec59685..2c1b1a207 100644 --- a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h +++ b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h @@ -51,11 +51,9 @@ QT_BEGIN_NAMESPACE class CameraBinServicePlugin : public QMediaServiceProviderPlugin , public QMediaServiceSupportedDevicesInterface - , public QMediaServiceFeaturesInterface { Q_OBJECT Q_INTERFACES(QMediaServiceSupportedDevicesInterface) - Q_INTERFACES(QMediaServiceFeaturesInterface) Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "camerabin.json") public: CameraBinServicePlugin(); @@ -64,8 +62,6 @@ public: QMediaService* create(const QString &key) override; void release(QMediaService *service) override; - QMediaServiceFeaturesInterface::Features supportedFeatures(const QByteArray &service) const override; - QByteArray defaultDevice(const QByteArray &service) const override; QList devices(const QByteArray &service) const override; QString deviceDescription(const QByteArray &service, const QByteArray &device) override; diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp index f40cd2918..31f6c871c 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp +++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp @@ -71,15 +71,6 @@ void QGstreamerCaptureServicePlugin::release(QMediaService *service) } #if defined(USE_GSTREAMER_CAMERA) -QMediaServiceFeaturesInterface::Features QGstreamerCaptureServicePlugin::supportedFeatures( - const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_CAMERA) - return QMediaServiceFeaturesInterface::VideoSurface; - - return QMediaServiceFeaturesInterface::Features(); -} - QByteArray QGstreamerCaptureServicePlugin::defaultDevice(const QByteArray &service) const { return service == Q_MEDIASERVICE_CAMERA diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h index ece0b00e6..0acc01257 100644 --- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h +++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h @@ -51,14 +51,12 @@ class QGstreamerCaptureServicePlugin : public QMediaServiceProviderPlugin #if defined(USE_GSTREAMER_CAMERA) , public QMediaServiceSupportedDevicesInterface - , public QMediaServiceFeaturesInterface #endif , public QMediaServiceSupportedFormatsInterface { Q_OBJECT #if defined(USE_GSTREAMER_CAMERA) Q_INTERFACES(QMediaServiceSupportedDevicesInterface) - Q_INTERFACES(QMediaServiceFeaturesInterface) #endif Q_INTERFACES(QMediaServiceSupportedFormatsInterface) #if defined(USE_GSTREAMER_CAMERA) @@ -71,8 +69,6 @@ public: void release(QMediaService *service) override; #if defined(USE_GSTREAMER_CAMERA) - QMediaServiceFeaturesInterface::Features supportedFeatures(const QByteArray &service) const override; - QByteArray defaultDevice(const QByteArray &service) const override; QList devices(const QByteArray &service) const override; QString deviceDescription(const QByteArray &service, const QByteArray &device) override; diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp index 010009016..48f23b1f7 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp @@ -66,19 +66,6 @@ void QGstreamerPlayerServicePlugin::release(QMediaService *service) delete service; } -QMediaServiceFeaturesInterface::Features QGstreamerPlayerServicePlugin::supportedFeatures( - const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_MEDIAPLAYER) - return -#if QT_CONFIG(gstreamer_app) - QMediaServiceFeaturesInterface::StreamPlayback | -#endif - QMediaServiceFeaturesInterface::VideoSurface; - - return QMediaServiceFeaturesInterface::Features(); -} - QMultimedia::SupportEstimate QGstreamerPlayerServicePlugin::hasSupport(const QString &mimeType, const QStringList &codecs) const { diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h index 6cc7a7007..a1f7cc293 100644 --- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h +++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h @@ -50,19 +50,15 @@ QT_BEGIN_NAMESPACE class QGstreamerPlayerServicePlugin : public QMediaServiceProviderPlugin - , public QMediaServiceFeaturesInterface , public QMediaServiceSupportedFormatsInterface { Q_OBJECT - Q_INTERFACES(QMediaServiceFeaturesInterface) 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; - QMediaServiceFeaturesInterface::Features supportedFeatures(const QByteArray &service) const override; - QMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList &codecs) const override; QStringList supportedMimeTypes() const override; -- cgit v1.2.3