From e48bda302a59c55dcc185e705c57dac427663d50 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Thu, 1 Nov 2018 14:52:18 +0200 Subject: [PATCH] Player: permit speed increasing --- src/bin/player.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bin/player.c b/src/bin/player.c index 9f8d4de..19d7578 100644 --- a/src/bin/player.c +++ b/src/bin/player.c @@ -143,6 +143,7 @@ static int _last_debug_src_cid = 0; static int _take_shot_op = EINA_DEBUG_OPCODE_INVALID; static Eina_Bool _stabilization_timer_cb(void *); +static double _speed = 1.0; static Eina_Bool _exit_required = EINA_FALSE; @@ -825,6 +826,11 @@ _src_open() last_action_type = act->type; } } + if (_speed && _speed != 1) + { + EINA_LIST_FOREACH(_src_unit->actions, itr, act) + act->delay_ms /= _speed; + } } else { @@ -994,6 +1000,7 @@ static const Ecore_Getopt optdesc = { ECORE_GETOPT_STORE_TRUE(0, "disable-screenshots", "Disable screenshots."), ECORE_GETOPT_STORE_STR('f', "fonts-dir", "Specify a directory of the fonts that should be used."), ECORE_GETOPT_STORE_TRUE(0, "stabilize-shots", "Wait for the frames to be stable before taking the shots."), + ECORE_GETOPT_STORE_DOUBLE(0, "speed", "Set the speed used to play the given test (default 1.0)."), ECORE_GETOPT_COUNT('v', "verbose", "Turn verbose messages on."), ECORE_GETOPT_LICENSE('L', "license"), @@ -1022,6 +1029,7 @@ int main(int argc, char **argv) ECORE_GETOPT_VALUE_BOOL(_disable_shots), ECORE_GETOPT_VALUE_STR(fonts_dir), ECORE_GETOPT_VALUE_BOOL(_stabilize_shots), + ECORE_GETOPT_VALUE_DOUBLE(_speed), ECORE_GETOPT_VALUE_INT(_verbose), ECORE_GETOPT_VALUE_BOOL(want_quit),