summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-05-07 14:40:51 +0200
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-05-10 15:18:35 +0200
commitf252ad92526c73c4df05798a4ab699853908edc2 (patch)
tree2d53174a0ac2a159d2666dc5f2f5514441a4ede4 /src
parent3bbeae539854c1474844c65025d40b813cec286c (diff)
AVFoundation: Fix sending proper state in QMediaRecorder
Need to send the state if it has been applied. Currently it happens when Recording is requested. If Stopped is requested, the state will be changed in handleRecordingFinished callback. Change-Id: I6911f2cebb2d1cc8a08eee17e7b91654b5d6e4c7 Fixes: QTBUG-75287 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/avfoundation/camera/avfmediarecordercontrol.mm6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm b/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
index 546eabf89..a67918bbc 100644
--- a/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
+++ b/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
@@ -294,6 +294,8 @@ void AVFMediaRecorderControl::setState(QMediaRecorder::State state)
m_recordingFinished = false;
Q_EMIT actualLocationChanged(actualLocation);
+ updateStatus();
+ Q_EMIT stateChanged(m_state);
} else {
Q_EMIT error(QMediaRecorder::FormatError, tr("Recorder not configured"));
}
@@ -312,10 +314,6 @@ void AVFMediaRecorderControl::setState(QMediaRecorder::State state)
unapplySettings();
}
}
-
- updateStatus();
- if (state != m_state)
- Q_EMIT stateChanged(m_state);
}
void AVFMediaRecorderControl::setMuted(bool muted)