Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src/bin Modified Files: ewl_media_test.c Log Message: - API breakage. - ewl_media_new now takes no parameters - the module to use for emotion is now set through an enum in ewl, so you don't have to know what the names of the emotion decoders are. - formatting - type checking =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/bin/ewl_media_test.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -3 -r1.9 -r1.10 --- ewl_media_test.c 21 Oct 2005 04:13:03 -0000 1.9 +++ ewl_media_test.c 24 Oct 2005 02:52:06 -0000 1.10 @@ -171,18 +171,24 @@ { Ewl_Widget *win = NULL, *o = NULL, *b = NULL; Ewl_Widget *controls = NULL, *time = NULL; - char * module = NULL; + Ewl_Media_Module_Type type = EWL_MEDIA_MODULE_XINE; char * file = NULL; + int i; if (!ewl_init(&argc, argv)) { printf("Can't init ewl"); return 1; } - if (argc > 1) { - module = argv[1]; - if (argc > 2) - file = argv[2]; + for (i = 1; i < argc; i++) + { + if (!strcmp(argv[i], "-gstreamer")) + type = EWL_MEDIA_MODULE_GSTREAMER; + + else if (!strcmp(argv[i], "-xine")) + type = EWL_MEDIA_MODULE_XINE; + else + file = argv[i]; } win = ewl_window_new(); @@ -206,8 +212,10 @@ ewl_text_text_set(EWL_TEXT(time), "00:00:00"); /* the video */ - video = ewl_media_new(module, file); + video = ewl_media_new(); ewl_container_child_append(EWL_CONTAINER(b), video); + ewl_media_module_set(EWL_MEDIA(video), type); + ewl_media_media_set(EWL_MEDIA(video), file); ewl_object_fill_policy_set(EWL_OBJECT(video), EWL_FLAG_FILL_ALL); ewl_callback_append(video, EWL_CALLBACK_REALIZE, video_realize_cb, NULL); ewl_callback_append(video, EWL_CALLBACK_VALUE_CHANGED, video_change_cb, time); ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs