AVFoundation: implement QCameraInfoControl.

Change-Id: I05f3daa5c4acb90e046e26d6d577ae40dfed0e30
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
This commit is contained in:
Yoann Lopes
2014-02-07 14:20:28 +01:00
committed by The Qt Project
parent 70415c3d97
commit 9a55f5ce57
11 changed files with 257 additions and 65 deletions

View File

@@ -50,11 +50,13 @@ QT_BEGIN_NAMESPACE
class AVFServicePlugin : public QMediaServiceProviderPlugin,
public QMediaServiceSupportedDevicesInterface,
public QMediaServiceDefaultDeviceInterface
public QMediaServiceDefaultDeviceInterface,
public QMediaServiceCameraInfoInterface
{
Q_OBJECT
Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
Q_INTERFACES(QMediaServiceDefaultDeviceInterface)
Q_INTERFACES(QMediaServiceCameraInfoInterface)
Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "avfcamera.json")
public:
@@ -67,12 +69,8 @@ public:
QList<QByteArray> devices(const QByteArray &service) const;
QString deviceDescription(const QByteArray &service, const QByteArray &device);
private:
void updateDevices() const;
mutable QByteArray m_defaultCameraDevice;
mutable QList<QByteArray> m_cameraDevices;
mutable QMap<QByteArray, QString> m_cameraDescriptions;
QCamera::Position cameraPosition(const QByteArray &device) const;
int cameraOrientation(const QByteArray &device) const;
};
QT_END_NAMESPACE