From f3c1cd693dbe801d8a0d54f18a14faba41642626 Mon Sep 17 00:00:00 2001 From: Daniel Zaoui Date: Wed, 25 Apr 2018 22:00:04 +0300 Subject: [PATCH] Player: begin actions feeding after the first canvas is created --- src/bin/player.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/bin/player.c b/src/bin/player.c index 739a0ac..85ba01f 100644 --- a/src/bin/player.c +++ b/src/bin/player.c @@ -672,6 +672,25 @@ EINA_DEBUG_OPCODES_ARRAY_DEFINE(_debug_ops, {NULL, NULL, NULL} ); +static Eina_Bool +_src_feed(void *data EINA_UNUSED) +{ + if (!_evas_list) return EINA_TRUE; + _cur_event_list = _src_unit->actions; + Exactness_Action *act = eina_list_data_get(_cur_event_list); + + if (act->delay_ms) + { + _printf(2, " Waiting <%f>\n", act->delay_ms / 1000.0); + ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); + } + else + { + _feed_event_timer_cb(NULL); + } + return EINA_FALSE; +} + static Eina_Bool _src_open() { @@ -687,18 +706,6 @@ _src_open() _src_unit = legacy_rec_file_read(_src_filename); } if (!_src_unit) return EINA_FALSE; - _cur_event_list = _src_unit->actions; - Exactness_Action *act = eina_list_data_get(_cur_event_list); - - if (act->delay_ms) - { - _printf(2, " Waiting <%f>\n", act->delay_ms / 1000.0); - ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL); - } - else - { - _feed_event_timer_cb(NULL); - } } else { @@ -1008,6 +1015,7 @@ int main(int argc, char **argv) _printf(1, "\n"); ecore_evas_callback_new_set(_my_evas_new); + ecore_idler_add(_src_feed, NULL); pret = _prg_invoke(_prg_full_path_guess(argv[0]), argc - opt_args, argv); if (_dest && _dest_unit)