Commit 1f8a5172 authored by Ming Rui Zhang's avatar Ming Rui Zhang

recordwidget: video recorder now stops at the last frame when recording finishes

Change-Id: I78741219ef1a848a5d4e42134fd564e4a78812dc
parent 463afd27
......@@ -58,6 +58,11 @@ RecordWidget::finishRecording()
bool isSuccessful = false;
try {
LRCInstance::avModel().stopLocalRecorder(recordedFilePath_.toStdString());
if (!isAudio_) {
previewWidget_->toPaintingBackground(false);
previewWidget_->toDrawLastFrame(true);
LRCInstance::avModel().stopPreview();
}
isSuccessful = true;
} catch (...) {
qDebug() << "The finish of record fails";
......@@ -83,6 +88,8 @@ void
RecordWidget::deleteRecording()
{
Utils::forceDeleteAsync(recordedFilePath_);
if (!isAudio_)
LRCInstance::avModel().startPreview();
}
bool
......@@ -129,5 +136,7 @@ RecordWidget::hideEvent(QHideEvent* event)
Q_UNUSED(event);
if(!isAudio_) {
LRCInstance::avModel().stopPreview();
previewWidget_->toPaintingBackground(true);
previewWidget_->toDrawLastFrame(false);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment