diff --git a/gui/OpenFaceOffline/MainWindow.xaml.cs b/gui/OpenFaceOffline/MainWindow.xaml.cs index 84d3a2a..e63d6a8 100644 --- a/gui/OpenFaceOffline/MainWindow.xaml.cs +++ b/gui/OpenFaceOffline/MainWindow.xaml.cs @@ -318,6 +318,7 @@ namespace OpenFaceOffline // Do not cary state accross images clnf_model.Reset(); face_analyser.Reset(); + recorder.Close(); // TODO how to report errors from the reader here? exceptions? logging? Problem for future versions? } diff --git a/lib/local/CppInerop/RecorderInterop.h b/lib/local/CppInerop/RecorderInterop.h index aa4ce46..858f09c 100644 --- a/lib/local/CppInerop/RecorderInterop.h +++ b/lib/local/CppInerop/RecorderInterop.h @@ -108,6 +108,11 @@ namespace UtilitiesOF { m_recorder = new Utilities::RecorderOpenFace(in_filename_std, *parameters->GetParams(), output_directory_std); } + void Close() + { + m_recorder->Close(); + } + void WriteObservation() { m_recorder->WriteObservation();