remove emotion obj init as its pretty pointless these days

v-0.4.0
Carsten Haitzler 3 years ago
parent 8d8a210798
commit 65a614e5e2
  1. 6
      src/bin/config.c
  2. 2
      src/bin/config.h
  3. 12
      src/bin/main.c
  4. 13
      src/bin/thumb.c
  5. 6
      src/bin/video.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)
{

@ -5,7 +5,7 @@ typedef struct _Config Config;
struct _Config
{
const char *emotion_engine;
int version; // dummy - unused atm
};
void config_init(void);

@ -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;

@ -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();

@ -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);

Loading…
Cancel
Save