summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/camera/avfcamerasession.mm
diff options
context:
space:
mode:
authorTimur Pocheptsov <Timur.Pocheptsov@digia.com>2015-01-28 17:51:19 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-02 12:44:29 +0000
commit0d783b730372ffaeebc22e882a3c65d83445932f (patch)
tree2d388856787e2e335b645e57f8320246561184ab /src/plugins/avfoundation/camera/avfcamerasession.mm
parentd27f493df06fb19125f5cd8010831a33b7f35ba8 (diff)
Viewfinder settings control (2) - version for iOS/OS X
QCameraViewfinderSettingsControl2 - version for AV foundation plugin (the new settings control interface implemented). Change-Id: I3fbfb87925e57c914d43eb711fa5422e26981207 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Diffstat (limited to 'src/plugins/avfoundation/camera/avfcamerasession.mm')
-rw-r--r--src/plugins/avfoundation/camera/avfcamerasession.mm11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/avfoundation/camera/avfcamerasession.mm b/src/plugins/avfoundation/camera/avfcamerasession.mm
index e7e886488..5570aa83b 100644
--- a/src/plugins/avfoundation/camera/avfcamerasession.mm
+++ b/src/plugins/avfoundation/camera/avfcamerasession.mm
@@ -39,6 +39,7 @@
#include "avfcameradevicecontrol.h"
#include "avfaudioinputselectorcontrol.h"
#include "avfmediavideoprobecontrol.h"
+#include "avfcameraviewfindersettingscontrol.h"
#include <CoreFoundation/CoreFoundation.h>
#include <Foundation/Foundation.h>
@@ -275,6 +276,7 @@ void AVFCameraSession::setState(QCamera::State newState)
Q_EMIT readyToConfigureConnections();
[m_captureSession commitConfiguration];
[m_captureSession startRunning];
+ applyViewfinderSettings();
}
if (oldState == QCamera::ActiveState) {
@@ -364,6 +366,15 @@ void AVFCameraSession::attachInputDevices()
}
}
+void AVFCameraSession::applyViewfinderSettings()
+{
+ if (AVFCameraViewfinderSettingsControl2 *control = m_service->viewfinderSettingsControl2()) {
+ QCameraViewfinderSettings settings(control->requestedSettings());
+ // TODO: Adjust the resolution (from image encoder control), updating 'settings'.
+ control->setViewfinderSettings(settings);
+ }
+}
+
void AVFCameraSession::addProbe(AVFMediaVideoProbeControl *probe)
{
m_videoProbesMutex.lock();