raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=534c3c91b79268fa03383f85ffe51782ca47c112

commit 534c3c91b79268fa03383f85ffe51782ca47c112
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Oct 25 18:34:25 2016 +0900

    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.
---
 src/lib/emotion/emotion_smart.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 52ae0e6..bc3a7eb 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 *
    sd->video.h = 0;
    if ((file) && (file[0] != 0))
      {
+        const char *file2;
+
         eina_stringshare_replace(&sd->file, file);
         emotion_engine_instance_file_close(sd->engine_instance);
         evas_object_image_data_set(sd->obj, NULL);
         evas_object_image_size_set(sd->obj, 1, 1);
         _emotion_image_data_zero(sd->obj);
         sd->open = 0;
-        if (!emotion_engine_instance_file_open(sd->engine_instance, sd->file))
+
+        Efl_Vpath_File *file_obj = 
efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, file);
+        efl_vpath_file_do(file_obj);
+        // XXX:FIXME: allow this to be async
+        efl_vpath_file_wait(file_obj);
+        file2 = efl_vpath_file_result_get(file_obj);
+
+        if (!emotion_engine_instance_file_open(sd->engine_instance, file2))
           {
              WRN("Couldn't open file=%s", sd->file);
+             efl_del(file_obj);
              return EINA_FALSE;
           }
+        efl_del(file_obj);
         DBG("successfully opened file=%s", sd->file);
         sd->pos = 0.0;
         if (sd->play) emotion_engine_instance_play(sd->engine_instance, 0.0);

-- 


Reply via email to