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>
This commit is contained in:
committed by
The Qt Project
parent
d964388b38
commit
b28ee24628
@@ -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>();
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user