From 652a6467fdc4e562fe9166d491f4ca9848e37abb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 29 Apr 2020 22:45:54 +0200 Subject: [PATCH] Add exit command to stress tester. --- DEVELOP.md | 6 +++++- src/wx/player_stress_tester.cc | 5 +++++ src/wx/player_stress_tester.h | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/DEVELOP.md b/DEVELOP.md index 4d2b0fca8..dc66a3bfd 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -36,10 +36,14 @@ Stop any current playback. Seek to some point in the current DCP, where 0 is the start and 4095 is the end; for example -```S 2048``` +```K 2048``` seeks half-way through the DCP. +* `E` + +Stops playback and closes the player. + The script can be run using something like ```dcpomatic2_player -s stress``` diff --git a/src/wx/player_stress_tester.cc b/src/wx/player_stress_tester.cc index c0e6e8443..726db2a70 100644 --- a/src/wx/player_stress_tester.cc +++ b/src/wx/player_stress_tester.cc @@ -67,6 +67,8 @@ Command::Command (string line) } type = SEEK; int_param = raw_convert(bits[1]); + } else if (bits[0] == "E") { + type = EXIT; } } @@ -156,6 +158,9 @@ PlayerStressTester::check_commands () _controls->seek (_current_command->int_param); ++_current_command; break; + case Command::EXIT: + wxTheApp->GetTopWindow()->Destroy(); + break; } } diff --git a/src/wx/player_stress_tester.h b/src/wx/player_stress_tester.h index 40686bc24..9da73762f 100644 --- a/src/wx/player_stress_tester.h +++ b/src/wx/player_stress_tester.h @@ -35,6 +35,7 @@ public: WAIT, STOP, SEEK, + EXIT }; Command(std::string line); -- 2.30.2