diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-10-25 18:34:25 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-10-25 18:34:25 +0900 |
commit | 534c3c91b79268fa03383f85ffe51782ca47c112 (patch) | |
tree | 823462543a6602387f1d0ddd297d0f3070ed3059 /src/lib | |
parent | cf643b627cb467eeb725477908eef928573d6635 (diff) |
emotion - add vpath support for file_set on emotion objects
this completes my todo list for vpath path support at least for now
(evas images, edje objects and emotion objects). now vpath's work for
these too.
Diffstat (limited to '')
-rw-r--r-- | src/lib/emotion/emotion_smart.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c index 52ae0e6d06..bc3a7eb8b6 100644 --- a/src/lib/emotion/emotion_smart.c +++ b/src/lib/emotion/emotion_smart.c | |||
@@ -374,17 +374,28 @@ _efl_canvas_video_efl_file_file_set(Eo *obj EINA_UNUSED, Efl_Canvas_Video_Data * | |||
374 | sd->video.h = 0; | 374 | sd->video.h = 0; |
375 | if ((file) && (file[0] != 0)) | 375 | if ((file) && (file[0] != 0)) |
376 | { | 376 | { |
377 | const char *file2; | ||
378 | |||
377 | eina_stringshare_replace(&sd->file, file); | 379 | eina_stringshare_replace(&sd->file, file); |
378 | emotion_engine_instance_file_close(sd->engine_instance); | 380 | emotion_engine_instance_file_close(sd->engine_instance); |
379 | evas_object_image_data_set(sd->obj, NULL); | 381 | evas_object_image_data_set(sd->obj, NULL); |
380 | evas_object_image_size_set(sd->obj, 1, 1); | 382 | evas_object_image_size_set(sd->obj, 1, 1); |
381 | _emotion_image_data_zero(sd->obj); | 383 | _emotion_image_data_zero(sd->obj); |
382 | sd->open = 0; | 384 | sd->open = 0; |
383 | if (!emotion_engine_instance_file_open(sd->engine_instance, sd->file)) | 385 | |
386 | Efl_Vpath_File *file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, file); | ||
387 | efl_vpath_file_do(file_obj); | ||
388 | // XXX:FIXME: allow this to be async | ||
389 | efl_vpath_file_wait(file_obj); | ||
390 | file2 = efl_vpath_file_result_get(file_obj); | ||
391 | |||
392 | if (!emotion_engine_instance_file_open(sd->engine_instance, file2)) | ||
384 | { | 393 | { |
385 | WRN("Couldn't open file=%s", sd->file); | 394 | WRN("Couldn't open file=%s", sd->file); |
395 | efl_del(file_obj); | ||
386 | return EINA_FALSE; | 396 | return EINA_FALSE; |
387 | } | 397 | } |
398 | efl_del(file_obj); | ||
388 | DBG("successfully opened file=%s", sd->file); | 399 | DBG("successfully opened file=%s", sd->file); |
389 | sd->pos = 0.0; | 400 | sd->pos = 0.0; |
390 | if (sd->play) emotion_engine_instance_play(sd->engine_instance, 0.0); | 401 | if (sd->play) emotion_engine_instance_play(sd->engine_instance, 0.0); |