From 9bcd559fae63e8dd0bcedf2d1c4709754a7d0116 Mon Sep 17 00:00:00 2001 From: Andrej Babic Date: Wed, 8 Apr 2020 15:17:58 +0200 Subject: [PATCH] Implement start and stop writing logic --- core-writer/src/ProcessManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core-writer/src/ProcessManager.cpp b/core-writer/src/ProcessManager.cpp index e4d373f..490505b 100644 --- a/core-writer/src/ProcessManager.cpp +++ b/core-writer/src/ProcessManager.cpp @@ -45,7 +45,8 @@ void ProcessManager::start_writing( cout << " user_id " << user_id << endl; #endif - // TODO: Empty buffer to have a clean slate. + recv_module_.stop_saving_and_clear_buffer(); + write_module_.start_writing(output_file, n_frames, user_id); recv_module_.start_saving(); } @@ -59,8 +60,8 @@ void ProcessManager::stop_writing() cout << "[ProcessManager::stop_writing]" << endl; #endif - recv_module_.stop_saving(); write_module_.stop_writing(); + recv_module_.stop_saving_and_clear_buffer(); } void ProcessManager::start_receiving(