From 65a614e5e2100cc53d7146d0341ad9218e74f3de Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 3 Mar 2020 20:18:34 +0000 Subject: [PATCH] remove emotion obj init as its pretty pointless these days --- src/bin/config.c | 6 ++---- src/bin/config.h | 2 +- src/bin/main.c | 12 ------------ src/bin/thumb.c | 13 +++++-------- src/bin/video.c | 6 ------ 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/src/bin/config.c b/src/bin/config.c index 1fb9280..082ce60 100644 --- a/src/bin/config.c +++ b/src/bin/config.c @@ -19,7 +19,7 @@ config_init(void) (&eddc, sizeof(eddc), "Config", sizeof(Config)); edd_base = eet_data_descriptor_stream_new(&eddc); EET_DATA_DESCRIPTOR_ADD_BASIC - (edd_base, Config, "emotion_engine", emotion_engine, EET_T_STRING); + (edd_base, Config, "version", version, EET_T_INT); snprintf(buf, sizeof(buf), "%s/rage/config/standard/base.cfg", efreet_config_home_get()); ef = eet_open(buf, EET_FILE_MODE_READ); if (ef) @@ -31,8 +31,7 @@ config_init(void) { config = calloc(1, sizeof(Config)); if (!config) abort(); - // xine vlc gstreamer1 - config->emotion_engine = eina_stringshare_add("gstreamer1"); + config->version = 1; config_save(); } } @@ -40,7 +39,6 @@ config_init(void) void config_shutdown(void) { - if (config->emotion_engine) eina_stringshare_del(config->emotion_engine); free(config); if (edd_base) { diff --git a/src/bin/config.h b/src/bin/config.h index 3e4f51e..510292e 100644 --- a/src/bin/config.h +++ b/src/bin/config.h @@ -5,7 +5,7 @@ typedef struct _Config Config; struct _Config { - const char *emotion_engine; + int version; // dummy - unused atm }; void config_init(void); diff --git a/src/bin/main.c b/src/bin/main.c index e1a4fc3..3313a7c 100644 --- a/src/bin/main.c +++ b/src/bin/main.c @@ -192,9 +192,6 @@ elm_main(int argc, char **argv) "\n" " -f\n" " Enable fullscreen mode at start\n" - " -e ENGINE\n" - " ENGINE is one of gstreamer1, xine or vlc\n" - " The default is gstreamer1\n" "\n" " -sub SUBTITLE_FILE\n" " This sets the subtitle file to use for the\n" @@ -209,15 +206,6 @@ elm_main(int argc, char **argv) , DEPTH_DEFAULT); exit(0); } - else if (!strcmp(argv[i], "-e")) - { - if (i < (argc - 1)) - { - i++; - eina_stringshare_del(config->emotion_engine); - config->emotion_engine = eina_stringshare_add(argv[i]); - } - } else if (!strcmp(argv[i], "-f")) { fullscreen = EINA_TRUE; diff --git a/src/bin/thumb.c b/src/bin/thumb.c index b7f33d6..ce0012d 100644 --- a/src/bin/thumb.c +++ b/src/bin/thumb.c @@ -196,7 +196,6 @@ _local_artwork_poster(Evas_Object *win, const char *path_to_file) { Evas_Object *em = emotion_object_add(evas_object_evas_get(win)); - emotion_object_init(em, NULL); emotion_object_file_set(em, path_to_file); char *path = albumart_file_get(path_to_file); @@ -277,13 +276,11 @@ elm_main(int argc, char **argv) goto out; } - if (emotion_object_init(vid, NULL)) - { - evas_object_smart_callback_add(vid, "open_done", _cb_loaded, file); - emotion_object_file_set(vid, file); - vid_timeout = ecore_timer_add(360.0, _cb_timeout, NULL); - elm_run(); - } + evas_object_smart_callback_add(vid, "open_done", _cb_loaded, file); + emotion_object_file_set(vid, file); + vid_timeout = ecore_timer_add(360.0, _cb_timeout, NULL); + elm_run(); + out: elm_shutdown(); diff --git a/src/bin/video.c b/src/bin/video.c index d90770a..d56f31e 100644 --- a/src/bin/video.c +++ b/src/bin/video.c @@ -581,12 +581,6 @@ video_add(Evas_Object *parent) o = sd->o_vid = emotion_object_add(evas_object_evas_get(obj)); emotion_object_keep_aspect_set(o, EMOTION_ASPECT_KEEP_NONE); config = config_get(); - if (!emotion_object_init(o, config->emotion_engine)) - { - evas_object_del(sd->o_vid); - sd->o_vid = NULL; - return obj; - } evas_object_smart_callback_add(o, "frame_decode", _cb_vid_frame, obj); evas_object_smart_callback_add(o, "frame_resize", _cb_vid_resize, obj); evas_object_smart_callback_add(o, "decode_stop", _cb_vid_stop, obj);