diff options
author | doursse <doursse> | 2008-05-15 16:52:04 +0000 |
---|---|---|
committer | doursse <doursse@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33> | 2008-05-15 16:52:04 +0000 |
commit | caea856117d54e4b2c46113ce42d62b15c9b3c26 (patch) | |
tree | dbd997b5a799b420c90c7b7827a1ef64437385a5 /legacy/emotion/src/lib/emotion_smart.c | |
parent | e5d9afb26f49c0e849663b24555f36e13b1916e3 (diff) |
* reorganize the way the gstreamer pipeline is built. Fix some usages
of emotion_object_file_set()
* move the "frame_decode" evas event to _emotion_frame_new() a,d
replace it in _emotion_video_pos_update() by "position_update"
* fix a mem leak in the gstreamer backend and in the smart object
SVN revision: 34581
Diffstat (limited to '')
-rw-r--r-- | legacy/emotion/src/lib/emotion_smart.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c index a1bc7e9b29..5943820564 100644 --- a/legacy/emotion/src/lib/emotion_smart.c +++ b/legacy/emotion/src/lib/emotion_smart.c | |||
@@ -235,6 +235,7 @@ emotion_object_file_set(Evas_Object *obj, const char *file) | |||
235 | { | 235 | { |
236 | int w, h; | 236 | int w, h; |
237 | 237 | ||
238 | if (sd->file) free(sd->file); | ||
238 | sd->file = strdup(file); | 239 | sd->file = strdup(file); |
239 | if (sd->module) | 240 | if (sd->module) |
240 | { | 241 | { |
@@ -256,6 +257,8 @@ emotion_object_file_set(Evas_Object *obj, const char *file) | |||
256 | sd->module->file_close(sd->video); | 257 | sd->module->file_close(sd->video); |
257 | evas_object_image_size_set(sd->obj, 0, 0); | 258 | evas_object_image_size_set(sd->obj, 0, 0); |
258 | } | 259 | } |
260 | if (sd->file) free(sd->file); | ||
261 | sd->file = NULL; | ||
259 | } | 262 | } |
260 | } | 263 | } |
261 | 264 | ||
@@ -838,6 +841,7 @@ _emotion_frame_new(Evas_Object *obj) | |||
838 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); | 841 | E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME); |
839 | // printf("pix get set 1 %p\n", sd->obj); | 842 | // printf("pix get set 1 %p\n", sd->obj); |
840 | evas_object_image_pixels_dirty_set(sd->obj, 1); | 843 | evas_object_image_pixels_dirty_set(sd->obj, 1); |
844 | evas_object_smart_callback_call(obj, "frame_decode", NULL); | ||
841 | } | 845 | } |
842 | 846 | ||
843 | EAPI void | 847 | EAPI void |
@@ -851,7 +855,7 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, double len) | |||
851 | if (len != sd->len) nlen = 1; | 855 | if (len != sd->len) nlen = 1; |
852 | sd->pos = pos; | 856 | sd->pos = pos; |
853 | sd->len = len; | 857 | sd->len = len; |
854 | if (npos) evas_object_smart_callback_call(obj, "frame_decode", NULL); | 858 | if (npos) evas_object_smart_callback_call(obj, "position_update", NULL); |
855 | if (nlen) evas_object_smart_callback_call(obj, "length_change", NULL); | 859 | if (nlen) evas_object_smart_callback_call(obj, "length_change", NULL); |
856 | } | 860 | } |
857 | 861 | ||