diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-05-05 17:39:06 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-08-20 07:01:10 +0000 |
commit | 2e54790a59ebd279c140eaf127881ce07a539785 (patch) | |
tree | ffceff35597789d5c4090c5b3f679109450e887a /src/plugins/android/src/mediacapture | |
parent | 28a20861fdf6df5fda1bad73296e18f7ae9966f1 (diff) |
Android: fix video probes when recording the camera.
The preview frame callback is cleared by the Android Camera whenever a
MediaRecorder is set up. We need to reset the callback after starting
the media recorder.
Change-Id: I604320b11eb3a7f6f8d7d3167d5aae371999be14
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/plugins/android/src/mediacapture')
-rw-r--r-- | src/plugins/android/src/mediacapture/qandroidcapturesession.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp b/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp index aaad8fd8a..f2ea1b9d7 100644 --- a/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp +++ b/src/plugins/android/src/mediacapture/qandroidcapturesession.cpp @@ -233,9 +233,14 @@ void QAndroidCaptureSession::start() m_notifyTimer.start(); updateDuration(); - if (m_cameraSession) + if (m_cameraSession) { m_cameraSession->setReadyForCapture(false); + // Preview frame callback is cleared when setting up the camera with the media recorder. + // We need to reset it. + m_cameraSession->camera()->setupPreviewFrameCallback(); + } + m_state = QMediaRecorder::RecordingState; emit stateChanged(m_state); } |