diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2014-12-19 10:54:31 +0100 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-02-05 22:23:49 +0000 |
commit | 6ad5ea7fa065c5484ffe1a67d51474b40f3d67e2 (patch) | |
tree | 85ea68379f749fc7f24fe7cd5f53f01a0dd245c6 /src/plugins/avfoundation/camera/avfcameraservice.mm | |
parent | 39f5de4106b87c5bda159290a512fcf56bc1dc4f (diff) |
Camera zoom control - version for the AVFoundation plugin
AVFCameraZoomControl for AVFoundation plugin (videoZoomFactor in
AVCaptureDeviceFormat). iOS only.
Change-Id: I585b8df4c2a477971ada7bd81fabbd44f2371d98
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.mm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/plugins/avfoundation/camera/avfcameraservice.mm b/src/plugins/avfoundation/camera/avfcameraservice.mm index c1ac0b739..b40d1ffab 100644 --- a/src/plugins/avfoundation/camera/avfcameraservice.mm +++ b/src/plugins/avfoundation/camera/avfcameraservice.mm @@ -59,6 +59,10 @@ #include "avfcamerafocuscontrol.h" #include "avfcameraexposurecontrol.h" +#ifdef Q_OS_IOS +#include "avfcamerazoomcontrol.h" +#endif + #include <private/qmediaplaylistnavigator_p.h> #include <qmediaplaylist.h> @@ -83,6 +87,11 @@ AVFCameraService::AVFCameraService(QObject *parent): if (QSysInfo::MacintoshVersion >= QSysInfo::MV_IOS_8_0) m_cameraExposureControl = new AVFCameraExposureControl(this); #endif + + m_cameraZoomControl = 0; +#ifdef Q_OS_IOS + m_cameraZoomControl = new AVFCameraZoomControl(this); +#endif } AVFCameraService::~AVFCameraService() @@ -103,7 +112,9 @@ AVFCameraService::~AVFCameraService() delete m_cameraControl; delete m_cameraFocusControl; delete m_cameraExposureControl; - +#ifdef Q_OS_IOS + delete m_cameraZoomControl; +#endif delete m_session; } @@ -143,6 +154,12 @@ QMediaControl *AVFCameraService::requestControl(const char *name) m_session->addProbe(videoProbe); return videoProbe; } + +#ifdef Q_OS_IOS + if (qstrcmp(name, QCameraZoomControl_iid) == 0) + return m_cameraZoomControl; +#endif + if (!m_videoOutput) { if (qstrcmp(name, QVideoRendererControl_iid) == 0) m_videoOutput = new AVFCameraRendererControl(this); |