Enlightenment CVS committal Author : moom16 Project : e17 Module : apps/eclair
Dir : e17/apps/eclair/src Modified Files: eclair.c eclair.h eclair_args.c eclair_types.h eclair_video.c Log Message: * Eclair works with the new API of emotion. It still needs some work when the emotion module can't be open. =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -3 -r1.28 -r1.29 --- eclair.c 10 Jul 2005 19:15:21 -0000 1.28 +++ eclair.c 2 Oct 2005 09:09:11 -0000 1.29 @@ -58,6 +58,7 @@ eclair->drop_object = ECLAIR_DROP_NONE; eclair->drop_window = NULL; eclair->video_engine = ECLAIR_SOFTWARE; + eclair->video_module = ECLAIR_VIDEO_XINE; eclair->start_playing = 0; if (!eclair_args_parse(eclair, &filenames)) =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- eclair.h 5 Sep 2005 15:27:30 -0000 1.13 +++ eclair.h 2 Oct 2005 09:09:11 -0000 1.14 @@ -37,6 +37,7 @@ //Video related vars Eclair_Video video; Eclair_Engine video_engine; + Eclair_Video_Module video_module; //Gui related vars Eclair_Window *gui_window; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair_args.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- eclair_args.c 10 Jul 2005 19:15:21 -0000 1.8 +++ eclair_args.c 2 Oct 2005 09:09:11 -0000 1.9 @@ -17,13 +17,14 @@ { "theme", required_argument, NULL, 't' }, { "gui-engine", required_argument, NULL, 'g' }, { "video-engine", required_argument, NULL, 'v' }, + { "video-module", required_argument, NULL, 'm' }, { NULL, 0, NULL, 0 } }; if (!eclair || (argc = *eclair->argc) <= 0 || !(argv = *eclair->argv)) return 0; - while ((c = getopt_long(argc, argv, "ht:g:v:", long_options, NULL)) != -1) + while ((c = getopt_long(argc, argv, "ht:g:v:m:", long_options, NULL)) != -1) { switch (c) { @@ -59,6 +60,17 @@ return 0; } break; + case 'm': + if (strcmp(optarg, "xine") == 0) + eclair->video_module = ECLAIR_VIDEO_XINE; + else if (strcmp(optarg, "gstreamer") == 0) + eclair->video_engine = ECLAIR_VIDEO_GSTREAMER; + else + { + _eclair_args_print_usage(); + return 0; + } + break; default: _eclair_args_print_usage(); return 0; @@ -81,5 +93,6 @@ "-h, --help Print this message and exit\n" "-t, --theme Specify an edj theme file for eclair\n" "-g, --gui-engine [software|gl] Specify the gui engine\n" - "-v, --video-engine [software|gl] Specify the video engine\n"); + "-v, --video-engine [software|gl] Specify the video engine\n" + "-m, --video-module [xine|gstreamer] Specify the video module\n"); } =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair_types.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- eclair_types.h 13 Jul 2005 21:27:43 -0000 1.2 +++ eclair_types.h 2 Oct 2005 09:09:11 -0000 1.3 @@ -2,6 +2,7 @@ #define _ECLAIR_TYPES_H_ typedef enum _Eclair_State Eclair_State; +typedef enum _Eclair_Video_Module Eclair_Video_Module; typedef enum _Eclair_Engine Eclair_Engine; typedef enum _Eclair_Drop_Object Eclair_Drop_Object; typedef enum _Eclair_Add_File_State Eclair_Add_File_State; @@ -31,6 +32,12 @@ ECLAIR_GL }; +enum _Eclair_Video_Module +{ + ECLAIR_VIDEO_XINE, + ECLAIR_VIDEO_GSTREAMER +}; + enum _Eclair_Add_File_State { ECLAIR_IDLE = 0, =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/eclair/src/eclair_video.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- eclair_video.c 10 Jul 2005 19:15:22 -0000 1.2 +++ eclair_video.c 2 Oct 2005 09:09:11 -0000 1.3 @@ -80,6 +80,7 @@ Eclair *eclair; Evas *evas; Evas_Object *new_video_object; + int result = 0; if (!(video = param) || !(eclair = video->eclair)) return NULL; @@ -93,7 +94,21 @@ evas_object_layer_set(new_video_object, 1); evas_object_show(new_video_object); - emotion_object_init(new_video_object); + switch (eclair->video_module) + { + case ECLAIR_VIDEO_GSTREAMER: + result |= emotion_object_init(new_video_object, "emotion_decoder_gstreamer.so"); + break; + case ECLAIR_VIDEO_XINE: + default: + result |= emotion_object_init(new_video_object, "emotion_decoder_xine.so"); + break; + } + if (!result) + { + evas_object_del(new_video_object); + return NULL; + } evas_object_focus_set(new_video_object, 1); evas_object_event_callback_add(new_video_object, EVAS_CALLBACK_KEY_DOWN, eclair_key_press_cb, eclair); ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs