[record] further cleanups of the workflow

This commit is contained in:
radius 2018-09-18 00:30:46 -05:00
parent 6351e80946
commit 356d4e2c5e
2 changed files with 2 additions and 7 deletions

View File

@ -2170,19 +2170,18 @@ TODO: Add a setting for these tweaks */
break; break;
case CMD_EVENT_RECORD_DEINIT: case CMD_EVENT_RECORD_DEINIT:
{ {
recording_set_state(false);
streaming_set_state(false);
if (!recording_deinit()) if (!recording_deinit())
return false; return false;
} }
break; break;
case CMD_EVENT_RECORD_INIT: case CMD_EVENT_RECORD_INIT:
{ {
command_event(CMD_EVENT_RECORD_DEINIT, NULL);
recording_set_state(true); recording_set_state(true);
if (!recording_init()) if (!recording_init())
{ {
command_event(CMD_EVENT_RECORD_DEINIT, NULL); command_event(CMD_EVENT_RECORD_DEINIT, NULL);
recording_set_state(false);
streaming_set_state(false);
return false; return false;
} }
} }

View File

@ -2699,8 +2699,6 @@ static int action_ok_start_streaming(const char *path,
static int action_ok_stop_recording(const char *path, static int action_ok_stop_recording(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx) const char *label, unsigned type, size_t idx, size_t entry_idx)
{ {
recording_set_state(false);
streaming_set_state(false);
command_event(CMD_EVENT_RECORD_DEINIT, NULL); command_event(CMD_EVENT_RECORD_DEINIT, NULL);
return generic_action_ok_command(CMD_EVENT_RESUME); return generic_action_ok_command(CMD_EVENT_RESUME);
} }
@ -2708,8 +2706,6 @@ static int action_ok_stop_recording(const char *path,
static int action_ok_stop_streaming(const char *path, static int action_ok_stop_streaming(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx) const char *label, unsigned type, size_t idx, size_t entry_idx)
{ {
recording_set_state(false);
streaming_set_state(false);
command_event(CMD_EVENT_RECORD_DEINIT, NULL); command_event(CMD_EVENT_RECORD_DEINIT, NULL);
return generic_action_ok_command(CMD_EVENT_RESUME); return generic_action_ok_command(CMD_EVENT_RESUME);
} }