Player: begin actions feeding after the first canvas is created

This commit is contained in:
Daniel Zaoui 2018-04-25 22:00:04 +03:00
parent 6489ac6142
commit f3c1cd693d
1 changed files with 20 additions and 12 deletions

View File

@ -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)