summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/camera/avfcameraservice.mm
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2015-01-14 12:18:53 +0100
committerTimur Pocheptsov <Timur.Pocheptsov@digia.com>2015-02-05 17:25:10 +0000
commit39f5de4106b87c5bda159290a512fcf56bc1dc4f (patch)
treecc472b9df03dbc30ee94a3df2304b6bdd454d7ee /src/plugins/avfoundation/camera/avfcameraservice.mm
parent60541844c10f86288a847728b71b211f5fa958b4 (diff)
AVFCameraExposureControl - exposure control for iOS
Exposure control, version for AVFoundation plugin (this code is using quite a new API, iOS >=8 only). Change-Id: I6871a758e8dfb98ab46b66d91a44142163e0bb44 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Diffstat (limited to 'src/plugins/avfoundation/camera/avfcameraservice.mm')
-rw-r--r--src/plugins/avfoundation/camera/avfcameraservice.mm12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/plugins/avfoundation/camera/avfcameraservice.mm b/src/plugins/avfoundation/camera/avfcameraservice.mm
index d617dc954..c1ac0b739 100644
--- a/src/plugins/avfoundation/camera/avfcameraservice.mm
+++ b/src/plugins/avfoundation/camera/avfcameraservice.mm
@@ -41,6 +41,7 @@
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
+#include <QtCore/qsysinfo.h>
#include "avfcameraservice.h"
#include "avfcameracontrol.h"
@@ -56,6 +57,7 @@
#include "avfimagecapturecontrol.h"
#include "avfmediavideoprobecontrol.h"
#include "avfcamerafocuscontrol.h"
+#include "avfcameraexposurecontrol.h"
#include <private/qmediaplaylistnavigator_p.h>
#include <qmediaplaylist.h>
@@ -75,8 +77,12 @@ AVFCameraService::AVFCameraService(QObject *parent):
m_metaDataControl = new AVFCameraMetaDataControl(this);
m_recorderControl = new AVFMediaRecorderControl(this);
m_imageCaptureControl = new AVFImageCaptureControl(this);
-
m_cameraFocusControl = new AVFCameraFocusControl(this);
+ m_cameraExposureControl = 0;
+#if defined(Q_OS_IOS) && QT_IOS_PLATFORM_SDK_EQUAL_OR_ABOVE(__IPHONE_8_0)
+ if (QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_8_0)
+ m_cameraExposureControl = new AVFCameraExposureControl(this);
+#endif
}
AVFCameraService::~AVFCameraService()
@@ -96,6 +102,7 @@ AVFCameraService::~AVFCameraService()
delete m_metaDataControl;
delete m_cameraControl;
delete m_cameraFocusControl;
+ delete m_cameraExposureControl;
delete m_session;
}
@@ -124,6 +131,9 @@ QMediaControl *AVFCameraService::requestControl(const char *name)
if (qstrcmp(name, QCameraImageCaptureControl_iid) == 0)
return m_imageCaptureControl;
+ if (qstrcmp(name, QCameraExposureControl_iid) == 0)
+ return m_cameraExposureControl;
+
if (qstrcmp(name, QCameraFocusControl_iid) == 0)
return m_cameraFocusControl;