[Toxine-cvs] CVS: toxine/src commands.c,1.56,1.57 commands.h,1.5,1.6 common.h,1.24,1.25 loader.c,1.1
Brought to you by:
f1rmb
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 |