Android: restart preview when image capture fails
The preview must be restarted after taking a picture but were doing that only when the capture succeeded. We now also do it when it fails. Change-Id: I8bfff06a811d9333220050e5e81561438f5a3786 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
This commit is contained in:
@@ -563,6 +563,9 @@ void QAndroidCameraSession::onCameraTakePictureFailed()
|
|||||||
{
|
{
|
||||||
emit imageCaptureError(m_currentImageCaptureId, QCameraImageCapture::ResourceError,
|
emit imageCaptureError(m_currentImageCaptureId, QCameraImageCapture::ResourceError,
|
||||||
tr("Failed to capture image"));
|
tr("Failed to capture image"));
|
||||||
|
|
||||||
|
// Preview needs to be restarted and the preview call back must be setup again
|
||||||
|
m_camera->startPreview();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QAndroidCameraSession::onCameraPictureExposed()
|
void QAndroidCameraSession::onCameraPictureExposed()
|
||||||
|
|||||||
Reference in New Issue
Block a user