toxine-cvs Mailing List for toxine (Page 4)
Brought to you by:
f1rmb
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(19) |
Jul
(81) |
Aug
(18) |
Sep
(38) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(24) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
(23) |
May
(36) |
Jun
(7) |
Jul
(29) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-12 12:59:02
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13086/plugins Modified Files: vo_x11.c Log Message: update help Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- vo_x11.c 12 Apr 2004 12:35:38 -0000 1.28 +++ vo_x11.c 12 Apr 2004 12:45:14 -0000 1.29 @@ -1152,11 +1152,12 @@ return "Video out plugin supports Xv, Xshm, DXR3/H+ overlay and Vidix drivers.\n" "\tShortcuts are:\n" - "\tf, F\t\t: Fullscreen toggle.\n" - "\t<space>\t\t: Pause/Resume toggle.\n" - "\t<up>\t\t: Increase playback speed\n" - "\t<down>\t\t: Decrease playback speed\n" - "\t<backspace>\t: Reset playback speed\n"; + "\t1\t\t: Stream size 1:1,\n" + "\tf, F\t\t: Fullscreen toggle,\n" + "\t<space>\t\t: Pause/Resume toggle,\n" + "\t<up>\t\t: Increase playback speed,\n" + "\t<down>\t\t: Decrease playback speed,\n" + "\t<backspace>\t: Reset playback speed.\n"; } /* |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-12 12:49:26
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11273 Modified Files: vo_x11.c Log Message: permit resizing Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- vo_x11.c 11 Apr 2004 13:29:39 -0000 1.27 +++ vo_x11.c 12 Apr 2004 12:35:38 -0000 1.28 @@ -105,6 +105,9 @@ pthread_t timed_thread; + int frame_width; + int frame_height; + pthread_mutex_t mutex; } x11_private_t; @@ -398,23 +401,21 @@ *dest_x = 0; *dest_y = 0; - if(!private->fullscreen) { - - if(((video_width > 0) && (video_height > 0)) && - ((video_width != private->x11_drawable[private->fullscreen].video_width) || - (video_height != private->x11_drawable[private->fullscreen].video_height))) { - + if((private->frame_width == -1) && (private->frame_height == -1)) { + private->x11_drawable[private->fullscreen].video_width = video_width; + private->x11_drawable[private->fullscreen].video_height = video_height; + if(!private->fullscreen) { XLockDisplay(private->display); XResizeWindow(private->display, private->x11_drawable[private->fullscreen].video_window, - video_width, video_height); - XFlush(private->display); + private->x11_drawable[private->fullscreen].video_width, + private->x11_drawable[private->fullscreen].video_height); XUnlockDisplay(private->display); } - - private->x11_drawable[private->fullscreen].video_width = video_width; - private->x11_drawable[private->fullscreen].video_height = video_height; } - + + private->frame_width = video_width; + private->frame_height = video_height; + *dest_width = private->x11_drawable[private->fullscreen].video_width; *dest_height = private->x11_drawable[private->fullscreen].video_height; @@ -552,7 +553,9 @@ private->x11_drawable[private->fullscreen].video_width = 720; private->x11_drawable[private->fullscreen].video_height = 576; - + private->frame_width = -1; + private->frame_height = -1; + /* Setup windowed window */ hint.x = 0; hint.y = 0; @@ -804,6 +807,22 @@ XUnlockDisplay(private->display); switch (ksym) { + /* 1:1 */ + case XK_1: + case XK_KP_1: + pthread_mutex_lock(&private->mutex); + private->x11_drawable[0].video_width = private->frame_width; + private->x11_drawable[0].video_height = private->frame_height; + if(!private->fullscreen) { + XLockDisplay(private->display); + XResizeWindow(private->display, private->x11_drawable[private->fullscreen].video_window, + private->x11_drawable[private->fullscreen].video_width, + private->x11_drawable[private->fullscreen].video_height); + XUnlockDisplay(private->display); + } + pthread_mutex_unlock(&private->mutex); + break; + /* Fullscreen toggle */ case XK_f: case XK_F: @@ -927,11 +946,22 @@ pthread_mutex_lock(&private->mutex); if(xev->xany.window == private->x11_drawable[private->fullscreen].video_window) { + XConfigureEvent *cev = (XConfigureEvent *) xev; - translate_coords(private->display, - private->x11_drawable[private->fullscreen].video_window, - &private->x11_drawable[private->fullscreen].x, - &private->x11_drawable[private->fullscreen].y); + private->x11_drawable[private->fullscreen].video_width = cev->width; + private->x11_drawable[private->fullscreen].video_height = cev->height; + + if((cev->x == 0) && (cev->y == 0)) { + translate_coords(private->display, + private->x11_drawable[private->fullscreen].video_window, + &private->x11_drawable[private->fullscreen].x, + &private->x11_drawable[private->fullscreen].y); + } + else { + private->x11_drawable[private->fullscreen].x = cev->x; + private->x11_drawable[private->fullscreen].y = cev->y; + } + #if 0 printf("CONFIGURE X %d, Y %d ** w %d, h %d ** 0x%lx\n", private->x11_drawable[private->fullscreen].x, |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-12 12:48:40
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11144 Modified Files: commands.c Log Message: fix segfault Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- commands.c 11 Apr 2004 13:29:38 -0000 1.60 +++ commands.c 12 Apr 2004 12:34:51 -0000 1.61 @@ -1188,6 +1188,7 @@ static void do_play(commands_t *command, toxine_t *tox, void *data) { return_if_no_init(tox); + return_if_no_stream(tox); if(tox->command.num_args) toxine_set_current_mrl(tox, (toxine_get_arg(tox, 1))); |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-11 13:45:42
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14534 Modified Files: loader.c Log Message: local build, again... ;-) Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- loader.c 11 Apr 2004 13:29:38 -0000 1.14 +++ loader.c 11 Apr 2004 13:32:04 -0000 1.15 @@ -35,7 +35,7 @@ extern int errno; -#define LOCAL_BUILD 1 +/* #define LOCAL_BUILD 1 */ #ifdef LOCAL_BUILD #undef TOXINE_PLUGINDIR #define TOXINE_PLUGINDIR "plugins/.libs" |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-11 13:43:18
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14067/plugins Modified Files: vo_x11.c Log Message: return of echo command. add 'display events <bool>' Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- vo_x11.c 9 Apr 2004 17:43:14 -0000 1.26 +++ vo_x11.c 11 Apr 2004 13:29:39 -0000 1.27 @@ -788,9 +788,6 @@ char kbuf[256]; int len; - if(tox->script.in_use) - return; - if((!private->cursor.visible) #ifdef HAVE_XTESTEXTENSION && (xev->xkey.keycode != private->fake_key) @@ -991,7 +988,7 @@ /* While event isn't completion */ while(got_xevent == True) { video_window_handle_event(&myevent, tox); - + XLockDisplay(private->display); got_xevent = XCheckIfEvent(private->display, &myevent, is_not_completion, (XPointer) NULL); XUnlockDisplay(private->display); |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-11 13:43:18
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14067 Modified Files: commands.c common.h loader.c utils.c xine_commands.c Log Message: return of echo command. add 'display events <bool>' Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -r1.59 -r1.60 --- commands.c 8 Apr 2004 15:35:36 -0000 1.59 +++ commands.c 11 Apr 2004 13:29:38 -0000 1.60 @@ -192,6 +192,7 @@ { "display", REQUIRE_ARGS, do_display, "Display some status", "display current <[position | time]>\n" + "display events <[yes | no | 1 | 0 | true | false] | [status]>\n" "display settings" }, { "down", NO_ARGS, do_events, @@ -516,16 +517,18 @@ break; } - pinfo("Get xine event:\n"); - poutalign(); - for(i = 0; event_struct[i].name != NULL; i++) { - if(event_struct[i].event == tox->event.last.type) { - event_name = event_struct[i].name; - break; + if(tox->display_events) { + pinfo("Get xine event:\n"); + poutalign(); + for(i = 0; event_struct[i].name != NULL; i++) { + if(event_struct[i].event == tox->event.last.type) { + event_name = event_struct[i].name; + break; + } } + pout("%s", (event_name) ? event_name : "UNKNOWN EVENT"); + pinfo("\n"); } - pout("%s", (event_name) ? event_name : "UNKNOWN EVENT"); - pinfo("\n"); if(tox->video.cur_plugin && tox->video.cur_plugin->receive_xine_event) tox->video.cur_plugin->receive_xine_event(tox, event); @@ -1764,6 +1767,7 @@ pinfo("\n"); pinfo(" Xine engine:\n"); pinfo(" initialized: '%s'\n", (tox->xine) ? "YES" : "NO"); + pinfo(" display events: '%s'\n", (tox->display_events) ? "YES" : "NO"); pinfo("\n"); pinfo(" Video:\n"); pinfo(" number of toxine plugins: '%d'\n", tox->video.plugins_num); @@ -1816,6 +1820,15 @@ } } + else if(toxine_is_arg_contain(tox, 1, "events")) { + const char *arg = toxine_get_arg(tox, 2); + + if(toxine_is_arg_contain(tox, 2, "status")) { + pinfo("Display events: %s\n", (tox->display_events) ? "YES" : "NO"); + } + else + tox->display_events = toxine_get_bool_value(arg); + } } } @@ -2242,15 +2255,13 @@ static char *get_var(toxine_t *tox, const char *var) { -#warning FIXME -#if 0 if(tox && var) { char *variable; variable = strchr(var, '$'); if(variable && (*variable == '$') && (*(variable + 1) != '$')) { - static char buffer[_PATH_MAX + _NAME_MAX + 1]; + static char buffer[32768]; char varname[1024]; int found = 0; @@ -2270,23 +2281,33 @@ found = 0; if(!strncasecmp(varname, "result", 6)) { - sprintf(buffer, "%d", toxine_get_last_int_result(tox)); + snprintf(buffer, sizeof(buffer), "%d", toxine_get_last_int_result(tox)); found = 1; } else if(!strncasecmp(varname, "cresult", 7)) { - sprintf(buffer, "%s", toxine_get_last_char_result(tox)); + snprintf(buffer, sizeof(buffer), "%s", toxine_get_last_char_result(tox)); + found = 1; + } + else if(!strncasecmp(varname, "cxresult", 7)) { + char *p = toxine_get_last_char_result(tox); + if(p) { + int val = strtol(p, &p, 10); + snprintf(buffer, sizeof(buffer), "0x%x", val); + } + else + snprintf(buffer, sizeof(buffer), "Nothing available"); found = 1; } else if(!strncasecmp(varname, "iresult", 7)) { - sprintf(buffer, "%d", toxine_get_last_int_result(tox)); + snprintf(buffer, sizeof(buffer), "%d", toxine_get_last_int_result(tox)); found = 1; } else if(!strncasecmp(varname, "xresult", 7)) { - sprintf(buffer, "0x%x", toxine_get_last_int_result(tox)); + snprintf(buffer, sizeof(buffer), "0x%x", toxine_get_last_int_result(tox)); found = 1; } else if(!strncasecmp(varname, "version", 7)) { - sprintf(buffer, "%s", VERSION); + snprintf(buffer, sizeof(buffer), "%s", VERSION); found = 1; } else if(!strncasecmp(varname, "date", 4)) { @@ -2295,9 +2316,9 @@ time(&curtime); lt = localtime(&curtime); - sprintf(buffer, "%-3.3s %-3.3s %d %d", - day_names + 3 * lt->tm_wday, month_names + 3 * lt->tm_mon, - lt->tm_mday, (lt->tm_year + 1900)); + snprintf(buffer, sizeof(buffer), "%-3.3s %-3.3s %d %d", + day_names + 3 * lt->tm_wday, month_names + 3 * lt->tm_mon, + lt->tm_mday, (lt->tm_year + 1900)); found = 1; } else if(!strncasecmp(varname, "time", 4)) { @@ -2306,27 +2327,27 @@ time(&curtime); lt = localtime(&curtime); - sprintf(buffer, "%02d:%02d:%02d", lt->tm_hour, lt->tm_min, lt->tm_sec); + snprintf(buffer, sizeof(buffer), "%02d:%02d:%02d", lt->tm_hour, lt->tm_min, lt->tm_sec); found = 1; } else if(!strncasecmp(varname, "config_file", 11)) { - sprintf(buffer, "%s", (tox->configfile) ? tox->configfile : "UNSET"); + snprintf(buffer, sizeof(buffer), "%s", (tox->configfile) ? tox->configfile : "UNSET"); found = 1; } else if(!strncasecmp(varname, "video_driver", 12)) { - sprintf(buffer, "%s", (tox->video.name) ? tox->video.name : "UNSET"); + snprintf(buffer, sizeof(buffer), "%s", (tox->video.name) ? tox->video.name : "UNSET"); found = 1; } else if(!strncasecmp(varname, "audio_driver", 12)) { - sprintf(buffer, "%s", (tox->audio.name) ? tox->audio.name : "UNSET"); + snprintf(buffer, sizeof(buffer), "%s", (tox->audio.name) ? tox->audio.name : "UNSET"); found = 1; } else if(!strncasecmp(varname, "mrl", 3)) { - sprintf(buffer, "%s", (tox->current_mrl) ? tox->current_mrl : "UNSET"); + snprintf(buffer, sizeof(buffer), "%s", (tox->current_mrl) ? tox->current_mrl : "UNSET"); found = 1; } else if(!strncasecmp(varname, "script_file", 11)) { - sprintf(buffer, "%s", (tox->script.filename) ? tox->script.filename : "UNSET"); + snprintf(buffer, sizeof(buffer), "%s", (tox->script.filename) ? tox->script.filename : "UNSET"); found = 1; } @@ -2336,7 +2357,7 @@ } } } -#endif + return NULL; } Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- common.h 7 Apr 2004 18:21:07 -0000 1.25 +++ common.h 11 Apr 2004 13:29:38 -0000 1.26 @@ -175,8 +175,9 @@ xine_event_queue_t *event_queue; int autoinit; int running; + int display_events; - // char *last_result; + char *last_result; char *configfile; uint32_t xine_state; /* bitfield, see XINE_* */ Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- loader.c 8 Apr 2004 15:36:30 -0000 1.13 +++ loader.c 11 Apr 2004 13:29:38 -0000 1.14 @@ -35,7 +35,7 @@ extern int errno; -/* #define LOCAL_BUILD 1 */ +#define LOCAL_BUILD 1 #ifdef LOCAL_BUILD #undef TOXINE_PLUGINDIR #define TOXINE_PLUGINDIR "plugins/.libs" Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- utils.c 7 Apr 2004 18:21:07 -0000 1.24 +++ utils.c 11 Apr 2004 13:29:38 -0000 1.25 @@ -435,44 +435,55 @@ return 1; } -#if 0 /* * */ void toxine_set_last_char_result(toxine_t *tox, const char *result) { - if(tox && result) { - if(tox->last_result) - tox->last_result = (char *) realloc(tox->last_result, sizeof(char *) * (strlen(result) + 1)); - else - tox->last_result = (char *) xine_xmalloc(sizeof(char *) * (strlen(result) + 1)); - - memset(tox->last_result, 0, sizeof(tox->last_result)); - sprintf(tox->last_result, "%s", result); + if(tox) { + if(result) { + if(tox->last_result) + tox->last_result = (char *) realloc(tox->last_result, (strlen(result) + 1)); + else + tox->last_result = (char *) xine_xmalloc(strlen(result) + 1); + + memset(tox->last_result, 0, sizeof(tox->last_result)); + sprintf(tox->last_result, "%s", result); + } + else { + free(tox->last_result); + tox->last_result = NULL; + } } } void toxine_set_last_achar_result(toxine_t *tox, const char *const *result) { - if(tox && result) { - int i = 0; - int len = 0; - - while(result[i] != NULL) - len += strlen(result[i++]); - - len += ((2 * (i - 1)) + 1); - - if(tox->last_result) - tox->last_result = (char *) realloc(tox->last_result, sizeof(char *) * (len + 1)); - else - tox->last_result = (char *) xine_xmalloc(sizeof(char *) * (len + 1)); - - memset(tox->last_result, 0, sizeof(tox->last_result)); - - i = 0; - while(result[i] != NULL) { - if(i > 0) - strcat(tox->last_result, ", "); - strcat(tox->last_result, result[i++]); + if(tox) { + if(result) { + int i = 0; + int len = 0; + + while(result[i] != NULL) + len += strlen(result[i++]); + + len += ((2 * (i - 1)) + 1); + + if(tox->last_result) + tox->last_result = (char *) realloc(tox->last_result, (len + 1)); + else + tox->last_result = (char *) xine_xmalloc(len + 1); + + memset(tox->last_result, 0, sizeof(tox->last_result)); + + i = 0; + while(result[i] != NULL) { + if(i > 0) + strcat(tox->last_result, ", "); + strcat(tox->last_result, result[i++]); + } + } + else { + free(tox->last_result); + tox->last_result = NULL; } } } @@ -495,17 +506,26 @@ } int toxine_get_last_int_result(toxine_t *tox) { - if(tox && (tox->last_result)) - return (atoi(tox->last_result)); + int retval = 0; + + if(tox && (tox->last_result)) { + char *p = tox->last_result; + + retval = strtol(p, &p, 10); + } return 0; } void toxine_unset_last_result(toxine_t *tox) { - if(tox) - toxine_set_last_int_result(tox, -1); + if(tox) { + if(tox->last_result) { + free(tox->last_result); + tox->last_result = NULL; + } + } } -#endif + static void _config_update(toxine_t *tox, _cfg_entry_t *entry, int type, int min, int max, int value, char *string) { Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- xine_commands.c 8 Apr 2004 16:28:03 -0000 1.43 +++ xine_commands.c 11 Apr 2004 13:29:38 -0000 1.44 @@ -434,6 +434,7 @@ */ void _xine_new(commands_t *command, toxine_t *tox, void *data) { + toxine_unset_last_result(tox); if(tox->xine) { pinfo("Exiting old xine instance\n"); _xine_exit(NULL, tox, NULL); @@ -442,9 +443,9 @@ pinfo("xine_new():\n"); tox->xine = xine_new(); pinfo(".\n"); - + tox->xine_state |= XINE_NEW; - // toxine_set_last_int_result(tox, (int)tox->xine); + toxine_set_last_int_result(tox, (int)tox->xine); _xine_config_load(NULL, tox, NULL); } @@ -466,8 +467,10 @@ tox->stream = xine_stream_new(tox->xine, tox->audio.port, tox->video.port); pinfo(".\n"); - if(tox->stream) + if(tox->stream) { tox->xine_state |= XINE_STREAM; + toxine_set_last_int_result(tox, (int)tox->stream); + } else perr("Wow, xine_stream_new() failed.\n"); @@ -480,7 +483,7 @@ */ void _xine_init(commands_t *command, toxine_t *tox, void *data) { - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); if(tox->xine_state & XINE_INIT) { perr("xine engine already initialized.\n"); @@ -507,6 +510,8 @@ _xine_exit(NULL, tox, NULL); return; } + + toxine_set_last_int_result(tox, (int)tox->xine); } /* @@ -521,10 +526,12 @@ if(mrl) { int result; + toxine_unset_last_result(tox); toxine_set_current_mrl(tox, mrl); pinfo("xine_open(%s):\n", tox->current_mrl); result = xine_open(tox->stream, tox->current_mrl); + toxine_set_last_int_result(tox, result); pinfo("-- returned %d\n", result); tox->xine_state |= XINE_OPEN; pinfo(".\n"); @@ -541,8 +548,9 @@ int ignore_args = 0; int nargs; int need_open = 1; - - // toxine_unset_last_result(tox); + int result; + + toxine_unset_last_result(tox); return_if_no_stream(tox); /* Don't take care about arguments */ @@ -681,19 +689,23 @@ time *= 1000; if(need_open) { + pinfo("xine_open(%s) && xine_play(%d, %d):\n", mrl, start, time); - if((!xine_open(tox->stream, mrl)) || (!xine_play(tox->stream, start, time))) + if((!(result = xine_open(tox->stream, mrl))) || (!(result = xine_play(tox->stream, start, time)))) toxine_handle_xine_errors(tox); else tox->xine_state |= XINE_OPEN; + } else { pinfo("xine_play(%d, %d):\n", start, time); - if(!xine_play(tox->stream, start, time)) + if(!(result = xine_play(tox->stream, start, time))) toxine_handle_xine_errors(tox); } pinfo(".\n"); + toxine_set_last_int_result(tox, result); + if(expanded_mrl) free(expanded_mrl); } @@ -704,6 +716,7 @@ void _xine_trick_mode(commands_t *command, toxine_t *tox, void *data) { int nargs; + toxine_unset_last_result(tox); return_if_no_stream(tox); if((nargs = toxine_is_args(tox)) == 2) { @@ -723,7 +736,8 @@ value = atoi(((char *)toxine_get_arg(tox, 2))); pinfo("xine_trick_mode(%s, %d):\n", xine_tricks[i].name, value); result = xine_trick_mode(tox->stream, trick_mode, value); - pinfo("returned %d\n", result); + toxine_set_last_int_result(tox, result); + pinfo("--returned %d\n", result); } else perr("invalid trick mode: %s.\n", trick); @@ -737,7 +751,8 @@ */ void _xine_get_stream_info(commands_t *command, toxine_t *tox, void *data) { int nargs; - + + toxine_unset_last_result(tox); return_if_no_stream(tox); nargs = toxine_is_args(tox); @@ -756,6 +771,7 @@ pinfo("xine_get_stream_info(%s):\n", stream_infos[i].name); stream_info = xine_get_stream_info(tox->stream, stream_infos[i].type); + toxine_set_last_int_result(tox, stream_info); toxine_show_stream_info(stream_infos[i].type, stream_info); pinfo(".\n"); } @@ -764,7 +780,8 @@ void _xine_get_meta_info(commands_t *command, toxine_t *tox, void *data) { int nargs; - + + toxine_unset_last_result(tox); return_if_no_stream(tox); nargs = toxine_is_args(tox); @@ -783,6 +800,8 @@ pinfo("xine_get_meta_info(%s):\n", meta_infos[i].name); meta_info = xine_get_meta_info(tox->stream, stream_infos[i].type); + toxine_set_last_char_result(tox, meta_info); + switch(meta_infos[i].type) { case XINE_META_INFO_TITLE: case XINE_META_INFO_COMMENT: @@ -805,7 +824,7 @@ * */ void _xine_stop(commands_t *command, toxine_t *tox, void *data) { - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_stream(tox); tox->ignore_finished = 1; pinfo("xine_stop():\n"); @@ -819,12 +838,12 @@ void _xine_eject(commands_t *command, toxine_t *tox, void *data) { int retval; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_stream(tox); pinfo("xine_eject():\n"); retval = xine_eject(tox->stream); - // toxine_set_last_int_result(tox, retval); + toxine_set_last_int_result(tox, retval); pinfo("returned %d.\n", retval); pinfo(".\n"); } @@ -833,8 +852,8 @@ * */ void _xine_exit(commands_t *command, toxine_t *tox, void *data) { - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_new(tox); toxine_config_save(tox); @@ -882,10 +901,12 @@ int xine_errno; char buffer[2048]; + toxine_unset_last_result(tox); return_if_no_stream(tox); pinfo("xine_get_error():\n"); xine_errno = xine_get_error(tox->stream); + toxine_set_last_int_result(tox, xine_errno); sprintf(buffer, "returned %d (", xine_errno); @@ -916,12 +937,12 @@ void _xine_get_status(commands_t *command, toxine_t *tox, void *data) { int i, found = 0, status; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_stream(tox); pinfo("xine_get_status():\n"); status = xine_get_status(tox->stream); - // toxine_set_last_int_result(tox, status); + toxine_set_last_int_result(tox, status); for(i = 0; xine_status[i].name != NULL; i++) { if(status == xine_status[i].status) { @@ -938,7 +959,8 @@ * */ void _xine_set_param(commands_t *command, toxine_t *tox, void *data) { - + + toxine_unset_last_result(tox); return_if_no_stream(tox); if((toxine_is_args(tox)) >= 2) { @@ -1038,6 +1060,7 @@ const char *param; int i, found = -1; + toxine_unset_last_result(tox); return_if_no_stream(tox); param = toxine_get_arg(tox, 1); @@ -1053,6 +1076,7 @@ pinfo("xine_get_param(%s):\n", xine_params[i].name); result = xine_get_param(tox->stream, xine_params[i].param); + toxine_set_last_int_result(tox, result); pinfo("returned [%d]:\n", result); switch(xine_params[i].param) { @@ -1170,7 +1194,8 @@ char lang[20]; int channel; int ret; - + + toxine_unset_last_result(tox); return_if_no_stream(tox); if(toxine_is_args(tox)) @@ -1180,7 +1205,7 @@ pinfo("xine_get_audio_lang(%d):\n", channel); ret = xine_get_audio_lang(tox->stream, channel, &lang[0]); - // toxine_set_last_char_result(tox, buffer); + toxine_set_last_int_result(tox, ret); poutalign(); pout("'%s'\n", lang); pinfo(".\n"); @@ -1194,6 +1219,7 @@ int channel; int ret; + toxine_unset_last_result(tox); return_if_no_stream(tox); if(toxine_is_args(tox)) @@ -1203,8 +1229,8 @@ pinfo("xine_get_spu_lang(%d):\n", channel); - ret= xine_get_spu_lang(tox->stream, channel, &lang[0]); - // toxine_set_last_char_result(tox, buffer); + ret = xine_get_spu_lang(tox->stream, channel, &lang[0]); + toxine_set_last_int_result(tox, ret); poutalign(); pout("'%s'\n", lang); pinfo(".\n"); @@ -1217,10 +1243,12 @@ int result, stream, time, length; int stime, slength; + toxine_unset_last_result(tox); return_if_no_stream(tox); pinfo("xine_get_pos_length():\n"); result = xine_get_pos_length (tox->stream, &stream, &time, &length); + toxine_set_last_int_result(tox, result); stime = time / 1000; slength = length / 1000; toxine_draw_bar("", 0, length, time); @@ -1242,11 +1270,14 @@ const char *log = NULL, *bufname; const char *const *log_names; + toxine_unset_last_result(tox); return_if_no_init(tox); bufname = toxine_get_arg(tox, 1); log_names = xine_get_log_names(tox->xine); + toxine_set_last_achar_result(tox, log_names); + if(log_names) { int i; @@ -1270,6 +1301,7 @@ pinfo("xine_get_log(%s):\n", log); logs = xine_get_log(tox->xine, buftype); + toxine_set_last_achar_result(tox, logs); if(logs) { char buffer[2048]; @@ -1293,12 +1325,14 @@ const char *log; char buffer[2048]; + toxine_unset_last_result(tox); return_if_no_init(tox); memset(&buffer, 0, sizeof(buffer)); pinfo("xine_get_log_names():\n"); log_names = xine_get_log_names(tox->xine); + toxine_set_last_achar_result(tox, log_names); if(log_names) { for(log = *log_names++; log; log = *log_names++) { if(strlen(buffer)) @@ -1318,9 +1352,11 @@ void _xine_get_log_section_count(commands_t *command, toxine_t *tox, void *data) { int count; + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_get_log_section_count():\n"); count = xine_get_log_section_count(tox->xine); + toxine_set_last_int_result(tox, count); pinfo("returned %d\n", count); pinfo(".\n"); @@ -1334,6 +1370,7 @@ const char *msg, *log = NULL, *bufname; const char *const *log_names; + toxine_unset_last_result(tox); return_if_no_init(tox); bufname = toxine_get_arg(tox, 1); @@ -1372,16 +1409,16 @@ void _xine_get_browsable_input_plugin_ids(commands_t *command, toxine_t *tox, void *data) { const char *const *inpp; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_get_browsable_input_plugin_ids():\n"); inpp = xine_get_browsable_input_plugin_ids(tox->xine); + toxine_set_last_achar_result(tox, inpp); if(inpp) { char buffer[4096]; const char *ipid; - // toxine_set_last_achar_result(tox, inpp); memset(&buffer, 0, sizeof(buffer)); pinfo("Available identifier of browsable input plugins are:\n"); @@ -1406,7 +1443,7 @@ void _xine_get_browse_mrls(commands_t *command, toxine_t *tox, void *data) { int nargs; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_init(tox); if((nargs = toxine_is_args(tox))) { @@ -1425,6 +1462,16 @@ pinfo("xine_get_browse_mrls(%s,%s):\n", pname, smrl); bmrls = xine_get_browse_mrls(tox->xine, pname, smrl, &mrls); + { + char *p[mrls + 1]; + + for(i = 0; i < mrls; i++) { + p[i] = bmrls[i]->mrl; + } + p[i] = NULL; + toxine_set_last_achar_result(tox, (const char *const *)p); + } + if(bmrls) { for(i = 0; i < mrls; i++) { const xine_mrl_t *mrl = bmrls[i]; @@ -1489,17 +1536,17 @@ void _xine_get_autoplay_input_plugin_ids(commands_t *command, toxine_t *tox, void *data) { const char *const *inpp; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_get_autoplay_input_plugin_ids():\n"); inpp = xine_get_autoplay_input_plugin_ids(tox->xine); + toxine_set_last_achar_result(tox, inpp); if(inpp) { char buffer[4096]; const char *ipid; - // toxine_set_last_achar_result(tox, inpp); memset(&buffer, 0, sizeof(buffer)); pinfo("Available identifier of autoplay featured input plugins are:\n"); @@ -1525,7 +1572,7 @@ */ void _xine_get_autoplay_mrls(commands_t *command, toxine_t *tox, void *data) { - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_init(tox); if(toxine_is_args(tox)) { @@ -1536,11 +1583,9 @@ pname = toxine_get_arg(tox, 1); pinfo("xine_get_autoplay_mrls(%s):\n", pname); ap = xine_get_autoplay_mrls(tox->xine, pname, &mrls); + toxine_set_last_achar_result(tox, (const char *const *)ap); if(ap) { - - // toxine_set_last_achar_result(tox, ap); - for(i = 0; i < mrls; i++) pinfo("%s\n", ap[i]); @@ -1556,7 +1601,7 @@ */ void _xine_get_input_plugin_description(commands_t *command, toxine_t *tox, void *data) { - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_init(tox); if(toxine_is_args(tox)) { @@ -1566,7 +1611,7 @@ pname = toxine_get_arg(tox, 1); pinfo("xine_get_input_plugin_description(%s):\n", pname); ipd = xine_get_input_plugin_description(tox->xine, pname); - // toxine_set_last_char_result(tox, ipd); + toxine_set_last_char_result(tox, ipd); if(ipd) { pinfo("description of '%s' plugin id is:\n", pname); pinfo("%s\n", ipd); @@ -1585,15 +1630,16 @@ const char *const *aop; char buffer[4096]; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_list_audio_output_plugins():\n"); aop = xine_list_audio_output_plugins(tox->xine); + toxine_set_last_achar_result(tox, aop); + if(aop) { const char *aopn; - - // toxine_set_last_achar_result(tox, aop); + pinfo("Available audio output plugins are:\n"); memset(&buffer, 0, sizeof(buffer)); for(aopn = *aop++; aopn; aopn = *aop++) { @@ -1621,14 +1667,15 @@ const char *const *vop; char buffer[4096]; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_list_video_output_plugins():\n"); vop = xine_list_video_output_plugins(tox->xine); + toxine_set_last_achar_result(tox, vop); + if(vop) { const char *vopn; - // toxine_set_last_achar_result(tox, vop); pinfo("Available video output plugins are:\n"); memset(&buffer, 0, sizeof(buffer)); for(vopn = *vop++; vopn; vopn = *vop++) { @@ -1655,7 +1702,7 @@ void _xine_event_send(commands_t *command, toxine_t *tox, void *data) { int alias_event = (int) data; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); return_if_no_stream(tox); if((toxine_is_args(tox)) || (alias_event > 0)) { @@ -1703,6 +1750,7 @@ void _xine_config_get_first_entry(commands_t *command, toxine_t *tox, void *data) { _cfg_entry_t cfg_entry; + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_config_get_first_entry():\n"); @@ -1716,6 +1764,7 @@ void _xine_config_get_next_entry(commands_t *command, toxine_t *tox, void *data) { _cfg_entry_t cfg_entry; + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_config_get_next_entry():\n"); @@ -1730,6 +1779,7 @@ const char *key; _cfg_entry_t cfg_entry; + toxine_unset_last_result(tox); return_if_no_init(tox); key = toxine_get_arg(tox, 1); @@ -1746,6 +1796,7 @@ int value; _cfg_entry_t cfg_entry; + toxine_unset_last_result(tox); return_if_no_init(tox); if(toxine_is_args(tox) >= 2) { @@ -1819,6 +1870,7 @@ void _xine_config_save(commands_t *command, toxine_t *tox, void *data) { const char *filename = NULL; + toxine_unset_last_result(tox); return_if_no_init(tox); if(toxine_is_args(tox)) @@ -1830,6 +1882,8 @@ } void _xine_config_reset(commands_t *command, toxine_t *tox, void *data) { + + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_config_reset():\n"); @@ -1845,10 +1899,14 @@ */ void _xine_get_version(commands_t *command, toxine_t *tox, void *data) { int major, minor, sub; + char buffer[32]; + toxine_unset_last_result(tox); pinfo("xine_get_version():\n"); xine_get_version(&major, &minor, &sub); - // toxine_set_last_int_result(tox, version); + sprintf(buffer, "%d.%d.%d", major, minor, sub); + toxine_set_last_char_result(tox, buffer); + poutalign(); pout("'%d.%d.%d'\n", major, minor, sub); pinfo(".\n"); @@ -1860,9 +1918,10 @@ void _xine_get_version_string(commands_t *command, toxine_t *tox, void *data) { const char *result; + toxine_unset_last_result(tox); pinfo("xine_get_version_string():\n"); result = xine_get_version_string(); - // toxine_set_last_char_result(tox, result); + toxine_set_last_char_result(tox, result); poutalign(); pout("'%s'\n", result); pinfo(".\n"); @@ -1874,13 +1933,13 @@ void _xine_check_version(commands_t *command, toxine_t *tox, void *data) { int major, minor, sub, retval; - // toxine_unset_last_result(tox); + toxine_unset_last_result(tox); if(toxine_is_args(tox) >= 1) { if((sscanf((toxine_get_arg(tox, 1)), "%d.%d.%d", &major, &minor, &sub)) == 3) { pinfo("xine_check_version(%d,%d,%d):\n", major, minor, sub); retval = xine_check_version(major, minor, sub); - // toxine_set_last_int_result(tox, retval); + toxine_set_last_int_result(tox, retval); pinfo("returned %d.\n", retval); pinfo(".\n"); } @@ -1888,6 +1947,7 @@ } void _xine_close(commands_t *command, toxine_t *tox, void *data) { + toxine_unset_last_result(tox); return_if_no_stream(tox); pinfo("xine_close():\n"); @@ -1897,6 +1957,7 @@ } void _xine_dispose(commands_t *command, toxine_t *tox, void *data) { + toxine_unset_last_result(tox); return_if_no_stream(tox); if(tox->event_queue) { @@ -1916,9 +1977,11 @@ void _xine_get_file_extensions(commands_t *command, toxine_t *tox, void *data) { char *exts; + toxine_unset_last_result(tox); return_if_no_init(tox); pinfo("xine_get_file_extensions():\n"); exts = xine_get_file_extensions(tox->xine); + toxine_set_last_char_result(tox, exts); pinfo("returned: '%s'\n", (exts) ? exts : "NONE"); pinfo(".\n"); toxine_free(exts); @@ -1927,9 +1990,12 @@ void _xine_get_mime_types(commands_t *command, toxine_t *tox, void *data) { char *mimes; + toxine_unset_last_result(tox); return_if_no_init(tox); + pinfo("xine_get_mime_types():\n"); mimes = xine_get_mime_types(tox->xine); + toxine_set_last_char_result(tox, mimes); pinfo("returned: '%s'\n", (mimes) ? mimes : "NONE"); pinfo(".\n"); toxine_free(mimes); @@ -1944,7 +2010,9 @@ int ratio_code; int format; uint8_t *frame = NULL; + int result; + toxine_unset_last_result(tox); return_if_no_stream(tox); if(toxine_is_args(tox)) @@ -1965,8 +2033,8 @@ frame = (uint8_t *) xine_xmalloc(sizeof(uint8_t) * size); pinfo("xine_get_current_frame():\n"); - if(xine_get_current_frame(tox->stream, &width, &height, &ratio_code, &format, frame)) { - + if((result = xine_get_current_frame(tox->stream, &width, &height, &ratio_code, &format, frame))) { + toxine_set_last_int_result(tox, result); pinfo("get frame: %dx%d, ratio %d, format %d\n", width, height, ratio_code, format); if((fd = fopen(filename, "w+b")) != NULL) { @@ -1994,6 +2062,7 @@ void _xine_usec_sleep(commands_t *command, toxine_t *tox, void *data) { unsigned usecs; + toxine_unset_last_result(tox); usecs = (unsigned) atoi((toxine_get_arg(tox, 1))); pinfo("xine_usec_sleep(%u):\n", usecs); xine_usec_sleep(usecs); @@ -2005,18 +2074,21 @@ uint32_t iinfo; int i; + toxine_unset_last_result(tox); return_if_no_stream(tox); return_if_no_open(tox); pinfo("Meta info:\n"); for(i = 0; meta_infos[i].name != NULL; i++) { minfo = xine_get_meta_info(tox->stream, meta_infos[i].type); + toxine_set_last_char_result(tox, minfo); pinfo("%s: %s\n", meta_infos[i].name, (minfo) ? (char *) minfo : "Unavailable"); } pinfo("\n"); pinfo("Stream info:\n"); for(i = 0; stream_infos[i].name != NULL; i++) { iinfo = xine_get_stream_info(tox->stream, stream_infos[i].type); + toxine_set_last_int_result(tox, iinfo); pinfo("%s: ", stream_infos[i].name); toxine_show_stream_info(stream_infos[i].type, iinfo); } |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-09 17:56:36
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7894/src/plugins Modified Files: Makefile.am vo_aa.c vo_dxr3.c vo_none.c vo_x11.c Added Files: vo_caca.c Log Message: support cacalib output --- NEW FILE: vo_caca.c --- /* ** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ** */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h> #include <unistd.h> #include <errno.h> #include <caca.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include "common.h" typedef struct { int init; } caca_private_t; static void init_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; caca_private_t *private = (caca_private_t *) vop->private; private->init = 1; tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, XINE_VISUAL_TYPE_CACA, NULL); if(tox->video.port == NULL) { fprintf(stderr, "xine_open_video_driver() failed to load '%s' driver.\n", tox->video.name); exit(1); } else fprintf(stderr, "video driver '%s' successfuly loaded.\n", tox->video.name); } static void deinit_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; caca_private_t *private = (caca_private_t *) vop->private; xine_close_video_driver(tox->xine, tox->video.port); tox->video.port = NULL; private->init = 0; } static void release_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.last_plugin; caca_private_t *private = (caca_private_t *) vop->private; if(private->init) deinit_video_out(tox); free(private); free(vop); } static const char *get_identifier(void) { return "CACAlib video out"; } static char *_vo_caca_names[] = { "CACA", NULL }; static const char **get_names(void) { return (const char **)_vo_caca_names; } static const char *get_help(void) { return "Video out plugin supporting ColorAsCiiArt driver.\n"; } static int is_fullscreen(toxine_t *tox) { return 0; } static void fullscreen(toxine_t *tox) { } toxine_vo_plugin_t *toxine_load_vo_plugin(toxine_t *tox) { toxine_vo_plugin_t *caca; caca_private_t *private; caca = (toxine_vo_plugin_t *) xine_xmalloc(sizeof(toxine_vo_plugin_t)); private = (caca_private_t *) xine_xmalloc(sizeof(caca_private_t)); private->init = 0; caca->video_out_init = init_video_out; caca->video_out_event_loop = NULL; caca->video_out_deinit = deinit_video_out; caca->video_out_release = release_video_out; caca->get_identifier = get_identifier; caca->get_names = get_names; caca->get_help = get_help; caca->is_fullscreen = is_fullscreen; caca->receive_xine_event = NULL; caca->fullscreen = fullscreen; caca->private = (void *) private; return caca; } Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Makefile.am 8 Apr 2004 15:27:17 -0000 1.9 +++ Makefile.am 9 Apr 2004 17:43:14 -0000 1.10 @@ -1,6 +1,6 @@ -AM_CFLAGS = @CFLAGS@ @XINE_CFLAGS@ @X_CFLAGS@ $(AALIB_CFLAGS) -DEBUG_CFLAGS = @DEBUG_CFLAGS@ @XINE_CFLAGS@ $(AALIB_CFLAGS) +AM_CFLAGS = @CFLAGS@ @XINE_CFLAGS@ @X_CFLAGS@ $(AALIB_CFLAGS) $(CACA_CFLAGS) +DEBUG_CFLAGS = @DEBUG_CFLAGS@ @XINE_CFLAGS@ $(AALIB_CFLAGS) $(CACA_CFLAGS) libdir = $(TOXINE_PLUGINDIR) @@ -10,7 +10,11 @@ aa_plugin = toxine_vo_plugin_aa.la endif -lib_LTLIBRARIES = $(aa_plugin) toxine_vo_plugin_x11.la \ +if HAVE_CACA +caca_plugin = toxine_vo_plugin_caca.la +endif + +lib_LTLIBRARIES = $(aa_plugin) $(caca_plugin) toxine_vo_plugin_x11.la \ toxine_vo_plugin_dxr3.la toxine_vo_plugin_none.la toxine_vo_plugin_x11_la_SOURCES = vo_x11.c @@ -20,6 +24,9 @@ toxine_vo_plugin_aa_la_SOURCES = vo_aa.c toxine_vo_plugin_aa_la_LDFLAGS = -avoid-version -module $(AALIB_LIBS) -lm +toxine_vo_plugin_caca_la_SOURCES = vo_caca.c +toxine_vo_plugin_caca_la_LDFLAGS = -avoid-version -module $(CACA_LIBS) -lm + toxine_vo_plugin_dxr3_la_SOURCES = vo_dxr3.c toxine_vo_plugin_dxr3_la_LDFLAGS = -avoid-version -module Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- vo_aa.c 7 Apr 2004 18:21:07 -0000 1.14 +++ vo_aa.c 9 Apr 2004 17:43:14 -0000 1.15 @@ -112,9 +112,6 @@ return "Video out plugin supporting AsciiArt driver.\n"; } -static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { -} - static int is_fullscreen(toxine_t *tox) { return 0; } @@ -139,7 +136,7 @@ aa->get_names = get_names; aa->get_help = get_help; aa->is_fullscreen = is_fullscreen; - aa->receive_xine_event = receive_xine_event; + aa->receive_xine_event = NULL; aa->fullscreen = fullscreen; aa->private = (void *) private; Index: vo_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- vo_dxr3.c 7 Apr 2004 18:21:07 -0000 1.18 +++ vo_dxr3.c 9 Apr 2004 17:43:14 -0000 1.19 @@ -114,9 +114,6 @@ return "Video out plugin supports DXR3/HW+ cards (lb:letterboxed, ws:widescreen).\n"; } -static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { -} - static int is_fullscreen(toxine_t *tox) { return 0; } @@ -140,7 +137,7 @@ dxr3->get_identifier = get_identifier; dxr3->get_names = get_names; dxr3->get_help = get_help; - dxr3->receive_xine_event = receive_xine_event; + dxr3->receive_xine_event = NULL; dxr3->is_fullscreen = is_fullscreen; dxr3->fullscreen = fullscreen; dxr3->private = (void *) private; Index: vo_none.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_none.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- vo_none.c 7 Apr 2004 18:21:07 -0000 1.11 +++ vo_none.c 9 Apr 2004 17:43:14 -0000 1.12 @@ -82,9 +82,6 @@ return "Video out plugin which display nothing (useful for audio only playback).\n"; } -static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { -} - static int is_fullscreen(toxine_t *tox) { return 0; } @@ -109,7 +106,7 @@ none->get_names = get_names; none->get_help = get_help; none->is_fullscreen = is_fullscreen; - none->receive_xine_event = receive_xine_event; + none->receive_xine_event = NULL; none->fullscreen = fullscreen; none->private = (void *) private; Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- vo_x11.c 8 Apr 2004 16:28:03 -0000 1.25 +++ vo_x11.c 9 Apr 2004 17:43:14 -0000 1.26 @@ -1135,12 +1135,6 @@ /* * */ -static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { -} - -/* - * - */ static int is_fullscreen(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; x11_private_t *private = (x11_private_t *) vop->private; @@ -1174,7 +1168,7 @@ x11->get_identifier = get_identifier; x11->get_names = get_names; x11->get_help = get_help; - x11->receive_xine_event = receive_xine_event; + x11->receive_xine_event = NULL; x11->is_fullscreen = is_fullscreen; x11->fullscreen = fullscreen; x11->private = (void *) private; |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-09 17:56:35
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7894 Modified Files: Makefile.am configure.ac Log Message: support cacalib output Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/Makefile.am,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Makefile.am 8 Apr 2004 15:13:57 -0000 1.9 +++ Makefile.am 9 Apr 2004 17:43:13 -0000 1.10 @@ -62,3 +62,4 @@ -rm -f config.h.in stamp-h.in ltconfig ltmain.sh -rm -f config.guess config.sub install-sh missing mkinstalldirs -rm -f depcomp config.log config.status libtool-nofpic stamp-h + -rm -f libtoolplugin-nofpic libtoollib-nofpic Index: configure.ac =================================================================== RCS file: /cvsroot/toxine/toxine/configure.ac,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- configure.ac 8 Apr 2004 15:27:16 -0000 1.7 +++ configure.ac 9 Apr 2004 17:43:14 -0000 1.8 @@ -183,6 +183,13 @@ AM_CONDITIONAL(HAVE_AA, test x$no_aalib != "xyes") +dnl +dnl checks for Color AsCii Art library +dnl +AM_PATH_CACA(0.8,, AC_MSG_RESULT([*** All CACA-dependent parts will be disabled ***])) +AM_CONDITIONAL(HAVE_CACA, test x$no_caca != "xyes") + + if test "$GCC" = yes; then dnl dnl check cflags not supported by all gcc versions |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-09 17:56:35
|
Update of /cvsroot/toxine/toxine/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7894/m4 Modified Files: Makefile.am Added Files: caca.m4 Log Message: support cacalib output --- NEW FILE: caca.m4 --- dnl Configure paths and dependencies for libcaca. dnl dnl Jeffrey S Smith <why...@ya...> 09-Dec-2003 dnl based on aa.m4 as found in xinelib dnl dnl AM_PATH_CACA([MINIMUM-VERSION, [ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND ]]]) dnl Test for CACA, and define CACA_CFLAGS, CACA_LIBS. dnl dnl *********************** dnl 09-Dec-2003 dnl * new m4 for libcaca dnl AC_DEFUN([AM_PATH_CACA], [dnl dnl AC_ARG_WITH(caca-prefix, [ --with-caca-prefix=PFX Prefix where CACA is installed (optional)], caca_config_prefix="$withval", caca_config_prefix="") AC_ARG_WITH(caca-exec-prefix, [ --with-caca-exec-prefix=PFX Exec prefix where CACA is installed (optional)], caca_config_exec_prefix="$withval", caca_config_exec_prefix="") AC_ARG_ENABLE(cacatest, [ --disable-cacatest Do not try to compile and run a test CACA program],, enable_cacatest=yes) if test x$caca_config_exec_prefix != x ; then caca_config_args="$caca_config_args --exec-prefix=$caca_config_exec_prefix" if test x${CACA_CONFIG+set} != xset ; then CACA_CONFIG=$caca_config_exec_prefix/bin/caca-config fi fi if test x$caca_config_prefix != x ; then caca_config_args="$caca_config_args --prefix=$caca_config_prefix" if test x${CACA_CONFIG+set} != xset ; then CACA_CONFIG=$caca_config_prefix/bin/caca-config fi fi min_caca_version=ifelse([$1], ,0.3,$1) if test x"$enable_cacatest" != "xyes"; then AC_MSG_CHECKING([for CACA version >= $min_caca_version]) else if test ! -x "$CACA_CONFIG"; then CACA_CONFIG="" fi AC_PATH_PROG(CACA_CONFIG, caca-config, no) if test "$CACA_CONFIG" = "no" ; then dnl dnl caca-config is missing dnl no_caca=yes else AC_MSG_CHECKING([for CACA version >= $min_caca_version]) no_caca="" CACA_CFLAGS=`$CACA_CONFIG $caca_config_args --cflags` CACA_LIBS=`$CACA_CONFIG $caca_config_args --plugin-libs` caca_major_version=`$CACA_CONFIG $caca_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\)/\1/'` caca_minor_version=`$CACA_CONFIG $caca_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\)/\2/'` ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $CACA_CFLAGS" LIBS="$CACA_LIBS $LIBS" dnl dnl Now check if the installed CACA is sufficiently new. (Also sanity dnl checks the results of caca-config to some extent) dnl AC_LANG_SAVE() AC_LANG_C() rm -f conf.cacatest AC_TRY_RUN([ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <caca.h> int main () { int major, minor; char *tmp_version; system("touch conf.cacatest"); tmp_version = (char *) strdup("$min_caca_version"); if (sscanf(tmp_version, "%d.%d", &major, &minor) != 2) { printf("%s, bad version string\n", "$min_caca_version"); exit(1); } if (($caca_major_version > major) || (($caca_major_version == major) && ($caca_minor_version >= minor))) { return 0; } else { printf("\n*** 'caca-config --version' returned %d.%d, but the minimum version\n", $caca_major_version, $caca_minor_version); printf("*** of CACA required is %d.%d. If caca-config is correct, then it is\n", major, minor); printf("*** best to upgrade to the required version.\n"); printf("*** If caca-config was wrong, set the environment variable CACA_CONFIG\n"); printf("*** to point to the correct copy of caca-config, and remove the file\n"); printf("*** config.cache before re-running configure\n"); return 1; } } ],, no_caca=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi dnl CACA_CONFIG if test "x$no_caca" = x; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$CACA_CONFIG" = "no"; then echo "*** The caca-config program installed by CACA could not be found" echo "*** If CACA was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or use --with-caca-prefix to set the prefix" echo "*** where CACA is installed." else if test -f conf.cacatest ; then : else echo "*** Could not run CACA test program, checking why..." CFLAGS="$CFLAGS $CACA_CFLAGS" LIBS="$LIBS $CACA_LIBS" AC_TRY_LINK([ #include <stdio.h> #include <caca.h> ], [ return 0; ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding CACA or finding the wrong" echo "*** version of CACA. If it is not finding CACA, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***"], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means CACA was incorrectly installed" echo "*** or that you have moved CACA since it was installed." ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi CACA_CFLAGS="" CACA_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(CACA_CFLAGS) AC_SUBST(CACA_LIBS) AC_LANG_RESTORE() rm -f conf.cacatest ]) Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/m4/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile.am 20 Sep 2002 22:36:47 -0000 1.2 +++ Makefile.am 9 Apr 2004 17:43:14 -0000 1.3 @@ -1,7 +1,7 @@ ## ## Process this file with automake to produce Makefile.in ## -EXTRA_DIST = _toxine.m4 readline.m4 aa.m4 +EXTRA_DIST = _toxine.m4 readline.m4 aa.m4 caca.m4 debug: install-debug: debug |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-09 17:56:35
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7894/src Modified Files: Makefile.am Log Message: support cacalib output Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile.am 8 Apr 2004 15:27:17 -0000 1.8 +++ Makefile.am 9 Apr 2004 17:43:14 -0000 1.9 @@ -39,7 +39,7 @@ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am mostlyclean-generic: - -rm -f *~ \#* .*~ .\#* mangen + -rm -f *~ \#* .*~ .\#* mangen sortcmds maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 16:41:13
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17686 Modified Files: main.c xine_commands.c Log Message: xine_new isn't called implicitly at startup Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- main.c 8 Apr 2004 15:35:36 -0000 1.25 +++ main.c 8 Apr 2004 16:28:03 -0000 1.26 @@ -279,11 +279,6 @@ } - tox->xine = xine_new(); - tox->xine_state |= XINE_NEW; - - toxine_config_load(tox); - tox->running = 1; tox->playlist.mmk = NULL; tox->playlist.thread_num = 0;; Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -r1.42 -r1.43 --- xine_commands.c 7 Apr 2004 18:21:07 -0000 1.42 +++ xine_commands.c 8 Apr 2004 16:28:03 -0000 1.43 @@ -446,9 +446,7 @@ tox->xine_state |= XINE_NEW; // toxine_set_last_int_result(tox, (int)tox->xine); - pinfo("xine_config_load():\n"); - xine_config_load(tox->xine, tox->configfile); - pinfo(".\n"); + _xine_config_load(NULL, tox, NULL); } void _xine_stream_new(commands_t *command, toxine_t *tox, void *data) { |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 16:41:13
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17686/plugins Modified Files: vo_x11.c Log Message: xine_new isn't called implicitly at startup Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- vo_x11.c 7 Apr 2004 18:21:07 -0000 1.24 +++ vo_x11.c 8 Apr 2004 16:28:03 -0000 1.25 @@ -502,6 +502,13 @@ exit(1); } + private->fake_rate = xine_config_register_num(tox->xine, "tox.fake_rate", 10, + "time between two fake key events (in s)", + "Each x seconds, this plugin fake a key event" + ", which prevent screensaver activation.", + 0, + change_fake_rate_cb, (void*)private); + if(getenv("DISPLAY")) display_name = getenv("DISPLAY"); @@ -1172,12 +1179,5 @@ x11->fullscreen = fullscreen; x11->private = (void *) private; - private->fake_rate = xine_config_register_num(tox->xine, "tox.fake_rate", 10, - "time between two fake key events (in s)", - "Each x seconds, this plugin fake a key event" - ", which prevent screensaver activation.", - 0, - change_fake_rate_cb, (void*)private); - return x11; } |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 15:49:42
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5572 Modified Files: loader.c Log Message: @@ oops, i'm the only one who is interrested to load plugin from source dir ;-) Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- loader.c 8 Apr 2004 15:35:36 -0000 1.12 +++ loader.c 8 Apr 2004 15:36:30 -0000 1.13 @@ -35,7 +35,7 @@ extern int errno; -#define LOCAL_BUILD 1 +/* #define LOCAL_BUILD 1 */ #ifdef LOCAL_BUILD #undef TOXINE_PLUGINDIR #define TOXINE_PLUGINDIR "plugins/.libs" |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 15:48:45
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5313 Modified Files: commands.c loader.c main.c Log Message: @@ reenable toxine_release() Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.58 retrieving revision 1.59 diff -u -r1.58 -r1.59 --- commands.c 8 Apr 2004 15:27:17 -0000 1.58 +++ commands.c 8 Apr 2004 15:35:36 -0000 1.59 @@ -1303,7 +1303,7 @@ int major, minor, sub; pinfo("Toxine version %s\n", VERSION); - pinfo("Copyright 2002, Daniel Caujolle-Bert <f1...@us...>.\n"); + pinfo("Copyright 2002-2004, Daniel Caujolle-Bert <f1...@us...>.\n"); pinfo("Built with xine library %d.%d.%d (%s).\n", XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION, XINE_VERSION); xine_get_version(&major, &minor, &sub); Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- loader.c 7 Apr 2004 18:21:07 -0000 1.11 +++ loader.c 8 Apr 2004 15:35:36 -0000 1.12 @@ -35,7 +35,7 @@ extern int errno; -/* #define LOCAL_BUILD 1 */ +#define LOCAL_BUILD 1 #ifdef LOCAL_BUILD #undef TOXINE_PLUGINDIR #define TOXINE_PLUGINDIR "plugins/.libs" Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- main.c 7 Apr 2004 18:21:07 -0000 1.24 +++ main.c 8 Apr 2004 15:35:36 -0000 1.25 @@ -112,13 +112,10 @@ * Freeing allocated memory. */ static void toxine_release(toxine_t *tox) { - int i; -#warning FIXME - return; - if(tox) { - + int i; + if(tox->msg_fd >= 0) close(tox->msg_fd); @@ -142,8 +139,6 @@ toxine_free(tox->script.filename); - pthread_mutex_destroy(&tox->event.mutex); - toxine_free(tox); } } |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 15:40:27
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3678/src/plugins Modified Files: Makefile.am Log Message: @@ small auto* fixes, fix readline CFLAGS Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile.am 15 Oct 2003 16:48:14 -0000 1.8 +++ Makefile.am 8 Apr 2004 15:27:17 -0000 1.9 @@ -1,5 +1,5 @@ -CFLAGS = @CFLAGS@ @XINE_CFLAGS@ @X_CFLAGS@ $(AALIB_CFLAGS) +AM_CFLAGS = @CFLAGS@ @XINE_CFLAGS@ @X_CFLAGS@ $(AALIB_CFLAGS) DEBUG_CFLAGS = @DEBUG_CFLAGS@ @XINE_CFLAGS@ $(AALIB_CFLAGS) libdir = $(TOXINE_PLUGINDIR) |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 15:40:26
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3678 Modified Files: configure.ac Log Message: @@ small auto* fixes, fix readline CFLAGS Index: configure.ac =================================================================== RCS file: /cvsroot/toxine/toxine/configure.ac,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- configure.ac 8 Apr 2004 15:13:57 -0000 1.6 +++ configure.ac 8 Apr 2004 15:27:16 -0000 1.7 @@ -459,16 +459,16 @@ fi dnl made libtool-nofpic silent and not installing plugins's .la files -cat libtool | sed -e 's/^show=\".*/show=\":\"/g' -e 's/# Install the pseudo\-library.*/continue/g' > libtoolplugin.tmp -cat libtool | sed -e 's/^show=\".*/show=\":\"/g' > libtoollib.tmp +cat libtool | sed -e 's/^.*echo \"---------.*$/exit 0/;s/# Install the pseudo-library.*/continue/' > libtoolplugin.tmp +cat libtool | sed -e 's/^.*echo \"---------.*$/exit 0/' > libtoollib.tmp if test x$no_fpic = "xyes"; then - cat libtoolplugin.tmp | sed -e 's/^pic_flag=/#pic_flag=/' > libtool-nofpic - cat libtoollib.tmp | sed -e 's/^pic_flag=/#pic_flag=/' > libtool-nofpic + cat libtoolplugin.tmp | sed -e 's/^pic_flag=/#pic_flag=/;s/^ *pic_mode=.*$/pic_mode=no/' > libtoolplugin-nofpic + cat libtoollib.tmp | sed -e 's/^pic_flag=/#pic_flag=/;s/^ *pic_mode=.*$/pic_mode=no/' > libtoollib-nofpic else cat libtoollib.tmp > libtoollib-nofpic cat libtoolplugin.tmp > libtoolplugin-nofpic fi rm -f libtoollib.tmp libtoolplugin.tmp -chmod +x libtool-nofpic +chmod +x libtoolplugin-nofpic libtoollib-nofpic |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 15:40:26
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3678/src Modified Files: Makefile.am commands.c Log Message: @@ small auto* fixes, fix readline CFLAGS Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Makefile.am 8 Apr 2004 15:14:19 -0000 1.7 +++ Makefile.am 8 Apr 2004 15:27:17 -0000 1.8 @@ -1,7 +1,8 @@ SUBDIRS = plugins -CFLAGS = @CFLAGS@ @XINE_CFLAGS@ +AM_CFLAGS = @CFLAGS@ @XINE_CFLAGS@ @READLINE_INCLUDES@ +LIBTOOL = $(SHELL) $(top_builddir)/libtoollib-nofpic bin_PROGRAMS = toxine EXTRA_PROGRAMS = mangen sortcmds Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- commands.c 7 Apr 2004 18:21:07 -0000 1.57 +++ commands.c 8 Apr 2004 15:27:17 -0000 1.58 @@ -31,9 +31,9 @@ #include <time.h> #include <pthread.h> -#include "readline.h" -#include "tilde.h" -#include "history.h" +#include <readline.h> +#include <tilde.h> +#include <history.h> #include "common.h" #include "utils.h" |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 15:27:38
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32766 Modified Files: Makefile.am configure.ac Log Message: don't need embedded readline anymore Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Makefile.am 1 Sep 2002 16:05:30 -0000 1.8 +++ Makefile.am 8 Apr 2004 15:13:57 -0000 1.9 @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = 1.3 -SUBDIRS = doc m4 misc readline src +SUBDIRS = doc m4 misc src EXTRA_DIST = cvscompile.sh @DEPCOMP@ @@ -61,4 +61,4 @@ -rm -f Makefile.in configure acinclude.m4 aclocal.m4 -rm -f config.h.in stamp-h.in ltconfig ltmain.sh -rm -f config.guess config.sub install-sh missing mkinstalldirs - -rm -f depcomp config.log config.status libtool-nofpic + -rm -f depcomp config.log config.status libtool-nofpic stamp-h Index: configure.ac =================================================================== RCS file: /cvsroot/toxine/toxine/configure.ac,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- configure.ac 15 Oct 2003 17:32:51 -0000 1.5 +++ configure.ac 8 Apr 2004 15:13:57 -0000 1.6 @@ -158,71 +158,11 @@ dnl dnl readline dnl -dnl configure defaults -LIBVERSION=4.2a -opt_curses=no -opt_shared=no - -dnl arguments to configure -AC_ARG_WITH(curses, - [ --with-curses use the curses library instead of the termcap library], - opt_curses=$withval) - -if test "$opt_curses" = "yes"; then - prefer_curses=yes +AC_CHECK_READLINE +AM_CONDITIONAL(HAVE_READLINE, test x"$have_readline" = "xyes") +if test x"$have_readline" != "xyes"; then + AC_MSG_ERROR([*** no readline found, toxine can't build ***]) fi -AC_TYPE_SIGNAL([]) - -AC_HEADER_STAT -AC_HEADER_DIRENT -AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \ - strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit getpwuid_r) - -AC_FUNC_STRCOLL - -AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \ - limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \ - termcap.h termios.h termio.h sys/file.h locale.h memory.h) - -dnl BASH_SYS_SIGNAL_VINTAGE dnl pure 2.50 -dnl BASH_SYS_REINSTALL_SIGHANDLERS dnl pure 2.50 -BASH_SIGNAL_CHECK -BASH_REINSTALL_SIGHANDLERS - -BASH_FUNC_POSIX_SETJMP -BASH_FUNC_LSTAT -BASH_CHECK_GETPW_FUNCS -BASH_FUNC_STRCOLL - -BASH_TYPE_SIGHANDLER -BASH_HAVE_TIOCGWINSZ -BASH_HAVE_TIOCSTAT -BASH_HAVE_FIONREAD -BASH_MISC_SPEED_T -BASH_STRUCT_WINSIZE -BASH_STRUCT_DIRENT_D_INO -BASH_STRUCT_DIRENT_D_FILENO -dnl yuck -case "$host_os" in -aix*) prefer_curses=yes ;; -esac - -BASH_CHECK_LIB_TERMCAP([], - AC_MSG_RESULT([*** All of READLINE dependent parts will be disabled ***])) - -case "$host_cpu" in -*cray*) READLINE_LOCAL_CFLAGS=-DCRAY ;; -*s390*) READLINE_LOCAL_CFLAGS=-fsigned-char ;; -esac - -case "$host_os" in -isc*) READLINE_LOCAL_CFLAGS=-Disc386 ;; -esac - -AC_SUBST(READLINE_LOCAL_CFLAGS) -AC_SUBST(TERMCAP_LIB) -AC_SUBST(LIBVERSION) -AM_CONDITIONAL(HAVE_TERMCAP, test x"$no_termcap" != "xyes") dnl dnl ncurses @@ -497,7 +437,6 @@ misc/relchk.sh misc/toxine.spec misc/dvdplayer.sh -readline/Makefile m4/Makefile src/Makefile src/plugins/Makefile |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 15:27:37
|
Update of /cvsroot/toxine/toxine/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32766/m4 Modified Files: readline.m4 Log Message: don't need embedded readline anymore Index: readline.m4 =================================================================== RCS file: /cvsroot/toxine/toxine/m4/readline.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- readline.m4 15 Jan 2003 17:40:11 -0000 1.2 +++ readline.m4 8 Apr 2004 15:13:57 -0000 1.3 @@ -1,1382 +1,59 @@ -dnl -dnl Bash specific tests -dnl -dnl Some derived from PDKSH 5.1.3 autoconf tests -dnl -dnl -dnl Check if dup2() does not clear the close on exec flag -dnl -dnl 30/04/2002 Daniel Caujolle-Bert <seg...@cl...> -dnl - Change BASH_CHECK_LIB_TERMCAP() found/not_found args. -dnl [...1404 lines suppressed...] - does not. */ - act.sa_flags = 0; - sigemptyset(&act.sa_mask); - sigemptyset(&oact.sa_mask); - i = fork (); - /* A possible race condition here, but in practice it never happens. */ - if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); } - sigaction(SIGINT, &act, &oact); - status = wait(&i); - if (status == -1) wait(&i); - exit (status == -1); -#endif -} -], bash_cv_sys_restartable_syscalls=yes, bash_cv_sys_restartable_syscalls=no, - AC_MSG_ERROR(cannot check restartable syscalls if cross compiling)) -]) -if test $bash_cv_sys_restartable_syscalls = yes; then - AC_DEFINE(HAVE_RESTARTABLE_SYSCALLS,,[Define if restarted system calls after a signal handler has been installed with signal()]) -fi -]) |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-08 15:27:29
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32766/src Modified Files: Makefile.am Log Message: don't need embedded readline anymore Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Makefile.am 17 Jan 2003 22:56:27 -0000 1.6 +++ Makefile.am 8 Apr 2004 15:14:19 -0000 1.7 @@ -18,20 +18,16 @@ toxine_SOURCES = $(GETOPT_C) main.c commands.c $(COMMON_sources) toxine_DEPENDENTIES = -toxine_LDADD = $(TERMCAP_LIB) $(top_builddir)/readline/libreadline.la @XINE_LIBS@ $(DYNAMIC_LD_LIBS) -lm +toxine_LDADD = @XINE_LIBS@ $(DYNAMIC_LD_LIBS) $(READLINE_LIBS) $(NCURSES_LIB) -lm mangen_SOURCES = $(GETOPT_C) mangen.c $(COMMON_sources) -mangen_LDADD = $(TERMCAP_LIB) $(top_builddir)/readline/libreadline.la @XINE_LIBS@ $(DYNAMIC_LD_LIBS) -lm +mangen_LDADD = @XINE_LIBS@ $(DYNAMIC_LD_LIBS) $(READLINE_LIBS) $(NCURSES_LIB) -lm sortcmds_SOURCES = $(GETOPT_C) sortcmds.c $(COMMON_sources) -sortcmds_LDADD = $(TERMCAP_LIB) $(top_builddir)/readline/libreadline.la @XINE_LIBS@ $(DYNAMIC_LD_LIBS) -lm +sortcmds_LDADD = @XINE_LIBS@ $(DYNAMIC_LD_LIBS) $(READLINE_LIBS) $(NCURSES_LIB) -lm noinst_HEADERS = common.h utils.h commands.h parse.h xine_commands.h loader.h script.h playlist.h -$(top_builddir)/readline/libreadline.la: - cd $(top_builddir)/readline && $(MAKE) libreadline.la - - debug: @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) @XINE_CFLAGS@" |
Update of /cvsroot/toxine/toxine/readline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32766/readline Removed Files: CHANGELOG CHANGES COPYING INSTALL MANIFEST Makefile.am README USAGE ansi_stdlib.h bind.c callback.c chardefs.h compat.c complete.c configure.in display.c emacs_keymap.c funmap.c histexpand.c histfile.c histlib.h history.c history.h histsearch.c input.c isearch.c keymaps.c keymaps.h kill.c macro.c nls.c parens.c posixdir.h posixjmp.h posixstat.h readline.c readline.h rlconf.h rldefs.h rlprivate.h rlshell.h rlstdc.h rltty.c rltty.h rltypedefs.h rlwinsize.h savestring.c search.c shell.c signals.c tcap.h terminal.c tilde.c tilde.h undo.c util.c vi_keymap.c vi_mode.c xmalloc.c xmalloc.h Log Message: don't need embedded readline anymore --- CHANGELOG DELETED --- --- CHANGES DELETED --- --- COPYING DELETED --- --- INSTALL DELETED --- --- MANIFEST DELETED --- --- Makefile.am DELETED --- --- README DELETED --- --- USAGE DELETED --- --- ansi_stdlib.h DELETED --- --- bind.c DELETED --- --- callback.c DELETED --- --- chardefs.h DELETED --- --- compat.c DELETED --- --- complete.c DELETED --- --- configure.in DELETED --- --- display.c DELETED --- --- emacs_keymap.c DELETED --- --- funmap.c DELETED --- --- histexpand.c DELETED --- --- histfile.c DELETED --- --- histlib.h DELETED --- --- history.c DELETED --- --- history.h DELETED --- --- histsearch.c DELETED --- --- input.c DELETED --- --- isearch.c DELETED --- --- keymaps.c DELETED --- --- keymaps.h DELETED --- --- kill.c DELETED --- --- macro.c DELETED --- --- nls.c DELETED --- --- parens.c DELETED --- --- posixdir.h DELETED --- --- posixjmp.h DELETED --- --- posixstat.h DELETED --- --- readline.c DELETED --- --- readline.h DELETED --- --- rlconf.h DELETED --- --- rldefs.h DELETED --- --- rlprivate.h DELETED --- --- rlshell.h DELETED --- --- rlstdc.h DELETED --- --- rltty.c DELETED --- --- rltty.h DELETED --- --- rltypedefs.h DELETED --- --- rlwinsize.h DELETED --- --- savestring.c DELETED --- --- search.c DELETED --- --- shell.c DELETED --- --- signals.c DELETED --- --- tcap.h DELETED --- --- terminal.c DELETED --- --- tilde.c DELETED --- --- tilde.h DELETED --- --- undo.c DELETED --- --- util.c DELETED --- --- vi_keymap.c DELETED --- --- vi_mode.c DELETED --- --- xmalloc.c DELETED --- --- xmalloc.h DELETED --- |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-07 18:34:11
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27158/src Modified Files: commands.c commands.h common.h loader.c loader.h main.c mangen.c parse.c parse.h playlist.c playlist.h script.c script.h sortcmds.c utils.c utils.h xine_commands.c xine_commands.h Log Message: Big Fat Note: you need very recent xine-lib (>= rc3b). Ton of fixes. xine_exit/xine_new cycle works. Update licence year. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -r1.56 -r1.57 --- commands.c 16 Oct 2003 22:16:35 -0000 1.56 +++ commands.c 7 Apr 2004 18:21:07 -0000 1.57 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -462,7 +462,7 @@ tox->playlist.thread_num++; cur = tox->playlist.cur; - while(tox->event.last.type != XINE_EVENT_UI_PLAYBACK_FINISHED) { + while(tox->running && (tox->event.last.type != XINE_EVENT_UI_PLAYBACK_FINISHED)) { xine_usec_sleep(500000.0); @@ -574,6 +574,12 @@ return 0; } + if(tox->video.last_plugin && (tox->video.last_plugin != tox->video.cur_plugin) && tox->video.last_plugin->video_out_release) + tox->video.last_plugin->video_out_release(tox); + + tox->video.last_plugin = tox->video.cur_plugin; + + tox->video.running = 1; tox->video.cur_plugin->video_out_init(tox); /* Display plugin help string, if available */ @@ -586,16 +592,17 @@ } } - pthread_attr_init(&pth_attrs); - pthread_attr_getschedparam(&pth_attrs, &pth_params); - pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER); - pthread_attr_setschedparam(&pth_attrs, &pth_params); - - tox->video.running = 1; - - pthread_create(&tox->video.loop_thread, &pth_attrs, - tox->video.cur_plugin->video_out_event_loop, (void *)tox); - + tox->video.loop_thread = 0; + if(tox->video.cur_plugin->video_out_event_loop) { + pthread_attr_init(&pth_attrs); + pthread_attr_getschedparam(&pth_attrs, &pth_params); + pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER); + pthread_attr_setschedparam(&pth_attrs, &pth_params); + + pthread_create(&tox->video.loop_thread, &pth_attrs, + tox->video.cur_plugin->video_out_event_loop, (void *)tox); + } + } return 1; @@ -831,9 +838,10 @@ if(tox->autoinit) { _xine_init(NULL, tox, NULL); - _xine_stream_new(NULL, tox, NULL); + if(tox->xine) + _xine_stream_new(NULL, tox, NULL); } - + if(tox->script.in_use) { toxine_handle_script(tox); tox->video.running = tox->running = 0; @@ -900,18 +908,14 @@ /* deinit video_out plugin */ if(tox->xine_state & XINE_INIT) { - if(tox->playlist.thread_num > 0) { - void *v; - - pthread_cancel(tox->playlist.end_thread); - pthread_join(tox->playlist.end_thread, &v); - } - + if(tox->playlist.thread_num > 0) + pthread_join(tox->playlist.end_thread, NULL); + _xine_exit(NULL, tox, NULL); } - if(tox->video.cur_plugin && tox->video.cur_plugin->video_out_deinit) - tox->video.cur_plugin->video_out_deinit(tox); + if(tox->video.last_plugin && tox->video.last_plugin->video_out_release) + tox->video.last_plugin->video_out_release(tox); } @@ -1154,7 +1158,9 @@ * initialize xine engine */ static void do_init(commands_t *command, toxine_t *tox, void *data) { + _xine_init(command, tox, NULL); + if(tox->xine) _xine_stream_new(command, tox, NULL); } Index: commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- commands.h 21 Jan 2003 16:53:35 -0000 1.5 +++ commands.h 7 Apr 2004 18:21:07 -0000 1.6 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- common.h 22 May 2003 20:50:34 -0000 1.24 +++ common.h 7 Apr 2004 18:21:07 -0000 1.25 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -61,6 +61,19 @@ #define XINE_OPEN 0x000000004 #define XINE_STREAM 0x000000008 +#define DUMP_XINE_STATE(x) \ + do { \ + if((x)->xine_state & XINE_INIT) pinfo("STATE & XINE_INIT\n"); \ + else pinfo("! STATE & XINE_INIT\n"); \ + if((x)->xine_state & XINE_INIT) pinfo("STATE & XINE_NEW\n"); \ + else pinfo("! STATE & XINE_NEW\n"); \ + if((x)->xine_state & XINE_INIT) pinfo("STATE & XINE_OPEN\n"); \ + else pinfo("! STATE & XINE_OPEN\n"); \ + if((x)->xine_state & XINE_INIT) pinfo("STATE & XINE_STREAM\n"); \ + else pinfo("! STATE & XINE_STREAM\n"); \ + } while(0) + + #define toxine_free(x) do { \ if((x)) { \ free((x)); \ @@ -183,6 +196,7 @@ toxine_vo_plugin_t *plugins[TOXINE_VO_PLUGINS_MAX]; int plugins_num; toxine_vo_plugin_t *cur_plugin; + toxine_vo_plugin_t *last_plugin; pthread_t loop_thread; int running; } video; Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- loader.c 15 Oct 2003 16:30:21 -0000 1.10 +++ loader.c 7 Apr 2004 18:21:07 -0000 1.11 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -122,5 +122,6 @@ exit(1); } - tox->video.cur_plugin = NULL; + tox->video.cur_plugin = NULL; + tox->video.last_plugin = NULL; } Index: loader.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- loader.h 17 Jan 2003 23:39:53 -0000 1.3 +++ loader.h 7 Apr 2004 18:21:07 -0000 1.4 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- main.c 18 Jan 2003 17:01:25 -0000 1.23 +++ main.c 7 Apr 2004 18:21:07 -0000 1.24 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: mangen.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/mangen.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mangen.c 17 Jan 2003 23:39:54 -0000 1.4 +++ mangen.c 7 Apr 2004 18:21:07 -0000 1.5 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: parse.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/parse.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- parse.c 17 Jan 2003 23:39:54 -0000 1.5 +++ parse.c 7 Apr 2004 18:21:07 -0000 1.6 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: parse.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/parse.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- parse.h 17 Jan 2003 23:39:55 -0000 1.2 +++ parse.h 7 Apr 2004 18:21:07 -0000 1.3 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: playlist.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/playlist.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- playlist.c 15 Oct 2003 14:44:52 -0000 1.11 +++ playlist.c 7 Apr 2004 18:21:07 -0000 1.12 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: playlist.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/playlist.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- playlist.h 17 Jan 2003 23:39:56 -0000 1.5 +++ playlist.h 7 Apr 2004 18:21:07 -0000 1.6 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: script.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/script.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- script.c 17 Jan 2003 23:39:56 -0000 1.2 +++ script.c 7 Apr 2004 18:21:07 -0000 1.3 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: script.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/script.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- script.h 17 Jan 2003 23:39:56 -0000 1.2 +++ script.h 7 Apr 2004 18:21:07 -0000 1.3 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: sortcmds.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/sortcmds.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- sortcmds.c 17 Jan 2003 23:39:56 -0000 1.3 +++ sortcmds.c 7 Apr 2004 18:21:07 -0000 1.4 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- utils.c 22 May 2003 20:50:34 -0000 1.23 +++ utils.c 7 Apr 2004 18:21:07 -0000 1.24 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: utils.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- utils.h 21 Jan 2003 16:53:36 -0000 1.11 +++ utils.h 7 Apr 2004 18:21:07 -0000 1.12 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- xine_commands.c 16 Oct 2003 22:16:36 -0000 1.41 +++ xine_commands.c 7 Apr 2004 18:21:07 -0000 1.42 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -436,24 +436,17 @@ if(tox->xine) { pinfo("Exiting old xine instance\n"); - if(tox->xine_state & XINE_STREAM) { - xine_close(tox->stream); - tox->xine_state &= ~XINE_OPEN; - xine_dispose(tox->stream); - tox->xine_state &= ~XINE_STREAM; - } - xine_exit(tox->xine); - //_xine_exit(NULL, tox, NULL); + _xine_exit(NULL, tox, NULL); } - pinfo("xine_new()"); + pinfo("xine_new():\n"); tox->xine = xine_new(); - pinfo("\n"); + pinfo(".\n"); tox->xine_state |= XINE_NEW; // toxine_set_last_int_result(tox, (int)tox->xine); - pinfo("0x%x\n", (int)tox->xine); - pinfo("xine_config_load()\n"); + + pinfo("xine_config_load():\n"); xine_config_load(tox->xine, tox->configfile); pinfo(".\n"); } @@ -465,22 +458,21 @@ perr("Choose and initialise a video driver first\n"); return; } + if(tox->xine_state & XINE_STREAM) { perr("Stream is already created, use xine_dispose() in order to create a new one\n"); return; } - pinfo("xine_stream_new():"); + pinfo("xine_stream_new():\n"); tox->stream = xine_stream_new(tox->xine, tox->audio.port, tox->video.port); - pinfo("return 0x%x\n", (int) tox->stream); + pinfo(".\n"); + if(tox->stream) tox->xine_state |= XINE_STREAM; else perr("Wow, xine_stream_new() failed.\n"); - - if(tox->event_queue) - xine_event_dispose_queue(tox->event_queue); - + tox->event_queue = xine_event_new_queue(tox->stream); xine_event_create_listener_thread(tox->event_queue, toxine_event_listener, (void *) tox); } @@ -496,33 +488,27 @@ perr("xine engine already initialized.\n"); return; } - + if(!(tox->xine_state & XINE_NEW)) _xine_new(NULL, tox, NULL); - pinfo("xine_init()"); + pinfo("xine_init():\n"); xine_init(tox->xine); - pinfo("\n"); + pinfo(".\n"); tox->xine_state |= XINE_INIT; pthread_mutex_init(&tox->event.mutex, NULL); if(!toxine_video_out_init(tox)) { perr("unable to initialize video out plugin.\n"); - xine_exit(tox->xine); - tox->xine = NULL; - tox->xine_state &= ~(XINE_NEW | XINE_INIT); + _xine_exit(NULL, tox, NULL); return; } if(!toxine_audio_out_init(tox)) { perr("unable to initialize audio driver, audio output disabled.\n"); - xine_exit(tox->xine); - tox->xine = NULL; - tox->xine_state &= ~(XINE_NEW | XINE_INIT); + _xine_exit(NULL, tox, NULL); return; } - - pinfo(".\n"); } /* @@ -541,7 +527,7 @@ pinfo("xine_open(%s):\n", tox->current_mrl); result = xine_open(tox->stream, tox->current_mrl); - pinfo("returned %d\n", result); + pinfo("-- returned %d\n", result); tox->xine_state |= XINE_OPEN; pinfo(".\n"); } @@ -576,27 +562,28 @@ return; } else { - + mrl = tox->current_mrl; - time = tox->playlist.mmk[tox->playlist.cur]->start; - if((tox->playlist.mmk[tox->playlist.cur]->end != -1) && - (tox->playlist.mmk[tox->playlist.cur]->start < - tox->playlist.mmk[tox->playlist.cur]->end)) { - pthread_attr_t pth_attrs; - struct sched_param pth_params; - void *v; - - if(tox->playlist.thread_num > 0) - pthread_join(tox->playlist.end_thread, &v); - - pthread_attr_init(&pth_attrs); - pthread_attr_getschedparam(&pth_attrs, &pth_params); - pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER); - pthread_attr_setschedparam(&pth_attrs, &pth_params); - - pthread_create(&tox->playlist.end_thread, &pth_attrs, - toxine_end_thread,(void *)tox); - + + if(tox->playlist.cur >= 0) { + time = tox->playlist.mmk[tox->playlist.cur]->start; + if((tox->playlist.mmk[tox->playlist.cur]->end != -1) && + (tox->playlist.mmk[tox->playlist.cur]->start < + tox->playlist.mmk[tox->playlist.cur]->end)) { + pthread_attr_t pth_attrs; + struct sched_param pth_params; + void *v; + + if(tox->playlist.thread_num > 0) + pthread_join(tox->playlist.end_thread, &v); + + pthread_attr_init(&pth_attrs); + pthread_attr_getschedparam(&pth_attrs, &pth_params); + pth_params.sched_priority = sched_get_priority_min(SCHED_OTHER); + pthread_attr_setschedparam(&pth_attrs, &pth_params); + + pthread_create(&tox->playlist.end_thread, &pth_attrs, toxine_end_thread,(void *)tox); + } } } } @@ -696,16 +683,16 @@ time *= 1000; if(need_open) { - pinfo("xine_open(%s) && xine_play(%d, %d)\n", mrl, start, time); + pinfo("xine_open(%s) && xine_play(%d, %d):\n", mrl, start, time); if((!xine_open(tox->stream, mrl)) || (!xine_play(tox->stream, start, time))) toxine_handle_xine_errors(tox); else tox->xine_state |= XINE_OPEN; } else { - pinfo("xine_play(%d, %d)\n", start, time); - if(!xine_play(tox->stream, start, time)) - toxine_handle_xine_errors(tox); + pinfo("xine_play(%d, %d):\n", start, time); + if(!xine_play(tox->stream, start, time)) + toxine_handle_xine_errors(tox); } pinfo(".\n"); @@ -822,8 +809,8 @@ void _xine_stop(commands_t *command, toxine_t *tox, void *data) { // toxine_unset_last_result(tox); return_if_no_stream(tox); - pinfo("xine_stop()\n"); tox->ignore_finished = 1; + pinfo("xine_stop():\n"); xine_stop(tox->stream); pinfo(".\n"); } @@ -852,28 +839,42 @@ return_if_no_new(tox); + toxine_config_save(tox); + + if(tox->xine_state & XINE_STREAM) { + _xine_close(NULL, tox, NULL); + _xine_dispose(NULL, tox, NULL); + } + if(tox->xine_state & XINE_INIT) { if(tox->event_queue) { - pinfo("xine_event_dispose_queue()\n"); + pinfo("xine_event_dispose_queue():\n"); xine_event_dispose_queue(tox->event_queue); + pinfo(".\n"); + tox->event_queue = NULL; } } - pinfo("xine_exit()\n"); - xine_exit(tox->xine); - tox->xine_state = 0; - if(tox->video.cur_plugin && tox->video.cur_plugin->video_out_deinit) { tox->video.running = 0; + if(tox->video.loop_thread) + pthread_join(tox->video.loop_thread, NULL); tox->video.cur_plugin->video_out_deinit(tox); - tox->video.cur_plugin = NULL; } + tox->video.cur_plugin = NULL; - tox->audio.port = NULL; - - pthread_mutex_destroy(&tox->event.mutex); + if(tox->audio.port) { + xine_close_audio_driver(tox->xine, tox->audio.port); + tox->audio.port = NULL; + } + pinfo("xine_exit():\n"); + xine_exit(tox->xine); pinfo(".\n"); + tox->xine = NULL; + tox->xine_state = 0; + + pthread_mutex_destroy(&tox->event.mutex); } /* @@ -1052,7 +1053,7 @@ if(found >= 0) { int result; - pinfo("xine_get_param(%s)\n", xine_params[i].name); + pinfo("xine_get_param(%s):\n", xine_params[i].name); result = xine_get_param(tox->stream, xine_params[i].param); pinfo("returned [%d]:\n", result); @@ -1677,11 +1678,13 @@ if(event_type > 0) { xine_event_t xine_event; - xine_event.type = event_type; + xine_event.type = event_type; + xine_event.data_length = 0; + xine_event.data = NULL; + xine_event.stream = tox->stream; gettimeofday(&xine_event.tv, NULL); - xine_event.stream = tox->stream; - pinfo("xine_event_send(%d)\n", event_type); + pinfo("xine_event_send(%d):\n", event_type); xine_event_send(tox->stream, &xine_event); pinfo(".\n"); } @@ -1732,7 +1735,7 @@ return_if_no_init(tox); key = toxine_get_arg(tox, 1); - pinfo("xine_config_lookup_entry(%s)\n", key); + pinfo("xine_config_lookup_entry(%s):\n", key); if((xine_config_lookup_entry(tox->xine, key, &cfg_entry))) toxine_dump_config_entry(tox, &cfg_entry); else @@ -1755,7 +1758,7 @@ svalue = toxine_get_arg(tox, 2); value = atoi(((char *) svalue)); - pinfo("xine_config_lookup_entry(%s)\n", key); + pinfo("xine_config_lookup_entry(%s):\n", key); if((xine_config_lookup_entry(tox->xine, key, &cfg_entry))) { switch(cfg_entry.type) { @@ -1888,17 +1891,24 @@ void _xine_close(commands_t *command, toxine_t *tox, void *data) { return_if_no_stream(tox); - - pinfo("xine_close():"); + + pinfo("xine_close():\n"); xine_close(tox->stream); - tox->xine_state &= ~XINE_OPEN; pinfo(".\n"); + tox->xine_state &= ~XINE_OPEN; } void _xine_dispose(commands_t *command, toxine_t *tox, void *data) { return_if_no_stream(tox); - pinfo("xine_dispose():"); + if(tox->event_queue) { + pinfo("xine_event_dispose_queue():\n"); + xine_event_dispose_queue(tox->event_queue); + pinfo(".\n"); + tox->event_queue = NULL; + } + + pinfo("xine_dispose():\n"); xine_dispose(tox->stream); tox->stream = NULL; tox->xine_state &= ~(XINE_OPEN | XINE_STREAM); @@ -1956,7 +1966,7 @@ frame = (uint8_t *) xine_xmalloc(sizeof(uint8_t) * size); - pinfo("xine_get_current_frame():"); + pinfo("xine_get_current_frame():\n"); if(xine_get_current_frame(tox->stream, &width, &height, &ratio_code, &format, frame)) { pinfo("get frame: %dx%d, ratio %d, format %d\n", width, height, ratio_code, format); @@ -1973,7 +1983,8 @@ } else perr("unable to get current frame\n"); - + + pinfo(".\n"); toxine_free(frame); } Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- xine_commands.h 16 Oct 2003 22:16:36 -0000 1.26 +++ xine_commands.h 7 Apr 2004 18:21:07 -0000 1.27 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by |
From: Daniel Caujolle-B. <f1...@us...> - 2004-04-07 18:34:09
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27158/src/plugins Modified Files: vo_aa.c vo_dxr3.c vo_none.c vo_plugin.h vo_x11.c Log Message: Big Fat Note: you need very recent xine-lib (>= rc3b). Ton of fixes. xine_exit/xine_new cycle works. Update licence year. Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- vo_aa.c 21 Jan 2003 16:53:37 -0000 1.13 +++ vo_aa.c 7 Apr 2004 18:21:07 -0000 1.14 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -72,22 +72,12 @@ } -static void *event_loop(void *data) { - toxine_t *tox = (toxine_t *) data; - /* toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; */ - /* aa_private_t *private = (aa_private_t *) vop->private; */ - - pthread_detach(pthread_self()); - - while(tox->video.running) - usleep(16666); - - pthread_exit(NULL); -} - static void deinit_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; aa_private_t *private = (aa_private_t *) vop->private; + + xine_close_video_driver(tox->xine, tox->video.port); + tox->video.port = NULL; private->init = 0; if(private->context) { @@ -99,7 +89,7 @@ } static void release_video_out(toxine_t *tox) { - toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; + toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.last_plugin; aa_private_t *private = (aa_private_t *) vop->private; if(private->init) @@ -142,7 +132,7 @@ private->init = 0; aa->video_out_init = init_video_out; - aa->video_out_event_loop = event_loop; + aa->video_out_event_loop = NULL; aa->video_out_deinit = deinit_video_out; aa->video_out_release = release_video_out; aa->get_identifier = get_identifier; Index: vo_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- vo_dxr3.c 21 Jan 2003 16:53:37 -0000 1.17 +++ vo_dxr3.c 7 Apr 2004 18:21:07 -0000 1.18 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -77,26 +77,18 @@ } -static void *event_loop(void *data) { - toxine_t *tox = (toxine_t *) data; - - pthread_detach(pthread_self()); - - while(tox->video.running) - usleep(16666); - - pthread_exit(NULL); -} - static void deinit_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; dxr3_private_t *private = (dxr3_private_t *) vop->private; + + xine_close_video_driver(tox->xine, tox->video.port); + tox->video.port = NULL; private->init = 0; } static void release_video_out(toxine_t *tox) { - toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; + toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.last_plugin; dxr3_private_t *private = (dxr3_private_t *) vop->private; if(private->init) @@ -142,7 +134,7 @@ private->init = 0; dxr3->video_out_init = init_video_out; - dxr3->video_out_event_loop = event_loop; + dxr3->video_out_event_loop = NULL; dxr3->video_out_deinit = deinit_video_out; dxr3->video_out_release = release_video_out; dxr3->get_identifier = get_identifier; Index: vo_none.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_none.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- vo_none.c 21 Jan 2003 16:53:38 -0000 1.10 +++ vo_none.c 7 Apr 2004 18:21:07 -0000 1.11 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -48,26 +48,18 @@ } -static void *event_loop(void *data) { - toxine_t *tox = (toxine_t *) data; - - pthread_detach(pthread_self()); - - while(tox->video.running) - usleep(16666); - - pthread_exit(NULL); -} - static void deinit_video_out(toxine_t *tox) { toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; none_private_t *private = (none_private_t *) vop->private; + xine_close_video_driver(tox->xine, tox->video.port); + tox->video.port = NULL; + private->init = 0; } static void release_video_out(toxine_t *tox) { - toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; + toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.last_plugin; none_private_t *private = (none_private_t *) vop->private; if(private->init) @@ -110,7 +102,7 @@ private->init = 0; none->video_out_init = init_video_out; - none->video_out_event_loop = event_loop; + none->video_out_event_loop = NULL; none->video_out_deinit = deinit_video_out; none->video_out_release = release_video_out; none->get_identifier = get_identifier; Index: vo_plugin.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_plugin.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- vo_plugin.h 21 Jan 2003 16:53:38 -0000 1.10 +++ vo_plugin.h 7 Apr 2004 18:21:07 -0000 1.11 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- vo_x11.c 22 May 2003 20:50:34 -0000 1.23 +++ vo_x11.c 7 Apr 2004 18:21:07 -0000 1.24 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002-2003 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2004 Daniel Caujolle-Bert <seg...@cl...> ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by @@ -289,32 +289,31 @@ x11_private_t *private = (x11_private_t *) vop->private; int screensaver_timer = 0; - while(!(tox->xine_state & XINE_STREAM)) - usec_sleep(100000); - while(tox->video.running) { int status; - if(tox->xine != NULL) { - status = xine_get_status(tox->stream); - - if(status == XINE_STATUS_PLAY) { - screensaver_timer++; - if(screensaver_timer >= private->fake_rate) { - screensaver_timer = 0; - reset_screensaver(vop); + if(tox->xine_state & XINE_STREAM) { + if(tox->xine != NULL) { + status = xine_get_status(tox->stream); + + if(status == XINE_STATUS_PLAY) { + screensaver_timer++; + if(screensaver_timer >= private->fake_rate) { + screensaver_timer = 0; + reset_screensaver(vop); + } } } + + if(private->cursor.visible) { + private->cursor.visible = !private->cursor.visible; + update_cursor_visibility(tox); + } + } - - if(private->cursor.visible) { - private->cursor.visible = !private->cursor.visible; - update_cursor_visibility(tox); - } - xine_usec_sleep(1000000); } - + pthread_exit(NULL); } @@ -957,21 +956,26 @@ toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; x11_private_t *private = (x11_private_t *) vop->private; XEvent myevent; - + int xconnection; + Bool got_xevent; + struct timeval tv; + fd_set r; + pthread_detach(pthread_self()); + XLockDisplay(private->display); + xconnection = ConnectionNumber(private->display); + XUnlockDisplay(private->display); + while(tox->video.running) { - Bool got_xevent; - struct timeval tv; - fd_set r; FD_ZERO(&r); - FD_SET(ConnectionNumber(private->display), &r); + FD_SET(xconnection, &r); tv.tv_sec = 0; tv.tv_usec = 33000; - select(ConnectionNumber(private->display) + 1, &r, 0, 0, &tv); + select(xconnection + 1, &r, 0, 0, &tv); XLockDisplay(private->display); got_xevent = XCheckIfEvent(private->display, &myevent, is_not_completion, (XPointer) NULL); @@ -998,7 +1002,11 @@ Status status; pthread_mutex_lock(&private->mutex); + pthread_join(private->timed_thread, NULL); + xine_close_video_driver(tox->xine, tox->video.port); + tox->video.port = NULL; + XLockDisplay(private->display); XUnmapWindow(private->display, private->x11_drawable[private->fullscreen].video_window); /* Waiting til' window's unmapped. */ @@ -1019,7 +1027,7 @@ XDestroyWindow(private->display, private->x11_drawable[private->fullscreen].video_window); XUnlockDisplay(private->display); - + XCloseDisplay(private->display); pthread_mutex_unlock(&private->mutex); @@ -1032,7 +1040,7 @@ * */ static void release_video_out(toxine_t *tox) { - toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; + toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.last_plugin; x11_private_t *private = (x11_private_t *) vop->private; if(private->init) |
From: Daniel Caujolle-B. <f1...@us...> - 2003-10-16 22:21:08
|
Update of /cvsroot/toxine/toxine/doc/man/en In directory sc8-pr-cvs1:/tmp/cvs-serv26294 Modified Files: toxine.1 Log Message: update man Index: toxine.1 =================================================================== RCS file: /cvsroot/toxine/toxine/doc/man/en/toxine.1,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- toxine.1 20 Sep 2002 23:48:06 -0000 1.21 +++ toxine.1 16 Oct 2003 22:21:05 -0000 1.22 @@ -1,7 +1,7 @@ .\" -*-Nroff-*- .\"" .\"" -.TH TOXINE 1x 2002-09-21 "toxine" +.TH TOXINE 1x 2003-10-17 "toxine" .SH NAME toxine \- a text program, using xine library. .SH SYNOPSIS @@ -40,13 +40,13 @@ .TP or add .TP -.BR #!/usr/local/bin/toxine\ \-s +.BR #!/home/daniel/usr/bin/toxine\ \-s in the first line of your script file. .TP A typical toxine's script look like: .nf -#!/usr/local/bin/toxine -s +#!/home/daniel/usr/bin/toxine -s set video driver xv set audio driver alsa09 @@ -218,6 +218,19 @@ .br .br .TP +.BR dumpstream +.br +.BR action: +.br +Dump stream informations (stream info and meta info). +.br + +.BR syntax: +.br +\ \ dumpstream +.br +.br +.TP .BR echo .br .BR action: @@ -743,7 +756,7 @@ .BR syntax: .br -\ \ waitfor <[MOUSE_BUTTON | MOUSE_MOVE | SPU_BUTTON | SPU_CLUT | UI_CHANNELS_CHANGED | UI_SET_TITLE | INPUT_MENU1 | INPUT_MENU2 | INPUT_MENU3 | INPUT_UP | INPUT_DOWN | INPUT_LEFT | INPUT_RIGHT | INPUT_SELECT | PLAYBACK_FINISHED | BRANCHED | NEED_NEXT_MRL | INPUT_NEXT | INPUT_PREVIOUS | INPUT_ANGLE_NEXT | INPUT_ANGLE_PREVIOUS | SPU_FORCEDISPLAY | FRAME_CHANGE | CLOSED_CAPTION | INPUT_BUTTON_FORCE | INPUT_MENU4 | INPUT_MENU5 | INPUT_MENU6 | INPUT_MENU7 | INPUT_NUMBER_0 | INPUT_NUMBER_1 | INPUT_NUMBER_2 | INPUT_NUMBER_3 | INPUT_NUMBER_4 | INPUT_NUMBER_5 | INPUT_NUMBER_6 | INPUT_NUMBER_7 | INPUT_NUMBER_8 | INPUT_NUMBER_9 | INPUT_NUMBER_10_ADD | ASPECT_CHANGE | OUTPUT_VIDEO | OUTPUT_NO_VIDEO | UI_MESSAGE | FOREVER | NOTHING]> +\ \ waitfor <[UI_PLAYBACK_FINISHED | UI_CHANNELS_CHANGED | UI_SET_TITLE | UI_MESSAGE | FRAME_FORMAT_CHANGE | AUDIO_LEVEL | QUIT | PROGRESS | MRL_REFERENCE | UI_NUM_BUTTONS | SPU_BUTTON | DROPPED_FRAMES | INPUT_MOUSE_BUTTON | INPUT_MOUSE_MOVE | INPUT_MENU1 | INPUT_MENU2 | INPUT_MENU3 | INPUT_MENU4 | INPUT_MENU5 | INPUT_MENU6 | INPUT_MENU7 | INPUT_UP | INPUT_DOWN | INPUT_LEFT | INPUT_RIGHT | INPUT_SELECT | INPUT_NEXT | INPUT_PREVIOUS | INPUT_ANGLE_NEXT | INPUT_ANGLE_PREVIOUS | INPUT_BUTTON_FORCE | INPUT_NUMBER_0 | INPUT_NUMBER_1 | INPUT_NUMBER_2 | INPUT_NUMBER_3 | INPUT_NUMBER_4 | INPUT_NUMBER_5 | INPUT_NUMBER_6 | INPUT_NUMBER_7 | INPUT_NUMBER_8 | INPUT_NUMBER_9 | INPUT_NUMBER_10_ADD | SET_V4L2 | PVR_SAVE | PVR_REPORT_NAME | PVR_REALTIME | PVR_PAUSE | SET_MPEG_DATA | FOREVER | NOTHING]> .br \ \ waitfor status <[PLAY | STOP | QUIT | PAUSE | SLOW_4 | SLOW_2 | NORMAL | FAST_2 | FAST_4]> .br @@ -762,6 +775,19 @@ .br .br .TP +.BR xine_stream_new +.br +.BR action: +.br +Create a new stream object. +.br + +.BR syntax: +.br +\ \ xine_stream_new +.br +.br +.TP .BR xine_init .br .BR action: @@ -841,7 +867,24 @@ .br \ \ \- info type can be: .br -\ \ [XINE_STREAM_INFO_BITRATE | XINE_STREAM_INFO_SEEKABLE | XINE_STREAM_INFO_VIDEO_WIDTH | XINE_STREAM_INFO_VIDEO_HEIGHT | XINE_STREAM_INFO_VIDEO_RATIO | XINE_STREAM_INFO_VIDEO_CHANNELS | XINE_STREAM_INFO_VIDEO_STREAMS | XINE_STREAM_INFO_VIDEO_BITRATE | XINE_STREAM_INFO_FRAME_DURATION | XINE_STREAM_INFO_AUDIO_CHANNELS | XINE_STREAM_INFO_AUDIO_BITS | XINE_STREAM_INFO_AUDIO_SAMPLERATE | XINE_STREAM_INFO_AUDIO_BITRATE | XINE_STREAM_INFO_HAS_CHAPTERS] +\ \ [XINE_STREAM_INFO_BITRATE | XINE_STREAM_INFO_SEEKABLE | XINE_STREAM_INFO_VIDEO_WIDTH | XINE_STREAM_INFO_VIDEO_HEIGHT | XINE_STREAM_INFO_VIDEO_RATIO | XINE_STREAM_INFO_VIDEO_CHANNELS | XINE_STREAM_INFO_VIDEO_STREAMS | XINE_STREAM_INFO_VIDEO_BITRATE | XINE_STREAM_INFO_VIDEO_FOURCC | XINE_STREAM_INFO_VIDEO_HANDLED | XINE_STREAM_INFO_FRAME_DURATION | XINE_STREAM_INFO_AUDIO_CHANNELS | XINE_STREAM_INFO_AUDIO_BITS | XINE_STREAM_INFO_AUDIO_SAMPLERATE | XINE_STREAM_INFO_AUDIO_BITRATE | XINE_STREAM_INFO_AUDIO_FOURCC | XINE_STREAM_INFO_AUDIO_HANDLED | XINE_STREAM_INFO_HAS_CHAPTERS | XINE_STREAM_INFO_HAS_VIDEO | XINE_STREAM_INFO_HAS_AUDIO | XINE_STREAM_INFO_IGNORE_VIDEO | XINE_STREAM_INFO_IGNORE_AUDIO | XINE_STREAM_INFO_IGNORE_SPU | XINE_STREAM_INFO_VIDEO_HAS_STILL | XINE_STREAM_INFO_MAX_AUDIO_CHANNEL | XINE_STREAM_INFO_MAX_SPU_CHANNEL] +.br +.br +.TP +.BR xine_get_meta_info +.br +.BR action: +.br +Get meta info. +.br + +.BR syntax: +.br +\ \ xine_get_meta_info <info type> +.br +\ \ \- info type can be: +.br +\ \ [XINE_META_INFO_TITLE | XINE_META_INFO_COMMENT | XINE_META_INFO_ARTIST | XINE_META_INFO_GENRE | XINE_META_INFO_ALBUM | XINE_META_INFO_YEAR | XINE_META_INFO_VIDEOCODEC | XINE_META_INFO_AUDIOCODEC | XINE_META_INFO_SYSTEMLAYER | XINE_META_INFO_INPUT_PLUGIN] .br .br .TP @@ -878,6 +921,10 @@ Deinitialize xine engine.xine_exit .br +.BR syntax: +.br +\ \ xine_exit +.br .br .TP .BR xine_get_error @@ -1146,7 +1193,7 @@ .br .br .TP -.BR xine_send_event +.BR xine_event_send .br .BR action: .br @@ -1155,11 +1202,11 @@ .BR syntax: .br -\ \ xine_send_event <event> +\ \ xine_event_send <event> .br \ \ \- event can be: .br -\ \ [XINE_EVENT_MOUSE_BUTTON | XINE_EVENT_MOUSE_MOVE | XINE_EVENT_SPU_BUTTON | XINE_EVENT_SPU_CLUT | XINE_EVENT_UI_CHANNELS_CHANGED | XINE_EVENT_UI_SET_TITLE | XINE_EVENT_INPUT_MENU1 | XINE_EVENT_INPUT_MENU2 | XINE_EVENT_INPUT_MENU3 | XINE_EVENT_INPUT_UP | XINE_EVENT_INPUT_DOWN | XINE_EVENT_INPUT_LEFT | XINE_EVENT_INPUT_RIGHT | XINE_EVENT_INPUT_SELECT | XINE_EVENT_PLAYBACK_FINISHED | XINE_EVENT_BRANCHED | XINE_EVENT_NEED_NEXT_MRL | XINE_EVENT_INPUT_NEXT | XINE_EVENT_INPUT_PREVIOUS | XINE_EVENT_INPUT_ANGLE_NEXT | XINE_EVENT_INPUT_ANGLE_PREVIOUS | XINE_EVENT_SPU_FORCEDISPLAY | XINE_EVENT_FRAME_CHANGE | XINE_EVENT_CLOSED_CAPTION | XINE_EVENT_INPUT_BUTTON_FORCE | XINE_EVENT_INPUT_MENU4 | XINE_EVENT_INPUT_MENU5 | XINE_EVENT_INPUT_MENU6 | XINE_EVENT_INPUT_MENU7 | XINE_EVENT_INPUT_NUMBER_0 | XINE_EVENT_INPUT_NUMBER_1 | XINE_EVENT_INPUT_NUMBER_2 | XINE_EVENT_INPUT_NUMBER_3 | XINE_EVENT_INPUT_NUMBER_4 | XINE_EVENT_INPUT_NUMBER_5 | XINE_EVENT_INPUT_NUMBER_6 | XINE_EVENT_INPUT_NUMBER_7 | XINE_EVENT_INPUT_NUMBER_8 | XINE_EVENT_INPUT_NUMBER_9 | XINE_EVENT_INPUT_NUMBER_10_ADD | XINE_EVENT_ASPECT_CHANGE | XINE_EVENT_OUTPUT_VIDEO | XINE_EVENT_OUTPUT_NO_VIDEO] +\ \ [XINE_EVENT_UI_PLAYBACK_FINISHED | XINE_EVENT_UI_CHANNELS_CHANGED | XINE_EVENT_UI_SET_TITLE | XINE_EVENT_UI_MESSAGE | XINE_EVENT_FRAME_FORMAT_CHANGE | XINE_EVENT_AUDIO_LEVEL | XINE_EVENT_QUIT | XINE_EVENT_PROGRESS | XINE_EVENT_MRL_REFERENCE | XINE_EVENT_UI_NUM_BUTTONS | XINE_EVENT_SPU_BUTTON | XINE_EVENT_DROPPED_FRAMES | XINE_EVENT_INPUT_MOUSE_BUTTON | XINE_EVENT_INPUT_MOUSE_MOVE | XINE_EVENT_INPUT_MENU1 | XINE_EVENT_INPUT_MENU2 | XINE_EVENT_INPUT_MENU3 | XINE_EVENT_INPUT_MENU4 | XINE_EVENT_INPUT_MENU5 | XINE_EVENT_INPUT_MENU6 | XINE_EVENT_INPUT_MENU7 | XINE_EVENT_INPUT_UP | XINE_EVENT_INPUT_DOWN | XINE_EVENT_INPUT_LEFT | XINE_EVENT_INPUT_RIGHT | XINE_EVENT_INPUT_SELECT | XINE_EVENT_INPUT_NEXT | XINE_EVENT_INPUT_PREVIOUS | XINE_EVENT_INPUT_ANGLE_NEXT | XINE_EVENT_INPUT_ANGLE_PREVIOUS | XINE_EVENT_INPUT_BUTTON_FORCE | XINE_EVENT_INPUT_NUMBER_0 | XINE_EVENT_INPUT_NUMBER_1 | XINE_EVENT_INPUT_NUMBER_2 | XINE_EVENT_INPUT_NUMBER_3 | XINE_EVENT_INPUT_NUMBER_4 | XINE_EVENT_INPUT_NUMBER_5 | XINE_EVENT_INPUT_NUMBER_6 | XINE_EVENT_INPUT_NUMBER_7 | XINE_EVENT_INPUT_NUMBER_8 | XINE_EVENT_INPUT_NUMBER_9 | XINE_EVENT_INPUT_NUMBER_10_ADD | XINE_EVENT_SET_V4L2 | XINE_EVENT_PVR_SAVE | XINE_EVENT_PVR_REPORT_NAME | XINE_EVENT_PVR_REALTIME | XINE_EVENT_PVR_PAUSE | XINE_EVENT_SET_MPEG_DATA] .br .br .TP @@ -1215,7 +1262,7 @@ .br .br .TP -.BR xine_load_config +.BR xine_config_load .br .BR action: .br @@ -1224,11 +1271,11 @@ .BR syntax: .br -\ \ xine_load_config [filename] +\ \ xine_config_load [filename] .br .br .TP -.BR xine_save_config +.BR xine_config_save .br .BR action: .br @@ -1237,11 +1284,11 @@ .BR syntax: .br -\ \ xine_save_config [filename] +\ \ xine_config_save [filename] .br .br .TP -.BR xine_reset_config +.BR xine_config_reset .br .BR action: .br @@ -1250,7 +1297,7 @@ .BR syntax: .br -\ \ xine_reset_config +\ \ xine_config_reset .br .br .TP @@ -1267,6 +1314,19 @@ .br .br .TP +.BR xine_get_version_string +.br +.BR action: +.br +Get version string. +.br + +.BR syntax: +.br +\ \ xine_get_version_string +.br +.br +.TP .BR xine_check_version .br .BR action: @@ -1277,6 +1337,71 @@ .BR syntax: .br \ \ xine_check_version <major>.<minor>.<sub> +.br +.br +.TP +.BR xine_close +.br +.BR action: +.br +Close current stream. +.br + +.BR syntax: +.br +\ \ xine_close +.br +.br +.TP +.BR xine_dispose +.br +.BR action: +.br +Dispose all stream related resources. +.br + +.BR syntax: +.br +\ \ xine_dispose +.br +.br +.TP +.BR xine_get_file_extensions +.br +.BR action: +.br +Return list of file extensions supported by 'demux by extensions' stage. +.br + +.BR syntax: +.br +\ \ xine_get_file_extensions +.br +.br +.TP +.BR xine_get_mime_types +.br +.BR action: +.br +Return list of supported mimes types. +.br + +.BR syntax: +.br +\ \ xine_get_mime_types +.br +.br +.TP +.BR xine_get_current_frame +.br +.BR action: +.br +Get current displayed frame, and save it into a file. +.br + +.BR syntax: +.br +\ \ xine_get_current_frame [filename] .br .br .TP |
From: Daniel Caujolle-B. <f1...@us...> - 2003-10-16 22:16:43
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv25006 Modified Files: commands.c xine_commands.c xine_commands.h Log Message: update EVENT_* Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- commands.c 15 Oct 2003 14:44:52 -0000 1.55 +++ commands.c 16 Oct 2003 22:16:35 -0000 1.56 @@ -50,7 +50,7 @@ char *name; uint32_t event; } event_struct[] = { - { "PLAYBACK_FINISHED" , XINE_EVENT_UI_PLAYBACK_FINISHED }, + { "UI_PLAYBACK_FINISHED", XINE_EVENT_UI_PLAYBACK_FINISHED }, { "UI_CHANNELS_CHANGED" , XINE_EVENT_UI_CHANNELS_CHANGED }, { "UI_SET_TITLE" , XINE_EVENT_UI_SET_TITLE }, { "UI_MESSAGE" , XINE_EVENT_UI_MESSAGE }, @@ -58,22 +58,10 @@ { "AUDIO_LEVEL" , XINE_EVENT_AUDIO_LEVEL }, { "QUIT" , XINE_EVENT_QUIT }, { "PROGRESS" , XINE_EVENT_PROGRESS }, - /* + { "MRL_REFERENCE" , XINE_EVENT_MRL_REFERENCE }, + { "UI_NUM_BUTTONS" , XINE_EVENT_UI_NUM_BUTTONS }, { "SPU_BUTTON" , XINE_EVENT_SPU_BUTTON }, - { "SPU_CLUT" , XINE_EVENT_SPU_CLUT }, - { "UI_CHANNELS_CHANGED" , XINE_EVENT_UI_CHANNELS_CHANGED }, - { "UI_SET_TITLE" , XINE_EVENT_UI_SET_TITLE }, - { "PLAYBACK_FINISHED" , XINE_EVENT_PLAYBACK_FINISHED }, - { "BRANCHED" , XINE_EVENT_BRANCHED }, - { "NEED_NEXT_MRL" , XINE_EVENT_NEED_NEXT_MRL }, - { "SPU_FORCEDISPLAY" , XINE_EVENT_SPU_FORCEDISPLAY }, - { "FRAME_CHANGE" , XINE_EVENT_FRAME_CHANGE }, - { "CLOSED_CAPTION" , XINE_EVENT_CLOSED_CAPTION }, - { "ASPECT_CHANGE" , XINE_EVENT_ASPECT_CHANGE }, - { "OUTPUT_VIDEO" , XINE_EVENT_OUTPUT_VIDEO }, - { "OUTPUT_NO_VIDEO" , XINE_EVENT_OUTPUT_NO_VIDEO }, - { "UI_MESSAGE" , XINE_EVENT_UI_MESSAGE }, - */ + { "DROPPED_FRAMES" , XINE_EVENT_DROPPED_FRAMES }, { "INPUT_MOUSE_BUTTON" , XINE_EVENT_INPUT_MOUSE_BUTTON }, { "INPUT_MOUSE_MOVE" , XINE_EVENT_INPUT_MOUSE_MOVE }, { "INPUT_MENU1" , XINE_EVENT_INPUT_MENU1 }, @@ -104,9 +92,15 @@ { "INPUT_NUMBER_8" , XINE_EVENT_INPUT_NUMBER_8 }, { "INPUT_NUMBER_9" , XINE_EVENT_INPUT_NUMBER_9 }, { "INPUT_NUMBER_10_ADD" , XINE_EVENT_INPUT_NUMBER_10_ADD }, + { "SET_V4L2" , XINE_EVENT_SET_V4L2 }, + { "PVR_SAVE" , XINE_EVENT_PVR_SAVE }, + { "PVR_REPORT_NAME" , XINE_EVENT_PVR_REPORT_NAME }, + { "PVR_REALTIME" , XINE_EVENT_PVR_REALTIME }, + { "PVR_PAUSE" , XINE_EVENT_PVR_PAUSE }, + { "SET_MPEG_DATA" , XINE_EVENT_SET_MPEG_DATA }, /* Following aren't xine's events, just hack */ - { "FOREVER" , XINE_EVENT_INPUT_NUMBER_10_ADD + 1 }, - { "NOTHING" , XINE_EVENT_INPUT_NUMBER_10_ADD + 1 }, + { "FOREVER" , XINE_EVENT_SET_MPEG_DATA + 1 }, + { "NOTHING" , XINE_EVENT_SET_MPEG_DATA + 1 }, { NULL , 0 } }; @@ -394,19 +388,21 @@ }, { "waitfor", REQUIRE_ARGS, do_waitfor, "Wait for an event.", - "waitfor <[MOUSE_BUTTON | MOUSE_MOVE | SPU_BUTTON | SPU_CLUT |\n" - " UI_CHANNELS_CHANGED | UI_SET_TITLE | INPUT_MENU1 |\n" - " INPUT_MENU2 | INPUT_MENU3 | INPUT_UP | INPUT_DOWN |\n" - " INPUT_LEFT | INPUT_RIGHT | INPUT_SELECT | PLAYBACK_FINISHED |\n" - " BRANCHED | NEED_NEXT_MRL | INPUT_NEXT | INPUT_PREVIOUS |\n" - " INPUT_ANGLE_NEXT | INPUT_ANGLE_PREVIOUS | SPU_FORCEDISPLAY |\n" - " FRAME_CHANGE | CLOSED_CAPTION | INPUT_BUTTON_FORCE |\n" - " INPUT_MENU4 | INPUT_MENU5 | INPUT_MENU6 | INPUT_MENU7 |\n" - " INPUT_NUMBER_0 | INPUT_NUMBER_1 | INPUT_NUMBER_2 |\n" - " INPUT_NUMBER_3 | INPUT_NUMBER_4 | INPUT_NUMBER_5 |\n" - " INPUT_NUMBER_6 | INPUT_NUMBER_7 | INPUT_NUMBER_8 |\n" - " INPUT_NUMBER_9 | INPUT_NUMBER_10_ADD | ASPECT_CHANGE |\n" - " OUTPUT_VIDEO | OUTPUT_NO_VIDEO | UI_MESSAGE | FOREVER | NOTHING]>\n" + "waitfor <[UI_PLAYBACK_FINISHED | UI_CHANNELS_CHANGED | UI_SET_TITLE |\n" + " UI_MESSAGE | FRAME_FORMAT_CHANGE | AUDIO_LEVEL | QUIT |\n" + " PROGRESS | MRL_REFERENCE | UI_NUM_BUTTONS | SPU_BUTTON |\n" + " DROPPED_FRAMES | INPUT_MOUSE_BUTTON | INPUT_MOUSE_MOVE |\n" + " INPUT_MENU1 | INPUT_MENU2 | INPUT_MENU3 | INPUT_MENU4 |\n" + " INPUT_MENU5 | INPUT_MENU6 | INPUT_MENU7 | INPUT_UP |\n" + " INPUT_DOWN | INPUT_LEFT | INPUT_RIGHT | INPUT_SELECT |\n" + " INPUT_NEXT | INPUT_PREVIOUS | INPUT_ANGLE_NEXT |\n" + " INPUT_ANGLE_PREVIOUS | INPUT_BUTTON_FORCE | INPUT_NUMBER_0 |\n" + " INPUT_NUMBER_1 | INPUT_NUMBER_2 | INPUT_NUMBER_3 |\n" + " INPUT_NUMBER_4 | INPUT_NUMBER_5 | INPUT_NUMBER_6 |\n" + " INPUT_NUMBER_7 | INPUT_NUMBER_8 | INPUT_NUMBER_9 |\n" + " INPUT_NUMBER_10_ADD | SET_V4L2 | PVR_SAVE |\n" + " PVR_REPORT_NAME | PVR_REALTIME | PVR_PAUSE |\n" + " SET_MPEG_DATA | FOREVER | NOTHING]>\n" "waitfor status <[PLAY | STOP | QUIT | PAUSE | SLOW_4 | SLOW_2 | NORMAL |\n" " FAST_2 | FAST_4]>" }, @@ -504,6 +500,8 @@ */ void toxine_event_listener(void *data, const xine_event_t *event) { toxine_t *tox = (toxine_t *) data; + int i; + char *event_name = NULL; pthread_mutex_lock(&tox->event.mutex); tox->event.last.type = event->type; @@ -514,169 +512,20 @@ finished_cb(tox); tox->ignore_finished = 0; break; - - /* - case XINE_EVENT_NEED_NEXT_MRL: { - xine_next_mrl_event_t *uevent = (xine_next_mrl_event_t *)event; - - uevent->handled = 1; - uevent->mrl = toxine_get_next_mrl(tox); - } - break; - - case XINE_EVENT_BRANCHED: - toxine_branched(tox); + default: break; - */ - } -#warning FIXME -#if 0 + pinfo("Get xine event:\n"); poutalign(); - - switch(tox->event.last.type) { - case XINE_EVENT_MOUSE_BUTTON: - pout("XINE_EVENT_MOUSE_BUTTON"); - break; - case XINE_EVENT_MOUSE_MOVE: - pout("XINE_EVENT_MOUSE_MOVE"); - break; - case XINE_EVENT_SPU_BUTTON: - pout("XINE_EVENT_SPU_BUTTON"); - break; - case XINE_EVENT_SPU_CLUT: - pout("XINE_EVENT_SPU_CLUT"); - break; - case XINE_EVENT_UI_CHANNELS_CHANGED: - pout("XINE_EVENT_UI_CHANNELS_CHANGED"); - break; - case XINE_EVENT_UI_SET_TITLE: - pout("XINE_EVENT_UI_SET_TITLE"); - break; - case XINE_EVENT_INPUT_MENU1: - pout("XINE_EVENT_INPUT_MENU1"); - break; - case XINE_EVENT_INPUT_MENU2: - pout("XINE_EVENT_INPUT_MENU2"); - break; - case XINE_EVENT_INPUT_MENU3: - pout("XINE_EVENT_INPUT_MENU3"); - break; - case XINE_EVENT_INPUT_UP: - pout("XINE_EVENT_INPUT_UP"); - break; - case XINE_EVENT_INPUT_DOWN: - pout("XINE_EVENT_INPUT_DOWN"); - break; - case XINE_EVENT_INPUT_LEFT: - pout("XINE_EVENT_INPUT_LEFT"); - break; - case XINE_EVENT_INPUT_RIGHT: - pout("XINE_EVENT_INPUT_RIGHT"); - break; - case XINE_EVENT_INPUT_SELECT: - pout("XINE_EVENT_INPUT_SELECT"); - break; - case XINE_EVENT_PLAYBACK_FINISHED: - pout("XINE_EVENT_PLAYBACK_FINISHED"); - break; - case XINE_EVENT_BRANCHED: - pout("XINE_EVENT_BRANCHED"); - break; - case XINE_EVENT_NEED_NEXT_MRL: - pout("XINE_EVENT_NEED_NEXT_MRL"); - break; - case XINE_EVENT_INPUT_NEXT: - pout("XINE_EVENT_INPUT_NEXT"); - break; - case XINE_EVENT_INPUT_PREVIOUS: - pout("XINE_EVENT_INPUT_PREVIOUS"); - break; - case XINE_EVENT_INPUT_ANGLE_NEXT: - pout("XINE_EVENT_INPUT_ANGLE_NEXT"); - break; - case XINE_EVENT_INPUT_ANGLE_PREVIOUS: - pout("XINE_EVENT_INPUT_ANGLE_PREVIOUS"); - break; - case XINE_EVENT_SPU_FORCEDISPLAY: - pout("XINE_EVENT_SPU_FORCEDISPLAY"); - break; - case XINE_EVENT_FRAME_CHANGE: - pout("XINE_EVENT_FRAME_CHANGE"); - break; - case XINE_EVENT_CLOSED_CAPTION: - pout("XINE_EVENT_CLOSED_CAPTION"); - break; - case XINE_EVENT_INPUT_BUTTON_FORCE: - pout("XINE_EVENT_INPUT_BUTTON_FORCE"); - break; - case XINE_EVENT_INPUT_MENU4: - pout("XINE_EVENT_INPUT_MENU4"); - break; - case XINE_EVENT_INPUT_MENU5: - pout("XINE_EVENT_INPUT_MENU5"); - break; - case XINE_EVENT_INPUT_MENU6: - pout("XINE_EVENT_INPUT_MENU6"); - break; - case XINE_EVENT_INPUT_MENU7: - pout("XINE_EVENT_INPUT_MENU7"); - break; - case XINE_EVENT_INPUT_NUMBER_0: - pout("XINE_EVENT_INPUT_NUMBER_0"); - break; - case XINE_EVENT_INPUT_NUMBER_1: - pout("XINE_EVENT_INPUT_NUMBER_1"); - break; - case XINE_EVENT_INPUT_NUMBER_2: - pout("XINE_EVENT_INPUT_NUMBER_2"); - break; - case XINE_EVENT_INPUT_NUMBER_3: - pout("XINE_EVENT_INPUT_NUMBER_3"); - break; - case XINE_EVENT_INPUT_NUMBER_4: - pout("XINE_EVENT_INPUT_NUMBER_4"); - break; - case XINE_EVENT_INPUT_NUMBER_5: - pout("XINE_EVENT_INPUT_NUMBER_5"); - break; - case XINE_EVENT_INPUT_NUMBER_6: - pout("XINE_EVENT_INPUT_NUMBER_6"); - break; - case XINE_EVENT_INPUT_NUMBER_7: - pout("XINE_EVENT_INPUT_NUMBER_7"); - break; - case XINE_EVENT_INPUT_NUMBER_8: - pout("XINE_EVENT_INPUT_NUMBER_8"); - break; - case XINE_EVENT_INPUT_NUMBER_9: - pout("XINE_EVENT_INPUT_NUMBER_9"); - break; - case XINE_EVENT_INPUT_NUMBER_10_ADD: - pout("XINE_EVENT_INPUT_NUMBER_10_ADD"); - break; - case XINE_EVENT_ASPECT_CHANGE: - pout("XINE_EVENT_ASPECT_CHANGE"); - break; - case XINE_EVENT_OUTPUT_VIDEO: - pout("XINE_EVENT_OUTPUT_VIDEO"); - break; - case XINE_EVENT_OUTPUT_NO_VIDEO: - pout("XINE_EVENT_OUTPUT_NO_VIDEO"); - break; - case XINE_EVENT_UI_MESSAGE: - pout("XINE_EVENT_UI_MESSAGE"); - break; - case XINE_EVENT_AUDIO_LEVEL: - pout("XINE_EVENT_AUDIO_LEVEL"); - break; - default: - pout("UNKNOWN EVENT"); - break; + for(i = 0; event_struct[i].name != NULL; i++) { + if(event_struct[i].event == tox->event.last.type) { + event_name = event_struct[i].name; + break; + } } + pout("%s", (event_name) ? event_name : "UNKNOWN EVENT"); pinfo("\n"); -#endif if(tox->video.cur_plugin && tox->video.cur_plugin->receive_xine_event) tox->video.cur_plugin->receive_xine_event(tox, event); Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- xine_commands.c 15 Oct 2003 14:44:52 -0000 1.40 +++ xine_commands.c 16 Oct 2003 22:16:36 -0000 1.41 @@ -97,6 +97,18 @@ char *name; int type; } event_types[] = { + { "XINE_EVENT_UI_PLAYBACK_FINISHED", XINE_EVENT_UI_PLAYBACK_FINISHED }, + { "XINE_EVENT_UI_CHANNELS_CHANGED" , XINE_EVENT_UI_CHANNELS_CHANGED }, + { "XINE_EVENT_UI_SET_TITLE" , XINE_EVENT_UI_SET_TITLE }, + { "XINE_EVENT_UI_MESSAGE" , XINE_EVENT_UI_MESSAGE }, + { "XINE_EVENT_FRAME_FORMAT_CHANGE" , XINE_EVENT_FRAME_FORMAT_CHANGE }, + { "XINE_EVENT_AUDIO_LEVEL" , XINE_EVENT_AUDIO_LEVEL }, + { "XINE_EVENT_QUIT" , XINE_EVENT_QUIT }, + { "XINE_EVENT_PROGRESS" , XINE_EVENT_PROGRESS }, + { "XINE_EVENT_MRL_REFERENCE" , XINE_EVENT_MRL_REFERENCE }, + { "XINE_EVENT_UI_NUM_BUTTONS" , XINE_EVENT_UI_NUM_BUTTONS }, + { "XINE_EVENT_SPU_BUTTON" , XINE_EVENT_SPU_BUTTON }, + { "XINE_EVENT_DROPPED_FRAMES" , XINE_EVENT_DROPPED_FRAMES }, { "XINE_EVENT_INPUT_MOUSE_BUTTON" , XINE_EVENT_INPUT_MOUSE_BUTTON }, { "XINE_EVENT_INPUT_MOUSE_MOVE" , XINE_EVENT_INPUT_MOUSE_MOVE }, { "XINE_EVENT_INPUT_MENU1" , XINE_EVENT_INPUT_MENU1 }, @@ -127,6 +139,12 @@ { "XINE_EVENT_INPUT_NUMBER_8" , XINE_EVENT_INPUT_NUMBER_8 }, { "XINE_EVENT_INPUT_NUMBER_9" , XINE_EVENT_INPUT_NUMBER_9 }, { "XINE_EVENT_INPUT_NUMBER_10_ADD" , XINE_EVENT_INPUT_NUMBER_10_ADD }, + { "XINE_EVENT_SET_V4L2" , XINE_EVENT_SET_V4L2 }, + { "XINE_EVENT_PVR_SAVE" , XINE_EVENT_PVR_SAVE }, + { "XINE_EVENT_PVR_REPORT_NAME" , XINE_EVENT_PVR_REPORT_NAME }, + { "XINE_EVENT_PVR_REALTIME" , XINE_EVENT_PVR_REALTIME }, + { "XINE_EVENT_PVR_PAUSE" , XINE_EVENT_PVR_PAUSE }, + { "XINE_EVENT_SET_MPEG_DATA" , XINE_EVENT_SET_MPEG_DATA }, { NULL , 0 } }; Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- xine_commands.h 22 May 2003 20:50:34 -0000 1.25 +++ xine_commands.h 16 Oct 2003 22:16:36 -0000 1.26 @@ -355,25 +355,24 @@ "Send an event to the engine.", \ "xine_event_send <event>\n" \ " - event can be:\n" \ - " [XINE_EVENT_MOUSE_BUTTON | XINE_EVENT_MOUSE_MOVE | XINE_EVENT_SPU_BUTTON |\n" \ - " XINE_EVENT_SPU_CLUT | XINE_EVENT_UI_CHANNELS_CHANGED |\n" \ - " XINE_EVENT_UI_SET_TITLE | XINE_EVENT_INPUT_MENU1 | XINE_EVENT_INPUT_MENU2 |\n" \ - " XINE_EVENT_INPUT_MENU3 | XINE_EVENT_INPUT_UP | XINE_EVENT_INPUT_DOWN |\n" \ - " XINE_EVENT_INPUT_LEFT | XINE_EVENT_INPUT_RIGHT | XINE_EVENT_INPUT_SELECT |\n" \ - " XINE_EVENT_PLAYBACK_FINISHED | XINE_EVENT_BRANCHED |\n" \ - " XINE_EVENT_NEED_NEXT_MRL | XINE_EVENT_INPUT_NEXT |\n" \ - " XINE_EVENT_INPUT_PREVIOUS | XINE_EVENT_INPUT_ANGLE_NEXT |\n" \ - " XINE_EVENT_INPUT_ANGLE_PREVIOUS | XINE_EVENT_SPU_FORCEDISPLAY |\n" \ - " XINE_EVENT_FRAME_CHANGE | XINE_EVENT_CLOSED_CAPTION |\n" \ - " XINE_EVENT_INPUT_BUTTON_FORCE | XINE_EVENT_INPUT_MENU4 |\n" \ - " XINE_EVENT_INPUT_MENU5 | XINE_EVENT_INPUT_MENU6 | XINE_EVENT_INPUT_MENU7 |\n" \ - " XINE_EVENT_INPUT_NUMBER_0 | XINE_EVENT_INPUT_NUMBER_1 |\n" \ - " XINE_EVENT_INPUT_NUMBER_2 | XINE_EVENT_INPUT_NUMBER_3 |\n" \ - " XINE_EVENT_INPUT_NUMBER_4 | XINE_EVENT_INPUT_NUMBER_5 |\n" \ - " XINE_EVENT_INPUT_NUMBER_6 | XINE_EVENT_INPUT_NUMBER_7 |\n" \ - " XINE_EVENT_INPUT_NUMBER_8 | XINE_EVENT_INPUT_NUMBER_9 |\n" \ - " XINE_EVENT_INPUT_NUMBER_10_ADD | XINE_EVENT_ASPECT_CHANGE |\n" \ - " XINE_EVENT_OUTPUT_VIDEO | XINE_EVENT_OUTPUT_NO_VIDEO]" \ + " [XINE_EVENT_UI_PLAYBACK_FINISHED | XINE_EVENT_UI_CHANNELS_CHANGED |\n" \ + " XINE_EVENT_UI_SET_TITLE | XINE_EVENT_UI_MESSAGE | XINE_EVENT_FRAME_FORMAT_CHANGE |\n" \ + " XINE_EVENT_AUDIO_LEVEL | XINE_EVENT_QUIT | XINE_EVENT_PROGRESS |\n" \ + " XINE_EVENT_MRL_REFERENCE | XINE_EVENT_UI_NUM_BUTTONS | XINE_EVENT_SPU_BUTTON |\n" \ + " XINE_EVENT_DROPPED_FRAMES | XINE_EVENT_INPUT_MOUSE_BUTTON |\n" \ + " XINE_EVENT_INPUT_MOUSE_MOVE | XINE_EVENT_INPUT_MENU1 | XINE_EVENT_INPUT_MENU2 |\n" \ + " XINE_EVENT_INPUT_MENU3 | XINE_EVENT_INPUT_MENU4 | XINE_EVENT_INPUT_MENU5 |\n" \ + " XINE_EVENT_INPUT_MENU6 | XINE_EVENT_INPUT_MENU7 | XINE_EVENT_INPUT_UP |\n" \ + " XINE_EVENT_INPUT_DOWN | XINE_EVENT_INPUT_LEFT | XINE_EVENT_INPUT_RIGHT |\n" \ + " XINE_EVENT_INPUT_SELECT | XINE_EVENT_INPUT_NEXT | XINE_EVENT_INPUT_PREVIOUS |\n" \ + " XINE_EVENT_INPUT_ANGLE_NEXT | XINE_EVENT_INPUT_ANGLE_PREVIOUS |\n" \ + " XINE_EVENT_INPUT_BUTTON_FORCE | XINE_EVENT_INPUT_NUMBER_0 | \n" \ + " XINE_EVENT_INPUT_NUMBER_1 | XINE_EVENT_INPUT_NUMBER_2 | XINE_EVENT_INPUT_NUMBER_3 |\n" \ + " XINE_EVENT_INPUT_NUMBER_4 | XINE_EVENT_INPUT_NUMBER_5 | XINE_EVENT_INPUT_NUMBER_6 |\n" \ + " XINE_EVENT_INPUT_NUMBER_7 | XINE_EVENT_INPUT_NUMBER_8 | XINE_EVENT_INPUT_NUMBER_9 |\n" \ + " XINE_EVENT_INPUT_NUMBER_10_ADD | XINE_EVENT_SET_V4L2 | XINE_EVENT_PVR_SAVE |\n" \ + " XINE_EVENT_PVR_REPORT_NAME | XINE_EVENT_PVR_REALTIME | XINE_EVENT_PVR_PAUSE |\n" \ + " XINE_EVENT_SET_MPEG_DATA]" \ }, \ { "xine_config_get_first_entry", NO_ARGS, _xine_config_get_first_entry, \ "Get first entry in xine config object.", \ |