diff options
author | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-03-31 09:20:50 +0200 |
---|---|---|
committer | Timur Pocheptsov <Timur.Pocheptsov@digia.com> | 2015-04-13 14:26:12 +0000 |
commit | 6187b72c51d0c05955d9d814baf8866b8e70fcfe (patch) | |
tree | 1498623c10c6eb6b7aafd34902dc6b876c0e0646 /src/plugins/avfoundation/camera/avfcameraservice.mm | |
parent | d9a988971f13b18450db16ef29d92b3bd399b7c5 (diff) |
Camera flash control - version for iOS/OS X
AVCaptureDevice has API to work with camera flash on both iOS and OS X
(quite limited on OS X though) - so camera flash control can be implemented
in AVFoundation plugin.
Task-number: QTBUG-37996
Change-Id: Ie9aaed09a709e7d09ccc1cedded93a69fea93975
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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/avfoundation/camera/avfcameraservice.mm b/src/plugins/avfoundation/camera/avfcameraservice.mm index 0485abdcd..f163e1299 100644 --- a/src/plugins/avfoundation/camera/avfcameraservice.mm +++ b/src/plugins/avfoundation/camera/avfcameraservice.mm @@ -52,6 +52,7 @@ #include "avfcameraexposurecontrol.h" #include "avfcameraviewfindersettingscontrol.h" #include "avfimageencodercontrol.h" +#include "avfcameraflashcontrol.h" #ifdef Q_OS_IOS #include "avfcamerazoomcontrol.h" @@ -89,6 +90,7 @@ AVFCameraService::AVFCameraService(QObject *parent): m_viewfinderSettingsControl2 = new AVFCameraViewfinderSettingsControl2(this); m_viewfinderSettingsControl = new AVFCameraViewfinderSettingsControl(this); m_imageEncoderControl = new AVFImageEncoderControl(this); + m_flashControl = new AVFCameraFlashControl(this); } AVFCameraService::~AVFCameraService() @@ -115,6 +117,7 @@ AVFCameraService::~AVFCameraService() delete m_viewfinderSettingsControl2; delete m_viewfinderSettingsControl; delete m_imageEncoderControl; + delete m_flashControl; delete m_session; } @@ -158,6 +161,9 @@ QMediaControl *AVFCameraService::requestControl(const char *name) if (qstrcmp(name, QImageEncoderControl_iid) == 0) return m_imageEncoderControl; + if (qstrcmp(name, QCameraFlashControl_iid) == 0) + return m_flashControl; + if (qstrcmp(name,QMediaVideoProbeControl_iid) == 0) { AVFMediaVideoProbeControl *videoProbe = 0; videoProbe = new AVFMediaVideoProbeControl(this); |