summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib/emotion_smart.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2004-07-22 04:13:28 +0000
committerCarsten Haitzler <raster@rasterman.com>2004-07-22 04:13:28 +0000
commitcf4f1ac8cb8b687ee29a87c39a488711c7ab0157 (patch)
treea654bdc684bd9205cfbb1429f5ed67454740d270 /legacy/emotion/src/lib/emotion_smart.c
parent4671d0684b1d2171c2408c1672c238e15bd221fb (diff)
put jobs back... does this work?
SVN revision: 10959
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index f7192751f9..89ca196fb0 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -42,6 +42,8 @@ struct _Smart_Data
42 double seek_pos; 42 double seek_pos;
43 double len; 43 double len;
44 44
45 Ecore_Job *job;
46
45 unsigned char play : 1; 47 unsigned char play : 1;
46 unsigned char seek : 1; 48 unsigned char seek : 1;
47 49
@@ -62,6 +64,7 @@ struct _Smart_Data
62 64
63static void _mouse_move(void *data, Evas *ev, Evas_Object *obj, void *event_info); 65static void _mouse_move(void *data, Evas *ev, Evas_Object *obj, void *event_info);
64static void _mouse_down(void *data, Evas *ev, Evas_Object *obj, void *event_info); 66static void _mouse_down(void *data, Evas *ev, Evas_Object *obj, void *event_info);
67static void _pos_set_job(void *data);
65static void _pixels_get(void *data, Evas_Object *obj); 68static void _pixels_get(void *data, Evas_Object *obj);
66 69
67static void _smart_init(void); 70static void _smart_init(void);
@@ -238,7 +241,10 @@ emotion_object_position_set(Evas_Object *obj, double sec)
238 if (!sd->module) return; 241 if (!sd->module) return;
239 if (!sd->video) return; 242 if (!sd->video) return;
240 sd->seek_pos = sec; 243 sd->seek_pos = sec;
241 sd->module->pos_set(sd->video, sd->seek_pos); 244 sd->seek = 1;
245 sd->pos = sd->seek_pos;
246 if (sd->job) ecore_job_del(sd->job);
247 sd->job = ecore_job_add(_pos_set_job, obj);
242} 248}
243 249
244double 250double
@@ -874,6 +880,22 @@ _mouse_down(void *data, Evas *ev, Evas_Object *obj, void *event_info)
874 sd->module->event_mouse_button_feed(sd->video, 1, x, y); 880 sd->module->event_mouse_button_feed(sd->video, 1, x, y);
875} 881}
876 882
883static void
884_pos_set_job(void *data)
885{
886 Evas_Object *obj;
887 Smart_Data *sd;
888
889 obj = data;
890 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
891 sd->job = NULL;
892 if (sd->seek)
893 {
894 sd->module->pos_set(sd->video, sd->seek_pos);
895 sd->seek = 0;
896 }
897}
898
877/* called by evas when it needs pixels for the image object */ 899/* called by evas when it needs pixels for the image object */
878static void 900static void
879_pixels_get(void *data, Evas_Object *obj) 901_pixels_get(void *data, Evas_Object *obj)
@@ -971,6 +993,7 @@ _smart_del(Evas_Object * obj)
971 if (sd->module) _emotion_module_close(sd->module); 993 if (sd->module) _emotion_module_close(sd->module);
972 evas_object_del(sd->obj); 994 evas_object_del(sd->obj);
973 if (sd->file) free(sd->file); 995 if (sd->file) free(sd->file);
996 if (sd->job) ecore_job_del(sd->job);
974 if (sd->progress.info) free(sd->progress.info); 997 if (sd->progress.info) free(sd->progress.info);
975 if (sd->ref.file) free(sd->ref.file); 998 if (sd->ref.file) free(sd->ref.file);
976 free(sd); 999 free(sd);