AVFoundation: fix microphone permission when using the camera.
authorYoann Lopes <yoann.lopes@theqtcompany.com>
Tue, 21 Apr 2015 16:07:19 +0000 (18:07 +0200)
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>
Thu, 23 Apr 2015 18:39:08 +0000 (18:39 +0000)
commitbcaec9624c9124dc256ad963d5735496e219414a
tree61a759b0699674db0caf82e0021486ca45faf847
parent6fe3061c1f6b7438d20c7bfb92c7652cedc5b049
AVFoundation: fix microphone permission when using the camera.

The microphone permission was always requested when using the camera,
even when not actually using the microphone, which can only happen when
recording a video. The permission request is triggered by adding an
audio AVCaptureDeviceInput to the AVCaptureSession, which was done when
setting the camera to LoadedState. This is now done when setting the
camera mode to CaptureVideo.

Task-number: QTBUG-45659
Change-Id: I3692797128cfb70ba5ccbc7a36b6955471039e80
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
src/plugins/avfoundation/camera/avfcamerasession.h
src/plugins/avfoundation/camera/avfcamerasession.mm
src/plugins/avfoundation/camera/avfmediarecordercontrol.h
src/plugins/avfoundation/camera/avfmediarecordercontrol.mm