toxine-cvs Mailing List for toxine (Page 11)
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...> - 2002-07-08 12:54:51
|
Update of /cvsroot/toxine/toxine/doc In directory usw-pr-cvs1:/tmp/cvs-serv8243/doc Modified Files: Makefile.am Log Message: Add playlist load/save. Support playlist format files (only for load): XMMS/XMMS(*.pls)/*.m3u/.sfv. Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/doc/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile.am 4 Jul 2002 15:56:04 -0000 1.1 +++ Makefile.am 8 Jul 2002 12:54:48 -0000 1.2 @@ -2,8 +2,6 @@ SUBDIRS = man -man-generator: - debug: install-debug: |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-08 12:54:51
|
Update of /cvsroot/toxine/toxine/doc/man/en In directory usw-pr-cvs1:/tmp/cvs-serv8243/doc/man/en Modified Files: toxine.1 Log Message: Add playlist load/save. Support playlist format files (only for load): XMMS/XMMS(*.pls)/*.m3u/.sfv. Index: toxine.1 =================================================================== RCS file: /cvsroot/toxine/toxine/doc/man/en/toxine.1,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- toxine.1 4 Jul 2002 15:56:05 -0000 1.1 +++ toxine.1 8 Jul 2002 12:54:48 -0000 1.2 @@ -516,6 +516,12 @@ .br \ \ playlist delete all .br +\ \ playlist load <filename> +.br +\ \ playlist save <filename> +.br +\ \ +.br .br .TP .BR version |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-05 14:06:59
|
Update of /cvsroot/toxine/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv370 Log Message: initial import into CVS Status: Vendor Tag: f1rmb Release Tags: start N htdocs/index.html No conflicts created by this import ***** Bogus filespec: - ***** Bogus filespec: Imported ***** Bogus filespec: sources |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:56:08
|
Update of /cvsroot/toxine/toxine/doc/man In directory usw-pr-cvs1:/tmp/cvs-serv21693/doc/man Added Files: Makefile.am Log Message: Add man page (first draft). mangen.c generate the commands man entries. --- NEW FILE: Makefile.am --- SUBDIRS = en mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:56:08
|
Update of /cvsroot/toxine/toxine/misc In directory usw-pr-cvs1:/tmp/cvs-serv21693/misc Modified Files: toxine.spec.in Log Message: Add man page (first draft). mangen.c generate the commands man entries. Index: toxine.spec.in =================================================================== RCS file: /cvsroot/toxine/toxine/misc/toxine.spec.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- toxine.spec.in 2 Jul 2002 10:30:50 -0000 1.1 +++ toxine.spec.in 4 Jul 2002 15:56:05 -0000 1.2 @@ -66,8 +66,11 @@ %defattr(-,root,root) %{_bindir}/toxine %{_libdir}/toxine/plugins/* +%{_mandir}/man1/* %changelog +* Thu Jul 04 2002 Daniel Caujolle-Bert <f1...@us...> +- add manpage (incomplete) * Tue Jul 02 2002 Daniel Caujolle-Bert <f1...@us...> - first spec file (shamelessly stolen from xine-ui). |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:56:08
|
Update of /cvsroot/toxine/toxine In directory usw-pr-cvs1:/tmp/cvs-serv21693 Modified Files: Makefile.am configure.in Log Message: Add man page (first draft). mangen.c generate the commands man entries. Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- Makefile.am 24 Jun 2002 21:57:30 -0000 1.5 +++ Makefile.am 4 Jul 2002 15:56:04 -0000 1.6 @@ -4,7 +4,7 @@ AUTOMAKE_OPTIONS = 1.3 -SUBDIRS = m4 misc readline src +SUBDIRS = doc m4 misc readline src EXTRA_DIST = cvscompile.sh @DEPCOMP@ Index: configure.in =================================================================== RCS file: /cvsroot/toxine/toxine/configure.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- configure.in 2 Jul 2002 10:30:50 -0000 1.11 +++ configure.in 4 Jul 2002 15:56:04 -0000 1.12 @@ -450,6 +450,9 @@ dnl AC_OUTPUT([ Makefile +doc/Makefile +doc/man/Makefile +doc/man/en/Makefile misc/Makefile misc/relchk.sh misc/toxine.spec |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:56:08
|
Update of /cvsroot/toxine/toxine/doc In directory usw-pr-cvs1:/tmp/cvs-serv21693/doc Added Files: Makefile.am Log Message: Add man page (first draft). mangen.c generate the commands man entries. --- NEW FILE: Makefile.am --- SUBDIRS = man man-generator: debug: install-debug: mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:56:08
|
Update of /cvsroot/toxine/toxine/src In directory usw-pr-cvs1:/tmp/cvs-serv21693/src Modified Files: Makefile.am commands.c main.c xine_commands.h Added Files: mangen.c Log Message: Add man page (first draft). mangen.c generate the commands man entries. --- NEW FILE: mangen.c --- /* ** Copyright (C) 2002 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 "common.h" #include "commands.c" /* * */ static char *string_cleanup(char *str) { static char buffer[16384]; char *s, *d; int no_br = 0; memset(&buffer, 0, sizeof(buffer)); s = str; d = &buffer[0]; while(*s != '\0') { switch(*s) { case '\n': if(!no_br) { *d++ = '\n'; *d++ = '.'; *d++ = 'b'; *d++ = 'r'; *d++ = '\n'; *d++ = '\\'; *d++ = ' '; *d++ = '\\'; *d++ = ' '; } break; case '[': no_br = 1; *d++ = '['; break; case ']': no_br = 0; *d++ = ']'; break; case 'µ': *d++ = 'u'; break; default: *d++ = *s; break; } s++; } *d = '\0'; return buffer; } /* * */ int main(int argc, char **argv) { int i = 0; while(commands[i].command != NULL) { printf(".TP\n"); printf(".BR %s\n", (string_cleanup(commands[i].command))); printf(".br\n"); if(commands[i].help) { printf(".BR action:\n.br\n"); printf("%s\n", (string_cleanup(commands[i].help))); printf(".br\n\n"); } if(commands[i].syntax) { printf(".BR syntax:\n.br\n"); printf("\\ \\ %s\n", (string_cleanup(commands[i].syntax))); printf(".br\n"); } printf(".br\n"); i++; } printf(".br\n"); return 1; } Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/Makefile.am,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- Makefile.am 13 May 2002 20:46:36 -0000 1.1.1.1 +++ Makefile.am 4 Jul 2002 15:56:05 -0000 1.2 @@ -4,6 +4,7 @@ CFLAGS = @GLOBAL_CFLAGS@ @XINE_CFLAGS@ bin_PROGRAMS = toxine +EXTRA_PROGRAMS = mangen EXTRA_DIST = getopt.c getopt1.c getopt.h @@ -17,10 +18,14 @@ toxine_DEPENDENTIES = toxine_LDADD = $(TERMCAP_LIB) $(top_builddir)/readline/libreadline.la @XINE_LIBS@ $(DYNAMIC_LD_LIBS) -lm +mangen_SOURCES = $(GETOPT_C) mangen.c utils.c parse.c xine_commands.c loader.c script.c +mangen_LDADD = $(TERMCAP_LIB) $(top_builddir)/readline/libreadline.la @XINE_LIBS@ $(DYNAMIC_LD_LIBS) -lm + noinst_HEADERS = common.h utils.h commands.h parse.h xine_commands.h loader.h script.h $(top_builddir)/readline/libreadline.la: cd $(top_builddir)/readline && $(MAKE) libreadline.la + debug: @$(MAKE) CFLAGS="$(DEBUG_CFLAGS)" Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- commands.c 3 Jul 2002 12:12:22 -0000 1.11 +++ commands.c 4 Jul 2002 15:56:05 -0000 1.12 @@ -148,7 +148,7 @@ "set audio volume <level>\n" "set audio mute\n" "set audio volume <level>\n" - "set interative <yes|no|1|0|true|false>\n" + "set interative [yes | no | 1 | 0 | true | false]\n" "set mrl <mrl>" }, { "get", OPTIONAL_ARGS, do_get, @@ -221,7 +221,7 @@ " INPUT_ANGLE_NEXT | INPUT_ANGLE_PREVIOUS | SPU_FORCEDISPLAY |\n" " FRAME_CHANGE | CLOSED_CAPTION | FOREVER | NOTHING ]\n" "waitfor status [ PLAY | STOP | QUIT | PAUSE | SLOW_4 | SLOW_2 | NORMAL |\n" - " FAST_2 | FAST_4", + " FAST_2 | FAST_4]", }, /* Some event aliases */ { "menu1", NO_ARGS, do_events, Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- main.c 30 Jun 2002 15:38:54 -0000 1.4 +++ main.c 4 Jul 2002 15:56:05 -0000 1.5 @@ -82,13 +82,14 @@ printf("usage: toxine [options]\n"); printf(" -s, --script <filename> Use <filename> as toxine script file.\n"); - printf(" -e, --execute <commands> Execute commands specified (like in prompt mode).\n"); - printf(" -o, --output [filename] Save all messages in a file (toxine.out if no filename\n"); + printf(" -e, --execute <commands> Execute specified commands (like in prompt mode).\n"); + printf(" -o, --output [filename] Save all messages in a file(*).\n"); + printf(" *('toxine.out' if filename isn't specified).\n"); printf(" -V, --video <name> Use video driver <name>.\n"); printf(" -A, --audio <name> Use audio driver <name>.\n"); printf(" -i, --interactive Disable interactive more (no confirm).\n"); - printf(" -I, --autoinit Init xine engine on start.\n"); - printf(" *NOTE: video/audio driver names should be sets.\n"); + printf(" -I, --autoinit Init xine engine on start(*).\n"); + printf(" *(video/audio driver names should be sets).\n"); printf(" -v, --version Display version.\n"); printf(" -h, --help Display this help text.\n"); printf("\n"); Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- xine_commands.h 13 May 2002 20:46:36 -0000 1.1.1.1 +++ xine_commands.h 4 Jul 2002 15:56:05 -0000 1.2 @@ -129,8 +129,8 @@ { "xine_set_speed", REQUIRE_ARGS, _xine_set_speed, \ "Set playback speed.", \ "xine_set_speed <value>\n" \ - "xine_set_speed <constant name> (SPEED_PAUSE, SPEED_SLOW_4, SPEED_SLOW_2\n" \ - " SPEED_NORMAL, SPEED_FAST_2 , SPEED_FAST_4" \ + "xine_set_speed <constant name> [SPEED_PAUSE | SPEED_SLOW_4 | SPEED_SLOW_2 |\n" \ + " SPEED_NORMAL | SPEED_FAST_2 | SPEED_FAST_4]" \ }, \ { "xine_get_speed", NO_ARGS, _xine_get_speed, \ "Get current playback speed.", \ |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:56:08
|
Update of /cvsroot/toxine/toxine/doc/man/en In directory usw-pr-cvs1:/tmp/cvs-serv21693/doc/man/en Added Files: Makefile.am toxine.1 toxine.1.footer toxine.1.header Log Message: Add man page (first draft). mangen.c generate the commands man entries. --- NEW FILE: Makefile.am --- EXTRA_DIST = toxine.1.header toxine.1.footer man_MANS = toxine.1 man-gen: cat toxine.1.header > toxine.1; \ (cd $(top_builddir)/src && $(MAKE) mangen); \ $(top_builddir)/src/mangen >> toxine.1; \ cat toxine.1.footer >> toxine.1 mostlyclean-generic: -rm -f *~ \#* .*~ .\#* maintainer-clean-generic: -@echo "This command is intended for maintainers to use;" -@echo "it deletes files that may require special tools to rebuild." -rm -f Makefile.in xine.1 --- NEW FILE: toxine.1 --- .\" -*-Nroff-*- .\"" .\"" .TH TOXINE 1x 2002-07-04 "toxine" .SH NAME toxine \- a text program, using xine library. .SH SYNOPSIS .B toxine .I "[options]" .SH "DESCRIPTION" This manual page documents briefly the .BR toxine program. .PP .B toxine can be runs in interactive mode, or in a script mode. This program was originaly designed to test and debug the xine library, but now, it's a real (small) project, which permit to playback some streams without XFree (using DXR3/HW+ card, AAlib output). .SH "INTERACTIVE MODE" [...1073 lines suppressed...] .br .br .TP .BR xine_usec_sleep .br .BR action: .br Sleep some u seconds .br .BR syntax: .br \ \ xine_usec_sleep <u seconds> .br .br .br .SH "SEE ALSO" .BR xine (1). .SH AUTHOR This manual page was written by Daniel Caujolle-Bert <f1...@us...>. --- NEW FILE: toxine.1.footer --- .SH "SEE ALSO" .BR xine (1). .SH AUTHOR This manual page was written by Daniel Caujolle-Bert <f1...@us...>. --- NEW FILE: toxine.1.header --- .\" -*-Nroff-*- .\"" .\"" .TH TOXINE 1x 2002-07-04 "toxine" .SH NAME toxine \- a text program, using xine library. .SH SYNOPSIS .B toxine .I "[options]" .SH "DESCRIPTION" This manual page documents briefly the .BR toxine program. .PP .B toxine can be runs in interactive mode, or in a script mode. This program was originaly designed to test and debug the xine library, but now, it's a real (small) project, which permit to playback some streams without XFree (using DXR3/HW+ card, AAlib output). .SH "INTERACTIVE MODE" In interactive mode, you can use real xine's API commands or toxine's commands (see below). In this mode, toxine use the readline library, which permit some completions, commands recall, etc... MORE TO COME .SH "SCRIPT MODE" WRITE ME .SH OPTIONS The program follow the usual GNU command line syntax, with long options starting with two dashes (\`\-\'). A summary of options are included below. .TP .BR \-s,\ \-\-script\ <filename> Use <filename> as toxine script file. .TP .BR \-e,\ \-\-execute <commands> Execute specified commands (like in prompt mode). .TP .BR \-o,\ \-\-output [filename] Save all messages in a file(*). *('toxine.out' if filename isn't specified). .TP .BR \-V,\ \-\-video <name> Use video driver <name>. .TP .BR \-A,\ \-\-audio <name> Use audio driver <name>. .TP .BR \-i,\ \-\-interactive Disable interactive more (no confirm). .TP .BR \-I,\ \-\-autoinit Init xine engine on start(*). *(video/audio driver names should be sets). .TP .BR \-v,\ \-\-version Display version. .TP .BR \-h,\ \-\-help Display this help text. .br .SH COMMANDS |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:53:31
|
Update of /cvsroot/toxine/toxine/doc/man/en In directory usw-pr-cvs1:/tmp/cvs-serv21186/en Log Message: Directory /cvsroot/toxine/toxine/doc/man/en added to the repository |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:52:56
|
Update of /cvsroot/toxine/toxine/doc/man In directory usw-pr-cvs1:/tmp/cvs-serv20890/man Log Message: Directory /cvsroot/toxine/toxine/doc/man added to the repository |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-04 15:52:04
|
Update of /cvsroot/toxine/toxine/doc In directory usw-pr-cvs1:/tmp/cvs-serv20593/doc Log Message: Directory /cvsroot/toxine/toxine/doc added to the repository |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-03 12:12:25
|
Update of /cvsroot/toxine/toxine/src In directory usw-pr-cvs1:/tmp/cvs-serv22253 Modified Files: commands.c Log Message: typos, update cursor visiblity when fullscreen toggle is activated with vo->fullscreen() call. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- commands.c 3 Jul 2002 09:03:16 -0000 1.10 +++ commands.c 3 Jul 2002 12:12:22 -0000 1.11 @@ -160,7 +160,8 @@ "get video capabilities\n" "get video fullscreen\n" "get video property <property> (see xine_get_video_property)\n" - "get video property_min_max <property> (see xine_get_video_property_min_max)\n", + "get video property_min_max <property> (see xine_get_video_property_min_max)\n" + "get video help", }, { "history", NO_ARGS, do_noop, "Display command history.", @@ -841,6 +842,19 @@ else pout("fullscreen isn't supported by video plugin\n"); } + else if(toxine_is_arg_contain(tox, 2, "help")) { + + if(tox->video.cur_plugin && tox->video.cur_plugin->get_help) { + char *help = tox->video.cur_plugin->get_help(); + + if(help) { + pinfo("Video out plugin help:\n"); + pinfo("%s\n", help); + } + } + + } + } else if(nargs >= 3) { |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-03 12:12:25
|
Update of /cvsroot/toxine/toxine/src/plugins In directory usw-pr-cvs1:/tmp/cvs-serv22253/plugins Modified Files: vo_dxr3.c vo_x11.c Log Message: typos, update cursor visiblity when fullscreen toggle is activated with vo->fullscreen() call. Index: vo_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- vo_dxr3.c 3 Jul 2002 09:03:17 -0000 1.4 +++ vo_dxr3.c 3 Jul 2002 12:12:22 -0000 1.5 @@ -83,7 +83,7 @@ } static char *get_identifier(void) { - return "dxr3 without overlay video out"; + return "DXR3/HW+ TV out"; } static char *_vo_dxr3_names[] = { "dxr3", NULL }; @@ -123,7 +123,7 @@ } static char *get_help(void) { - return "Video out plugin supporting dxr3/hw+ cards.\n"; + return "Video out plugin supports DXR3/HW+ cards.\n"; } static void receive_xine_event(toxine_t *tox, xine_event_t *event) { Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- vo_x11.c 3 Jul 2002 09:03:17 -0000 1.6 +++ vo_x11.c 3 Jul 2002 12:12:23 -0000 1.7 @@ -298,7 +298,7 @@ update_cursor_visibility(tox); } - sleep(1); + sleep(2); } pthread_exit(NULL); @@ -652,11 +652,12 @@ /* Wait for map. */ - do { + do { XMaskEvent(private->display, StructureNotifyMask, &xev) ; - } while (xev.type != MapNotify || xev.xmap.event != private->x11_drawable[private->fullscreen].video_window); + } while ((xev.type != MapNotify) || + (xev.xmap.event != private->x11_drawable[private->fullscreen].video_window)); XFlush(private->display); XUnlockDisplay (private->display); @@ -711,10 +712,8 @@ tox->config->read(tox->config, tox->configfile); } - tox->video.driver = xine_load_video_output_plugin(tox->config, - tox->video.name, - VISUAL_TYPE_X11, - (void *)&vis); + tox->video.driver = xine_load_video_output_plugin(tox->config, tox->video.name, + VISUAL_TYPE_X11, (void *)&vis); if(tox->video.driver == NULL) { fprintf(stderr, "xine_load_video_output_plugin() failed to load '%s' driver.\n", @@ -1014,7 +1013,7 @@ */ static char *get_help(void) { return - "Video out plugin supporting Xv and Xshm X11 drivers.\n" + "Video out plugin supports Xv, Xshm, DXR3/H+ overlay and Vidix drivers.\n" "\tShortcuts are:\n" "\tf,F\t\tFullscreen toggle.\n"; } @@ -1039,6 +1038,7 @@ */ static void fullscreen(toxine_t *tox) { toggle_fullscreen(tox); + update_cursor_visibility(tox); } /* |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-03 09:03:19
|
Update of /cvsroot/toxine/toxine/src/plugins In directory usw-pr-cvs1:/tmp/cvs-serv9012/src/plugins Modified Files: vo_aa.c vo_dxr3.c vo_plugin.h vo_x11.c Log Message: Change few functions prototype in toxine_vo_plugin_t (get rid of toxine_vo_plugin_t * param, it's self contained in the toxine_t object.). Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- vo_aa.c 3 Jul 2002 08:44:42 -0000 1.3 +++ vo_aa.c 3 Jul 2002 09:03:17 -0000 1.4 @@ -37,8 +37,9 @@ aa_context *context; } aa_private_t; -static void init_video_out(toxine_t *tox, toxine_vo_plugin_t *vop) { - aa_private_t *private = (aa_private_t *) vop->private; +static void init_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; private->context = aa_autoinit(&aa_defparams); if(private->context == NULL) { @@ -82,8 +83,9 @@ pthread_exit(NULL); } -static void deinit_video_out(toxine_t *tox, toxine_vo_plugin_t *vop) { - aa_private_t *private = (aa_private_t *) vop->private; +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; if(private->context) { aa_showcursor(private->context); @@ -148,14 +150,14 @@ /* * */ -static int is_fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { +static int is_fullscreen(toxine_t *tox) { return 0; } /* * */ -static void fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { +static void fullscreen(toxine_t *tox) { } toxine_vo_plugin_t *toxine_load_vo_plugin(toxine_t *tox) { Index: vo_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- vo_dxr3.c 3 Jul 2002 08:44:42 -0000 1.3 +++ vo_dxr3.c 3 Jul 2002 09:03:17 -0000 1.4 @@ -34,7 +34,7 @@ int dummy; } dxr3_private_t; -static void init_video_out(toxine_t *tox, toxine_vo_plugin_t *vop) { +static void init_video_out(toxine_t *tox) { /* First, we have to initialize the config entry */ (void *) tox->config->register_string(tox->config, @@ -74,8 +74,9 @@ pthread_exit(NULL); } -static void deinit_video_out(toxine_t *tox, toxine_vo_plugin_t *vop) { - dxr3_private_t *private = (dxr3_private_t *) vop->private; +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; free(private); free(vop); @@ -128,11 +129,11 @@ static void receive_xine_event(toxine_t *tox, xine_event_t *event) { } -static int is_fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { +static int is_fullscreen(toxine_t *tox) { return 0; } -static void fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { +static void fullscreen(toxine_t *tox) { } toxine_vo_plugin_t *toxine_load_vo_plugin(toxine_t *tox) { Index: vo_plugin.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_plugin.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- vo_plugin.h 3 Jul 2002 08:44:42 -0000 1.3 +++ vo_plugin.h 3 Jul 2002 09:03:17 -0000 1.4 @@ -27,9 +27,9 @@ typedef struct toxine_vo_plugin_s toxine_vo_plugin_t; struct toxine_vo_plugin_s { - void (*video_out_init)(toxine_t *, toxine_vo_plugin_t *); + void (*video_out_init)(toxine_t *); void *(*video_out_event_loop)(void *); - void (*video_out_deinit)(toxine_t *, toxine_vo_plugin_t *); + void (*video_out_deinit)(toxine_t *); char *(*get_identifier)(void); char **(*get_names)(void); uint32_t (*get_capabilities)(toxine_t *); @@ -38,8 +38,8 @@ int (*set_property)(toxine_t *, int property, int value); char *(*get_help)(void); void (*receive_xine_event)(toxine_t *, xine_event_t *); - int (*is_fullscreen)(toxine_t *, toxine_vo_plugin_t *); - void (*fullscreen)(toxine_t *, toxine_vo_plugin_t *); + int (*is_fullscreen)(toxine_t *); + void (*fullscreen)(toxine_t *); void *private; }; Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- vo_x11.c 3 Jul 2002 08:44:42 -0000 1.5 +++ vo_x11.c 3 Jul 2002 09:03:17 -0000 1.6 @@ -450,20 +450,21 @@ /* * */ -static void video_window_init(toxine_t *tox, toxine_vo_plugin_t *vop) { - Pixmap cursor_no, cursor_yes, cursor_yes_bg; - char *display_name = ":0.0"; - XColor dummy; - x11_private_t *private = (x11_private_t *) vop->private; - static char *window_title = "toxine video output"; - XSizeHints hint; - XSetWindowAttributes attr; - Atom XA_NO_BORDER, XA_WIN_LAYER; - XEvent xev; - XGCValues xgcv; - MWMHints mwmhints; - XWMHints *wm_hint; - long propvalue[1]; +static void video_window_init(toxine_t *tox) { + toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; + Pixmap cursor_no, cursor_yes, cursor_yes_bg; + char *display_name = ":0.0"; + XColor dummy; + x11_private_t *private = (x11_private_t *) vop->private; + static char *window_title = "toxine video output"; + XSizeHints hint; + XSetWindowAttributes attr; + Atom XA_NO_BORDER, XA_WIN_LAYER; + XEvent xev; + XGCValues xgcv; + MWMHints mwmhints; + XWMHints *wm_hint; + long propvalue[1]; if(!XInitThreads()) { perr("XInitThreads failed - looks like you don't have a " @@ -748,8 +749,8 @@ /* * */ -static void init_video_out(toxine_t *tox, toxine_vo_plugin_t *vop) { - video_window_init (tox, vop); +static void init_video_out(toxine_t *tox) { + video_window_init (tox); } /* @@ -905,7 +906,8 @@ /* * */ -static void deinit_video_out(toxine_t *tox, toxine_vo_plugin_t *vop) { +static void deinit_video_out(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; XWindowAttributes wattr; Status status; @@ -1026,15 +1028,16 @@ /* * */ -static int is_fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { - x11_private_t *private = (x11_private_t *) vop->private; +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; return (private->fullscreen ? 1 : 0); } /* * */ -static void fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { +static void fullscreen(toxine_t *tox) { toggle_fullscreen(tox); } |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-03 09:03:19
|
Update of /cvsroot/toxine/toxine/src In directory usw-pr-cvs1:/tmp/cvs-serv9012/src Modified Files: commands.c Log Message: Change few functions prototype in toxine_vo_plugin_t (get rid of toxine_vo_plugin_t * param, it's self contained in the toxine_t object.). Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- commands.c 3 Jul 2002 08:44:42 -0000 1.9 +++ commands.c 3 Jul 2002 09:03:16 -0000 1.10 @@ -474,7 +474,7 @@ return 0; } - tox->video.cur_plugin->video_out_init(tox, tox->video.cur_plugin); + tox->video.cur_plugin->video_out_init(tox); /* Display plugin help string, if available */ if(tox->video.cur_plugin->get_help) { @@ -777,7 +777,7 @@ _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, tox->video.cur_plugin); + tox->video.cur_plugin->video_out_deinit(tox); } @@ -834,7 +834,7 @@ int fullscreen; CHECK_XINE(tox); if(tox->video.cur_plugin->is_fullscreen) { - fullscreen = tox->video.cur_plugin->is_fullscreen(tox, tox->video.cur_plugin); + fullscreen = tox->video.cur_plugin->is_fullscreen(tox); pinfo("fullscreen is %d\n", fullscreen); pinfo(".\n"); } @@ -927,7 +927,7 @@ else if(toxine_is_arg_contain(tox, 2, "fullscreen")) { CHECK_XINE(tox); if(tox->video.cur_plugin->fullscreen) - tox->video.cur_plugin->fullscreen(tox, tox->video.cur_plugin); + tox->video.cur_plugin->fullscreen(tox); } } } |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-03 08:44:45
|
Update of /cvsroot/toxine/toxine/src/plugins In directory usw-pr-cvs1:/tmp/cvs-serv1471/src/plugins Modified Files: vo_aa.c vo_dxr3.c vo_plugin.h vo_x11.c Log Message: Forward xine_event to vo plugin. Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- vo_aa.c 21 Jun 2002 08:57:25 -0000 1.2 +++ vo_aa.c 3 Jul 2002 08:44:42 -0000 1.3 @@ -142,6 +142,12 @@ /* * */ +static void receive_xine_event(toxine_t *tox, xine_event_t *event) { +} + +/* + * + */ static int is_fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { return 0; } @@ -170,6 +176,7 @@ aa->set_property = set_property; aa->get_help = get_help; aa->is_fullscreen = is_fullscreen; + aa->receive_xine_event = receive_xine_event; 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.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- vo_dxr3.c 21 Jun 2002 08:57:25 -0000 1.2 +++ vo_dxr3.c 3 Jul 2002 08:44:42 -0000 1.3 @@ -125,6 +125,9 @@ return "Video out plugin supporting dxr3/hw+ cards.\n"; } +static void receive_xine_event(toxine_t *tox, xine_event_t *event) { +} + static int is_fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { return 0; } @@ -149,6 +152,7 @@ dxr3->get_property_min_max = get_property_min_max; dxr3->set_property = set_property; dxr3->get_help = get_help; + dxr3->receive_xine_event = receive_xine_event; dxr3->is_fullscreen = is_fullscreen; dxr3->fullscreen = fullscreen; dxr3->private = (void *) private; Index: vo_plugin.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_plugin.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- vo_plugin.h 21 Jun 2002 08:57:25 -0000 1.2 +++ vo_plugin.h 3 Jul 2002 08:44:42 -0000 1.3 @@ -37,6 +37,7 @@ void (*get_property_min_max)(toxine_t *, int property, int *min, int *max); int (*set_property)(toxine_t *, int property, int value); char *(*get_help)(void); + void (*receive_xine_event)(toxine_t *, xine_event_t *); int (*is_fullscreen)(toxine_t *, toxine_vo_plugin_t *); void (*fullscreen)(toxine_t *, toxine_vo_plugin_t *); void *private; Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- vo_x11.c 21 Jun 2002 13:14:59 -0000 1.4 +++ vo_x11.c 3 Jul 2002 08:44:42 -0000 1.5 @@ -1020,6 +1020,12 @@ /* * */ +static void receive_xine_event(toxine_t *tox, xine_event_t *event) { +} + +/* + * + */ static int is_fullscreen(toxine_t *tox, toxine_vo_plugin_t *vop) { x11_private_t *private = (x11_private_t *) vop->private; return (private->fullscreen ? 1 : 0); @@ -1052,6 +1058,7 @@ x11->get_property_min_max = get_property_min_max; x11->set_property = set_property; x11->get_help = get_help; + x11->receive_xine_event = receive_xine_event; x11->is_fullscreen = is_fullscreen; x11->fullscreen = fullscreen; x11->private = (void *) private; |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-03 08:44:45
|
Update of /cvsroot/toxine/toxine/src In directory usw-pr-cvs1:/tmp/cvs-serv1471/src Modified Files: commands.c Log Message: Forward xine_event to vo plugin. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- commands.c 1 Jul 2002 21:30:07 -0000 1.8 +++ commands.c 3 Jul 2002 08:44:42 -0000 1.9 @@ -427,6 +427,10 @@ } pinfo("\n"); #endif + + if(tox->video.cur_plugin && tox->video.cur_plugin->receive_xine_event) + tox->video.cur_plugin->receive_xine_event(tox, event); + } /* |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-02 10:30:53
|
Update of /cvsroot/toxine/toxine In directory usw-pr-cvs1:/tmp/cvs-serv17777 Modified Files: configure.in Log Message: New spec file. Index: configure.in =================================================================== RCS file: /cvsroot/toxine/toxine/configure.in,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- configure.in 24 Jun 2002 21:47:34 -0000 1.10 +++ configure.in 2 Jul 2002 10:30:50 -0000 1.11 @@ -65,7 +65,7 @@ dnl dnl Build all libs as static dnl -BUILD_LIB_STATIC="-static" +dnl BUILD_LIB_STATIC="-static" BUILD_LIB_STATIC="" AC_SUBST(BUILD_LIB_STATIC) @@ -87,8 +87,10 @@ dnl dnl Check for xine-lib dnl -AM_PATH_XINE(0.9.12,, AC_MSG_ERROR(*** You should install xine-lib first ***)) - +dnl required xine lib version (subst in spec file) +REQ_XINE=0.9.12 +AM_PATH_XINE($REQ_XINE,, AC_MSG_ERROR(*** You should install xine-lib first ***)) +AC_SUBST(REQ_XINE) dnl dnl threads: xine-config tell us what should be used, but @@ -450,6 +452,7 @@ Makefile misc/Makefile misc/relchk.sh +misc/toxine.spec readline/Makefile m4/Makefile src/Makefile |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-02 10:30:53
|
Update of /cvsroot/toxine/toxine/misc In directory usw-pr-cvs1:/tmp/cvs-serv17777/misc Modified Files: Makefile.am Added Files: toxine.spec.in Log Message: New spec file. --- NEW FILE: toxine.spec.in --- %define name @PACKAGE@ %define version @SPEC_VERSION@ %define release 1 Name: %{name} Summary: A textUI/scriptable tool using xine library. Summary(fr): Un utilitaire scriptable et une interface texte utilisant la bibliotheque xine. Version: %{version} Release: %{release} Copyright: GPL Group: Applications/Multimedia ## FIXME, this is wrong. Source: http://toxine.sourceforge.net/%{name}-%{version}.tar.gz URL: http://toxine.sourceforge.net/ Packager: Daniel Caujolle-Bert <f1...@us...> Requires: libxine0 >= @REQ_XINE@ BuildRoot: %{_tmppath}/%{name}-buildroot %description toxine is a small utility in text mode (using the readline library), which permit playback for all streams supported by the xine library <http://xine.sourceforge.net>. This tool is also scriptable. %description -l fr toxine est un utilitaire en mode texte (utilisant la bibliotheque readline) permettant la lecture de tout les types de flux supportes par la bibliotheque xine <http://xine.sourceforge.net>. Cet utilitaire est aussi 'scriptable'. %prep %setup -n %{name}-%{version} %build if [ ! -f configure ]; then NO_CONFIGURE=1 ./cvscompile.sh fi # # currently we do not use %%configure as it seems to cause trouble with # certain automake produced configure scripts - depending on automake version. # ./configure --build=%{_target_platform} --prefix=%{_prefix} \ --exec-prefix=%{_exec_prefix} --bindir=%{_bindir} \ --sbindir=%{_sbindir} --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} --includedir=%{_includedir} \ --libdir=%{_libdir} --libexecdir=%{_libexecdir} \ --localstatedir=%{_localstatedir} \ --sharedstatedir=%{_sharedstatedir} --mandir=%{_mandir} \ --infodir=%{_infodir} $BUILD_ARGS make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=%{?buildroot:%{buildroot}} install %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %{_bindir}/toxine %{_libdir}/toxine/plugins/* %changelog * Tue Jul 02 2002 Daniel Caujolle-Bert <f1...@us...> - first spec file (shamelessly stolen from xine-ui). Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/misc/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile.am 24 Jun 2002 21:35:05 -0000 1.2 +++ Makefile.am 2 Jul 2002 10:30:50 -0000 1.3 @@ -1,5 +1,5 @@ -EXTRA_DIST = autogen.sh +EXTRA_DIST = autogen.sh toxine.spec debug: install-debug: debug |
From: Daniel Caujolle-B. <f1...@us...> - 2002-07-01 21:30:10
|
Update of /cvsroot/toxine/toxine/src In directory usw-pr-cvs1:/tmp/cvs-serv16339 Modified Files: commands.c Log Message: Merge checks. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- commands.c 30 Jun 2002 15:44:05 -0000 1.7 +++ commands.c 1 Jul 2002 21:30:07 -0000 1.8 @@ -344,7 +344,6 @@ } - #if 0 pinfo("Get xine event:\n"); poutalign(); @@ -1469,18 +1468,24 @@ else if(toxine_is_arg_contain(tox, 1, "from")) { char **ap; int i, mrls; - + CHECK_XINE(tox); - + pinfo("Grab mrls from '%s' input plugin.\n", toxine_get_arg(tox, 2)); ap = xine_get_autoplay_mrls(tox->xine, (char *) (toxine_get_arg(tox, 2)), &mrls); - if(ap) { - - for(i = 0; i < mrls; i++) + if(ap && mrls) { + + for(i = 0; i < mrls; i++) { tox->playlist.entries[tox->playlist.num++] = strdup(ap[i]); - } + } - if((!ap) || (!mrls)) + if(tox->playlist.num && (tox->playlist.cur == -1)) { + tox->playlist.cur = 0; + toxine_set_current_mrl_from_cur(tox); + } + + } + else pinfo("Plugin '%s' returned nothing.\n", toxine_get_arg(tox, 2)); } |
From: Daniel Caujolle-B. <f1...@us...> - 2002-06-30 15:44:08
|
Update of /cvsroot/toxine/toxine/src In directory usw-pr-cvs1:/tmp/cvs-serv17178 Modified Files: commands.c common.h Log Message: Remove unused decl/comments. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- commands.c 30 Jun 2002 15:38:54 -0000 1.6 +++ commands.c 30 Jun 2002 15:44:05 -0000 1.7 @@ -326,7 +326,6 @@ switch(tox->event.last.type) { case XINE_EVENT_PLAYBACK_FINISHED: - // next entry in playback; finished_cb(tox); tox->ignore_finished = 0; break; @@ -1381,15 +1380,6 @@ static void do_playlist(commands_t *command, toxine_t *tox, void *data) { int nargs; - - /* - "playlist select #" - "playlist add <mrl> <...>" - "playlist from <plugin>" - "playlist delete #" - "playlist delete all" - - */ nargs = toxine_is_args(tox); Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- common.h 30 Jun 2002 15:38:54 -0000 1.2 +++ common.h 30 Jun 2002 15:44:05 -0000 1.3 @@ -150,7 +150,6 @@ char *entries[MAX_PLAYLIST]; int num; /* number of entries in playlist */ int cur; /* current entry in playlist */ - char *current; /* pointer to current playlist entry */ } playlist; char prompt[32]; |
From: Daniel Caujolle-B. <f1...@us...> - 2002-06-30 15:38:58
|
Update of /cvsroot/toxine/toxine/src In directory usw-pr-cvs1:/tmp/cvs-serv14762/src Modified Files: commands.c common.h main.c utils.c utils.h xine_commands.c Log Message: Add playlist support (keep 'set mrl <mrl>' compatibility). Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- commands.c 21 Jun 2002 08:57:25 -0000 1.5 +++ commands.c 30 Jun 2002 15:38:54 -0000 1.6 @@ -119,6 +119,7 @@ static void do_syntax(commands_t *, toxine_t *, void *); static void do_waitfor(commands_t *, toxine_t *, void *); static void do_events(commands_t *, toxine_t *, void *); +static void do_playlist(commands_t *, toxine_t *, void *); static commands_t commands[] = { { "commands", NO_ARGS, do_help, @@ -271,6 +272,17 @@ "select" }, /* End of event aliases */ + { "playlist", REQUIRE_ARGS, do_playlist, + "playlist management", + "playlist show\n" + "playlist select #\n" + "playlist next\n" + "playlist previous\n" + "playlist add <mrl> ...\n" + "playlist from <plugin>\n" + "playlist delete # ...\n" + "playlist delete all" + }, { "version", NO_ARGS, do_version, "Display some version informations", "version" @@ -284,6 +296,25 @@ /* + * Callback called on XINE_EVENT_PLAYBACK_FINISHED event + */ +static void finished_cb(toxine_t *tox) { + + if(tox->ignore_finished) + return; + + tox->playlist.cur++; + + if (tox->playlist.cur < tox->playlist.num) { + toxine_set_current_mrl_from_cur(tox); + _xine_play(NULL, tox, (void *)NO_ARGS); + } + else + tox->playlist.cur--; + +} + +/* * Listener of xine engine events. */ void toxine_event_listener(void *data, xine_event_t *event) { @@ -293,6 +324,28 @@ tox->event.last.type = event->type; pthread_mutex_unlock(&tox->event.mutex); + switch(tox->event.last.type) { + case XINE_EVENT_PLAYBACK_FINISHED: + // next entry in playback; + 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); + break; + + } + + #if 0 pinfo("Get xine event:\n"); poutalign(); @@ -341,7 +394,7 @@ pout("XINE_EVENT_INPUT_SELECT"); break; case XINE_EVENT_PLAYBACK_FINISHED: - pout("****XINE_EVENT_PLAYBACK_FINISHED"); + pout("XINE_EVENT_PLAYBACK_FINISHED"); break; case XINE_EVENT_BRANCHED: pout("XINE_EVENT_BRANCHED"); @@ -660,7 +713,7 @@ if(tox->autoinit) _xine_init(NULL, tox, NULL); - if(tox->script.use) { + if(tox->script.in_use) { toxine_handle_script(tox); tox->running = 0; } @@ -1322,6 +1375,168 @@ if(!strncmp(command->command, event_aliases[i].alias, strlen(command->command))) { _xine_send_event(command, tox, (void *) event_aliases[i].event); break; + } + } +} + +static void do_playlist(commands_t *command, toxine_t *tox, void *data) { + int nargs; + + /* + "playlist select #" + "playlist add <mrl> <...>" + "playlist from <plugin>" + "playlist delete #" + "playlist delete all" + + */ + + nargs = toxine_is_args(tox); + + if(nargs == 1) { + if(toxine_is_arg_contain(tox, 1, "show")) { + + if(tox->playlist.num) { + int i; + + pinfo("Playlist (* is current):\n"); + for(i = 0; i < tox->playlist.num; i++) { + poutalign(); + if(tox->playlist.cur == i) { + pout("*%4d: '%s'\n", i, tox->playlist.entries[i]); + } + else { + pout(" %4d: '%s'\n", i, tox->playlist.entries[i]); + } + } + pinfo(".\n"); + } + else + pinfo("Empty playlist.\n"); + } + else if(toxine_is_arg_contain(tox, 1, "next")) { + tox->ignore_finished = 0; + finished_cb(tox); + } + else if(toxine_is_arg_contain(tox, 1, "prev")) { + + tox->ignore_finished = 1; + tox->playlist.cur--; + + if((tox->playlist.cur >= 0) && (tox->playlist.cur < tox->playlist.num)) { + + toxine_set_current_mrl_from_cur(tox); + _xine_play(NULL, tox, (void *)NO_ARGS); + + } + else { + tox->playlist.cur = 0; + tox->ignore_finished = 0; + } + + } + + } + else if(nargs >= 2) { + + if(toxine_is_arg_contain(tox, 1, "select")) { + int entry = atoi(toxine_get_arg(tox, 2)); + int old_cur = tox->playlist.cur; + + if(entry < tox->playlist.num) { + tox->playlist.cur = entry; + toxine_set_current_mrl_from_cur(tox); + } + + /* + * If xine engine is in PLAY status, and new selected entry is != than old one, + * start playback with new selected stream + */ + if(tox->xine && (old_cur != tox->playlist.cur)) { + int status = xine_get_status(tox->xine); + + if(status == XINE_PLAY) + _xine_play(NULL, tox, (void *)NO_ARGS); + + } + + } + else if(toxine_is_arg_contain(tox, 1, "add")) { + char *mrl; + int i = 2; + + while((mrl = (char *) (toxine_get_arg(tox, i))) != NULL) { + + tox->playlist.entries[tox->playlist.num++] = strdup(mrl); + + if(tox->playlist.cur == -1) { + tox->playlist.cur = 0; + toxine_set_current_mrl_from_cur(tox); + } + i++; + } + } + else if(toxine_is_arg_contain(tox, 1, "from")) { + char **ap; + int i, mrls; + + CHECK_XINE(tox); + + pinfo("Grab mrls from '%s' input plugin.\n", toxine_get_arg(tox, 2)); + ap = xine_get_autoplay_mrls(tox->xine, (char *) (toxine_get_arg(tox, 2)), &mrls); + if(ap) { + + for(i = 0; i < mrls; i++) + tox->playlist.entries[tox->playlist.num++] = strdup(ap[i]); + } + + if((!ap) || (!mrls)) + pinfo("Plugin '%s' returned nothing.\n", toxine_get_arg(tox, 2)); + + } + else if(toxine_is_arg_contain(tox, 1, "delete")) { + + if(toxine_is_arg_contain(tox, 2, "all")) { + if(tox->playlist.num) { + + for(; tox->playlist.num >= 0; tox->playlist.num--) + _FREE(tox->playlist.entries[tox->playlist.num]); + + tox->playlist.num = 0; + tox->playlist.cur = -1; + } + } + else { + char *argument; + int i = 2; + + while((argument = (char *) (toxine_get_arg(tox, i)))) { + int entry = atoi(argument); + + if(tox->playlist.num && (entry < tox->playlist.num)) { + int j; + + if(tox->playlist.cur >= entry) { + tox->playlist.cur = -1; + } + + _FREE(tox->playlist.entries[entry]); + + for(j = entry; j < tox->playlist.num; j++) + tox->playlist.entries[j] = tox->playlist.entries[j + 1]; + + tox->playlist.entries[j] = NULL; + tox->playlist.num--; + + if(tox->playlist.num && (tox->playlist.cur == -1)) { + tox->playlist.cur = 0; + toxine_set_current_mrl_from_cur(tox); + } + } + + i++; + } + } } } } Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- common.h 13 May 2002 20:46:35 -0000 1.1.1.1 +++ common.h 30 Jun 2002 15:38:54 -0000 1.2 @@ -45,6 +45,8 @@ #define ERROR_PREFIX " (!) " #define EMPTY_PREFIX " " #define PROMPT "toxine{%s}> " +#define MAX_PLAYLIST 2048 /* Max playlist length */ + #define poutalign() { \ fprintf(stdout, "%s", EMPTY_PREFIX); \ @@ -80,6 +82,7 @@ } \ } + typedef struct { int xine_state; char *state; @@ -95,6 +98,8 @@ config_values_t *config; xine_t *xine; + int ignore_finished; + int msg_fd; struct { @@ -140,12 +145,19 @@ } command; char *current_mrl; + + struct { + char *entries[MAX_PLAYLIST]; + int num; /* number of entries in playlist */ + int cur; /* current entry in playlist */ + char *current; /* pointer to current playlist entry */ + } playlist; char prompt[32]; int interactive; struct { - int use; + int in_use; char *filename; FILE *fd; char buf[256]; Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- main.c 24 Jun 2002 21:35:05 -0000 1.3 +++ main.c 30 Jun 2002 15:38:54 -0000 1.4 @@ -105,6 +105,11 @@ if(tox->msg_fd >= 0) close(tox->msg_fd); + if(tox->playlist.num) { + for(; tox->playlist.num >= 0; tox->playlist.num--) + _FREE(tox->playlist.entries[tox->playlist.num]); + } + _FREE(tox->configfile); _FREE(tox->video.name); _FREE(tox->audio.name); @@ -145,6 +150,7 @@ tox->command.command = NULL; tox->command.execute = 0; tox->msg_fd = -1; + tox->playlist.cur = -1; /* * parse command line @@ -157,7 +163,7 @@ if(optarg != NULL) { if(tox->script.filename == NULL) { tox->script.filename = strdup(optarg); - tox->script.use = 1; + tox->script.in_use = 1; } else fprintf(stderr, "script filename already set: '%s'\n", tox->script.filename); @@ -222,7 +228,7 @@ } if(tox->msg_fd >= 0) { - if((!tox->script.use) && (!tox->command.execute)) { + if((!tox->script.in_use) && (!tox->command.execute)) { fprintf(stderr, "You can't use message redirection in prompt mode.\n"); toxine_free(tox); exit(1); Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- utils.c 13 May 2002 20:46:36 -0000 1.1.1.1 +++ utils.c 30 Jun 2002 15:38:54 -0000 1.2 @@ -163,13 +163,73 @@ } /* + * Look for first entry in playlist matching with 'mrl' + */ +static int toxine_lookup_in_playlist(toxine_t *tox, const char *mrl) { + int i; + + if(tox->playlist.num) { + for(i = 0; i < tox->playlist.num; i++) { + if(!strcmp(mrl, tox->playlist.entries[i])) + return i; + } + } + + return -1; +} + +/* + * + */ +void toxine_set_current_mrl_from_cur(toxine_t *tox) { + if(tox) { + if((tox->playlist.cur >= 0) && (tox->playlist.entries[tox->playlist.cur] != NULL)) + tox->current_mrl = tox->playlist.entries[tox->playlist.cur]; + else + tox->current_mrl = NULL; + } +} + +/* * Set current mrl from mrl */ void toxine_set_current_mrl(toxine_t *tox, const char *mrl) { + if(tox && mrl) { - if(tox->current_mrl) - free(tox->current_mrl); - tox->current_mrl = strdup(mrl); + if((tox->playlist.cur = toxine_lookup_in_playlist(tox, mrl)) == -1) { + tox->playlist.cur = tox->playlist.num++; + tox->playlist.entries[tox->playlist.cur] = strdup(mrl); + } + + toxine_set_current_mrl_from_cur(tox); + } +} + +/* + * Return next mrl in playlist. + */ +char *toxine_get_next_mrl(toxine_t *tox) { + if(tox) { + + if(tox->playlist.cur >= (tox->playlist.num - 1)) + return NULL; + + return tox->playlist.entries[tox->playlist.cur + 1]; + } + + return NULL; +} + +/* + * Branching was successfully accomplished, update playlist. + */ +void toxine_branched(toxine_t *tox) { + + if(tox) { + if(tox->playlist.cur < (tox->playlist.num - 1)) { + tox->playlist.cur++; + toxine_set_current_mrl_from_cur(tox); + } } } Index: utils.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- utils.h 13 May 2002 20:46:35 -0000 1.1.1.1 +++ utils.h 30 Jun 2002 15:38:54 -0000 1.2 @@ -27,9 +27,12 @@ int toxine_system(int dont_run_as_root, char *command); int toxine_get_bool_value(const char *val); void toxine_set_command_line(toxine_t *tox, char *line); +void toxine_set_current_mrl_from_cur(toxine_t *tox); void toxine_set_current_mrl(toxine_t *tox, const char *mrl); int toxine_is_args(toxine_t *tox); const char *toxine_get_arg(toxine_t *tox, int num); int toxine_is_arg_contain(toxine_t *tox, int pos, const char *arg); +char *toxine_get_next_mrl(toxine_t *tox); +void toxine_branched(toxine_t *tox); #endif Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- xine_commands.c 3 Jun 2002 14:53:18 -0000 1.4 +++ xine_commands.c 30 Jun 2002 15:38:54 -0000 1.5 @@ -266,6 +266,9 @@ if(data) ignore_args = (int) data; + if(tox->ignore_finished) + tox->ignore_finished = 0; + nargs = toxine_is_args(tox); if((!nargs) || (ignore_args == NO_ARGS)) { @@ -362,6 +365,7 @@ void _xine_stop(commands_t *command, toxine_t *tox, void *data) { CHECK_XINE(tox); pinfo("xine_stop()\n"); + tox->ignore_finished = 1; xine_stop(tox->xine); pinfo(".\n"); } |
From: Daniel Caujolle-B. <f1...@us...> - 2002-06-24 21:57:34
|
Update of /cvsroot/toxine/toxine In directory usw-pr-cvs1:/tmp/cvs-serv16036 Modified Files: Makefile.am Log Message: quit lftp after upload. Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Makefile.am 24 Jun 2002 21:47:34 -0000 1.4 +++ Makefile.am 24 Jun 2002 21:57:30 -0000 1.5 @@ -45,7 +45,7 @@ upload: - lftp -u anonymous upload.sourceforge.net -e "cd incoming; mput $(distdir).tar.gz" + lftp -u anonymous upload.sourceforge.net -e "cd incoming; mput $(distdir).tar.gz; quit" mostlyclean-generic: |
From: Daniel Caujolle-B. <f1...@us...> - 2002-06-24 21:48:52
|
Update of /cvsroot/toxine/toxine In directory usw-pr-cvs1:/tmp/cvs-serv11717 Modified Files: ChangeLog Log Message: Index: ChangeLog =================================================================== RCS file: /cvsroot/toxine/toxine/ChangeLog,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ChangeLog 24 Jun 2002 21:47:34 -0000 1.3 +++ ChangeLog 24 Jun 2002 21:48:48 -0000 1.4 @@ -1,3 +1,7 @@ +2002-06-24 Monday 23:47 f1rmb + + 0.4.0 release. + 2002-06-24 Monday 23:35 f1rmb more checks for release. Need 0.9.12. |