forked from enlightenment/efl
parent
939afcb3ea
commit
15276b648e
|
@ -4,27 +4,18 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <Eina.h>
|
|
||||||
#include <Evas.h>
|
#include <Evas.h>
|
||||||
#include <Emotion.h>
|
#include <Emotion.h>
|
||||||
#include <Ecore.h>
|
|
||||||
|
|
||||||
struct cb_data {
|
|
||||||
Ethumb_File *ef;
|
|
||||||
ethumb_generate_callback_t finished_cb;
|
|
||||||
void *data;
|
|
||||||
};
|
|
||||||
|
|
||||||
static Evas_Object *_emotion = NULL;
|
static Evas_Object *_emotion = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_shutdown(Ethumb_Plugin *plugin)
|
_shutdown(Ethumb_Plugin *plugin)
|
||||||
{
|
{
|
||||||
ecore_shutdown();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_frame_decoded_cb(void *data, Evas_Object *o, void *event_info)
|
_frame_resized_cb(void *data, Evas_Object *o, void *event_info)
|
||||||
{
|
{
|
||||||
Ethumb_File *ef = data;
|
Ethumb_File *ef = data;
|
||||||
Ethumb *e = ef->ethumb;
|
Ethumb *e = ef->ethumb;
|
||||||
|
@ -40,7 +31,7 @@ _frame_decoded_cb(void *data, Evas_Object *o, void *event_info)
|
||||||
|
|
||||||
ethumb_image_save(ef);
|
ethumb_image_save(ef);
|
||||||
|
|
||||||
evas_object_smart_callback_del(o, "frame_decode", _frame_decoded_cb);
|
evas_object_smart_callback_del(o, "frame_resize", _frame_resized_cb);
|
||||||
emotion_object_play_set(o, 0);
|
emotion_object_play_set(o, 0);
|
||||||
evas_object_del(o);
|
evas_object_del(o);
|
||||||
ethumb_finished_callback_call(ef);
|
ethumb_finished_callback_call(ef);
|
||||||
|
@ -67,7 +58,7 @@ _generate_thumb(Ethumb_File *ef)
|
||||||
emotion_object_position_set(o, e->video.time);
|
emotion_object_position_set(o, e->video.time);
|
||||||
emotion_object_play_set(o, 1);
|
emotion_object_play_set(o, 1);
|
||||||
|
|
||||||
evas_object_smart_callback_add(o, "frame_decode", _frame_decoded_cb, ef);
|
evas_object_smart_callback_add(o, "frame_resize", _frame_resized_cb, ef);
|
||||||
|
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
|
|
||||||
|
@ -87,7 +78,5 @@ ethumb_plugin_init(void)
|
||||||
_shutdown
|
_shutdown
|
||||||
};
|
};
|
||||||
|
|
||||||
ecore_init();
|
|
||||||
|
|
||||||
return &plugin;
|
return &plugin;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue