diff options
Diffstat (limited to 'src')
24 files changed, 29 insertions, 243 deletions
diff --git a/src/imports/multimedia/qdeclarativeaudio.cpp b/src/imports/multimedia/qdeclarativeaudio.cpp index 2f98dae60..4b2dce631 100644 --- a/src/imports/multimedia/qdeclarativeaudio.cpp +++ b/src/imports/multimedia/qdeclarativeaudio.cpp @@ -969,7 +969,7 @@ void QDeclarativeAudio::_q_statusChanged() } } -void QDeclarativeAudio::_q_mediaChanged(const QUrl &media) +void QDeclarativeAudio::_q_mediaChanged(const QUrl &) { emit sourceChanged(); } diff --git a/src/multimedia/controls/qmediaplayercontrol.cpp b/src/multimedia/controls/qmediaplayercontrol.cpp index a41e67ec5..237bf64e1 100644 --- a/src/multimedia/controls/qmediaplayercontrol.cpp +++ b/src/multimedia/controls/qmediaplayercontrol.cpp @@ -318,10 +318,12 @@ QMediaPlayerControl::QMediaPlayerControl(QObject *parent) information relating to the current media source and to cease all I/O operations related to that media. - Qt resource files are never passed as is. If the service supports - QMediaServiceFeaturesInterface::StreamPlayback, a \a stream is supplied, pointing to an opened + Qt resource files are never passed as is. If the control supports + stream playback, a \a stream is supplied, pointing to an opened QFile. Otherwise, the resource is copied into a temporary file and \a media contains the url to that file. + + \sa streamPlaybackSupported() */ /*! diff --git a/src/multimedia/controls/qmediaplayercontrol.h b/src/multimedia/controls/qmediaplayercontrol.h index 8c4005dc1..f796ec300 100644 --- a/src/multimedia/controls/qmediaplayercontrol.h +++ b/src/multimedia/controls/qmediaplayercontrol.h @@ -94,6 +94,8 @@ public: virtual void setCustomAudioRole(const QString &/*role*/) {} virtual QStringList supportedCustomAudioRoles() const { return {}; } + virtual bool streamPlaybackSupported() const { return false; } + Q_SIGNALS: void audioRoleChanged(QAudio::Role role); void customAudioRoleChanged(const QString &role); diff --git a/src/multimedia/gstreamer/qgstreamerplayercontrol_p.h b/src/multimedia/gstreamer/qgstreamerplayercontrol_p.h index d06eb7526..dbc6e3151 100644 --- a/src/multimedia/gstreamer/qgstreamerplayercontrol_p.h +++ b/src/multimedia/gstreamer/qgstreamerplayercontrol_p.h @@ -93,6 +93,8 @@ public: const QIODevice *mediaStream() const override; void setMedia(const QUrl&, QIODevice *) override; + bool streamPlaybackSupported() const override { return true; } + public Q_SLOTS: void setPosition(qint64 pos) override; diff --git a/src/multimedia/playback/qmediaplayer.cpp b/src/multimedia/playback/qmediaplayer.cpp index 096670b6d..895595def 100644 --- a/src/multimedia/playback/qmediaplayer.cpp +++ b/src/multimedia/playback/qmediaplayer.cpp @@ -261,13 +261,12 @@ static QMediaService *playerService() parented to \a parent and with \a flags. */ -QMediaPlayer::QMediaPlayer(QObject *parent, QMediaPlayer::Flags flags): +QMediaPlayer::QMediaPlayer(QObject *parent): QMediaSource(*new QMediaPlayerPrivate, parent, playerService()) { Q_D(QMediaPlayer); - Q_UNUSED(flags); d->provider = QMediaServiceProvider::defaultServiceProvider(); if (d->service == nullptr) { @@ -300,7 +299,7 @@ QMediaPlayer::QMediaPlayer(QObject *parent, QMediaPlayer::Flags flags): if (d->status == StalledMedia || d->status == BufferingMedia) addPropertyWatch("bufferStatus"); - d->hasStreamPlaybackFeature = d->provider->supportedFeatures(d->service).testFlag(QMediaServiceFeaturesInterface::StreamPlayback); + d->hasStreamPlaybackFeature = d->control->streamPlaybackSupported(); } } } @@ -626,13 +625,11 @@ void QMediaPlayer::setMedia(const QUrl &media, QIODevice *stream) specified. */ QMultimedia::SupportEstimate QMediaPlayer::hasSupport(const QString &mimeType, - const QStringList& codecs, - Flags flags) + const QStringList& codecs) { return QMediaServiceProvider::defaultServiceProvider()->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), mimeType, - codecs, - flags); + codecs); } /*! @@ -647,10 +644,9 @@ QMultimedia::SupportEstimate QMediaPlayer::hasSupport(const QString &mimeType, cases this function will need to load all available media plugins and query them for their support, which may take some time. */ -QStringList QMediaPlayer::supportedMimeTypes(Flags flags) +QStringList QMediaPlayer::supportedMimeTypes() { - return QMediaServiceProvider::defaultServiceProvider()->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), - flags); + return QMediaServiceProvider::defaultServiceProvider()->supportedMimeTypes(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER)); } /*! @@ -1128,21 +1124,6 @@ QStringList QMediaPlayer::supportedCustomAudioRoles() const Signal the amount of the local buffer filled as a percentage by \a percentFilled. */ -/*! - \enum QMediaPlayer::Flag - - \value LowLatency The player is expected to be used with simple audio formats, - but playback should start without significant delay. - Such playback service can be used for beeps, ringtones, etc. - - \value StreamPlayback The player is expected to play QIODevice based streams. - If passed to QMediaPlayer constructor, the service supporting - streams playback will be chosen. - - \value VideoSurface The player is expected to be able to render to a - QAbstractVideoSurface \l {setVideoOutput()}{output}. -*/ - QT_END_NAMESPACE #include "moc_qmediaplayer.cpp" diff --git a/src/multimedia/playback/qmediaplayer.h b/src/multimedia/playback/qmediaplayer.h index 7fc6d35e2..71fc242e7 100644 --- a/src/multimedia/playback/qmediaplayer.h +++ b/src/multimedia/playback/qmediaplayer.h @@ -95,15 +95,6 @@ public: InvalidMedia }; - // ### Go away - enum Flag - { - LowLatency = 0x01, - StreamPlayback = 0x02, - VideoSurface = 0x04 - }; - Q_DECLARE_FLAGS(Flags, Flag) - enum Error { NoError, @@ -114,14 +105,13 @@ public: ServiceMissingError }; - explicit QMediaPlayer(QObject *parent = nullptr, Flags flags = Flags()); + explicit QMediaPlayer(QObject *parent = nullptr); ~QMediaPlayer(); // ### this needs a better solution static QMultimedia::SupportEstimate hasSupport(const QString &mimeType, - const QStringList& codecs = QStringList(), - Flags flags = Flags()); - static QStringList supportedMimeTypes(Flags flags = Flags()); + const QStringList& codecs = QStringList()); + static QStringList supportedMimeTypes(); // new API // bool enableLowLatencyPlayback(bool tryEnable); diff --git a/src/multimedia/qmediaserviceprovider.cpp b/src/multimedia/qmediaserviceprovider.cpp index a424c8380..f729e3876 100644 --- a/src/multimedia/qmediaserviceprovider.cpp +++ b/src/multimedia/qmediaserviceprovider.cpp @@ -101,27 +101,9 @@ public: } } - QMediaServiceFeaturesInterface::Features supportedFeatures(const QMediaService *service) const override - { - if (service) { - MediaServiceData d = mediaServiceData.value(service); - - if (d.plugin) { - QMediaServiceFeaturesInterface *iface = - qobject_cast<QMediaServiceFeaturesInterface*>(d.plugin); - - if (iface) - return iface->supportedFeatures(d.type); - } - } - - return QMediaServiceFeaturesInterface::Features(); - } - [[nodiscard]] QMultimedia::SupportEstimate hasSupport(const QByteArray &serviceType, const QString &mimeType, - const QStringList& codecs, - int flags) const override + const QStringList& codecs) const override { QObject *instance = loader()->instance(QLatin1String(serviceType)); @@ -133,31 +115,11 @@ public: if (iface) supportEstimate = qMax(supportEstimate, iface->hasSupport(mimeType, codecs)); - if (flags && supportEstimate == QMultimedia::ProbablySupported) { - QMediaServiceFeaturesInterface *iface = qobject_cast<QMediaServiceFeaturesInterface*>(instance); - - if (iface) { - QMediaServiceFeaturesInterface::Features features = iface->supportedFeatures(serviceType); - - //if low latency playback was asked, skip services known - //not to provide low latency playback - if ((flags & QMediaPlayer::LowLatency) && - !(features & QMediaServiceFeaturesInterface::LowLatencyPlayback)) - supportEstimate = QMultimedia::MaybeSupported; - - //the same for QIODevice based streams support - if ((flags & QMediaPlayer::StreamPlayback) && - !(features & QMediaServiceFeaturesInterface::StreamPlayback)) - supportEstimate = QMultimedia::MaybeSupported; - } - } - return supportEstimate; } - [[nodiscard]] QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const override + [[nodiscard]] QStringList supportedMimeTypes(const QByteArray &serviceType) const override { - Q_UNUSED(flags); QObject *instance = loader()->instance(QLatin1String(serviceType)); if (!instance) return {}; @@ -279,19 +241,6 @@ Q_GLOBAL_STATIC(QPluginServiceProvider, pluginProvider); /*! \internal - \fn QMediaServiceProvider::supportedFeatures(const QMediaService *service) const - - Returns the features supported by a given \a service. -*/ -QMediaServiceFeaturesInterface::Features QMediaServiceProvider::supportedFeatures(const QMediaService *service) const -{ - Q_UNUSED(service); - - return {}; -} - -/*! - \internal Returns how confident a media service provider is that is can provide a \a serviceType service that is able to play media of a specific \a mimeType that is encoded using the listed \a codecs while adhering to constraints @@ -299,13 +248,11 @@ QMediaServiceFeaturesInterface::Features QMediaServiceProvider::supportedFeature */ QMultimedia::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray &serviceType, const QString &mimeType, - const QStringList& codecs, - int flags) const + const QStringList& codecs) const { Q_UNUSED(serviceType); Q_UNUSED(mimeType); Q_UNUSED(codecs); - Q_UNUSED(flags); return QMultimedia::MaybeSupported; } @@ -320,10 +267,9 @@ QMultimedia::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray The resultant list is restricted to MIME types which can be supported given the constraints in \a flags. */ -QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType, int flags) const +QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType) const { Q_UNUSED(serviceType); - Q_UNUSED(flags); return QStringList(); } @@ -421,8 +367,7 @@ QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider() plug-ins. A media service provider plug-in may implement one or more of - QMediaServiceSupportedFormatsInterface, - QMediaServiceSupportedDevicesInterface, and QMediaServiceFeaturesInterface + QMediaServiceSupportedFormatsInterface and QMediaServiceSupportedDevicesInterface to identify the features it supports. */ @@ -504,27 +449,6 @@ QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider() Returns the default device for a \a service type. */ -/*! - \class QMediaServiceFeaturesInterface - \obsolete - \inmodule QtMultimedia - \brief The QMediaServiceFeaturesInterface class interface identifies - features supported by a media service plug-in. - - A QMediaServiceProviderPlugin may implement this interface. -*/ - -/*! - \fn QMediaServiceFeaturesInterface::~QMediaServiceFeaturesInterface() - - Destroys a media service features interface. -*/ -/*! - \fn QMediaServiceFeaturesInterface::supportedFeatures(const QByteArray &service) const - - Returns a set of features supported by a plug-in \a service. -*/ - QT_END_NAMESPACE #include "moc_qmediaserviceprovider_p.cpp" diff --git a/src/multimedia/qmediaserviceprovider_p.h b/src/multimedia/qmediaserviceprovider_p.h index a896bf4a2..61ae01c19 100644 --- a/src/multimedia/qmediaserviceprovider_p.h +++ b/src/multimedia/qmediaserviceprovider_p.h @@ -70,13 +70,10 @@ public: virtual QMediaService* requestService(const QByteArray &type) = 0; virtual void releaseService(QMediaService *service) = 0; - virtual QMediaServiceFeaturesInterface::Features supportedFeatures(const QMediaService *service) const; - virtual QMultimedia::SupportEstimate hasSupport(const QByteArray &serviceType, const QString &mimeType, - const QStringList& codecs, - int flags = 0) const; - virtual QStringList supportedMimeTypes(const QByteArray &serviceType, int flags = 0) const; + const QStringList& codecs) const; + virtual QStringList supportedMimeTypes(const QByteArray &serviceType) const; virtual QByteArray defaultDevice(const QByteArray &serviceType) const; virtual QList<QByteArray> devices(const QByteArray &serviceType) const; diff --git a/src/multimedia/qmediaserviceproviderplugin.h b/src/multimedia/qmediaserviceproviderplugin.h index c89a4fe4d..dcdc7c500 100644 --- a/src/multimedia/qmediaserviceproviderplugin.h +++ b/src/multimedia/qmediaserviceproviderplugin.h @@ -103,29 +103,6 @@ Q_DECLARE_INTERFACE(QMediaServiceSupportedDevicesInterface, QMediaServiceSupport // Required for QDoc workaround class QString; -struct Q_MULTIMEDIA_EXPORT QMediaServiceFeaturesInterface -{ - enum Feature { - LowLatencyPlayback = 0x01, - RecordingSupport = 0x02, - StreamPlayback = 0x04, - VideoSurface = 0x08 - }; - Q_DECLARE_FLAGS(Features, Feature) - - virtual ~QMediaServiceFeaturesInterface() {} - virtual QMediaServiceFeaturesInterface::Features supportedFeatures(const QByteArray &service) const = 0; -}; - -Q_DECLARE_OPERATORS_FOR_FLAGS(QMediaServiceFeaturesInterface::Features) - -#define QMediaServiceFeaturesInterface_iid \ - "org.qt-project.qt.mediaservicefeatures/5.0" -Q_DECLARE_INTERFACE(QMediaServiceFeaturesInterface, QMediaServiceFeaturesInterface_iid) - -// Required for QDoc workaround -class QString; - class Q_MULTIMEDIA_EXPORT QMediaServiceProviderPlugin : public QObject, public QMediaServiceProviderFactoryInterface { Q_OBJECT diff --git a/src/plugins/android/src/qandroidmediaserviceplugin.cpp b/src/plugins/android/src/qandroidmediaserviceplugin.cpp index e8bc20ec2..99af8b3d4 100644 --- a/src/plugins/android/src/qandroidmediaserviceplugin.cpp +++ b/src/plugins/android/src/qandroidmediaserviceplugin.cpp @@ -82,20 +82,6 @@ void QAndroidMediaServicePlugin::release(QMediaService *service) delete service; } -QMediaServiceFeaturesInterface::Features QAndroidMediaServicePlugin::supportedFeatures(const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_MEDIAPLAYER) - return QMediaServiceFeaturesInterface::VideoSurface; - - if (service == Q_MEDIASERVICE_CAMERA) - return QMediaServiceFeaturesInterface::VideoSurface | QMediaServiceFeaturesInterface::RecordingSupport; - - if (service == Q_MEDIASERVICE_AUDIOSOURCE) - return QMediaServiceFeaturesInterface::RecordingSupport; - - return QMediaServiceFeaturesInterface::Features(); -} - QByteArray QAndroidMediaServicePlugin::defaultDevice(const QByteArray &service) const { if (service == Q_MEDIASERVICE_CAMERA && !QAndroidCameraSession::availableCameras().isEmpty()) diff --git a/src/plugins/android/src/qandroidmediaserviceplugin.h b/src/plugins/android/src/qandroidmediaserviceplugin.h index c1bf63bac..7320042d2 100644 --- a/src/plugins/android/src/qandroidmediaserviceplugin.h +++ b/src/plugins/android/src/qandroidmediaserviceplugin.h @@ -47,11 +47,9 @@ QT_BEGIN_NAMESPACE class QAndroidMediaServicePlugin : 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 "android_mediaservice.json") @@ -62,8 +60,6 @@ public: QMediaService* create(QString const& key) override; void release(QMediaService *service) override; - QMediaServiceFeaturesInterface::Features supportedFeatures(const QByteArray &service) const override; - QByteArray defaultDevice(const QByteArray &service) const override; QList<QByteArray> devices(const QByteArray &service) const override; QString deviceDescription(const QByteArray &service, const QByteArray &device) override; diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h b/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h index 5e4bd5376..07f30d3d6 100644 --- a/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h +++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h @@ -49,11 +49,9 @@ QT_BEGIN_NAMESPACE class AVFMediaPlayerServicePlugin : public QMediaServiceProviderPlugin , public QMediaServiceSupportedFormatsInterface - , public QMediaServiceFeaturesInterface { Q_OBJECT Q_INTERFACES(QMediaServiceSupportedFormatsInterface) - Q_INTERFACES(QMediaServiceFeaturesInterface) Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "avfmediaplayer.json") public: @@ -62,7 +60,6 @@ public: QMediaService* create(QString const& 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; diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm index 1216fc173..d91956e69 100644 --- a/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm +++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm @@ -68,14 +68,6 @@ void AVFMediaPlayerServicePlugin::release(QMediaService *service) delete service; } -QMediaServiceFeaturesInterface::Features AVFMediaPlayerServicePlugin::supportedFeatures(const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_MEDIAPLAYER) - return QMediaServiceFeaturesInterface::VideoSurface; - else - return QMediaServiceFeaturesInterface::Features(); -} - QMultimedia::SupportEstimate AVFMediaPlayerServicePlugin::hasSupport(const QString &mimeType, const QStringList &codecs) const { Q_UNUSED(codecs); 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<QByteArray> 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<QByteArray> 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; diff --git a/src/plugins/qnx/neutrinoserviceplugin.cpp b/src/plugins/qnx/neutrinoserviceplugin.cpp index 99d3fcc3d..25a26d28f 100644 --- a/src/plugins/qnx/neutrinoserviceplugin.cpp +++ b/src/plugins/qnx/neutrinoserviceplugin.cpp @@ -59,10 +59,4 @@ void NeutrinoServicePlugin::release(QMediaService *service) delete service; } -QMediaServiceFeaturesInterface::Features NeutrinoServicePlugin::supportedFeatures(const QByteArray &service) const -{ - Q_UNUSED(service); - return QMediaServiceFeaturesInterface::Features(); -} - QT_END_NAMESPACE diff --git a/src/plugins/qnx/neutrinoserviceplugin.h b/src/plugins/qnx/neutrinoserviceplugin.h index 0a239f75c..6fd9752ee 100644 --- a/src/plugins/qnx/neutrinoserviceplugin.h +++ b/src/plugins/qnx/neutrinoserviceplugin.h @@ -44,18 +44,15 @@ QT_BEGIN_NAMESPACE class NeutrinoServicePlugin - : public QMediaServiceProviderPlugin, - public QMediaServiceFeaturesInterface + : public QMediaServiceProviderPlugin { Q_OBJECT - Q_INTERFACES(QMediaServiceFeaturesInterface) Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "neutrino_mediaservice.json") public: NeutrinoServicePlugin(); QMediaService *create(const QString &key) override; void release(QMediaService *service) override; - QMediaServiceFeaturesInterface::Features supportedFeatures(const QByteArray &service) const override; }; QT_END_NAMESPACE diff --git a/src/plugins/wmf/player/mfplayercontrol.h b/src/plugins/wmf/player/mfplayercontrol.h index 87e1a1f2d..f74f414da 100644 --- a/src/plugins/wmf/player/mfplayercontrol.h +++ b/src/plugins/wmf/player/mfplayercontrol.h @@ -91,6 +91,9 @@ public: void pause(); void stop(); + bool streamPlaybackSupported() const { return true; } + + private Q_SLOTS: void handleStatusChanged(); void handleVideoAvailable(); diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp index 3e48cab2f..09cade82f 100644 --- a/src/plugins/wmf/wmfserviceplugin.cpp +++ b/src/plugins/wmf/wmfserviceplugin.cpp @@ -91,15 +91,6 @@ void WMFServicePlugin::release(QMediaService *service) releaseRefCount(); } -QMediaServiceFeaturesInterface::Features WMFServicePlugin::supportedFeatures( - const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_MEDIAPLAYER) - return QMediaServiceFeaturesInterface::StreamPlayback; - else - return QMediaServiceFeaturesInterface::Features(); -} - QByteArray WMFServicePlugin::defaultDevice(const QByteArray &) const { return QByteArray(); diff --git a/src/plugins/wmf/wmfserviceplugin.h b/src/plugins/wmf/wmfserviceplugin.h index d42cf25e1..a9a722043 100644 --- a/src/plugins/wmf/wmfserviceplugin.h +++ b/src/plugins/wmf/wmfserviceplugin.h @@ -48,11 +48,9 @@ QT_USE_NAMESPACE class WMFServicePlugin : 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 "wmf.json") public: |