diff options
author | Yoann Lopes <yoann.lopes@digia.com> | 2014-01-22 16:18:42 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-28 14:10:00 +0100 |
commit | b28ee24628f77fced393cacc45500be6761e4497 (patch) | |
tree | 811173f8a2caf84e0fa386010283ccfd32c6ad0d /src/plugins/wmf | |
parent | d964388b38ec4762e315d86aacb779604bcdca1b (diff) | |
download | qtmultimedia-b28ee24628f77fced393cacc45500be6761e4497.tar.gz |
New QCameraInfo class.
The class allows to get the list of available cameras on the system as
well as getting some static information about them such as their unique
ID, display name, physical position and sensor orientation.
This makes QCamera::availableDevices() and QCamera::deviceDescription()
obsolete.
This patch contains the API, documentation and auto-tests but not the
actual implementation by each backend (except for retrieving the default
camera device).
[ChangeLog][QtMultimedia] Added new QCameraInfo class
[ChangeLog][QtMultimedia] QCamera: availableDevices() and
deviceDescription() are deprecated, use QCameraInfo instead
Change-Id: I64fd65729ab26a789468979ed5444ee90bb82cd0
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Diffstat (limited to 'src/plugins/wmf')
-rw-r--r-- | src/plugins/wmf/wmfserviceplugin.cpp | 5 | ||||
-rw-r--r-- | src/plugins/wmf/wmfserviceplugin.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp index 79354b4e1..f114e2908 100644 --- a/src/plugins/wmf/wmfserviceplugin.cpp +++ b/src/plugins/wmf/wmfserviceplugin.cpp @@ -105,6 +105,11 @@ QMediaServiceProviderHint::Features WMFServicePlugin::supportedFeatures( return QMediaServiceProviderHint::Features(); } +QByteArray WMFServicePlugin::defaultDevice(const QByteArray &) const +{ + return QByteArray(); +} + QList<QByteArray> WMFServicePlugin::devices(const QByteArray &) const { return QList<QByteArray>(); diff --git a/src/plugins/wmf/wmfserviceplugin.h b/src/plugins/wmf/wmfserviceplugin.h index bc2e6ff54..a58af5c4b 100644 --- a/src/plugins/wmf/wmfserviceplugin.h +++ b/src/plugins/wmf/wmfserviceplugin.h @@ -49,10 +49,12 @@ QT_USE_NAMESPACE class WMFServicePlugin : public QMediaServiceProviderPlugin , public QMediaServiceSupportedDevicesInterface + , public QMediaServiceDefaultDeviceInterface , public QMediaServiceFeaturesInterface { Q_OBJECT Q_INTERFACES(QMediaServiceSupportedDevicesInterface) + Q_INTERFACES(QMediaServiceDefaultDeviceInterface) Q_INTERFACES(QMediaServiceFeaturesInterface) Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "wmf.json") public: @@ -61,6 +63,7 @@ public: QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const; + QByteArray defaultDevice(const QByteArray &service) const; QList<QByteArray> devices(const QByteArray &service) const; QString deviceDescription(const QByteArray &service, const QByteArray &device); }; |