summaryrefslogtreecommitdiff
path: root/legacy/emotion
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-06-19 06:52:29 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-06-19 06:52:29 +0000
commit6ef64395a886f42313f2196e11db3a8a7996dd57 (patch)
tree8fd9799396f7e656d43cfe5f57534c899822df85 /legacy/emotion
parent4dc64ed00e6dae08d145e7c50b4bf9c34e1fe7f4 (diff)
emotion: sync rendering with Ecore_Animtor.
SVN revision: 72440
Diffstat (limited to 'legacy/emotion')
-rw-r--r--legacy/emotion/ChangeLog4
-rw-r--r--legacy/emotion/NEWS1
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c30
3 files changed, 31 insertions, 4 deletions
diff --git a/legacy/emotion/ChangeLog b/legacy/emotion/ChangeLog
index ca8f7aff55..beb9c64034 100644
--- a/legacy/emotion/ChangeLog
+++ b/legacy/emotion/ChangeLog
@@ -21,3 +21,7 @@
212012-06-08 Hugo Camboulive 212012-06-08 Hugo Camboulive
22 22
23 * Implement SPU switch for generic/vlc. 23 * Implement SPU switch for generic/vlc.
24
252012-06-19 Cedric Bail
26
27 * Sync rendering with Ecore_Animator.
diff --git a/legacy/emotion/NEWS b/legacy/emotion/NEWS
index 9f7f54ab73..cb4d5af68f 100644
--- a/legacy/emotion/NEWS
+++ b/legacy/emotion/NEWS
@@ -6,6 +6,7 @@ Changes since Emotion 1.0.0:
6Additions: 6Additions:
7 - Add support for "playback_started" callback to generic player. 7 - Add support for "playback_started" callback to generic player.
8 - Implement SPU switch for generic/vlc. 8 - Implement SPU switch for generic/vlc.
9 - Sync rendering with Ecore_Animator.
9 10
10Fixes: 11Fixes:
11 - build out of tree. 12 - build out of tree.
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 141137442f..8421f6f581 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -111,6 +111,8 @@ struct _Smart_Data
111 Emotion_Suspend state; 111 Emotion_Suspend state;
112 Emotion_Aspect aspect; 112 Emotion_Aspect aspect;
113 113
114 Ecore_Animator *anim;
115
114 Eina_Bool open : 1; 116 Eina_Bool open : 1;
115 Eina_Bool play : 1; 117 Eina_Bool play : 1;
116 Eina_Bool remember_play : 1; 118 Eina_Bool remember_play : 1;
@@ -234,6 +236,7 @@ _smart_data_free(Smart_Data *sd)
234 eina_stringshare_del(sd->file); 236 eina_stringshare_del(sd->file);
235 free(sd->module_name); 237 free(sd->module_name);
236 if (sd->job) ecore_job_del(sd->job); 238 if (sd->job) ecore_job_del(sd->job);
239 if (sd->anim) ecore_animator_del(sd->anim);
237 free(sd->progress.info); 240 free(sd->progress.info);
238 free(sd->ref.file); 241 free(sd->ref.file);
239 free(sd); 242 free(sd);
@@ -410,6 +413,9 @@ emotion_object_init(Evas_Object *obj, const char *module_filename)
410 sd->len = 0; 413 sd->len = 0;
411 sd->remember_play = 0; 414 sd->remember_play = 0;
412 415
416 if (sd->anim) ecore_animator_del(sd->anim);
417 sd->anim = NULL;
418
413 _emotion_module_close(sd->module, sd->video_data); 419 _emotion_module_close(sd->module, sd->video_data);
414 sd->module = NULL; 420 sd->module = NULL;
415 sd->video_data = NULL; 421 sd->video_data = NULL;
@@ -468,6 +474,9 @@ emotion_object_file_set(Evas_Object *obj, const char *file)
468 eina_stringshare_replace(&sd->file, NULL); 474 eina_stringshare_replace(&sd->file, NULL);
469 } 475 }
470 476
477 if (sd->anim) ecore_animator_del(sd->anim);
478 sd->anim = NULL;
479
471#ifdef HAVE_EIO 480#ifdef HAVE_EIO
472 /* Only cancel the load_xattr or we will loose ref to time_seek stringshare */ 481 /* Only cancel the load_xattr or we will loose ref to time_seek stringshare */
473 if (sd->load_xattr) eio_file_cancel(sd->load_xattr); 482 if (sd->load_xattr) eio_file_cancel(sd->load_xattr);
@@ -1349,7 +1358,7 @@ _eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
1349 Smart_Data *sd = data; 1358 Smart_Data *sd = data;
1350 1359
1351 emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double); 1360 emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double);
1352 evas_object_smart_callback_call(sd->obj, SIG_POSITION_LOAD_SUCCEED, NULL); 1361 evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), SIG_POSITION_LOAD_SUCCEED, NULL);
1353 _eio_load_xattr_cleanup(sd, handler); 1362 _eio_load_xattr_cleanup(sd, handler);
1354} 1363}
1355 1364
@@ -1495,6 +1504,21 @@ _emotion_video_get(const Evas_Object *obj)
1495 return sd->video_data; 1504 return sd->video_data;
1496} 1505}
1497 1506
1507static Eina_Bool
1508_emotion_frame_anim(void *data)
1509{
1510 Evas_Object *obj = data;
1511 Smart_Data *sd;
1512
1513 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EINA_FALSE);
1514
1515 evas_object_image_pixels_dirty_set(sd->obj, 1);
1516 evas_object_smart_callback_call(obj, SIG_FRAME_DECODE, NULL);
1517 sd->anim = NULL;
1518
1519 return EINA_FALSE;
1520}
1521
1498EAPI void 1522EAPI void
1499_emotion_frame_new(Evas_Object *obj) 1523_emotion_frame_new(Evas_Object *obj)
1500{ 1524{
@@ -1502,9 +1526,7 @@ _emotion_frame_new(Evas_Object *obj)
1502 1526
1503 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); 1527 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
1504 1528
1505// printf("pix get set 1 %p\n", sd->obj); 1529 if (!sd->anim) sd->anim = ecore_animator_add(_emotion_frame_anim, obj);
1506 evas_object_image_pixels_dirty_set(sd->obj, 1);
1507 evas_object_smart_callback_call(obj, SIG_FRAME_DECODE, NULL);
1508} 1530}
1509 1531
1510EAPI void 1532EAPI void