diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-01-20 22:11:01 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2021-01-29 08:48:57 +0000 |
commit | 7cd2be39182a01eb4791ca33a5a71284f6cfa2ac (patch) | |
tree | 2b21de1637c252841401bd79ee194390759c215d /src | |
parent | 5b2f925eba093c6851b773ce242d1f00b65ce96b (diff) |
Cleanup some of the now unused plugin interface code
Those code paths are unused and the whole plugin infrastructure
needs to go anyway.
Change-Id: I826085a5ea5d61822486e2634a58c2bd38c14079
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
12 files changed, 6 insertions, 508 deletions
diff --git a/src/multimedia/platform/android/qandroidmediaserviceplugin.cpp b/src/multimedia/platform/android/qandroidmediaserviceplugin.cpp index 48683f20f..82567904b 100644 --- a/src/multimedia/platform/android/qandroidmediaserviceplugin.cpp +++ b/src/multimedia/platform/android/qandroidmediaserviceplugin.cpp @@ -78,41 +78,6 @@ void QAndroidMediaServicePlugin::release(QMediaService *service) delete service; } -QByteArray QAndroidMediaServicePlugin::defaultDevice(const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_CAMERA && !QAndroidCameraSession::availableCameras().isEmpty()) - return QAndroidCameraSession::availableCameras().first().id(); - - return QByteArray(); -} - -QList<QByteArray> QAndroidMediaServicePlugin::devices(const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_CAMERA) { - QList<QByteArray> devices; - const QList<QCameraInfo> &cameras = QAndroidCameraSession::availableCameras(); - for (int i = 0; i < cameras.count(); ++i) - devices.append(cameras.at(i).id()); - return devices; - } - - return QList<QByteArray>(); -} - -QString QAndroidMediaServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device) -{ - if (service == Q_MEDIASERVICE_CAMERA) { - const QList<QCameraInfo> &cameras = QAndroidCameraSession::availableCameras(); - for (int i = 0; i < cameras.count(); ++i) { - const QCameraInfo &info = cameras.at(i); - if (info.id()== device) - return info.description(); - } - } - - return QString(); -} - QT_END_NAMESPACE Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void * /*reserved*/) diff --git a/src/multimedia/platform/android/qandroidmediaserviceplugin_p.h b/src/multimedia/platform/android/qandroidmediaserviceplugin_p.h index 0b91df628..4beff309b 100644 --- a/src/multimedia/platform/android/qandroidmediaserviceplugin_p.h +++ b/src/multimedia/platform/android/qandroidmediaserviceplugin_p.h @@ -57,20 +57,14 @@ QT_BEGIN_NAMESPACE class QAndroidMediaServicePlugin : public QMediaServiceProviderPlugin - , public QMediaServiceSupportedDevicesInterface { Q_OBJECT - Q_INTERFACES(QMediaServiceSupportedDevicesInterface) public: QAndroidMediaServicePlugin(); ~QAndroidMediaServicePlugin(); QMediaService* create(QString const& key) override; void release(QMediaService *service) 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; }; QT_END_NAMESPACE diff --git a/src/multimedia/platform/darwin/camera/avfcameraserviceplugin.mm b/src/multimedia/platform/darwin/camera/avfcameraserviceplugin.mm index 2fd8d3fad..129f3d334 100644 --- a/src/multimedia/platform/darwin/camera/avfcameraserviceplugin.mm +++ b/src/multimedia/platform/darwin/camera/avfcameraserviceplugin.mm @@ -67,37 +67,4 @@ void AVFServicePlugin::release(QMediaService *service) delete service; } -QByteArray AVFServicePlugin::defaultDevice(const QByteArray &service) const -{ - if (service == Q_MEDIASERVICE_CAMERA) { - int i = AVFCameraSession::defaultCameraIndex(); - if (i != -1) - return AVFCameraSession::availableCameraDevices().at(i).deviceId; - } - - return QByteArray(); -} - -QList<QByteArray> AVFServicePlugin::devices(const QByteArray &service) const -{ - QList<QByteArray> devs; - - if (service == Q_MEDIASERVICE_CAMERA) { - const QList<AVFCameraInfo> &cameras = AVFCameraSession::availableCameraDevices(); - devs.reserve(cameras.size()); - for (const AVFCameraInfo &info : cameras) - devs.append(info.deviceId); - } - - return devs; -} - -QString AVFServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device) -{ - if (service == Q_MEDIASERVICE_CAMERA) - return AVFCameraSession::cameraDeviceInfo(device).description; - - return QString(); -} - QT_END_NAMESPACE diff --git a/src/multimedia/platform/darwin/camera/avfcameraserviceplugin_p.h b/src/multimedia/platform/darwin/camera/avfcameraserviceplugin_p.h index e9028542c..499fe5836 100644 --- a/src/multimedia/platform/darwin/camera/avfcameraserviceplugin_p.h +++ b/src/multimedia/platform/darwin/camera/avfcameraserviceplugin_p.h @@ -58,20 +58,13 @@ QT_BEGIN_NAMESPACE class AVFServicePlugin : public QMediaServiceProviderPlugin, - public QMediaServiceSupportedDevicesInterface { Q_OBJECT - Q_INTERFACES(QMediaServiceSupportedDevicesInterface) - public: AVFServicePlugin(); QMediaService* create(QString const &key) override; void release(QMediaService *service) 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; }; QT_END_NAMESPACE diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin.cpp b/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin.cpp index 0f51f2942..d15c424c7 100644 --- a/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin.cpp +++ b/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin.cpp @@ -89,46 +89,6 @@ void CameraBinServicePlugin::release(QMediaService *service) delete service; } -QByteArray CameraBinServicePlugin::defaultDevice(const QByteArray &service) const -{ - const auto cameras = QMediaPlatformIntegration::instance()->deviceManager()->videoInputs(); - - if (service != Q_MEDIASERVICE_CAMERA || cameras.isEmpty()) - return QByteArray(); - return cameras.at(0).id(); -} - -QList<QByteArray> CameraBinServicePlugin::devices(const QByteArray &service) const -{ - QList<QByteArray> devices; - if (service == Q_MEDIASERVICE_CAMERA) { - const auto cameras = QMediaPlatformIntegration::instance()->deviceManager()->videoInputs(); - for (auto c : cameras) - devices.append(c.id()); - } - return devices; -} - -QString CameraBinServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &deviceName) -{ - if (service != Q_MEDIASERVICE_CAMERA) - return QString(); - - const auto cameras = QMediaPlatformIntegration::instance()->deviceManager()->videoInputs(); - for (auto c : cameras) - if (c.id() == device) - return c.description(); - return QString(); -} - -QVariant CameraBinServicePlugin::deviceProperty(const QByteArray &service, const QByteArray &device, const QByteArray &property) -{ - Q_UNUSED(service); - Q_UNUSED(device); - Q_UNUSED(property); - return QVariant(); -} - GstElementFactory *CameraBinServicePlugin::sourceFactory() const { if (!m_sourceFactory) { diff --git a/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin_p.h b/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin_p.h index 00de757bf..05661e3d5 100644 --- a/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin_p.h +++ b/src/multimedia/platform/gstreamer/camerabin/camerabinserviceplugin_p.h @@ -61,11 +61,8 @@ QT_BEGIN_NAMESPACE class CameraBinServicePlugin : public QMediaServiceProviderPlugin - , public QMediaServiceSupportedDevicesInterface { Q_OBJECT - Q_INTERFACES(QMediaServiceSupportedDevicesInterface) - Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "camerabin.json") public: CameraBinServicePlugin(); ~CameraBinServicePlugin(); @@ -73,11 +70,6 @@ public: QMediaService* create(const QString &key) override; void release(QMediaService *service) 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; - QVariant deviceProperty(const QByteArray &service, const QByteArray &device, const QByteArray &property); - private: GstElementFactory *sourceFactory() const; diff --git a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp index 4ad5815e4..af0ea5d4b 100644 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp +++ b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp @@ -73,49 +73,8 @@ void QGstreamerCaptureServicePlugin::release(QMediaService *service) delete service; } -#if defined(USE_GSTREAMER_CAMERA) -QByteArray QGstreamerCaptureServicePlugin::defaultDevice(const QByteArray &service) const -{ - const auto cameras = QMediaPlatformIntegration::instance()->deviceManager()->videoInputs(); - - if (service != Q_MEDIASERVICE_CAMERA || cameras.isEmpty()) - return QByteArray(); - return cameras.at(0).id(); -} - -QList<QByteArray> QGstreamerCaptureServicePlugin::devices(const QByteArray &service) const -{ - QList<QByteArray> devices; - if (service == Q_MEDIASERVICE_CAMERA) { - const auto cameras = QMediaPlatformIntegration::instance()->deviceManager()->videoInputs(); - for (auto c : cameras) - devices.append(c.id()); - } - return devices; -} - -QString QGstreamerCaptureServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device) -{ - if (service != Q_MEDIASERVICE_CAMERA) - return QString(); - - const auto cameras = QMediaPlatformIntegration::instance()->deviceManager()->videoInputs(); - for (auto c : cameras) - if (c.id() == device) - return c.description(); - return QString(); -} - -QVariant QGstreamerCaptureServicePlugin::deviceProperty(const QByteArray &service, const QByteArray &device, const QByteArray &property) -{ - Q_UNUSED(service); - Q_UNUSED(device); - Q_UNUSED(property); - return QVariant(); -} - -#endif - +#if 0 +// #### Find a better way to enumerate supported formats QMultimedia::SupportEstimate QGstreamerCaptureServicePlugin::hasSupport(const QString &mimeType, const QStringList& codecs) const { @@ -141,4 +100,4 @@ 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 index e0290195a..acfd4f27c 100644 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin_p.h +++ b/src/multimedia/platform/gstreamer/mediacapture/qgstreamercaptureserviceplugin_p.h @@ -60,34 +60,11 @@ QT_BEGIN_NAMESPACE class QGstreamerCaptureServicePlugin : public QMediaServiceProviderPlugin -#if defined(USE_GSTREAMER_CAMERA) - , public QMediaServiceSupportedDevicesInterface -#endif - , public QMediaServiceSupportedFormatsInterface { Q_OBJECT -#if defined(USE_GSTREAMER_CAMERA) - Q_INTERFACES(QMediaServiceSupportedDevicesInterface) -#endif - Q_INTERFACES(QMediaServiceSupportedFormatsInterface) public: QMediaService* create(const QString &key) override; void release(QMediaService *service) override; - -#if defined(USE_GSTREAMER_CAMERA) - QByteArray defaultDevice(const QByteArray &service) const override; - QList<QByteArray> devices(const QByteArray &service) const override; - QString deviceDescription(const QByteArray &service, const QByteArray &device) override; - QVariant deviceProperty(const QByteArray &service, const QByteArray &device, const QByteArray &property); -#endif - - 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 diff --git a/src/multimedia/platform/gstreamer/mediacapture/qgstreamerv4l2input.cpp b/src/multimedia/platform/gstreamer/mediacapture/qgstreamerv4l2input.cpp index 473700e64..835f9b541 100644 --- a/src/multimedia/platform/gstreamer/mediacapture/qgstreamerv4l2input.cpp +++ b/src/multimedia/platform/gstreamer/mediacapture/qgstreamerv4l2input.cpp @@ -48,8 +48,6 @@ #include <algorithm> QT_BEGIN_NAMESPACE -static inline uint qHash(const QSize& key) { return uint(key.width()*256+key.height()); } - static bool operator<(const QSize &s1, const QSize s2) { return s1.width()*s1.height() < s2.width()*s2.height(); diff --git a/src/multimedia/qmediaserviceprovider.cpp b/src/multimedia/qmediaserviceprovider.cpp index 620148724..c1f68c80e 100644 --- a/src/multimedia/qmediaserviceprovider.cpp +++ b/src/multimedia/qmediaserviceprovider.cpp @@ -61,10 +61,6 @@ QT_BEGIN_NAMESPACE -QMediaServiceProviderFactoryInterface::~QMediaServiceProviderFactoryInterface() -{ -} - class Loader { #define GET_PLUGIN(Key, Class) \ @@ -134,108 +130,6 @@ public: d.plugin->release(service); } } - - [[nodiscard]] QMultimedia::SupportEstimate hasSupport(const QByteArray &serviceType, - const QString &mimeType, - const QStringList& codecs) const override - { - QObject *instance = loader()->instance(QLatin1String(serviceType)); - - if (!instance) - return QMultimedia::NotSupported; - - QMultimedia::SupportEstimate supportEstimate = QMultimedia::MaybeSupported; - QMediaServiceSupportedFormatsInterface *iface = qobject_cast<QMediaServiceSupportedFormatsInterface*>(instance); - if (iface) - supportEstimate = qMax(supportEstimate, iface->hasSupport(mimeType, codecs)); - - return supportEstimate; - } - - [[nodiscard]] QStringList supportedMimeTypes(const QByteArray &serviceType) const override - { - QObject *instance = loader()->instance(QLatin1String(serviceType)); - if (!instance) - return {}; - - QMediaServiceSupportedFormatsInterface *iface = qobject_cast<QMediaServiceSupportedFormatsInterface*>(instance); - - if (iface) - return iface->supportedMimeTypes(); - - return {}; - } - - [[nodiscard]] QByteArray defaultDevice(const QByteArray &serviceType) const override - { - QObject *instance = loader()->instance(QLatin1String(serviceType)); - if (!instance) - return QByteArray(); - - const QMediaServiceSupportedDevicesInterface *iface = qobject_cast<QMediaServiceSupportedDevicesInterface *>(instance); - if (iface) - return iface->defaultDevice(serviceType); - - return QByteArray(); - } - - [[nodiscard]] QList<QByteArray> devices(const QByteArray &serviceType) const override - { - QObject *instance = loader()->instance(QLatin1String(serviceType)); - if (!instance) - return {}; - - QMediaServiceSupportedDevicesInterface *iface = qobject_cast<QMediaServiceSupportedDevicesInterface*>(instance); - if (iface) - return iface->devices(serviceType); - - return {}; - } - - QString deviceDescription(const QByteArray &serviceType, const QByteArray &device) override - { - QObject *instance = loader()->instance(QLatin1String(serviceType)); - if (!instance) - return {}; - - QMediaServiceSupportedDevicesInterface *iface = qobject_cast<QMediaServiceSupportedDevicesInterface*>(instance); - if (iface) { - if (iface->devices(serviceType).contains(device)) - return iface->deviceDescription(serviceType, device); - } - - return QString(); - } - - [[nodiscard]] QCamera::Position cameraPosition(const QByteArray &device) const override - { - QMediaService *service = const_cast<QPluginServiceProvider *>(this)->requestService(Q_MEDIASERVICE_CAMERA); - auto *deviceControl = qobject_cast<QVideoDeviceSelectorControl *>(service->requestControl(QVideoDeviceSelectorControl_iid)); - auto pos = QCamera::UnspecifiedPosition; - for (int i = 0; i < deviceControl->deviceCount(); i++) { - if (deviceControl->deviceName(i) == QString::fromUtf8(device)) { - pos = deviceControl->cameraPosition(i); - break; - } - } - service->releaseControl(deviceControl); - return pos; - } - - [[nodiscard]] int cameraOrientation(const QByteArray &device) const override - { - QMediaService *service = const_cast<QPluginServiceProvider *>(this)->requestService(Q_MEDIASERVICE_CAMERA); - auto *deviceControl = qobject_cast<QVideoDeviceSelectorControl *>(service->requestControl(QVideoDeviceSelectorControl_iid)); - int orientation = 0; - for (int i = 0; i < deviceControl->deviceCount(); i++) { - if (deviceControl->deviceName(i) == QString::fromUtf8(device)) { - orientation = deviceControl->cameraOrientation(i); - break; - } - } - service->releaseControl(deviceControl); - return orientation; - } }; Q_GLOBAL_STATIC(QPluginServiceProvider, pluginProvider); @@ -273,101 +167,6 @@ Q_GLOBAL_STATIC(QPluginServiceProvider, pluginProvider); Releases a media \a service requested with requestService(). */ -/*! - \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 - identified in \a flags. -*/ -QMultimedia::SupportEstimate QMediaServiceProvider::hasSupport(const QByteArray &serviceType, - const QString &mimeType, - const QStringList& codecs) const -{ - Q_UNUSED(serviceType); - Q_UNUSED(mimeType); - Q_UNUSED(codecs); - - return QMultimedia::MaybeSupported; -} - -/*! - \internal - \fn QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType, int flags) const - - Returns a list of MIME types supported by the service provider for the - specified \a serviceType. - - The resultant list is restricted to MIME types which can be supported given - the constraints in \a flags. -*/ -QStringList QMediaServiceProvider::supportedMimeTypes(const QByteArray &serviceType) const -{ - Q_UNUSED(serviceType); - - return QStringList(); -} - -/*! - \internal - \since 5.3 - - Returns the default device for a \a service type. -*/ -QByteArray QMediaServiceProvider::defaultDevice(const QByteArray &serviceType) const -{ - Q_UNUSED(serviceType); - return QByteArray(); -} - -/*! - \internal - Returns the list of devices related to \a service type. -*/ -QList<QByteArray> QMediaServiceProvider::devices(const QByteArray &service) const -{ - Q_UNUSED(service); - return QList<QByteArray>(); -} - -/*! - \internal - Returns the description of \a device related to \a serviceType, suitable for use by - an application for display. -*/ -QString QMediaServiceProvider::deviceDescription(const QByteArray &serviceType, const QByteArray &device) -{ - Q_UNUSED(serviceType); - Q_UNUSED(device); - return QString(); -} - -/*! - \internal - \since 5.3 - - Returns the physical position of a camera \a device on the system hardware. -*/ -QCamera::Position QMediaServiceProvider::cameraPosition(const QByteArray &device) const -{ - Q_UNUSED(device); - return QCamera::UnspecifiedPosition; -} - -/*! - \internal - \since 5.3 - - Returns the physical orientation of the camera \a device. The value is the angle by which the - camera image should be rotated anti-clockwise (in steps of 90 degrees) so it shows correctly on - the display in its natural orientation. -*/ -int QMediaServiceProvider::cameraOrientation(const QByteArray &device) const -{ - Q_UNUSED(device); - return 0; -} - static QMediaServiceProvider *qt_defaultMediaServiceProvider = nullptr; /*! @@ -449,40 +248,6 @@ QMediaServiceProvider *QMediaServiceProvider::defaultServiceProvider() Returns a list of MIME types supported by the media service plug-in. */ -/*! - \class QMediaServiceSupportedDevicesInterface - \obsolete - \inmodule QtMultimedia - \brief The QMediaServiceSupportedDevicesInterface class interface - identifies the devices supported by a media service plug-in. - - A QMediaServiceProviderPlugin may implement this interface. -*/ - -/*! - \fn QMediaServiceSupportedDevicesInterface::~QMediaServiceSupportedDevicesInterface() - - Destroys a media service supported devices interface. -*/ - -/*! - \fn QList<QByteArray> QMediaServiceSupportedDevicesInterface::devices(const QByteArray &service) const - - Returns a list of devices available for a \a service type. -*/ - -/*! - \fn QString QMediaServiceSupportedDevicesInterface::deviceDescription(const QByteArray &service, const QByteArray &device) - - Returns the description of a \a device available for a \a service type. -*/ - -/*! - \fn QByteArray QMediaServiceSupportedDevicesInterface::defaultDevice(const QByteArray &service) const - - Returns the default device for a \a service type. -*/ - QT_END_NAMESPACE #include "moc_qmediaserviceprovider_p.cpp" diff --git a/src/multimedia/qmediaserviceprovider_p.h b/src/multimedia/qmediaserviceprovider_p.h index 61ae01c19..53709ca68 100644 --- a/src/multimedia/qmediaserviceprovider_p.h +++ b/src/multimedia/qmediaserviceprovider_p.h @@ -70,18 +70,6 @@ public: virtual QMediaService* requestService(const QByteArray &type) = 0; virtual void releaseService(QMediaService *service) = 0; - virtual QMultimedia::SupportEstimate hasSupport(const QByteArray &serviceType, - const QString &mimeType, - 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; - virtual QString deviceDescription(const QByteArray &serviceType, const QByteArray &device); - - virtual QCamera::Position cameraPosition(const QByteArray &device) const; - virtual int cameraOrientation(const QByteArray &device) const; - static QMediaServiceProvider* defaultServiceProvider(); static void setDefaultServiceProvider(QMediaServiceProvider *provider); }; diff --git a/src/multimedia/qmediaserviceproviderplugin.h b/src/multimedia/qmediaserviceproviderplugin.h index f11adaac1..639a67dcb 100644 --- a/src/multimedia/qmediaserviceproviderplugin.h +++ b/src/multimedia/qmediaserviceproviderplugin.h @@ -52,65 +52,12 @@ QT_BEGIN_NAMESPACE -// Required for QDoc workaround -class QString; - -class QMediaService; - -// Required for QDoc workaround -class QString; - -struct Q_MULTIMEDIA_EXPORT QMediaServiceProviderFactoryInterface -{ - virtual QMediaService* create(QString const& key) = 0; - virtual void release(QMediaService *service) = 0; - virtual ~QMediaServiceProviderFactoryInterface(); -}; - -#define QMediaServiceProviderFactoryInterface_iid \ - "org.qt-project.qt.mediaserviceproviderfactory/5.0" -Q_DECLARE_INTERFACE(QMediaServiceProviderFactoryInterface, QMediaServiceProviderFactoryInterface_iid) - -// Required for QDoc workaround -class QString; - -struct Q_MULTIMEDIA_EXPORT QMediaServiceSupportedFormatsInterface -{ - virtual ~QMediaServiceSupportedFormatsInterface() {} - virtual QMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const = 0; - virtual QStringList supportedMimeTypes() const = 0; -}; - -#define QMediaServiceSupportedFormatsInterface_iid \ - "org.qt-project.qt.mediaservicesupportedformats/5.0" -Q_DECLARE_INTERFACE(QMediaServiceSupportedFormatsInterface, QMediaServiceSupportedFormatsInterface_iid) - -// Required for QDoc workaround -class QString; - -struct Q_MULTIMEDIA_EXPORT QMediaServiceSupportedDevicesInterface -{ - virtual ~QMediaServiceSupportedDevicesInterface() {} - virtual QList<QByteArray> devices(const QByteArray &service) const = 0; - virtual QString deviceDescription(const QByteArray &service, const QByteArray &device) = 0; - virtual QByteArray defaultDevice(const QByteArray &service) const = 0; -}; - -#define QMediaServiceSupportedDevicesInterface_iid \ - "org.qt-project.qt.mediaservicesupporteddevices/5.0" -Q_DECLARE_INTERFACE(QMediaServiceSupportedDevicesInterface, QMediaServiceSupportedDevicesInterface_iid) - -// Required for QDoc workaround -class QString; - -class Q_MULTIMEDIA_EXPORT QMediaServiceProviderPlugin : public QObject, public QMediaServiceProviderFactoryInterface +class Q_MULTIMEDIA_EXPORT QMediaServiceProviderPlugin : public QObject { Q_OBJECT - Q_INTERFACES(QMediaServiceProviderFactoryInterface) - public: - QMediaService* create(const QString& key) override = 0; - void release(QMediaService *service) override = 0; + virtual QMediaService* create(const QString& key) = 0; + virtual void release(QMediaService *service) = 0; }; /*! @@ -137,13 +84,6 @@ public: */ #define Q_MEDIASERVICE_CAMERA "org.qt-project.qt.camera" -/*! - Service with support for decoding audio. - Required Controls: QAudioDecoderControl - Optional: that streams control -*/ -#define Q_MEDIASERVICE_AUDIODECODER "org.qt-project.qt.audiodecode" - QT_END_NAMESPACE #endif // QMEDIASERVICEPROVIDERPLUGIN_H |