diff options
author | Bartlomiej Moskal <bartlomiej.moskal@qt.io> | 2021-07-28 09:36:45 +0200 |
---|---|---|
committer | Bartlomiej Moskal <bartlomiej.moskal@qt.io> | 2021-07-28 11:31:12 +0200 |
commit | 79a522a243d5d54074ffe535905c756ec47dd38e (patch) | |
tree | dd0368114d476ac266d29775339b36b77cab86df | |
parent | c2c1d524836dbfedf851cc68c53403afcbbcbe44 (diff) |
Android: camera calls onCameraOpened when needed
Before this change, onCameraOpened() method was never triggered.
That is why supported modes for: focus, exposure and whiteBalance were
not set.
It was missing from the commit:
1955e9f3fb527a8e1a33f51e0a50b7627a1ac8fe, when onCameraOpened method was
moved to qAndroidCameraControl
Later in commits: 424614afde0ca3cb7479296c093689e98a0c6f13 and
0c40d337ae107d5ab2fde5da022c071c64c67e0e, CameraImageProcessing and
CameraExposure was merged to CameraControl. Each time after removing not
needed class, connection to opened signal was removed, but not added
(into CameraControl).
Additionally fix the order for disconnecting signals from cameraSession
Change-Id: Ic12fdb1bd9c91cb6b39d50a77c4f8fef9b242f92
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | src/multimedia/platform/android/mediacapture/qandroidcamera.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/multimedia/platform/android/mediacapture/qandroidcamera.cpp b/src/multimedia/platform/android/mediacapture/qandroidcamera.cpp index 7e075db5c..53ba0d998 100644 --- a/src/multimedia/platform/android/mediacapture/qandroidcamera.cpp +++ b/src/multimedia/platform/android/mediacapture/qandroidcamera.cpp @@ -92,8 +92,8 @@ void QAndroidCamera::setCaptureSession(QPlatformMediaCaptureSession *session) m_service = captureSession; if (!m_service) { - m_cameraSession = nullptr; disconnect(m_cameraSession,nullptr,this,nullptr); + m_cameraSession = nullptr; return; } @@ -102,6 +102,7 @@ void QAndroidCamera::setCaptureSession(QPlatformMediaCaptureSession *session) connect(m_cameraSession, &QAndroidCameraSession::activeChanged, this, &QAndroidCamera::activeChanged); connect(m_cameraSession, &QAndroidCameraSession::error, this, &QAndroidCamera::error); + connect(m_cameraSession, &QAndroidCameraSession::opened, this, &QAndroidCamera::onCameraOpened); } void QAndroidCamera::setFocusMode(QCamera::FocusMode mode) |