forked from enlightenment/rage
parent
253c1bbcdc
commit
313dda5f2d
|
@ -86,7 +86,10 @@ _art_check(Evas_Object *obj)
|
|||
free(thumb);
|
||||
}
|
||||
}
|
||||
else evas_object_hide(sd->o_img);
|
||||
else
|
||||
{
|
||||
evas_object_hide(sd->o_img);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -97,8 +100,16 @@ _cb_vid_frame(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
|
|||
|
||||
if (!sd) return;
|
||||
evas_object_geometry_get(data, &ox, &oy, &ow, &oh);
|
||||
if (!emotion_object_video_handled_get(sd->o_vid))
|
||||
{
|
||||
evas_object_hide(sd->o_vid);
|
||||
evas_object_show(sd->o_img);
|
||||
}
|
||||
else
|
||||
{
|
||||
evas_object_show(sd->o_vid);
|
||||
evas_object_hide(sd->o_img);
|
||||
}
|
||||
evas_object_show(sd->clip);
|
||||
_ob_resize(data, ox, oy, ow, oh);
|
||||
evas_object_smart_callback_call(data, "frame_decode", NULL);
|
||||
|
@ -292,7 +303,8 @@ _ob_resize(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coor
|
|||
sd->pih = sd->ih;
|
||||
evas_object_smart_callback_call(obj, "frame_resize", NULL);
|
||||
}
|
||||
if ((sd->tw > 0) && (sd->th > 0) && (sd->doart))
|
||||
if ((sd->tw > 0) && (sd->th > 0) && (sd->doart) &&
|
||||
(!emotion_object_video_handled_get(sd->o_vid)))
|
||||
{
|
||||
int iw, ih;
|
||||
|
||||
|
|
|
@ -276,6 +276,7 @@ _videothumb_image_load(Evas_Object *obj)
|
|||
if (sd->poster_mode)
|
||||
{
|
||||
artfile = albumart_file_get(sd->realpath);
|
||||
printf("artfile for %s = %s\n", sd->realpath, artfile);
|
||||
if (artfile)
|
||||
{
|
||||
if (ecore_file_exists(artfile))
|
||||
|
|
|
@ -185,7 +185,22 @@ _cb_fetched(void *data)
|
|||
file = video_file_get(inf->vid);
|
||||
if (file)
|
||||
{
|
||||
char *realfile = ecore_file_realpath(file);
|
||||
char *realfile = NULL;
|
||||
|
||||
if (!strncasecmp(file, "file:/", 6))
|
||||
{
|
||||
Efreet_Uri *uri = efreet_uri_decode(file);
|
||||
if (uri)
|
||||
{
|
||||
realfile = ecore_file_realpath(uri->path);
|
||||
efreet_uri_free(uri);
|
||||
}
|
||||
}
|
||||
else if ((!strncasecmp(file, "http:/", 6)) ||
|
||||
(!strncasecmp(file, "https:/", 7)))
|
||||
realfile = strdup(file);
|
||||
else
|
||||
realfile = ecore_file_realpath(file);
|
||||
if (realfile)
|
||||
{
|
||||
char *path = albumart_file_get(realfile);
|
||||
|
@ -616,10 +631,18 @@ win_art(Evas_Object *win, const char *path)
|
|||
int iw, ih;
|
||||
|
||||
if (inf->artimg)
|
||||
{
|
||||
const char *path2;
|
||||
|
||||
evas_object_image_file_get(inf->artimg, &path2, NULL);
|
||||
if ((!path2) || (strcmp(path, path2)))
|
||||
{
|
||||
evas_object_del(inf->artimg);
|
||||
inf->artimg = NULL;
|
||||
}
|
||||
}
|
||||
if (!inf->artimg)
|
||||
{
|
||||
inf->artimg = evas_object_image_filled_add(evas_object_evas_get(win));
|
||||
evas_object_image_file_set(inf->artimg, path, NULL);
|
||||
evas_object_image_size_get(inf->artimg, &iw, &ih);
|
||||
|
@ -637,6 +660,7 @@ win_art(Evas_Object *win, const char *path)
|
|||
inf->artimg = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue