toxine-cvs Mailing List for toxine (Page 5)
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...> - 2003-10-15 18:05:55
|
Update of /cvsroot/toxine/toxine/readline In directory sc8-pr-cvs1:/tmp/cvs-serv11580/readline Modified Files: Makefile.am bind.c complete.c rldefs.h rltty.c Log Message: sync readline from xine-ui one Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/readline/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile.am 15 Oct 2003 16:48:13 -0000 1.2 +++ Makefile.am 15 Oct 2003 18:05:46 -0000 1.3 @@ -1,21 +1,76 @@ -CFLAGS = @CFLAGS@ @READLINE_LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION=\"@LIBVERSION@\" -static +AM_CFLAGS = @READLINE_LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION=\"@LIBVERSION@\" -static -LIBTOOL = $(SHELL) $(top_builddir)/libtoollib-nofpic +if HAVE_TERMCAP +readline_lib = libreadline.la +endif -noinst_LTLIBRARIES = libreadline.la +noinst_LTLIBRARIES = $(readline_lib) -EXTRA_DIST = emacs_keymap.c vi_keymap.c savestring.c histexpand.c \ - CHANGELOG CHANGES COPYING INSTALL MANIFEST README USAGE +EXTRA_DIST = \ + CHANGELOG \ + CHANGES \ + COPYING \ + INSTALL \ + MANIFEST \ + README \ + USAGE \ + emacs_keymap.c \ + histexpand.c \ + savestring.c \ + vi_keymap.c -libreadline_la_SOURCES = readline.c vi_mode.c funmap.c keymaps.c parens.c search.c rltty.c \ - complete.c bind.c isearch.c display.c signals.c util.c kill.c undo.c macro.c input.c \ - callback.c terminal.c nls.c compat.c xmalloc.c history.c histexpand.c histfile.c \ - histsearch.c shell.c tilde.c +libreadline_la_SOURCES = \ + bind.c \ + callback.c \ + compat.c \ + complete.c \ + display.c \ + funmap.c \ + history.c \ + histexpand.c \ + histfile.c \ + histsearch.c \ + input.c \ + isearch.c \ + keymaps.c \ + kill.c \ + macro.c \ + nls.c \ + parens.c \ + readline.c \ + rltty.c \ + search.c \ + shell.c \ + signals.c \ + terminal.c \ + tilde.c \ + undo.c \ + util.c \ + vi_mode.c \ + xmalloc.c -noinst_HEADERS = ansi_stdlib.h history.h posixjmp.h rlconf.h rlshell.h rltypedefs.h tilde.h \ - chardefs.h keymaps.h posixstat.h rldefs.h rlstdc.h rlwinsize.h xmalloc.h histlib.h \ - posixdir.h readline.h rlprivate.h rltty.h tcap.h +noinst_HEADERS = \ + ansi_stdlib.h \ + chardefs.h \ + histlib.h \ + history.h \ + keymaps.h \ + posixdir.h \ + posixjmp.h \ + posixstat.h \ + readline.h \ + rlconf.h \ + rldefs.h \ + rlprivate.h \ + rlshell.h \ + rlstdc.h \ + rltty.h \ + rltypedefs.h \ + rlwinsize.h \ + tcap.h \ + tilde.h \ + xmalloc.h debug: @$(MAKE) CFLAGS="$(DEBUG_CFLAGS) @READLINE_LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION=\\\"@LIBVERSION@\\\" -static" Index: bind.c =================================================================== RCS file: /cvsroot/toxine/toxine/readline/bind.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- bind.c 16 Jul 2002 09:15:28 -0000 1.2 +++ bind.c 15 Oct 2003 18:05:46 -0000 1.3 @@ -1027,7 +1027,7 @@ if (*string == '"') { int passc = 0; - + for (i = 1; (c = string[i]); i++) { if (passc) Index: complete.c =================================================================== RCS file: /cvsroot/toxine/toxine/readline/complete.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- complete.c 16 Jul 2002 09:15:28 -0000 1.2 +++ complete.c 15 Oct 2003 18:05:46 -0000 1.3 @@ -1430,7 +1430,7 @@ while ((string = (*entry_function) (text, matches))) { - if (matches + 1 == match_list_size) + if ((matches + 1) == match_list_size) match_list = (char **)xrealloc (match_list, ((match_list_size += 10) + 1) * sizeof (char *)); Index: rldefs.h =================================================================== RCS file: /cvsroot/toxine/toxine/readline/rldefs.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- rldefs.h 13 May 2002 20:45:45 -0000 1.1.1.1 +++ rldefs.h 15 Oct 2003 18:05:46 -0000 1.2 @@ -74,7 +74,7 @@ #define _rl_strnicmp strncasecmp #else extern int _rl_stricmp PARAMS((char *, char *)); -extern int _rl_strnicmp PARAMS((char *, char *)); +extern int _rl_strnicmp PARAMS((char *, char *, int)); #endif #if defined (HAVE_STRPBRK) Index: rltty.c =================================================================== RCS file: /cvsroot/toxine/toxine/readline/rltty.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rltty.c 16 Jul 2002 09:15:28 -0000 1.2 +++ rltty.c 15 Oct 2003 18:05:46 -0000 1.3 @@ -647,7 +647,7 @@ if (get_tty_settings (tty, &tio) < 0) { release_sigint (); - fprintf(stderr, "readline: warning: rl_prep_terminal: cannot get terminal settings"); +fprintf(stderr, "readline: warning: rl_prep_terminal: cannot get terminal settings"); return; } |
From: Daniel Caujolle-B. <f1...@us...> - 2003-10-15 17:32:54
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1:/tmp/cvs-serv5267 Modified Files: configure.ac Log Message: try to fix jcd tputs problem Index: configure.ac =================================================================== RCS file: /cvsroot/toxine/toxine/configure.ac,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- configure.ac 15 Oct 2003 16:48:13 -0000 1.4 +++ configure.ac 15 Oct 2003 17:32:51 -0000 1.5 @@ -164,8 +164,9 @@ 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) +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 @@ -181,7 +182,7 @@ 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 ) + 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 @@ -207,7 +208,7 @@ esac BASH_CHECK_LIB_TERMCAP([], - AC_MSG_ERROR([*** termcap support is required to build readline library ***])) + AC_MSG_RESULT([*** All of READLINE dependent parts will be disabled ***])) case "$host_cpu" in *cray*) READLINE_LOCAL_CFLAGS=-DCRAY ;; @@ -221,6 +222,19 @@ AC_SUBST(READLINE_LOCAL_CFLAGS) AC_SUBST(TERMCAP_LIB) AC_SUBST(LIBVERSION) +AM_CONDITIONAL(HAVE_TERMCAP, test x"$no_termcap" != "xyes") + +dnl +dnl ncurses +dnl +AC_CHECK_HEADERS(curses.h) +AC_CHECK_LIB(ncurses, cbreak, + AC_DEFINE(HAVE_NCURSES,,[Define this if you have ncurses installed]) + ac_have_ncurses="yes" + NCURSES_LIB="-lncurses") +AC_SUBST(NCURSES_LIB) +AM_CONDITIONAL(HAVE_NCURSES, test x$ac_have_ncurses = "xyes") + dnl dnl Checks for Ascii-Art library |
From: Daniel Caujolle-B. <f1...@us...> - 2003-10-15 16:48:18
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv29906/src/plugins Modified Files: Makefile.am Log Message: avoid plugin's .la file to be installed, hack libtool here too Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- Makefile.am 15 Jan 2003 20:34:19 -0000 1.7 +++ Makefile.am 15 Oct 2003 16:48:14 -0000 1.8 @@ -4,7 +4,7 @@ libdir = $(TOXINE_PLUGINDIR) -LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic +LIBTOOL = $(SHELL) $(top_builddir)/libtoolplugin-nofpic if HAVE_AA aa_plugin = toxine_vo_plugin_aa.la |
From: Daniel Caujolle-B. <f1...@us...> - 2003-10-15 16:48:18
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1:/tmp/cvs-serv29906 Modified Files: configure.ac Log Message: avoid plugin's .la file to be installed, hack libtool here too Index: configure.ac =================================================================== RCS file: /cvsroot/toxine/toxine/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- configure.ac 22 May 2003 20:50:34 -0000 1.3 +++ configure.ac 15 Oct 2003 16:48:13 -0000 1.4 @@ -504,10 +504,18 @@ ;; esac 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 + if test x$no_fpic = "xyes"; then - cat libtool | sed -e 's/^pic_flag=/#pic_flag=/' > libtool-nofpic + cat libtoolplugin.tmp | sed -e 's/^pic_flag=/#pic_flag=/' > libtool-nofpic + cat libtoollib.tmp | sed -e 's/^pic_flag=/#pic_flag=/' > libtool-nofpic else - cat libtool > libtool-nofpic + cat libtoollib.tmp > libtoollib-nofpic + cat libtoolplugin.tmp > libtoolplugin-nofpic fi +rm -f libtoollib.tmp libtoolplugin.tmp chmod +x libtool-nofpic |
From: Daniel Caujolle-B. <f1...@us...> - 2003-10-15 16:48:18
|
Update of /cvsroot/toxine/toxine/readline In directory sc8-pr-cvs1:/tmp/cvs-serv29906/readline Modified Files: Makefile.am Log Message: avoid plugin's .la file to be installed, hack libtool here too Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/readline/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:45:52 -0000 1.1.1.1 +++ Makefile.am 15 Oct 2003 16:48:13 -0000 1.2 @@ -1,6 +1,8 @@ CFLAGS = @CFLAGS@ @READLINE_LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION=\"@LIBVERSION@\" -static +LIBTOOL = $(SHELL) $(top_builddir)/libtoollib-nofpic + noinst_LTLIBRARIES = libreadline.la EXTRA_DIST = emacs_keymap.c vi_keymap.c savestring.c histexpand.c \ |
From: Daniel Caujolle-B. <f1...@us...> - 2003-10-15 16:30:30
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv26987 Modified Files: loader.c Log Message: oops, load system's plugins Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- loader.c 15 Oct 2003 14:44:52 -0000 1.9 +++ loader.c 15 Oct 2003 16:30:21 -0000 1.10 @@ -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...> - 2003-10-15 14:45:01
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv5632/src Modified Files: commands.c loader.c playlist.c xine_commands.c Log Message: small fix Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- commands.c 22 May 2003 20:50:34 -0000 1.54 +++ commands.c 15 Oct 2003 14:44:52 -0000 1.55 @@ -969,6 +969,15 @@ if(sigaction(SIGALRM, &action, NULL) != 0) fprintf(stderr, "sigaction(SIGALRM) failed: %s\n", strerror(errno)); + if(argc) { + int i; + + tox->playlist.cur = 0; + + for(i = 0; i < argc; i++) + playlist_add_entry(tox, argv[i], argv[i], 0, -1); + } + toxine_load_vo_plugins(tox); if(tox->autoinit) { @@ -1324,7 +1333,14 @@ if(tox->command.num_args) toxine_set_current_mrl(tox, (toxine_get_arg(tox, 1))); - + else if(!tox->current_mrl) + toxine_set_current_mrl_from_cur(tox); + + if(!tox->current_mrl) { + perr("No mrl set.\n"); + return; + } + if(xine_open(tox->stream, tox->current_mrl)) { tox->xine_state |= XINE_OPEN; _xine_play(command, tox, (void *)NO_ARGS); Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- loader.c 23 Jan 2003 18:19:34 -0000 1.8 +++ loader.c 15 Oct 2003 14:44:52 -0000 1.9 @@ -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: playlist.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/playlist.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- playlist.c 17 Jan 2003 23:39:56 -0000 1.10 +++ playlist.c 15 Oct 2003 14:44:52 -0000 1.11 @@ -580,6 +580,7 @@ } } __discard: + ; } fclose(playlist->fd); Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- xine_commands.c 22 May 2003 20:50:34 -0000 1.39 +++ xine_commands.c 15 Oct 2003 14:44:52 -0000 1.40 @@ -314,6 +314,10 @@ perr("MRL '%s' is malformed\n", tox->current_mrl); break; + case XINE_ERROR_INPUT_FAILED: + perr("Input plugin failed to open '%s'\n", tox->current_mrl); + break; + default: perr("!! Unhandled error !!\n"); break; |
From: Daniel Caujolle-B. <f1...@us...> - 2003-05-22 20:50:39
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv17186/src Modified Files: commands.c common.h utils.c xine_commands.c xine_commands.h Log Message: Made it compile with gcc 3.2.2, without warnings. Made it compile with OrT. Get rid of Shm completion event. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- commands.c 21 Jan 2003 16:53:34 -0000 1.53 +++ commands.c 22 May 2003 20:50:34 -0000 1.54 @@ -2515,7 +2515,7 @@ } static void do_dumpconfig(commands_t *command, toxine_t *tox, void *data) { - xine_cfg_entry_t cfg_entry; + _cfg_entry_t cfg_entry; return_if_no_new(tox); Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- common.h 21 Jan 2003 16:53:35 -0000 1.23 +++ common.h 22 May 2003 20:50:34 -0000 1.24 @@ -40,6 +40,12 @@ #define __tox_func__ __FUNCTION__ #endif +#ifdef XINE_ORT +#define _cfg_entry_t xine_config_entry_t +#else +#define _cfg_entry_t xine_cfg_entry_t +#endif + #define INFO_PREFIX " (I) " #define HELP_PREFIX " (?) " #define ECHO_PREFIX " (e) " Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- utils.c 21 Jan 2003 16:53:35 -0000 1.22 +++ utils.c 22 May 2003 20:50:34 -0000 1.23 @@ -507,7 +507,7 @@ } #endif static void _config_update(toxine_t *tox, - xine_cfg_entry_t *entry, + _cfg_entry_t *entry, int type, int min, int max, int value, char *string) { switch(type) { @@ -542,9 +542,9 @@ } void toxine_config_update_range(toxine_t *tox, char *key, int min, int max) { - xine_cfg_entry_t entry; + _cfg_entry_t entry; - memset(&entry, 0, sizeof(xine_cfg_entry_t)); + memset(&entry, 0, sizeof(_cfg_entry_t)); if(xine_config_lookup_entry(tox->xine, key, &entry)) _config_update(tox, &entry, XINE_CONFIG_TYPE_RANGE, min, max, 0, NULL); else @@ -552,9 +552,9 @@ } void toxine_config_update_string(toxine_t *tox, char *key, char *string) { - xine_cfg_entry_t entry; + _cfg_entry_t entry; - memset(&entry, 0, sizeof(xine_cfg_entry_t)); + memset(&entry, 0, sizeof(_cfg_entry_t)); if((xine_config_lookup_entry(tox->xine, key, &entry)) && string) _config_update(tox, &entry, XINE_CONFIG_TYPE_STRING, 0, 0, 0, string); @@ -567,9 +567,9 @@ } void toxine_config_update_enum(toxine_t *tox, char *key, int value) { - xine_cfg_entry_t entry; + _cfg_entry_t entry; - memset(&entry, 0, sizeof(xine_cfg_entry_t)); + memset(&entry, 0, sizeof(_cfg_entry_t)); if(xine_config_lookup_entry(tox->xine, key, &entry)) _config_update(tox, &entry, XINE_CONFIG_TYPE_ENUM, 0, 0, value, NULL); else @@ -577,9 +577,9 @@ } void toxine_config_update_bool(toxine_t *tox, char *key, int value) { - xine_cfg_entry_t entry; + _cfg_entry_t entry; - memset(&entry, 0, sizeof(xine_cfg_entry_t)); + memset(&entry, 0, sizeof(_cfg_entry_t)); if(xine_config_lookup_entry(tox->xine, key, &entry)) _config_update(tox, &entry, XINE_CONFIG_TYPE_BOOL, 0, 0, ((value > 0) ? 1 : 0), NULL); else @@ -587,9 +587,9 @@ } void toxine_config_update_num(toxine_t *tox, char *key, int value) { - xine_cfg_entry_t entry; + _cfg_entry_t entry; - memset(&entry, 0, sizeof(xine_cfg_entry_t)); + memset(&entry, 0, sizeof(_cfg_entry_t)); if(xine_config_lookup_entry(tox->xine, key, &entry)) _config_update(tox, &entry, XINE_CONFIG_TYPE_NUM, 0, 0, value, NULL); else Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- xine_commands.c 21 Jan 2003 16:53:36 -0000 1.38 +++ xine_commands.c 22 May 2003 20:50:34 -0000 1.39 @@ -321,7 +321,7 @@ } -void toxine_dump_config_entry(toxine_t *tox, xine_cfg_entry_t *entry) { +void toxine_dump_config_entry(toxine_t *tox, _cfg_entry_t *entry) { pinfo("%s:\n", entry->key); pinfo(" entry->description: '%s'\n", (entry->description) ? entry->description : "none"); @@ -1678,7 +1678,7 @@ * ****** CONFIG ****** */ void _xine_config_get_first_entry(commands_t *command, toxine_t *tox, void *data) { - xine_cfg_entry_t cfg_entry; + _cfg_entry_t cfg_entry; return_if_no_init(tox); @@ -1691,7 +1691,7 @@ pinfo(".\n"); } void _xine_config_get_next_entry(commands_t *command, toxine_t *tox, void *data) { - xine_cfg_entry_t cfg_entry; + _cfg_entry_t cfg_entry; return_if_no_init(tox); @@ -1705,7 +1705,7 @@ } void _xine_config_lookup_entry(commands_t *command, toxine_t *tox, void *data) { const char *key; - xine_cfg_entry_t cfg_entry; + _cfg_entry_t cfg_entry; return_if_no_init(tox); @@ -1721,7 +1721,7 @@ void _xine_config_update_entry(commands_t *command, toxine_t *tox, void *data) { const char *key; int value; - xine_cfg_entry_t cfg_entry; + _cfg_entry_t cfg_entry; return_if_no_init(tox); Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- xine_commands.h 21 Jan 2003 16:53:36 -0000 1.24 +++ xine_commands.h 22 May 2003 20:50:34 -0000 1.25 @@ -20,7 +20,7 @@ #ifndef __TOXINE_XINE_COMMANDS_H__ #define __TOXINE_XINE_COMMANDS_H__ -void toxine_dump_config_entry(toxine_t *, xine_cfg_entry_t *); +void toxine_dump_config_entry(toxine_t *, _cfg_entry_t *); void _NAPI_xine_dumpstream(toxine_t *tox); void _xine_new(commands_t *, toxine_t *, void *); |
From: Daniel Caujolle-B. <f1...@us...> - 2003-05-22 20:50:39
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv17186/src/plugins Modified Files: vo_x11.c Log Message: Made it compile with gcc 3.2.2, without warnings. Made it compile with OrT. Get rid of Shm completion event. Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- vo_x11.c 21 Jan 2003 16:53:39 -0000 1.22 +++ vo_x11.c 22 May 2003 20:50:34 -0000 1.23 @@ -29,6 +29,8 @@ #include <sys/types.h> #include <signal.h> #include <time.h> +#include <sys/select.h> +#include <sys/stat.h> #include <X11/Xlib.h> #include <X11/Xatom.h> @@ -88,7 +90,6 @@ int screen; XColor black, white; - int completion_event; Visual *visual; Colormap colormap; int depth; @@ -126,7 +127,7 @@ /* * Config callback. */ -static void change_fake_rate_cb(void *data, xine_cfg_entry_t *cfg) { +static void change_fake_rate_cb(void *data, _cfg_entry_t *cfg) { x11_private_t *private = (x11_private_t *)data; private->fake_rate = cfg->num_value; @@ -543,14 +544,6 @@ private->wm_hint->initial_state = NormalState; private->wm_hint->flags = InputHint | StateHint; - /* - * completion event - */ - if(XShmQueryExtension(private->display) == True) - private->completion_event = XShmGetEventBase(private->display) + ShmCompletion; - else - private->completion_event = -1; - private->x11_drawable[private->fullscreen].video_width = 720; private->x11_drawable[private->fullscreen].video_height = 576; @@ -951,15 +944,14 @@ } - if((xev->type == private->completion_event) - && tox->video.port && (tox->xine_state & XINE_STREAM)) - xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_COMPLETION_EVENT, (void *)xev); - } /* * */ +static Bool is_not_completion(Display *display, XEvent *event, XPointer arg) { + return True; +} 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; @@ -969,8 +961,31 @@ pthread_detach(pthread_self()); while(tox->video.running) { - XNextEvent(private->display, &myevent); - video_window_handle_event(&myevent, tox) ; + Bool got_xevent; + struct timeval tv; + fd_set r; + + FD_ZERO(&r); + FD_SET(ConnectionNumber(private->display), &r); + + tv.tv_sec = 0; + tv.tv_usec = 33000; + + select(ConnectionNumber(private->display) + 1, &r, 0, 0, &tv); + + XLockDisplay(private->display); + got_xevent = XCheckIfEvent(private->display, &myevent, is_not_completion, (XPointer) NULL); + XUnlockDisplay(private->display); + + /* 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); + + } } pthread_exit(NULL); |
From: Daniel Caujolle-B. <f1...@us...> - 2003-05-22 20:50:37
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1:/tmp/cvs-serv17186 Modified Files: configure.ac Log Message: Made it compile with gcc 3.2.2, without warnings. Made it compile with OrT. Get rid of Shm completion event. Index: configure.ac =================================================================== RCS file: /cvsroot/toxine/toxine/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- configure.ac 17 Jan 2003 22:56:26 -0000 1.2 +++ configure.ac 22 May 2003 20:50:34 -0000 1.3 @@ -240,6 +240,15 @@ AC_TRY_CFLAGS("-fno-strict-aliasing", f_nsa="-fno-strict-aliasing", f_nsa="") AC_TRY_CFLAGS("-fschedule-insns2", f_si="-fschedule-insns2", f_si="") AC_TRY_CFLAGS("-mwide-multiply", m_wm="-mwide-multiply", m_wm="") + dnl + dnl gcc 3.1 uses the -f version + dnl + AC_TRY_CFLAGS("-falign-functions=4", f_af="-falign-functions=4", + f_af="-malign-functions=4") + AC_TRY_CFLAGS("-falign-loops=4", f_al="-falign-loops=4", + f_al="-malign-loops=4") + AC_TRY_CFLAGS("-falign-jumps=4", f_aj="-falign-jumps=4", + f_aj="-malign-jumps=4") fi dnl Flags not supported by all *cc* variants @@ -262,7 +271,7 @@ case "$host_or_hostalias" in i386-*-freebsd*) - CFLAGS="$CFLAGS -pipe -fomit-frame-pointer -malign-functions=4 -malign-loops=4 -malign-jumps=4 -malign-functions=4 $m_wm $m_psb -fexpensive-optimizations $f_si $f_nsa -ffast-math -funroll-loops -finline-functions -D_REENTRANT" + CFLAGS="$CFLAGS -pipe -fomit-frame-pointer $f_af $f_al $f_aj $m_wm $m_psb -fexpensive-optimizations $f_si $f_nsa -ffast-math -funroll-loops -finline-functions -D_REENTRANT" DEBUG_CFLAGS="$X_CFLAGS $DEBUG_CFLAGS -D_REENTRANT -DDEBUG" AC_DEFINE(__i386__,1,[Define this if you're running x86 architecture]) AC_DEFINE([ARCH_X86],,[x86 architecture]) @@ -283,7 +292,7 @@ AC_TRY_CFLAGS("$sarchopt=athlon", k7cpu="athlon", k7cpu="i686") dnl add x86 specific CFLAGS - CFLAGS="$CFLAGS -O3 -pipe -fomit-frame-pointer -malign-functions=4 -malign-loops=4 -malign-jumps=4 -malign-functions=4 $m_wm $m_psb -fexpensive-optimizations $f_si $f_nsa -ffast-math -funroll-loops -finline-functions" + CFLAGS="$CFLAGS -O3 -pipe -fomit-frame-pointer $f_af $f_al $f_aj $m_wm $m_psb -fexpensive-optimizations $f_si $f_nsa -ffast-math -funroll-loops -finline-functions" DEBUG_CFLAGS="$DEBUG_CFLAGS -O3" dnl enable x86 specific parts of the code |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-23 18:19:39
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv25622 Modified Files: loader.c Log Message: use system installed plugins Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- loader.c 17 Jan 2003 23:59:15 -0000 1.7 +++ loader.c 23 Jan 2003 18:19:34 -0000 1.8 @@ -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...> - 2003-01-21 16:54:13
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv7645 Modified Files: commands.c commands.h common.h utils.c utils.h xine_commands.c xine_commands.h Log Message: @@made playlist works again. Some new xine api functions adding. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- commands.c 19 Jan 2003 11:25:18 -0000 1.52 +++ commands.c 21 Jan 2003 16:53:34 -0000 1.53 @@ -435,7 +435,10 @@ __playmrloop: toxine_set_current_mrl_from_cur(tox); - _xine_play(NULL, tox, (void *)NO_ARGS); + if(xine_open(tox->stream, tox->current_mrl)) { + tox->xine_state |= XINE_OPEN; + _xine_play(NULL, tox, (void *)NO_ARGS); + } } else { if(tox->playlist.loop && tox->playlist.num) { @@ -499,7 +502,7 @@ /* * Listener of xine engine events. */ -void toxine_event_listener(void *data, xine_event_t *event) { +void toxine_event_listener(void *data, const xine_event_t *event) { toxine_t *tox = (toxine_t *) data; pthread_mutex_lock(&tox->event.mutex); @@ -754,15 +757,16 @@ */ int toxine_audio_out_init(toxine_t *tox) { - tox->audio.mixer.enable = 0; - tox->audio.mixer.caps = 0; - if(!tox->audio.name) { perr("no audio driver sets, no audio output.\n"); - return 0; + return 1; } if(tox->audio.port == NULL) { + + tox->audio.mixer.enable = 0; + tox->audio.mixer.caps = 0; + tox->audio.port = xine_open_audio_driver(tox->xine, (const char*)tox->audio.name, NULL); if(tox->audio.port == NULL) { perr("xine_load_audio_output_plugin() failed to load '%s' driver.\n", tox->audio.name); @@ -1195,7 +1199,7 @@ memset(&buffer, 0, sizeof(buffer)); sprintf(buffer, "%s %s %s", - "xine_set_video_property", toxine_get_arg(tox, 3), toxine_get_arg(tox, 4)); + "xine_set_param", toxine_get_arg(tox, 3), toxine_get_arg(tox, 4)); toxine_set_command_line(tox, buffer); toxine_handle_command(tox, NULL); @@ -1261,7 +1265,7 @@ tox->audio.mixer.volume_level = atoi(toxine_get_arg(tox, 3)); sprintf(buffer, "%s %d", - "xine_set_audio_property volume", tox->audio.mixer.volume_level); + "xine_set_param XINE_PARAM_AUDIO_VOLUME", tox->audio.mixer.volume_level); toxine_set_command_line(tox, buffer); toxine_handle_command(tox, NULL); @@ -1271,7 +1275,7 @@ } else if(toxine_is_arg_contain(tox, 2, "mute")) { - toxine_set_command_line(tox, "xine_set_audio_property mute"); + toxine_set_command_line(tox, "xine_set_param XINE_PARAM_AUDIO_MUTE"); toxine_handle_command(tox, NULL); } @@ -1293,7 +1297,8 @@ */ static void do_init(commands_t *command, toxine_t *tox, void *data) { _xine_init(command, tox, NULL); - _xine_stream_new(command, tox, NULL); + if(tox->xine) + _xine_stream_new(command, tox, NULL); } /* @@ -1320,7 +1325,10 @@ if(tox->command.num_args) toxine_set_current_mrl(tox, (toxine_get_arg(tox, 1))); - _xine_play(command, tox, (void *)NO_ARGS); + if(xine_open(tox->stream, tox->current_mrl)) { + tox->xine_state |= XINE_OPEN; + _xine_play(command, tox, (void *)NO_ARGS); + } } Index: commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- commands.h 17 Jan 2003 23:39:52 -0000 1.4 +++ commands.h 21 Jan 2003 16:53:35 -0000 1.5 @@ -27,7 +27,7 @@ #define REQUIRE_ARGS 2 #define OPTIONAL_ARGS 3 -void toxine_event_listener(void *, xine_event_t *); +void toxine_event_listener(void *, const xine_event_t *); int toxine_video_out_init(toxine_t *); int toxine_audio_out_init(toxine_t *); void toxine_handle_command(toxine_t *, void *); Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- common.h 18 Jan 2003 17:01:24 -0000 1.22 +++ common.h 21 Jan 2003 16:53:35 -0000 1.23 @@ -153,7 +153,7 @@ struct toxine_s { xine_t *xine; xine_stream_t *stream; - + xine_event_queue_t *event_queue; int autoinit; int running; Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- utils.c 19 Jan 2003 11:25:18 -0000 1.21 +++ utils.c 21 Jan 2003 16:53:35 -0000 1.22 @@ -337,60 +337,6 @@ } /* - * Return next mrl in playlist. - */ -char *toxine_get_next_mrl(toxine_t *tox) { - if(tox) { - - if(tox->playlist.cur >= (tox->playlist.num - 1)) { - - if(tox->playlist.loop) { - - if(tox->loop_mode == PLAYLIST_LOOP) - return tox->playlist.mmk[0]->mrl; - else if(tox->loop_mode == PLAYLIST_MRL_LOOP) - return tox->playlist.mmk[tox->playlist.cur]->mrl; - - } - else - return NULL; - } - - return tox->playlist.mmk[tox->playlist.cur + 1]->mrl; - } - - return NULL; -} - -/* - * Branching was successfully accomplished, update playlist. - */ -void toxine_branched(toxine_t *tox) { - - if(tox) { - if(tox->playlist.cur < (tox->playlist.num - 1)) { - - if(tox->playlist.loop) { - if(tox->loop_mode == PLAYLIST_LOOP) - tox->playlist.cur++; - } - else - tox->playlist.cur++; - - toxine_set_current_mrl_from_cur(tox); - } - else { - - if(tox->playlist.loop && (tox->loop_mode == PLAYLIST_LOOP)) { - tox->playlist.cur = 0; - toxine_set_current_mrl_from_cur(tox); - } - - } - } -} - -/* * Execute a shell command. */ int toxine_system(int dont_run_as_root, char *command) { Index: utils.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- utils.h 19 Jan 2003 11:25:18 -0000 1.10 +++ utils.h 21 Jan 2003 16:53:36 -0000 1.11 @@ -35,8 +35,6 @@ 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); int toxine_mkdir_safe(char *path); void toxine_draw_bar(char *title, int min, int max, int val); Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- xine_commands.c 19 Jan 2003 11:40:47 -0000 1.37 +++ xine_commands.c 21 Jan 2003 16:53:36 -0000 1.38 @@ -433,7 +433,7 @@ pinfo("0x%x\n", (int)tox->xine); pinfo("xine_config_load()\n"); xine_config_load(tox->xine, tox->configfile); - pinfo("\n"); + pinfo(".\n"); } void _xine_stream_new(commands_t *command, toxine_t *tox, void *data) { @@ -448,13 +448,19 @@ return; } - pinfo("xine_stream_new()"); + pinfo("xine_stream_new():"); tox->stream = xine_stream_new(tox->xine, tox->audio.port, tox->video.port); pinfo("return 0x%x\n", (int) tox->stream); 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); } /* @@ -475,40 +481,26 @@ pinfo("xine_init()"); xine_init(tox->xine); pinfo("\n"); - tox->xine_state |= XINE_INIT; - + 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); return; } - if(!toxine_audio_out_init(tox)) + 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); + return; + } - /* - if(xine_get_param(tox->xine, XINE_PARAM_AO_MIXER_VOL)) - tox->audio.mixer.caps |= XINE_PARAM_AO_MIXER_VOL; - if(xine_get_param(tox->xine, XINE_PARAM_AO_PCM_VOL)) - tox->audio.mixer.caps |= XINE_PARAM_AO_PCM_VOL; - if(xine_get_param(tox->xine, XINE_PARAM_AO_MUTE)) - tox->audio.mixer.caps |= XINE_PARAM_AO_MUTE; - - if(tox->audio.mixer.caps & (XINE_PARAM_AO_MIXER_VOL | XINE_PARAM_AO_PCM_VOL)) { - tox->audio.mixer.enable = 1; - tox->audio.mixer.volume_level = xine_get_param(tox->xine, XINE_PARAM_AUDIO_VOLUME); - } - - if(tox->audio.mixer.caps & XINE_PARAM_AO_MUTE) - tox->audio.mixer.mute = xine_get_param(tox->xine, XINE_PARAM_AUDIO_MUTE); - */ - pthread_mutex_init(&tox->event.mutex, NULL); -#warning FIXME -#if 0 - pinfo("xine_register_event_listener()\n"); - xine_register_event_listener(tox->xine, toxine_event_listener, (void *) tox); pinfo(".\n"); -#endif - } /* @@ -529,7 +521,7 @@ result = xine_open(tox->stream, tox->current_mrl); pinfo("returned %d\n", result); tox->xine_state |= XINE_OPEN; - pinfo("\n"); + pinfo(".\n"); } } @@ -729,7 +721,7 @@ else perr("invalid trick mode: %s.\n", trick); - pinfo("\n"); + pinfo(".\n"); } } @@ -758,7 +750,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_show_stream_info(stream_infos[i].type, stream_info); - pinfo("\n"); + pinfo(".\n"); } } } @@ -798,7 +790,7 @@ pinfo("%s\n", (meta_info) ? (char *) meta_info : "Unavailable"); break; } - pinfo("\n"); + pinfo(".\n"); } } } @@ -839,8 +831,10 @@ return_if_no_new(tox); if(tox->xine_state & XINE_INIT) { - pinfo("xine_remove_event_listener()\n"); - // xine_remove_event_listener(tox->xine, toxine_event_listener); + if(tox->event_queue) { + pinfo("xine_event_dispose_queue()\n"); + xine_event_dispose_queue(tox->event_queue); + } } pinfo("xine_exit()\n"); @@ -855,6 +849,8 @@ tox->audio.port = NULL; + pthread_mutex_destroy(&tox->event.mutex); + pinfo(".\n"); } @@ -890,7 +886,7 @@ break; } pinfo(buffer); - pinfo("\n"); + pinfo(".\n"); } /* @@ -1143,7 +1139,7 @@ else perr("Unknown xine parameter: '%s'\n", param); - pinfo("\n"); + pinfo(".\n"); } /* @@ -1213,7 +1209,7 @@ stream, stime / (60 * 60), (stime / 60) % 60, stime % 60, time); pinfo("Total time: %02d:%02d:%02d (%dms)\n", slength / (60 * 60), (slength / 60) % 60, slength % 60, length); - pinfo("\n"); + pinfo(".\n"); } /* @@ -1261,12 +1257,11 @@ sprintf(buffer, "%s%c", log, '\n'); pinfo("%s", buffer); } - pinfo(".\n"); } else pinfo("No log entry available.\n"); - pinfo("\n"); + pinfo(".\n"); } /* @@ -1306,7 +1301,7 @@ pinfo("xine_get_log_section_count():\n"); count = xine_get_log_section_count(tox->xine); pinfo("returned %d\n", count); - pinfo("\n"); + pinfo(".\n"); } @@ -1347,7 +1342,7 @@ pinfo("xine_log(%s, '%s')\n", log, msg); xine_log(tox->xine, buftype, msg); - pinfo("\n"); + pinfo(".\n"); } /* @@ -1693,7 +1688,7 @@ else perr("xine_config_get_first_entry() returned NULL\n"); - pinfo("\n"); + pinfo(".\n"); } void _xine_config_get_next_entry(commands_t *command, toxine_t *tox, void *data) { xine_cfg_entry_t cfg_entry; @@ -1706,7 +1701,7 @@ else perr("xine_config_get_next_entry() returned NULL\n"); - pinfo("\n"); + pinfo(".\n"); } void _xine_config_lookup_entry(commands_t *command, toxine_t *tox, void *data) { const char *key; @@ -1721,7 +1716,7 @@ else perr("Entry '%s' doesn't exist.\n", key); - pinfo("\n"); + pinfo(".\n"); } void _xine_config_update_entry(commands_t *command, toxine_t *tox, void *data) { const char *key; @@ -1774,7 +1769,7 @@ else perr("Entry '%s' doesn't exist.\n", key); - pinfo("\n"); + pinfo(".\n"); } else @@ -1797,7 +1792,6 @@ xine_config_load(tox->xine, tox->configfile); pinfo(".\n"); - pinfo("\n"); } void _xine_config_save(commands_t *command, toxine_t *tox, void *data) { const char *filename = NULL; @@ -1811,7 +1805,6 @@ xine_config_save(tox->xine, ((filename) ? filename : tox->configfile)); pinfo(".\n"); - pinfo("\n"); } void _xine_config_reset(commands_t *command, toxine_t *tox, void *data) { return_if_no_init(tox); @@ -1819,8 +1812,6 @@ pinfo("xine_config_reset():\n"); xine_config_reset(tox->xine); pinfo(".\n"); - - pinfo("\n"); } /* * ****** END CONFIG ****** @@ -1879,7 +1870,7 @@ pinfo("xine_close():"); xine_close(tox->stream); tox->xine_state &= ~XINE_OPEN; - pinfo("\n"); + pinfo(".\n"); } void _xine_dispose(commands_t *command, toxine_t *tox, void *data) { @@ -1889,7 +1880,81 @@ xine_dispose(tox->stream); tox->stream = NULL; tox->xine_state &= ~(XINE_OPEN | XINE_STREAM); - pinfo("\n"); + pinfo(".\n"); +} + +void _xine_get_file_extensions(commands_t *command, toxine_t *tox, void *data) { + char *exts; + + return_if_no_init(tox); + pinfo("xine_get_file_extensions():\n"); + exts = xine_get_file_extensions(tox->xine); + pinfo("returned: '%s'\n", (exts) ? exts : "NONE"); + pinfo(".\n"); + toxine_free(exts); +} + +void _xine_get_mime_types(commands_t *command, toxine_t *tox, void *data) { + char *mimes; + + return_if_no_init(tox); + pinfo("xine_get_mime_types():\n"); + mimes = xine_get_mime_types(tox->xine); + pinfo("returned: '%s'\n", (mimes) ? mimes : "NONE"); + pinfo(".\n"); + toxine_free(mimes); +} + +void _xine_get_current_frame(commands_t *command, toxine_t *tox, void *data) { + char buffer[_PATH_MAX + _NAME_MAX + 1]; + char *filename = NULL; + FILE *fd; + int width; + int height; + int ratio_code; + int format; + uint8_t *frame = NULL; + + return_if_no_stream(tox); + + if(toxine_is_args(tox)) + filename = (char *) toxine_get_arg(tox, 1); + else { + sprintf(buffer, "xine_frame-%d.frm", (unsigned int)(time(NULL))); + filename = buffer; + } + + width = xine_get_stream_info(tox->stream,XINE_STREAM_INFO_VIDEO_WIDTH); + height = xine_get_stream_info(tox->stream,XINE_STREAM_INFO_VIDEO_HEIGHT); + + if((!width) || (!height)) + perr("Wrong frame size: %dx%d\n", width, height); + else { + int size = (width * height) * 2; + + frame = (uint8_t *) xine_xmalloc(sizeof(uint8_t) * size); + + pinfo("xine_get_current_frame():"); + 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); + + if((fd = fopen(filename, "w+b")) != NULL) { + fwrite(frame, size, 1, fd); + fflush(fd); + fclose(fd); + pinfo("File '%s' saved\n", filename); + } + else + perr("Unable to open file '%s' in write mode\n", filename); + + } + else + perr("unable to get current frame\n"); + + toxine_free(frame); + } + } /* @@ -1924,5 +1989,5 @@ pinfo("%s: ", stream_infos[i].name); toxine_show_stream_info(stream_infos[i].type, iinfo); } - pinfo("\n"); + pinfo(".\n"); } Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- xine_commands.h 19 Jan 2003 11:40:47 -0000 1.23 +++ xine_commands.h 21 Jan 2003 16:53:36 -0000 1.24 @@ -65,13 +65,14 @@ void _xine_check_version(commands_t *, toxine_t *, void *); void _xine_close(commands_t *, toxine_t *, void *); void _xine_dispose(commands_t *, toxine_t *, void *); +void _xine_get_file_extensions(commands_t *, toxine_t *, void *); +void _xine_get_mime_types(commands_t *, toxine_t *, void *); +void _xine_get_current_frame(commands_t *, toxine_t *, void *); /* void _xine_stream_master_slave(...) void xine_get_current_frame(...) - void xine_get_file_extensions(...) - void xine_get_mime_types(...) void xine_gui_send_vo_data(...) void xine_config_update_entry(...) @@ -421,6 +422,18 @@ { "xine_dispose", NO_ARGS, _xine_dispose, \ "Dispose all stream related resources.", \ "xine_dispose" \ + }, \ + { "xine_get_file_extensions", NO_ARGS, _xine_get_file_extensions, \ + "Return list of file extensions supported by 'demux by extensions' stage.", \ + "xine_get_file_extensions" \ + }, \ + { "xine_get_mime_types", NO_ARGS, _xine_get_mime_types, \ + "Return list of supported mimes types.", \ + "xine_get_mime_types" \ + }, \ + { "xine_get_current_frame", OPTIONAL_ARGS, _xine_get_current_frame, \ + "Get current displayed frame, and save it into a file.", \ + "xine_get_current_frame [filename]" \ }, \ { "xine_usec_sleep", REQUIRE_ARGS, _xine_usec_sleep, \ "Sleep some µ seconds", \ |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-21 16:53:46
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv7645/plugins Modified Files: vo_aa.c vo_dxr3.c vo_none.c vo_plugin.h vo_x11.c Log Message: @@made playlist works again. Some new xine api functions adding. Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- vo_aa.c 17 Jan 2003 23:39:58 -0000 1.12 +++ vo_aa.c 21 Jan 2003 16:53:37 -0000 1.13 @@ -122,7 +122,7 @@ return "Video out plugin supporting AsciiArt driver.\n"; } -static void receive_xine_event(toxine_t *tox, xine_event_t *event) { +static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { } static int is_fullscreen(toxine_t *tox) { Index: vo_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- vo_dxr3.c 17 Jan 2003 23:39:59 -0000 1.16 +++ vo_dxr3.c 21 Jan 2003 16:53:37 -0000 1.17 @@ -122,7 +122,7 @@ return "Video out plugin supports DXR3/HW+ cards (lb:letterboxed, ws:widescreen).\n"; } -static void receive_xine_event(toxine_t *tox, xine_event_t *event) { +static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { } static int is_fullscreen(toxine_t *tox) { Index: vo_none.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_none.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- vo_none.c 18 Jan 2003 17:01:28 -0000 1.9 +++ vo_none.c 21 Jan 2003 16:53:38 -0000 1.10 @@ -90,7 +90,7 @@ return "Video out plugin which display nothing (useful for audio only playback).\n"; } -static void receive_xine_event(toxine_t *tox, xine_event_t *event) { +static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { } static int is_fullscreen(toxine_t *tox) { Index: vo_plugin.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_plugin.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- vo_plugin.h 17 Jan 2003 23:40:00 -0000 1.9 +++ vo_plugin.h 21 Jan 2003 16:53:38 -0000 1.10 @@ -34,7 +34,7 @@ const char *(*get_identifier)(void); const char **(*get_names)(void); const char *(*get_help)(void); - void (*receive_xine_event)(toxine_t *, xine_event_t *); + void (*receive_xine_event)(toxine_t *, const xine_event_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.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- vo_x11.c 18 Jan 2003 17:01:28 -0000 1.21 +++ vo_x11.c 21 Jan 2003 16:53:39 -0000 1.22 @@ -1105,7 +1105,7 @@ /* * */ -static void receive_xine_event(toxine_t *tox, xine_event_t *event) { +static void receive_xine_event(toxine_t *tox, const xine_event_t *event) { } /* |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-19 11:40:50
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv27747 Modified Files: xine_commands.c xine_commands.h Log Message: @@cleanup continue Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- xine_commands.c 19 Jan 2003 11:25:18 -0000 1.36 +++ xine_commands.c 19 Jan 2003 11:40:47 -0000 1.37 @@ -416,9 +416,9 @@ pinfo("Exiting old xine instance\n"); if(tox->xine_state & XINE_STREAM) { xine_close(tox->stream); - tox->xine_state |= ~XINE_OPEN; + tox->xine_state &= ~XINE_OPEN; xine_dispose(tox->stream); - tox->xine_state |= ~XINE_STREAM; + tox->xine_state &= ~XINE_STREAM; } xine_exit(tox->xine); //_xine_exit(NULL, tox, NULL); @@ -443,7 +443,7 @@ perr("Choose and initialise a video driver first\n"); return; } - if(tox->stream != NULL) { + if(tox->xine_state & XINE_STREAM) { perr("Stream is already created, use xine_dispose() in order to create a new one\n"); return; } @@ -1871,6 +1871,25 @@ pinfo(".\n"); } } +} + +void _xine_close(commands_t *command, toxine_t *tox, void *data) { + return_if_no_stream(tox); + + pinfo("xine_close():"); + xine_close(tox->stream); + tox->xine_state &= ~XINE_OPEN; + pinfo("\n"); +} + +void _xine_dispose(commands_t *command, toxine_t *tox, void *data) { + return_if_no_stream(tox); + + pinfo("xine_dispose():"); + xine_dispose(tox->stream); + tox->stream = NULL; + tox->xine_state &= ~(XINE_OPEN | XINE_STREAM); + pinfo("\n"); } /* Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- xine_commands.h 19 Jan 2003 11:25:18 -0000 1.22 +++ xine_commands.h 19 Jan 2003 11:40:47 -0000 1.23 @@ -63,12 +63,12 @@ void _xine_get_version(commands_t *, toxine_t *, void *); void _xine_get_version_string(commands_t *, toxine_t *, void *); void _xine_check_version(commands_t *, toxine_t *, void *); +void _xine_close(commands_t *, toxine_t *, void *); +void _xine_dispose(commands_t *, toxine_t *, void *); /* void _xine_stream_master_slave(...) - void xine_close(...) - void xine_dispose(...) void xine_get_current_frame(...) void xine_get_file_extensions(...) void xine_get_mime_types(...) @@ -241,7 +241,7 @@ }, \ { "xine_exit", NO_ARGS, _xine_exit, \ "Deinitialize xine engine.xine_exit", \ - NULL \ + "xine_exit" \ }, \ { "xine_get_error", NO_ARGS, _xine_get_error, \ "get error", \ @@ -413,6 +413,14 @@ { "xine_check_version", REQUIRE_ARGS, _xine_check_version, \ "Compare version numbers with xine installed version.", \ "xine_check_version <major>.<minor>.<sub>" \ + }, \ + { "xine_close", NO_ARGS, _xine_close, \ + "Close current stream.", \ + "xine_close" \ + }, \ + { "xine_dispose", NO_ARGS, _xine_dispose, \ + "Dispose all stream related resources.", \ + "xine_dispose" \ }, \ { "xine_usec_sleep", REQUIRE_ARGS, _xine_usec_sleep, \ "Sleep some µ seconds", \ |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-19 11:25:21
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv24301 Modified Files: commands.c utils.c utils.h xine_commands.c xine_commands.h Log Message: @@cleanup continue Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- commands.c 19 Jan 2003 10:42:58 -0000 1.51 +++ commands.c 19 Jan 2003 11:25:18 -0000 1.52 @@ -117,7 +117,7 @@ { "PLAY" , XINE_STATUS_PLAY }, { "STOP" , XINE_STATUS_STOP }, { "QUIT" , XINE_STATUS_QUIT }, - { "PAUSE" , -1 }, + { "PAUSE" , -1 }, { "SLOW_4", -2 }, { "SLOW_2", -3 }, { "NORMAL", -4 }, @@ -167,6 +167,7 @@ static void do_mediamk(commands_t *, toxine_t *, void *); static void do_echo(commands_t *, toxine_t *, void *); static void do_dumpconfig(commands_t *, toxine_t *, void *); +static void do_dumpstream(commands_t *, toxine_t *, void *); static commands_t commands[] = { @@ -207,6 +208,10 @@ "Dump all entries of current config object.", "dumpconfig" }, + { "dumpstream", NO_ARGS, do_dumpstream, + "Dump stream informations (stream info and meta info).", + "dumpstream" + }, { "echo", REQUIRE_ARGS, do_echo, "echoing some text / variables", "echo <[string|variable]> ...\n" @@ -2515,4 +2520,8 @@ pinfo(".\n"); pinfo("\n"); +} + +static void do_dumpstream(commands_t *command, toxine_t *tox, void *data) { + _NAPI_xine_dumpstream(tox); } Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- utils.c 19 Jan 2003 10:42:59 -0000 1.20 +++ utils.c 19 Jan 2003 11:25:18 -0000 1.21 @@ -661,3 +661,46 @@ xine_config_save(tox->xine, tox->configfile); } } + +void toxine_show_stream_info(int info_type, uint32_t iinfo) { + switch(info_type) { + case XINE_STREAM_INFO_BITRATE: + case XINE_STREAM_INFO_SEEKABLE: + case XINE_STREAM_INFO_AUDIO_HANDLED: + case XINE_STREAM_INFO_HAS_CHAPTERS: + case XINE_STREAM_INFO_HAS_VIDEO: + case XINE_STREAM_INFO_HAS_AUDIO: + case XINE_STREAM_INFO_IGNORE_VIDEO: + case XINE_STREAM_INFO_IGNORE_AUDIO: + case XINE_STREAM_INFO_IGNORE_SPU: + case XINE_STREAM_INFO_VIDEO_HAS_STILL: + pinfo("%s\n", toxine_get_yesno_string(iinfo)); + break; + + case XINE_STREAM_INFO_AUDIO_FOURCC: + case XINE_STREAM_INFO_VIDEO_FOURCC: + pinfo("%s\n", toxine_get_fourcc_string(iinfo)); + break; + + case XINE_STREAM_INFO_VIDEO_WIDTH: + case XINE_STREAM_INFO_VIDEO_HEIGHT: + case XINE_STREAM_INFO_VIDEO_RATIO: + case XINE_STREAM_INFO_VIDEO_CHANNELS: + case XINE_STREAM_INFO_VIDEO_STREAMS: + case XINE_STREAM_INFO_VIDEO_BITRATE: + case XINE_STREAM_INFO_VIDEO_HANDLED: + case XINE_STREAM_INFO_FRAME_DURATION: + case XINE_STREAM_INFO_AUDIO_CHANNELS: + case XINE_STREAM_INFO_AUDIO_BITS: + case XINE_STREAM_INFO_AUDIO_SAMPLERATE: + case XINE_STREAM_INFO_AUDIO_BITRATE: + case XINE_STREAM_INFO_MAX_AUDIO_CHANNEL: + case XINE_STREAM_INFO_MAX_SPU_CHANNEL: + pinfo("%d\n", iinfo); + break; + + default: + perr("Unknown stream info type %d\n", iinfo); + break; + } +} Index: utils.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- utils.h 19 Jan 2003 10:42:59 -0000 1.9 +++ utils.h 19 Jan 2003 11:25:18 -0000 1.10 @@ -55,4 +55,6 @@ void toxine_config_load(toxine_t *tox); void toxine_config_save(toxine_t *tox); +void toxine_show_stream_info(int info_type, uint32_t iinfo); + #endif Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- xine_commands.c 19 Jan 2003 10:42:59 -0000 1.35 +++ xine_commands.c 19 Jan 2003 11:25:18 -0000 1.36 @@ -757,43 +757,7 @@ pinfo("xine_get_stream_info(%s):\n", stream_infos[i].name); stream_info = xine_get_stream_info(tox->stream, stream_infos[i].type); - switch(stream_infos[i].type) { - case XINE_STREAM_INFO_BITRATE: - case XINE_STREAM_INFO_SEEKABLE: - case XINE_STREAM_INFO_AUDIO_HANDLED: - case XINE_STREAM_INFO_HAS_CHAPTERS: - case XINE_STREAM_INFO_HAS_VIDEO: - case XINE_STREAM_INFO_HAS_AUDIO: - case XINE_STREAM_INFO_IGNORE_VIDEO: - case XINE_STREAM_INFO_IGNORE_AUDIO: - case XINE_STREAM_INFO_IGNORE_SPU: - case XINE_STREAM_INFO_VIDEO_HAS_STILL: - pinfo("%s\n", toxine_get_yesno_string(stream_info)); - break; - - case XINE_STREAM_INFO_AUDIO_FOURCC: - case XINE_STREAM_INFO_VIDEO_FOURCC: - pinfo("%s\n", toxine_get_fourcc_string(stream_info)); - break; - - case XINE_STREAM_INFO_VIDEO_WIDTH: - case XINE_STREAM_INFO_VIDEO_HEIGHT: - case XINE_STREAM_INFO_VIDEO_RATIO: - case XINE_STREAM_INFO_VIDEO_CHANNELS: - case XINE_STREAM_INFO_VIDEO_STREAMS: - case XINE_STREAM_INFO_VIDEO_BITRATE: - case XINE_STREAM_INFO_VIDEO_HANDLED: - case XINE_STREAM_INFO_FRAME_DURATION: - case XINE_STREAM_INFO_AUDIO_CHANNELS: - case XINE_STREAM_INFO_AUDIO_BITS: - case XINE_STREAM_INFO_AUDIO_SAMPLERATE: - case XINE_STREAM_INFO_AUDIO_BITRATE: - case XINE_STREAM_INFO_MAX_AUDIO_CHANNEL: - case XINE_STREAM_INFO_MAX_SPU_CHANNEL: - pinfo("%d\n", stream_info); - break; - - } + toxine_show_stream_info(stream_infos[i].type, stream_info); pinfo("\n"); } } @@ -1919,4 +1883,27 @@ pinfo("xine_usec_sleep(%u):\n", usecs); xine_usec_sleep(usecs); pinfo(".\n"); +} + +void _NAPI_xine_dumpstream(toxine_t *tox) { + const char *minfo; + uint32_t iinfo; + int i; + + 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); + 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); + pinfo("%s: ", stream_infos[i].name); + toxine_show_stream_info(stream_infos[i].type, iinfo); + } + pinfo("\n"); } Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- xine_commands.h 19 Jan 2003 10:42:59 -0000 1.21 +++ xine_commands.h 19 Jan 2003 11:25:18 -0000 1.22 @@ -21,6 +21,8 @@ #define __TOXINE_XINE_COMMANDS_H__ void toxine_dump_config_entry(toxine_t *, xine_cfg_entry_t *); +void _NAPI_xine_dumpstream(toxine_t *tox); + void _xine_new(commands_t *, toxine_t *, void *); void _xine_init(commands_t *, toxine_t *, void *); void _xine_open(commands_t *, toxine_t *, void *); |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-19 10:43:03
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv13533 Modified Files: commands.c utils.c utils.h xine_commands.c xine_commands.h Log Message: @@cleanup continue Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- commands.c 19 Jan 2003 00:26:12 -0000 1.50 +++ commands.c 19 Jan 2003 10:42:58 -0000 1.51 @@ -1370,8 +1370,7 @@ * Seek in stream. */ static void do_seek(commands_t *command, toxine_t *tox, void *data) { - int sec; - int offset; + int msec; return_if_no_init(tox); @@ -1383,16 +1382,12 @@ return; } - xine_get_pos_length(tox->stream, NULL, &sec, NULL); - sec /= 1000; - offset = atoi((toxine_get_arg(tox, 1))); - - if ((sec + offset) < 0) - sec = 0; - else - sec += offset; + msec = (atoi((toxine_get_arg(tox, 1)))) * 1000; - if(!xine_play(tox->stream, 0, sec)) + if(msec < 0) + msec = 0; + + if(!xine_play(tox->stream, 0, msec)) fprintf(stderr, "xine_play() failed.\n"); } Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- utils.c 17 Jan 2003 23:59:16 -0000 1.19 +++ utils.c 19 Jan 2003 10:42:59 -0000 1.20 @@ -41,6 +41,36 @@ extern prompt_state_t prompt_state[]; +char *toxine_get_yesno_string(uint32_t val) { + static char *yesno[] = { "No", "Yes" }; + + return ((val > 0) ? yesno[1] : yesno[0]); +} + +char *toxine_get_fourcc_string(uint32_t f) { + static char fcc[5]; + + memset(&fcc, 0, sizeof(fcc)); + + /* Should we take care about endianess ? */ + fcc[0] = f | 0xFFFFFF00; + fcc[1] = f>>8 | 0xFFFFFF00; + fcc[2] = f>>16 | 0xFFFFFF00; + fcc[3] = f>>24 | 0xFFFFFF00; + fcc[4] = 0; + + if(f <= 0xFFFF) + sprintf(fcc, "0x%x", f); + + if((fcc[0] == 'm') && (fcc[1] == 's')) { + if((fcc[2] = 0x0) && (fcc[3] == 0x55)) { + *(uint32_t *) fcc = 0x33706d2e; /* Force to '.mp3' */ + } + } + + return &fcc[0]; +} + /* * cleanup the str string, take care about ' */ Index: utils.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- utils.h 17 Jan 2003 23:39:57 -0000 1.8 +++ utils.h 19 Jan 2003 10:42:59 -0000 1.9 @@ -22,6 +22,8 @@ #include "common.h" +char *toxine_get_yesno_string(uint32_t val); +char *toxine_get_fourcc_string(uint32_t f); char *toxine_atoa(char *str); int toxine_confirm(char *message); void toxine_update_prompt(toxine_t *tox); Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- xine_commands.c 19 Jan 2003 00:26:13 -0000 1.34 +++ xine_commands.c 19 Jan 2003 10:42:59 -0000 1.35 @@ -52,6 +52,7 @@ { NULL , 0 } }; +#if 0 static struct video_props_s { char *name; int prop; @@ -74,7 +75,9 @@ XINE_VO_ZOOM_MIN */ }; +#endif +#if 0 static struct visual_types_s { char *name; int type; @@ -88,6 +91,7 @@ { "XINE_VISUAL_TYPE_PM" , XINE_VISUAL_TYPE_PM }, { NULL , 0 } }; +#endif static struct event_types_s { char *name; @@ -230,6 +234,7 @@ { NULL , 0 } }; +#if 0 static struct xine_vo_params_s { char *name; int param; @@ -247,7 +252,9 @@ { "XINE_PARAM_VO_TVMODE" , XINE_PARAM_VO_TVMODE }, { NULL , 0 } }; +#endif +#if 0 static struct xine_vo_zooms_s { char *name; int factor; @@ -257,6 +264,7 @@ { "XINE_VO_ZOOM_MIN" , XINE_VO_ZOOM_MIN }, { NULL , 0 } }; +#endif static struct xine_vo_aspects_s { char *name; @@ -725,7 +733,9 @@ } } - +/* + * ************* + */ void _xine_get_stream_info(commands_t *command, toxine_t *tox, void *data) { int nargs; @@ -748,27 +758,86 @@ pinfo("xine_get_stream_info(%s):\n", stream_infos[i].name); stream_info = xine_get_stream_info(tox->stream, stream_infos[i].type); switch(stream_infos[i].type) { - case XINE_STREAM_INFO_BITRATE: case XINE_STREAM_INFO_SEEKABLE: + case XINE_STREAM_INFO_AUDIO_HANDLED: + case XINE_STREAM_INFO_HAS_CHAPTERS: + case XINE_STREAM_INFO_HAS_VIDEO: + case XINE_STREAM_INFO_HAS_AUDIO: + case XINE_STREAM_INFO_IGNORE_VIDEO: + case XINE_STREAM_INFO_IGNORE_AUDIO: + case XINE_STREAM_INFO_IGNORE_SPU: + case XINE_STREAM_INFO_VIDEO_HAS_STILL: + pinfo("%s\n", toxine_get_yesno_string(stream_info)); + break; + + case XINE_STREAM_INFO_AUDIO_FOURCC: + case XINE_STREAM_INFO_VIDEO_FOURCC: + pinfo("%s\n", toxine_get_fourcc_string(stream_info)); + break; + case XINE_STREAM_INFO_VIDEO_WIDTH: case XINE_STREAM_INFO_VIDEO_HEIGHT: case XINE_STREAM_INFO_VIDEO_RATIO: + case XINE_STREAM_INFO_VIDEO_CHANNELS: + case XINE_STREAM_INFO_VIDEO_STREAMS: case XINE_STREAM_INFO_VIDEO_BITRATE: + case XINE_STREAM_INFO_VIDEO_HANDLED: case XINE_STREAM_INFO_FRAME_DURATION: case XINE_STREAM_INFO_AUDIO_CHANNELS: case XINE_STREAM_INFO_AUDIO_BITS: case XINE_STREAM_INFO_AUDIO_SAMPLERATE: case XINE_STREAM_INFO_AUDIO_BITRATE: - case XINE_STREAM_INFO_HAS_CHAPTERS: - pinfo("%d\n", stream_info); + case XINE_STREAM_INFO_MAX_AUDIO_CHANNEL: + case XINE_STREAM_INFO_MAX_SPU_CHANNEL: + pinfo("%d\n", stream_info); break; + } pinfo("\n"); } } } +void _xine_get_meta_info(commands_t *command, toxine_t *tox, void *data) { + int nargs; + + return_if_no_stream(tox); + + nargs = toxine_is_args(tox); + if(nargs) { + char *info_name = (char *)toxine_get_arg(tox, 1); + int i, found = -1; + + for(i = 0; meta_infos[i].name != NULL; i++) { + if(!strncasecmp(info_name, meta_infos[i].name, strlen(info_name))) { + found = i; + break; + } + } + if(found >= 0) { + const char *meta_info; + + pinfo("xine_get_meta_info(%s):\n", meta_infos[i].name); + meta_info = xine_get_meta_info(tox->stream, stream_infos[i].type); + switch(meta_infos[i].type) { + case XINE_META_INFO_TITLE: + case XINE_META_INFO_COMMENT: + case XINE_META_INFO_ARTIST: + case XINE_META_INFO_GENRE: + case XINE_META_INFO_ALBUM: + case XINE_META_INFO_YEAR: + case XINE_META_INFO_VIDEOCODEC: + case XINE_META_INFO_AUDIOCODEC: + case XINE_META_INFO_SYSTEMLAYER: + case XINE_META_INFO_INPUT_PLUGIN: + pinfo("%s\n", (meta_info) ? (char *) meta_info : "Unavailable"); + break; + } + pinfo("\n"); + } + } +} /* * */ @@ -929,20 +998,6 @@ } break; - case XINE_PARAM_AV_OFFSET: - case XINE_PARAM_AUDIO_CHANNEL_LOGICAL: - case XINE_PARAM_SPU_CHANNEL: - case XINE_PARAM_VIDEO_CHANNEL: - case XINE_PARAM_AUDIO_VOLUME: - case XINE_PARAM_AUDIO_MUTE: - case XINE_PARAM_AUDIO_COMPR_LEVEL: - case XINE_PARAM_AUDIO_AMP_LEVEL: - case XINE_PARAM_AUDIO_REPORT_LEVEL: - case XINE_PARAM_VO_DEINTERLACE: - sprintf(buffer, "%s, %d)\n", buffer, value); - value_found = 1; - break; - case XINE_PARAM_VO_ASPECT_RATIO: for(i = 0; xine_vo_aspects[i].name != NULL; i++) { if(!strncasecmp(svalue, xine_vo_aspects[i].name, strlen(svalue))) { @@ -954,6 +1009,18 @@ } break; + case XINE_PARAM_AV_OFFSET: + case XINE_PARAM_AUDIO_CHANNEL_LOGICAL: + case XINE_PARAM_SPU_CHANNEL: + case XINE_PARAM_VIDEO_CHANNEL: + case XINE_PARAM_AUDIO_VOLUME: + case XINE_PARAM_AUDIO_MUTE: + case XINE_PARAM_AUDIO_COMPR_LEVEL: + case XINE_PARAM_AUDIO_AMP_LEVEL: + case XINE_PARAM_AUDIO_REPORT_LEVEL: + case XINE_PARAM_VERBOSITY: + case XINE_PARAM_SPU_OFFSET: + case XINE_PARAM_VO_DEINTERLACE: case XINE_PARAM_VO_HUE: case XINE_PARAM_VO_SATURATION: case XINE_PARAM_VO_CONTRAST: @@ -1054,6 +1121,14 @@ pinfo("report level: %s", (result) ? "yes" : "no"); break; + case XINE_PARAM_VERBOSITY: + pinfo("verbosity: %d", result); + break; + + case XINE_PARAM_SPU_OFFSET: + pinfo("spu offset: %d (u: 1/90000 sec)", result); + break; + case XINE_PARAM_VO_DEINTERLACE: pinfo("video out deinterlace: %s", (result) ? "yes" : "no"); break; @@ -1117,7 +1192,6 @@ return_if_no_stream(tox); -#warning OPTIONAL channel if(toxine_is_args(tox)) channel = atoi(((char *)toxine_get_arg(tox, 1))); else @@ -1141,7 +1215,6 @@ return_if_no_stream(tox); -#warning OPTIONAL channel if(toxine_is_args(tox)) channel = atoi(((char *)toxine_get_arg(tox, 1))); else @@ -1354,7 +1427,6 @@ int nargs; // toxine_unset_last_result(tox); -#warning CHECKME return_if_no_init(tox); if((nargs = toxine_is_args(tox))) { @@ -1438,7 +1510,6 @@ const char *const *inpp; // toxine_unset_last_result(tox); -#warning CHECKME; return_if_no_init(tox); pinfo("xine_get_autoplay_input_plugin_ids():\n"); @@ -1799,7 +1870,6 @@ pinfo("xine_get_version():\n"); xine_get_version(&major, &minor, &sub); -#warning FIXME // toxine_set_last_int_result(tox, version); poutalign(); pout("'%d.%d.%d'\n", major, minor, sub); @@ -1838,633 +1908,6 @@ } } } - - -/////////////////////////////////////////////////// -#if 0 -/* - * - */ -void _xine_get_spu_channel(commands_t *command, toxine_t *tox, void *data) { - int chan; - - CHECK_XINE(tox); - - pinfo("xine_get_spu_channel():\n"); - chan = xine_get_spu_channel(tox->xine); - // toxine_set_last_int_result(tox, chan); - poutalign(); - pout("'%d'\n", chan); - pinfo(".\n"); -} - - -/* - * - */ -void _xine_get_audio_selection(commands_t *command, toxine_t *tox, void *data) { - int chan; - - CHECK_XINE(tox); - - pinfo("xine_get_audio_selection():\n"); - chan = xine_get_audio_selection(tox->stream); - // toxine_set_last_int_result(tox, chan); - poutalign(); - pout("'%d'\n", chan); - pinfo(".\n"); -} - -/* - * - */ -void _xine_get_audio_lang(commands_t *command, toxine_t *tox, void *data) { - char buffer[16]; - - CHECK_XINE(tox); - - pinfo("xine_get_audio_lang():\n"); - xine_get_audio_lang(tox->stream, buffer); - // toxine_set_last_char_result(tox, buffer); - poutalign(); - pout("'%s'\n", buffer); - pinfo(".\n"); -} - -/* - * - */ -void _xine_select_audio_channel(commands_t *command, toxine_t *tox, void *data) { - int channel; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - channel = atoi((toxine_get_arg(tox, 1))); - pinfo("xine_select_audio_channel(%d)\n", channel); - xine_select_audio_channel(tox->xine, channel); - pinfo(".\n"); -} - -/* - * - */ -void _xine_select_spu_channel(commands_t *command, toxine_t *tox, void *data) { - int channel; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - channel = atoi((toxine_get_arg(tox, 1))); - pinfo("xine_select_spu_channel(%d)\n", channel); - xine_select_spu_channel(tox->xine, channel); - pinfo(".\n"); -} -/* - * - */ -void _xine_set_speed(commands_t *command, toxine_t *tox, void *data) { - int speed; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - if(toxine_is_arg_contain(tox, 1, "SPEED_PAUSE")) - speed = SPEED_PAUSE; - else if(toxine_is_arg_contain(tox, 1, "SPEED_SLOW_4")) - speed = SPEED_SLOW_4; - else if(toxine_is_arg_contain(tox, 1, "SPEED_SLOW_2")) - speed = SPEED_SLOW_2; - else if(toxine_is_arg_contain(tox, 1, "SPEED_NORMAL")) - speed = SPEED_NORMAL; - else if(toxine_is_arg_contain(tox, 1, "SPEED_FAST_2")) - speed = SPEED_FAST_2; - else if(toxine_is_arg_contain(tox, 1, "SPEED_FAST_4")) - speed = SPEED_FAST_4; - else - speed = atoi((toxine_get_arg(tox, 1))); - - pinfo("xine_set_speed(%d)\n", speed); - xine_set_speed(tox->xine, speed); - pinfo(".\n"); -} - -/* - * - */ -void _xine_get_speed(commands_t *command, toxine_t *tox, void *data) { - int speed; - - CHECK_XINE(tox); - - pinfo("xine_get_speed():\n"); - speed = xine_get_speed(tox->xine); - // toxine_set_last_int_result(tox, speed); - poutalign(); - pout("%d (", speed); - switch(speed) { - case SPEED_PAUSE: - pout("SPEED_PAUSE"); - break; - case SPEED_SLOW_4: - pout("SPEED_SLOW_4"); - break; - case SPEED_SLOW_2: - pout("SPEED_SLOW_2"); - break; - case SPEED_NORMAL: - pout("SPEED_NORMAL"); - break; - case SPEED_FAST_2: - pout("SPEED_FAST_2"); - break; - case SPEED_FAST_4: - pout("SPEED_FAST_4"); - break; - default: - pout("UNKNOWN"); - break; - } - pout(")\n"); - pinfo(".\n"); -} - -/* - * - */ -void _xine_set_audio_property(commands_t *command, toxine_t *tox, void *data) { - int nargs; - int property = -1, value = 0; - - // toxine_unset_last_result(tox); - - CHECK_XINE(tox); - - nargs = toxine_is_args(tox); - - if(tox->audio.mixer.enable) { - if(nargs >= 1) { - if(toxine_is_arg_contain(tox, 1, "volume") && (nargs >= 2)) { - tox->audio.mixer.volume_level = atoi(toxine_get_arg(tox, 2)); - - if(tox->audio.mixer.volume_level < 0) - tox->audio.mixer.volume_level = 0; - else if(tox->audio.mixer.volume_level > 100) - tox->audio.mixer.volume_level = 100; - - property = tox->audio.mixer.volume_mixer; - value = tox->audio.mixer.volume_level; - } - else if(toxine_is_arg_contain(tox, 1, "mute")) { - if(tox->audio.mixer.caps & AO_CAP_MUTE_VOL) { - tox->audio.mixer.mute = !tox->audio.mixer.mute; - property = AO_PROP_MUTE_VOL; - value = tox->audio.mixer.mute; - } - } - else if(nargs >= 2) { - value = atoi(toxine_get_arg(tox, 2)); - - if(toxine_is_arg_contain(tox, 1, "AO_PROP_MIXER_VOL")) - property = AO_PROP_MIXER_VOL; - else if(toxine_is_arg_contain(tox, 1, "AO_PROP_PCM_VOL")) - property = AO_PROP_PCM_VOL; - else if(toxine_is_arg_contain(tox, 1, "AO_PROP_MUTE_VOL")) - property = AO_PROP_MUTE_VOL; - - if((property == AO_PROP_MIXER_VOL) || (property == AO_PROP_PCM_VOL)) { - if(value < 0) - value = 0; - else if(value > 100) - value = 100; - } - } - - if(property >= 0) { - pinfo("xine_set_audio_property():\n"); - xine_set_audio_property(tox->xine, property, value); - pinfo(".\n"); - } - - } - } -} - -/* - * - */ -void _xine_get_audio_capabilities(commands_t *command, toxine_t *tox, void *data) { - int caps, i; - - // toxine_unset_last_result(tox); - - CHECK_XINE(tox); - if(tox->audio.port) { - - pinfo("xine_get_audio_capabilities():\n"); - caps = xine_get_audio_capabilities(tox->stream); - // toxine_set_last_int_result(tox, caps); - pinfo("capabilities (0x%x):\n", caps); - - for(i = 0; audio_caps[i].name != NULL; i++) { - if(caps & audio_caps[i].cap) - pinfo("%s\n", audio_caps[i].name); - } - - pinfo(".\n"); - } - else { - perr("audio driver not initialized\n"); - return; - } - -} - -/* - * - */ -void _xine_get_audio_property(commands_t *command, toxine_t *tox, void *data) { - int nargs, property = -1, retval; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - nargs = toxine_is_args(tox); - if(nargs) { - - if(toxine_is_arg_contain(tox, 1, "volume")) - property = tox->audio.mixer.volume_mixer; - else if(toxine_is_arg_contain(tox, 1, "mute")) - property = AO_PROP_MUTE_VOL; - else if(toxine_is_arg_contain(tox, 1, "AO_PROP_MIXER_VOL")) - property = AO_PROP_MIXER_VOL; - else if(toxine_is_arg_contain(tox, 1, "AO_PROP_PCM_VOL")) - property = AO_PROP_PCM_VOL; - else if(toxine_is_arg_contain(tox, 1, "AO_PROP_MUTE_VOL")) - property = AO_PROP_MUTE_VOL; - - if(property >= 0) { - pinfo("xine_get_audio_property(%d):\n", property); - retval = xine_get_audio_property(tox->xine, property); - // toxine_set_last_int_result(tox, retval); - poutalign(); - pinfo("%d\n", retval); - pinfo(".\n"); - } - } -} - -/* - * - */ -void _NAPI_xine_get_video_capabilities(commands_t *command, toxine_t *tox, void *data) { - uint32_t vcap; - int i; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - if(tox->video.cur_plugin) { - vcap = tox->video.cur_plugin->get_capabilities(tox); - // toxine_set_last_int_result(tox, vcap); - pinfo("video capabilities (0x%x): \n", vcap); - - for(i = 0; video_caps[i].name != NULL; i++) { - if(vcap & video_caps[i].cap) - pinfo("%s\n", video_caps[i].name); - } - - pinfo(".\n"); - } - else { - perr("video driver not initialized\n"); - return; - } -} - -/* - * - */ -void _NAPI_xine_set_video_property(commands_t *command, toxine_t *tox, void *data) { - int nargs; - int property, value, retval; - uint32_t vcap; - int i; - char *property_name; - - // toxine_unset_last_result(tox); - - CHECK_XINE(tox); - - nargs = toxine_is_args(tox); - - if(nargs >= 2) { - -#warning FIXME -#if 0 - - property_name = (char *)toxine_get_arg(tox, 1); - value = atoi(toxine_get_arg(tox, 2)); - - if(tox->video.cur_plugin) { - - vcap = tox->video.cur_plugin->get_capabilities(tox); - - for(i = 0; video_props[i].name != NULL; i++) { - if(!strncasecmp(property_name, video_props[i].name, strlen(property_name))) { - - property = video_props[i].prop; - - if((vcap & video_props[i].req_cap) || (video_props[i].req_cap == 0)) { - pinfo("set property %s to value %d:\n", video_props[i].name, value); - retval = tox->video.cur_plugin->set_property(tox, property, value); - pinfo("returned %d.\n", retval); - pinfo(".\n"); - } - - } - } - } - else - perr("video driver not initialized\n"); -#endif - } -} - -/* - * - */ -void _NAPI_xine_get_video_property(commands_t *command, toxine_t *tox, void *data) { - int nargs; - int property, retval; - uint32_t vcap; - int i; - char *property_name; - - // toxine_unset_last_result(tox); - - CHECK_XINE(tox); - - nargs = toxine_is_args(tox); - - if(nargs >= 1) { - - property_name = (char *)toxine_get_arg(tox, 1); - - if(tox->video.cur_plugin) { - - vcap = tox->video.cur_plugin->get_capabilities(tox); - // toxine_set_last_int_result(tox, vcap); - - for(i = 0; video_props[i].name != NULL; i++) { - if(!strncasecmp(property_name, video_props[i].name, strlen(property_name))) { - - property = video_props[i].prop; - - if((vcap & video_props[i].req_cap) || (video_props[i].req_cap == 0)) { - pinfo("get property %s:\n", video_props[i].name); - retval = tox->video.cur_plugin->get_property(tox, property); - pinfo("property value is %d.\n", retval); - pinfo(".\n"); - } - else - perr("current video driver don't support the '%s' property\n", video_props[i].name); - - } - } - } - else - perr("video driver not initialized\n"); - - } -} - -/* - * - */ -void _NAPI_xine_get_video_property_min_max(commands_t *command, toxine_t *tox, void *data) { - int nargs; - int property, min, max; - uint32_t vcap; - int i; - char *property_name; - - // toxine_unset_last_result(tox); - - CHECK_XINE(tox); - - nargs = toxine_is_args(tox); - - if(nargs >= 1) { - - property_name = (char *)toxine_get_arg(tox, 1); - - if(tox->video.cur_plugin) { - - vcap = tox->video.cur_plugin->get_capabilities(tox); - // toxine_set_last_int_result(tox, vcap); - - for(i = 0; video_props[i].name != NULL; i++) { - if(!strncasecmp(property_name, video_props[i].name, strlen(property_name))) { - - property = video_props[i].prop; - - if((vcap & video_props[i].req_cap) || (video_props[i].req_cap == 0)) { - pinfo("get property min/max %s:\n", video_props[i].name); - tox->video.cur_plugin->get_property_min_max(tox, property, &min, &max); - pinfo("property min value is %d, max value is %d.\n", min, max); - pinfo(".\n"); - } - else - perr("current video driver don't support the '%s' property\n", video_props[i].name); - - } - } - } - else - perr("video driver not initialized\n"); - - } -} - -/* - * - */ -void _xine_get_av_offset(commands_t *command, toxine_t *tox, void *data) { - int avoff; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - pinfo("xine_get_av_offset():\n"); - avoff = xine_get_av_offset(tox->xine); - // toxine_set_last_int_result(tox, avoff); - pinfo("returned %d.\n", avoff); - pinfo(".\n"); -} - -/* - * - */ -void _xine_set_av_offset(commands_t *command, toxine_t *tox, void *data) { - int avoff; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - if(toxine_is_args(tox)) { - avoff = atoi((toxine_get_arg(tox, 1))); - pinfo("xine_set_av_offset(%d):\n", avoff); - xine_set_av_offset(tox->xine, avoff); - pinfo(".\n"); - } -} - - -/* - * - */ -void _xine_get_current_position(commands_t *command, toxine_t *tox, void *data) { - int curpos; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - pinfo("xine_get_current_position():\n"); - curpos = xine_get_current_position(tox->xine); - // toxine_set_last_int_result(tox, curpos); - pinfo("current position is %d.\n", curpos); - pinfo(".\n"); -} - -/* - * - */ -void _xine_get_current_time(commands_t *command, toxine_t *tox, void *data) { - int curtime; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - pinfo("xine_get_current_time():\n"); - curtime = xine_get_current_time(tox->xine); - // toxine_set_last_int_result(tox, curtime); - pinfo("current time is %d.\n", curtime); - pinfo(".\n"); -} - -/* - * - */ -void _xine_get_stream_length(commands_t *command, toxine_t *tox, void *data) { - int len; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - pinfo("xine_get_stream_length():\n"); - len = xine_get_stream_length(tox->xine); - // toxine_set_last_int_result(tox, len); - pinfo("stream length estimated to %d.\n", len); - pinfo(".\n"); -} - -/* - * - */ -void _xine_is_stream_seekable(commands_t *command, toxine_t *tox, void *data) { - int retval; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - pinfo("xine_is_stream_seekable():\n"); - retval = xine_is_stream_seekable(tox->xine); - // toxine_set_last_int_result(tox, retval); - pinfo("returned %d.\n", retval); - pinfo(".\n"); -} - - -void _NAPI_config(commands_t *command, toxine_t *tox, void *data) { - int nargs; - - // toxine_unset_last_result(tox); - nargs = toxine_is_args(tox); - - if(nargs == 1) { - if(toxine_is_arg_contain(tox, 1, "save")) { - - pinfo("config->save(config)\n"); - tox->config->save(tox->config); - pinfo(".\n"); - - } - else if(toxine_is_arg_contain(tox, 1, "dump")) { - cfg_entry_t *entry; - - pinfo("Dump all config entries:\n"); - - for(entry = tox->config->first; entry; entry = entry->next) - toxine_dump_config_entry(NULL, entry); - - pinfo(".\n"); - } - } - else if(nargs >= 2) { - if(toxine_is_arg_contain(tox, 1, "read")) { - char *filename = (char *) toxine_get_arg(tox, 2); - struct stat pstat; - - if(((stat(filename, &pstat)) == 0) && (S_ISREG(pstat.st_mode))) { - - pinfo("config->read(config, %s)\n", filename); - tox->config->read(tox->config, filename); - pinfo(".\n"); - - } - else - perr("filename %s don't exist or isn't a regular file.\n", filename); - - } - else if(toxine_is_arg_contain(tox, 1, "lookup")) { - char *key = (char *) toxine_get_arg(tox, 2); - cfg_entry_t *entry; - - pinfo("config->lookup_entry(config, %s)\n", key); - entry = tox->config->lookup_entry(tox->config, key); - - if(entry) - toxine_dump_config_entry(tox, entry); - else - pinfo("config key '%s' not found\n", key); - - } - } -} - - -void _xine_get_input_plugin_capabilities(commands_t *command, toxine_t *tox, void *data) { - uint32_t caps; - int i; - - // toxine_unset_last_result(tox); - CHECK_XINE(tox); - - pinfo("xine_get_input_plugin_capabilities():\n"); - caps = xine_get_input_plugin_capabilities(tox->xine); - // toxine_set_last_int_result(tox, caps); - pinfo("capabilities (0x%x):\n", caps); - - for(i = 0; input_caps[i].name != NULL; i++) { - if(caps & input_caps[i].cap) - pinfo("%s\n", input_caps[i].name); - } - - pinfo(".\n"); -} - -#endif /* * xine-utils Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- xine_commands.h 18 Jan 2003 17:01:27 -0000 1.20 +++ xine_commands.h 19 Jan 2003 10:42:59 -0000 1.21 @@ -28,6 +28,7 @@ void _xine_play(commands_t *, toxine_t *, void *); void _xine_trick_mode(commands_t *, toxine_t *, void *); void _xine_get_stream_info(commands_t *, toxine_t *, void *); +void _xine_get_meta_info(commands_t *, toxine_t *, void *); void _xine_stop(commands_t *, toxine_t *, void *); void _xine_eject(commands_t *, toxine_t *, void *); void _xine_exit(commands_t *, toxine_t *, void *); @@ -67,7 +68,6 @@ void xine_close(...) void xine_dispose(...) void xine_get_current_frame(...) - void xine_get_meta_info(...) void xine_get_file_extensions(...) void xine_get_mime_types(...) void xine_gui_send_vo_data(...) @@ -206,13 +206,28 @@ "Get stream info.", \ "xine_get_stream_info <info type>\n" \ " - info type can be:\n" \ - " [XINE_STREAM_INFO_BITRATE | XINE_STREAM_INFO_SEEKABLE |\n" \ - " XINE_STREAM_INFO_VIDEO_WIDTH | XINE_STREAM_INFO_VIDEO_HEIGHT |\n" \ - " XINE_STREAM_INFO_VIDEO_RATIO | XINE_STREAM_INFO_VIDEO_CHANNELS |\n" \ - " XINE_STREAM_INFO_VIDEO_STREAMS | XINE_STREAM_INFO_VIDEO_BITRATE |\n" \ - " XINE_STREAM_INFO_FRAME_DURATION | XINE_STREAM_INFO_AUDIO_CHANNELS |\n" \ - " XINE_STREAM_INFO_AUDIO_BITS | XINE_STREAM_INFO_AUDIO_SAMPLERATE |\n" \ - " XINE_STREAM_INFO_AUDIO_BITRATE | XINE_STREAM_INFO_HAS_CHAPTERS]" \ + " [XINE_STREAM_INFO_BITRATE | XINE_STREAM_INFO_SEEKABLE | XINE_STREAM_INFO_VIDEO_WIDTH |\n" \ + " XINE_STREAM_INFO_VIDEO_HEIGHT | XINE_STREAM_INFO_VIDEO_RATIO |\n" \ + " XINE_STREAM_INFO_VIDEO_CHANNELS | XINE_STREAM_INFO_VIDEO_STREAMS |\n" \ + " XINE_STREAM_INFO_VIDEO_BITRATE | XINE_STREAM_INFO_VIDEO_FOURCC |\n" \ + " XINE_STREAM_INFO_VIDEO_HANDLED | XINE_STREAM_INFO_FRAME_DURATION |\n" \ + " XINE_STREAM_INFO_AUDIO_CHANNELS | XINE_STREAM_INFO_AUDIO_BITS |\n" \ + " XINE_STREAM_INFO_AUDIO_SAMPLERATE | XINE_STREAM_INFO_AUDIO_BITRATE |\n" \ + " XINE_STREAM_INFO_AUDIO_FOURCC | XINE_STREAM_INFO_AUDIO_HANDLED |\n" \ + " XINE_STREAM_INFO_HAS_CHAPTERS | XINE_STREAM_INFO_HAS_VIDEO |\n" \ + " XINE_STREAM_INFO_HAS_AUDIO | XINE_STREAM_INFO_IGNORE_VIDEO |\n" \ + " XINE_STREAM_INFO_IGNORE_AUDIO | XINE_STREAM_INFO_IGNORE_SPU |\n" \ + " XINE_STREAM_INFO_VIDEO_HAS_STILL | XINE_STREAM_INFO_MAX_AUDIO_CHANNEL |\n" \ + " XINE_STREAM_INFO_MAX_SPU_CHANNEL]" \ + }, \ + { "xine_get_meta_info", REQUIRE_ARGS, _xine_get_meta_info, \ + "Get meta info.", \ + "xine_get_meta_info <info type>\n" \ + " - info type can be:\n" \ + " [XINE_META_INFO_TITLE | XINE_META_INFO_COMMENT | XINE_META_INFO_ARTIST |\n" \ + " XINE_META_INFO_GENRE | XINE_META_INFO_ALBUM | XINE_META_INFO_YEAR |\n" \ + " XINE_META_INFO_VIDEOCODEC | XINE_META_INFO_AUDIOCODEC |\n" \ + " XINE_META_INFO_SYSTEMLAYER | XINE_META_INFO_INPUT_PLUGIN]" \ }, \ { "xine_stop", NO_ARGS, _xine_stop, \ "Stop playback", \ @@ -275,7 +290,7 @@ "Get current audio channel language", \ "xine_get_audio_lang" \ }, \ - { "xine_get_spu_lang", NO_ARGS, _xine_get_spu_lang, \ + { "xine_get_spu_lang", OPTIONAL_ARGS, _xine_get_spu_lang, \ "Get current spu channel language", \ "xine_get_spu_lang" \ }, \ @@ -404,166 +419,20 @@ -#if 0 - - { "xine_get_audio_capabilities", NO_ARGS, _xine_get_audio_capabilities, \ - "Get audio driver capabilities", \ - "xine_get_audio_capabilities" \ - }, \ - { "xine_get_audio_property", REQUIRE_ARGS, _xine_get_audio_property, \ - "Get an audio property", \ - "xine_get_audio_property <property>\n" \ - " - property can be: [AO_PROP_MIXER_VOL | AO_PROP_PCM_VOL | AO_PROP_MUTE_VOL]" \ - }, \ - { "xine_get_audio_selection", NO_ARGS, _xine_get_audio_selection, \ - "Get current audio channel", \ - "xine_get_audio_selection" \ - }, \ - { "xine_get_av_offset", NO_ARGS, _xine_get_av_offset, \ - "Return the current audio/video sync offset.", \ - "xine_get_av_offset" \ - }, \ - { "xine_get_current_position", NO_ARGS, _xine_get_current_position, \ - "Get current position in stream.", \ - "xine_get_current_position" \ - }, \ - { "xine_get_current_time", NO_ARGS, _xine_get_current_time, \ - "Get current position measured in seconds from the beginning of the stream.", \ - "xine_get_current_time" \ - }, \ - { "xine_get_input_plugin_capabilities", NO_ARGS, _xine_get_input_plugin_capabilities, \ - "Request input plugin capabilities.", \ - "xine_get_input_plugin_capabilities" \ - }, \ - { "xine_get_major_version", NO_ARGS, _xine_get_major_version, \ - "Get major version of xine engine", \ - "xine_get_major_version" \ - }, \ - { "xine_get_minor_version", NO_ARGS, _xine_get_minor_version, \ - "Get minor version of xine engine", \ - "xine_get_minor_version" \ - }, \ - { "xine_get_speed", NO_ARGS, _xine_get_speed, \ - "Get current playback speed.", \ - "xine_get_speed" \ - }, \ - { "xine_get_spu_channel", NO_ARGS, _xine_get_spu_channel, \ - "Get current spu channel", \ - "xine_get_spu_channel" \ - }, \ - { "xine_get_str_version", NO_ARGS, _xine_get_str_version, \ - "Get xine string version", \ - "xine_get_str_version" \ - }, \ - { "xine_get_stream_length", NO_ARGS, _xine_get_stream_length, \ - "Estimate length of input stream in seconds.", \ - "xine_get_stream_length" \ - }, \ - { "xine_get_sub_version", NO_ARGS, _xine_get_sub_version, \ - "Get sub version of xine engine", \ - "xine_get_sub_version" \ - }, \ - { "xine_get_video_capabilities", NO_ARGS, _NAPI_xine_get_video_capabilities, \ - "Get video driver capabilities", \ - "xine_get_video_capabilities" \ - }, \ - { "xine_get_video_property", REQUIRE_ARGS, _NAPI_xine_get_video_property, \ - "Get a video property", \ - "xine_get_video_property <property> \n" \ - " - property can be:\n" \ - " [VO_PROP_INTERLACED | VO_PROP_ASPECT_RATIO | VO_PROP_HUE |\n" \ - " VO_PROP_SATURATION | VO_PROP_CONTRAST | VO_PROP_BRIGHTNESS |\n" \ - " VO_PROP_COLORKEY | VO_PROP_AUTOPAINT_COLORKEY | VO_PROP_ZOOM_X | VO_PROP_ZOOM_Y |\n" \ - " VO_PROP_PAN_SCAN | VO_PROP_TVMODE | VO_PROP_MAX_NUM_FRAMES | VO_PROP_VO_TYPE]" \ - }, \ - { "xine_get_video_property_min_max", REQUIRE_ARGS, _NAPI_xine_get_video_property_min_max, \ - "Get a video property min and max values", \ - "xine_get_video_property_min_max <property> \n" \ - " - property can be:\n" \ - " [VO_PROP_INTERLACED | VO_PROP_ASPECT_RATIO | VO_PROP_HUE |\n" \ - " VO_PROP_SATURATION | VO_PROP_CONTRAST | VO_PROP_BRIGHTNESS |\n" \ - " VO_PROP_COLORKEY | VO_PROP_AUTOPAINT_COLORKEY | VO_PROP_ZOOM_X | VO_PROP_ZOOM_Y |\n" \ - " VO_PROP_PAN_SCAN | VO_PROP_TVMODE | VO_PROP_MAX_NUM_FRAMES | VO_PROP_VO_TYPE]" \ - }, \ - { "xine_is_stream_seekable", NO_ARGS, _xine_is_stream_seekable, \ - "check if the stream is seekable.", \ - "xine_is_stream_seekable" \ - }, \ - { "xine_select_audio_channel", REQUIRE_ARGS, _xine_select_audio_channel, \ - "Select audio channel", \ - "xine_select_audio_channel <channel>" \ - }, \ - { "xine_select_spu_channel", REQUIRE_ARGS, _xine_select_spu_channel, \ - "Select spu channel", \ - "xine_select_spu_channel <channel>" \ - }, \ - { "xine_send_event", REQUIRE_ARGS, _xine_send_event, \ - "Send an event to the engine.", \ - "xine_send_event <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_set_audio_property", REQUIRE_ARGS, _xine_set_audio_property, \ - "Set audio properties", \ - "xine_set_audio_property <property> <value>\n" \ - " - property can be: [AO_PROP_MIXER_VOL | AO_PROP_PCM_VOL | AO_PROP_MUTE_VOL]\n" \ - "xine_set_audio_property volume <level>\n" \ - "xine_set_audio_property mute" \ - }, \ - { "xine_set_av_offset", REQUIRE_ARGS, _xine_set_av_offset, \ - "Set audio/video sync offset, according to offset pts value.", \ - "xine_set_av_offset <offset pts>" \ - }, \ - { "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_video_property", REQUIRE_ARGS, _NAPI_xine_set_video_property, \ - "Set a video property to a value", \ - "xine_set_video_property <property> <value>\n" \ - " - property can be:\n" \ - " [VO_PROP_INTERLACED | VO_PROP_ASPECT_RATIO | VO_PROP_HUE |\n" \ - " VO_PROP_SATURATION | VO_PROP_CONTRAST | VO_PROP_BRIGHTNESS |\n" \ - " VO_PROP_COLORKEY | VO_PROP_AUTOPAINT_COLORKEY | VO_PROP_ZOOM_X | VO_PROP_ZOOM_Y |\n" \ - " VO_PROP_PAN_SCAN | VO_PROP_TVMODE | VO_PROP_MAX_NUM_FRAMES | VO_PROP_VO_TYPE]" \ - }, \ - -#endif /* 0 */ - - /* - xine_audio_port_t *xine_open_audio_driver (xine_t *self, const char *id, - void *data); - xine_video_port_t *xine_open_video_driver (xine_t *self, const char *id, - int visual, void *data); - - void xine_close_audio_driver (xine_t *self, xine_audio_port_t *driver); - void xine_close_video_driver (xine_t *self, xine_video_port_t *driver); - */ - - -#ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES +#if 0 /* ... */ +/* + xine_audio_port_t *xine_open_audio_driver (xine_t *self, const char *id, + void *data); + xine_video_port_t *xine_open_video_driver (xine_t *self, const char *id, + int visual, void *data); + + void xine_close_audio_driver (xine_t *self, xine_audio_port_t *driver); + void xine_close_video_driver (xine_t *self, xine_video_port_t *driver); +*/ -xine_video_port_t *xine_new_framegrab_video_port (xine_t *self); + #ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES + + xine_video_port_t *xine_new_framegrab_video_port (xine_t *self); typedef struct { @@ -620,6 +489,7 @@ uint8_t *img); /* TODO: xine_get_audio_frame */ +#endif #endif |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-19 00:26:15
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv10931 Modified Files: commands.c xine_commands.c Log Message: @@more api sync Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- commands.c 18 Jan 2003 17:23:28 -0000 1.49 +++ commands.c 19 Jan 2003 00:26:12 -0000 1.50 @@ -749,6 +749,9 @@ */ int toxine_audio_out_init(toxine_t *tox) { + tox->audio.mixer.enable = 0; + tox->audio.mixer.caps = 0; + if(!tox->audio.name) { perr("no audio driver sets, no audio output.\n"); return 0; @@ -760,6 +763,8 @@ perr("xine_load_audio_output_plugin() failed to load '%s' driver.\n", tox->audio.name); return 0; } + tox->audio.mixer.enable = 1; + tox->audio.mixer.caps = 1; } return 1; Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- xine_commands.c 18 Jan 2003 17:23:29 -0000 1.33 +++ xine_commands.c 19 Jan 2003 00:26:13 -0000 1.34 @@ -52,62 +52,6 @@ { NULL , 0 } }; -/* -static struct audio_caps_s { - char *name; - uint32_t cap; -} audio_caps[] = { - { "AO_CAP_NOCAP", AO_CAP_NOCAP }, - { "AO_CAP_MODE_A52", AO_CAP_MODE_A52 }, - { "AO_CAP_MODE_AC5", AO_CAP_MODE_AC5 }, - { "AO_CAP_MODE_MONO", AO_CAP_MODE_MONO }, - { "AO_CAP_MODE_STEREO", AO_CAP_MODE_STEREO }, - { "AO_CAP_MODE_4CHANNEL", AO_CAP_MODE_4CHANNEL }, - { "AO_CAP_MODE_5CHANNEL", AO_CAP_MODE_5CHANNEL }, - { "AO_CAP_MODE_5_1CHANNEL", AO_CAP_MODE_5_1CHANNEL }, - { "AO_CAP_MIXER_VOL", AO_CAP_MIXER_VOL }, - { "AO_CAP_PCM_VOL", AO_CAP_PCM_VOL }, - { "AO_CAP_MUTE_VOL", AO_CAP_MUTE_VOL }, - { NULL, 0 } -}; - -static struct video_caps_s { - char *name; - uint32_t cap; -} video_caps[] = { - { "VO_CAP_COPIES_IMAGE", VO_CAP_COPIES_IMAGE }, - { "VO_CAP_YV12", VO_CAP_YV12 }, - { "VO_CAP_YUY2", VO_CAP_YUY2 }, - { "VO_CAP_HUE", VO_CAP_HUE }, - { "VO_CAP_SATURATION", VO_CAP_SATURATION }, - { "VO_CAP_BRIGHTNESS", VO_CAP_BRIGHTNESS }, - { "VO_CAP_CONTRAST", VO_CAP_CONTRAST }, - { "VO_CAP_COLORKEY", VO_CAP_COLORKEY }, - { "VO_CAP_AUTOPAINT_COLORKEY", VO_CAP_AUTOPAINT_COLORKEY }, - { NULL, 0 } -}; - - -static struct input_caps_s { - char *name; - uint32_t cap; -} input_caps[] = { - { "INPUT_CAP_NOCAP", INPUT_CAP_NOCAP }, - { "INPUT_CAP_SEEKABLE", INPUT_CAP_SEEKABLE }, - { "INPUT_CAP_BLOCK", INPUT_CAP_BLOCK }, - { "INPUT_CAP_AUTOPLAY", INPUT_CAP_AUTOPLAY }, - { "INPUT_CAP_GET_DIR", INPUT_CAP_GET_DIR }, - { "INPUT_CAP_BROWSABLE", INPUT_CAP_BROWSABLE }, - { "INPUT_CAP_CLUT", INPUT_CAP_CLUT }, - { "INPUT_CAP_AUDIOLANG", INPUT_CAP_AUDIOLANG }, - { "INPUT_CAP_SPULANG", INPUT_CAP_SPULANG }, - { "INPUT_CAP_VARIABLE_BITRATE", INPUT_CAP_VARIABLE_BITRATE }, - { "INPUT_CAP_PREVIEW", INPUT_CAP_PREVIEW }, - { "INPUT_CAP_CHAPTERS", INPUT_CAP_CHAPTERS }, - { NULL, 0 } -}; -*/ -#if 0 static struct video_props_s { char *name; int prop; @@ -130,7 +74,6 @@ XINE_VO_ZOOM_MIN */ }; -#endif static struct visual_types_s { char *name; @@ -287,7 +230,6 @@ { NULL , 0 } }; -#if 0 static struct xine_vo_params_s { char *name; int param; @@ -305,7 +247,6 @@ { "XINE_PARAM_VO_TVMODE" , XINE_PARAM_VO_TVMODE }, { NULL , 0 } }; -#endif static struct xine_vo_zooms_s { char *name; @@ -337,7 +278,7 @@ static void toxine_handle_xine_errors(toxine_t *tox) { int err; - return_if_no_init(tox); + return_if_no_stream(tox); err = xine_get_error(tox->stream); @@ -465,14 +406,21 @@ if(tox->xine) { pinfo("Exiting old xine instance\n"); - _xine_exit(NULL, tox, NULL); + 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); } - pinfo("xine_new():\n"); - tox->xine = xine_new(); - if(tox->xine) - tox->xine_state |= XINE_NEW; + pinfo("xine_new()"); + tox->xine = xine_new(); + 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"); @@ -510,7 +458,6 @@ if(tox->xine_state & XINE_INIT) { perr("xine engine already initialized.\n"); -#warning FIXME return; } @@ -530,8 +477,6 @@ if(!toxine_audio_out_init(tox)) perr("unable to initialize audio driver, audio output disabled.\n"); - tox->audio.mixer.enable = 1; - tox->audio.mixer.caps = 1; /* if(xine_get_param(tox->xine, XINE_PARAM_AO_MIXER_VOL)) tox->audio.mixer.caps |= XINE_PARAM_AO_MIXER_VOL; @@ -1681,8 +1626,9 @@ xine_event_t xine_event; xine_event.type = event_type; -#warning TIME + gettimeofday(&xine_event.tv, NULL); xine_event.stream = tox->stream; + pinfo("xine_event_send(%d)\n", event_type); xine_event_send(tox->stream, &xine_event); pinfo(".\n"); |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-18 17:23:36
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv23203 Modified Files: commands.c xine_commands.c Log Message: @@more port Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- commands.c 18 Jan 2003 16:59:04 -0000 1.48 +++ commands.c 18 Jan 2003 17:23:28 -0000 1.49 @@ -959,7 +959,7 @@ if(tox->autoinit) { _xine_init(NULL, tox, NULL); - //stream new + _xine_stream_new(NULL, tox, NULL); } if(tox->script.in_use) { Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- xine_commands.c 18 Jan 2003 17:01:26 -0000 1.32 +++ xine_commands.c 18 Jan 2003 17:23:29 -0000 1.33 @@ -530,8 +530,8 @@ if(!toxine_audio_out_init(tox)) perr("unable to initialize audio driver, audio output disabled.\n"); - tox->audio.mixer.enable = 0; - tox->audio.mixer.caps = 0; + tox->audio.mixer.enable = 1; + tox->audio.mixer.caps = 1; /* if(xine_get_param(tox->xine, XINE_PARAM_AO_MIXER_VOL)) tox->audio.mixer.caps |= XINE_PARAM_AO_MIXER_VOL; @@ -564,7 +564,7 @@ void _xine_open(commands_t *command, toxine_t *tox, void *data) { const char *mrl; - return_if_no_init(tox); + return_if_no_stream(tox); mrl = toxine_get_arg(tox, 1); if(mrl) { @@ -592,7 +592,7 @@ int need_open = 1; // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); /* Don't take care about arguments */ if(data) @@ -725,6 +725,9 @@ if(!tox->current_mrl && mrl) tox->current_mrl = strdup(mrl); + if(time) + 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))) @@ -749,7 +752,7 @@ void _xine_trick_mode(commands_t *command, toxine_t *tox, void *data) { int nargs; - return_if_no_init(tox); + return_if_no_stream(tox); if((nargs = toxine_is_args(tox)) == 2) { int i, trick_mode = -1; @@ -781,7 +784,7 @@ void _xine_get_stream_info(commands_t *command, toxine_t *tox, void *data) { int nargs; - return_if_no_init(tox); + return_if_no_stream(tox); nargs = toxine_is_args(tox); if(nargs) { @@ -826,7 +829,7 @@ */ void _xine_stop(commands_t *command, toxine_t *tox, void *data) { // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); pinfo("xine_stop()\n"); tox->ignore_finished = 1; xine_stop(tox->stream); @@ -840,7 +843,7 @@ int retval; // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); pinfo("xine_eject():\n"); retval = xine_eject(tox->stream); @@ -884,7 +887,8 @@ int xine_errno; char buffer[2048]; - return_if_no_init(tox); + return_if_no_stream(tox); + pinfo("xine_get_error():\n"); xine_errno = xine_get_error(tox->stream); @@ -918,7 +922,7 @@ int i, found = 0, status; // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); pinfo("xine_get_status():\n"); status = xine_get_status(tox->stream); @@ -940,7 +944,8 @@ */ void _xine_set_param(commands_t *command, toxine_t *tox, void *data) { - return_if_no_init(tox); + return_if_no_stream(tox); + if((toxine_is_args(tox)) >= 2) { const char *param; const char *svalue; @@ -1040,7 +1045,7 @@ const char *param; int i, found = -1; - return_if_no_init(tox); + return_if_no_stream(tox); param = toxine_get_arg(tox, 1); for(i = 0; xine_params[i].name != NULL; i++) { @@ -1165,7 +1170,7 @@ int channel; int ret; - return_if_no_init(tox); + return_if_no_stream(tox); #warning OPTIONAL channel if(toxine_is_args(tox)) @@ -1189,7 +1194,8 @@ int channel; int ret; - return_if_no_init(tox); + return_if_no_stream(tox); + #warning OPTIONAL channel if(toxine_is_args(tox)) channel = atoi(((char *)toxine_get_arg(tox, 1))); @@ -1212,8 +1218,7 @@ int result, stream, time, length; int stime, slength; - return_if_no_init(tox); - return_if_no_open(tox); + return_if_no_stream(tox); pinfo("xine_get_pos_length():\n"); result = xine_get_pos_length (tox->stream, &stream, &time, &length); @@ -1370,7 +1375,7 @@ const char *const *inpp; // toxine_unset_last_result(tox); - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_get_browsable_input_plugin_ids():\n"); inpp = xine_get_browsable_input_plugin_ids(tox->xine); @@ -1489,7 +1494,7 @@ // toxine_unset_last_result(tox); #warning CHECKME; - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_get_autoplay_input_plugin_ids():\n"); inpp = xine_get_autoplay_input_plugin_ids(tox->xine); @@ -1556,7 +1561,7 @@ void _xine_get_input_plugin_description(commands_t *command, toxine_t *tox, void *data) { // toxine_unset_last_result(tox); - return_if_no_new(tox); + return_if_no_init(tox); if(toxine_is_args(tox)) { const char *ipd; @@ -1585,7 +1590,7 @@ char buffer[4096]; // toxine_unset_last_result(tox); - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_list_audio_output_plugins():\n"); aop = xine_list_audio_output_plugins(tox->xine); @@ -1621,7 +1626,7 @@ char buffer[4096]; // toxine_unset_last_result(tox); - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_list_video_output_plugins():\n"); vop = xine_list_video_output_plugins(tox->xine); if(vop) { @@ -1655,7 +1660,7 @@ int alias_event = (int) data; // toxine_unset_last_result(tox); - return_if_no_init(tox); + return_if_no_stream(tox); if((toxine_is_args(tox)) || (alias_event > 0)) { const char *event_name = NULL; @@ -1699,7 +1704,7 @@ void _xine_config_get_first_entry(commands_t *command, toxine_t *tox, void *data) { xine_cfg_entry_t cfg_entry; - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_config_get_first_entry():\n"); if((xine_config_get_first_entry(tox->xine, &cfg_entry))) @@ -1712,7 +1717,7 @@ void _xine_config_get_next_entry(commands_t *command, toxine_t *tox, void *data) { xine_cfg_entry_t cfg_entry; - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_config_get_next_entry():\n"); if((xine_config_get_next_entry(tox->xine, &cfg_entry))) @@ -1726,7 +1731,7 @@ const char *key; xine_cfg_entry_t cfg_entry; - return_if_no_new(tox); + return_if_no_init(tox); key = toxine_get_arg(tox, 1); pinfo("xine_config_lookup_entry(%s)\n", key); @@ -1742,7 +1747,7 @@ int value; xine_cfg_entry_t cfg_entry; - return_if_no_new(tox); + return_if_no_init(tox); if(toxine_is_args(tox) >= 2) { const char *svalue; @@ -1816,7 +1821,7 @@ void _xine_config_save(commands_t *command, toxine_t *tox, void *data) { const char *filename = NULL; - return_if_no_new(tox); + return_if_no_init(tox); if(toxine_is_args(tox)) filename = toxine_get_arg(tox, 1); @@ -1828,7 +1833,7 @@ pinfo("\n"); } void _xine_config_reset(commands_t *command, toxine_t *tox, void *data) { - return_if_no_new(tox); + return_if_no_init(tox); pinfo("xine_config_reset():\n"); xine_config_reset(tox->xine); |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-18 17:01:32
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv14886/plugins Modified Files: vo_none.c vo_x11.c Log Message: @@first displayed frames Index: vo_none.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_none.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- vo_none.c 17 Jan 2003 23:39:59 -0000 1.8 +++ vo_none.c 18 Jan 2003 17:01:28 -0000 1.9 @@ -32,9 +32,10 @@ static void init_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; - - tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, 0, (void *)NULL); - + + tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, XINE_VISUAL_TYPE_NONE, + (void *)NULL); + private->init = 1; if(tox->video.port == NULL) { Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- vo_x11.c 17 Jan 2003 23:40:00 -0000 1.20 +++ vo_x11.c 18 Jan 2003 17:01:28 -0000 1.21 @@ -252,7 +252,7 @@ private->x11_drawable[private->fullscreen].y); #endif - if(tox->video.port && (tox->xine_state & XINE_INIT)) + if(tox->video.port && (tox->xine_state & XINE_STREAM)) xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_DRAWABLE_CHANGED, (void*) private->x11_drawable[private->fullscreen].video_window); @@ -288,7 +288,7 @@ x11_private_t *private = (x11_private_t *) vop->private; int screensaver_timer = 0; - while(!(tox->xine_state & XINE_INIT)) + while(!(tox->xine_state & XINE_STREAM)) usec_sleep(100000); while(tox->video.running) { @@ -335,7 +335,7 @@ rect.w = 0; rect.h = 0; - if(tox->video.port && (tox->xine_state & XINE_INIT) && + if(tox->video.port && (tox->xine_state & XINE_STREAM) && (xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, (void*)&rect) != -1)) { /* driver implements gui->video coordinate space translation, use it */ @@ -454,7 +454,7 @@ x11_private_t *private = (x11_private_t *) vop->private; XLockDisplay (private->display); - if(tox->video.port && (tox->xine_state & XINE_INIT)) { + if(tox->video.port && (tox->xine_state & XINE_STREAM)) { xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_SELECT_VISUAL, (void *)&vinfo); if(vinfo != (XVisualInfo *) -1) { if(!vinfo) { @@ -816,7 +816,7 @@ case XK_BackSpace: /* speed == * 1 */ - if(tox->xine_state & XINE_INIT) { + if(tox->xine_state & XINE_STREAM) { if((xine_get_param(tox->stream, XINE_PARAM_SPEED)) != XINE_SPEED_NORMAL) xine_set_param(tox->stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL); } @@ -824,7 +824,7 @@ case XK_Up: /* speed++ */ - if(tox->xine_state & XINE_INIT) { + if(tox->xine_state & XINE_STREAM) { if((xine_get_param(tox->stream, XINE_PARAM_SPEED)) < XINE_SPEED_FAST_4) { if((xine_get_param(tox->stream, XINE_PARAM_SPEED)) > XINE_SPEED_PAUSE) xine_set_param(tox->stream, XINE_PARAM_SPEED, @@ -837,7 +837,7 @@ case XK_Down: /* speed-- */ - if(tox->xine_state & XINE_INIT) { + if(tox->xine_state & XINE_STREAM) { if((xine_get_param(tox->stream, XINE_PARAM_SPEED)) > XINE_SPEED_PAUSE) xine_set_param(tox->stream, XINE_PARAM_SPEED, ((xine_get_param(tox->stream, XINE_PARAM_SPEED)) / 2)); @@ -845,7 +845,7 @@ break; case XK_space: - if(tox->xine_state & XINE_INIT) { + if(tox->xine_state & XINE_STREAM) { if(xine_get_param(tox->stream, XINE_PARAM_SPEED) != XINE_SPEED_PAUSE) xine_set_param(tox->stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE); else @@ -869,7 +869,7 @@ /* printf("Mouse event:mx=%d my=%d\n",mevent->x, mevent->y); */ - if((tox->xine_state & XINE_INIT) && + if((tox->xine_state & XINE_STREAM) && (video_window_translate_point(tox, vop, mevent->x, mevent->y, &x, &y))) { event.type = XINE_EVENT_INPUT_MOUSE_MOVE; @@ -897,7 +897,7 @@ } if(bevent->button == Button1) { - if((tox->xine_state & XINE_INIT) && + if((tox->xine_state & XINE_STREAM) && (video_window_translate_point(tox, vop, bevent->x, bevent->y, &x, &y))) { event.type = XINE_EVENT_INPUT_MOUSE_BUTTON; @@ -920,7 +920,7 @@ if (xevent->count == 0) { if((xev->xany.window == private->x11_drawable[private->fullscreen].video_window) - && tox->video.port && (tox->xine_state & XINE_INIT)) + && tox->video.port && (tox->xine_state & XINE_STREAM)) xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_EXPOSE_EVENT, (void *)xev); } @@ -951,7 +951,8 @@ } - if((xev->type == private->completion_event) && tox->video.port && (tox->xine_state & XINE_INIT)) + if((xev->type == private->completion_event) + && tox->video.port && (tox->xine_state & XINE_STREAM)) xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_COMPLETION_EVENT, (void *)xev); } |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-18 17:01:32
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv14886 Modified Files: common.h main.c xine_commands.c xine_commands.h Log Message: @@first displayed frames Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- common.h 17 Jan 2003 23:59:15 -0000 1.21 +++ common.h 18 Jan 2003 17:01:24 -0000 1.22 @@ -118,6 +118,14 @@ } \ } while(0) +#define return_if_no_stream(x) do { \ + if(((x)->xine == NULL) || !((x)->xine_state & XINE_STREAM)) { \ + perr("%s(): no stream created. Do it first.\n", \ + __tox_func__); \ + return; \ + } \ + } while(0) + #ifndef NAME_MAX #define _NAME_MAX 256 #else Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- main.c 17 Jan 2003 23:59:15 -0000 1.22 +++ main.c 18 Jan 2003 17:01:25 -0000 1.23 @@ -76,7 +76,7 @@ int major, minor, sub; printf("This is toxine - xine shell v%s\n" - "(c) 2002 by Daniel Caujolle-Bert <f1...@us...>.\n", VERSION); + "(c) 2002-2003 by Daniel Caujolle-Bert <f1...@us...>.\n", VERSION); printf("Built with xine library %d.%d.%d (%s)\n", XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION, XINE_VERSION); @@ -288,6 +288,7 @@ 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.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- xine_commands.c 17 Jan 2003 23:39:57 -0000 1.31 +++ xine_commands.c 18 Jan 2003 17:01:26 -0000 1.32 @@ -480,6 +480,27 @@ pinfo("\n"); } +void _xine_stream_new(commands_t *command, toxine_t *tox, void *data) { + return_if_no_init(tox); + + if(tox->video.port == NULL) { + perr("Choose and initialise a video driver first\n"); + return; + } + if(tox->stream != NULL) { + perr("Stream is already created, use xine_dispose() in order to create a new one\n"); + return; + } + + pinfo("xine_stream_new()"); + tox->stream = xine_stream_new(tox->xine, tox->audio.port, tox->video.port); + pinfo("return 0x%x\n", (int) tox->stream); + if(tox->stream) + tox->xine_state |= XINE_STREAM; + else + perr("Wow, xine_stream_new() failed.\n"); +} + /* * */ @@ -495,20 +516,20 @@ if(!(tox->xine_state & XINE_NEW)) _xine_new(NULL, tox, NULL); - + + pinfo("xine_init()"); + xine_init(tox->xine); + pinfo("\n"); + tox->xine_state |= XINE_INIT; + if(!toxine_video_out_init(tox)) { perr("unable to initialize video out plugin.\n"); return; } - printf("toxine_video_out_init(): DONE\n"); if(!toxine_audio_out_init(tox)) perr("unable to initialize audio driver, audio output disabled.\n"); - - pinfo("xine_init(%s, %s):\n", (tox->audio.name)?tox->audio.name:"NULL", tox->video.name); - // xine_init(tox->xine, tox->audio.port, tox->video.port); - tox->xine_state |= XINE_INIT; - + tox->audio.mixer.enable = 0; tox->audio.mixer.caps = 0; /* @@ -528,12 +549,12 @@ tox->audio.mixer.mute = xine_get_param(tox->xine, XINE_PARAM_AUDIO_MUTE); */ pthread_mutex_init(&tox->event.mutex, NULL); - pinfo("xine_register_event_listener()\n"); #warning FIXME #if 0 + pinfo("xine_register_event_listener()\n"); xine_register_event_listener(tox->xine, toxine_event_listener, (void *) tox); -#endif pinfo(".\n"); +#endif } Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- xine_commands.h 17 Jan 2003 23:39:57 -0000 1.19 +++ xine_commands.h 18 Jan 2003 17:01:27 -0000 1.20 @@ -24,6 +24,7 @@ void _xine_new(commands_t *, toxine_t *, void *); void _xine_init(commands_t *, toxine_t *, void *); void _xine_open(commands_t *, toxine_t *, void *); +void _xine_stream_new(commands_t *, toxine_t *, void *); void _xine_play(commands_t *, toxine_t *, void *); void _xine_trick_mode(commands_t *, toxine_t *, void *); void _xine_get_stream_info(commands_t *, toxine_t *, void *); @@ -60,6 +61,81 @@ void _xine_get_version_string(commands_t *, toxine_t *, void *); void _xine_check_version(commands_t *, toxine_t *, void *); +/* + + void _xine_stream_master_slave(...) + void xine_close(...) + void xine_dispose(...) + void xine_get_current_frame(...) + void xine_get_meta_info(...) + void xine_get_file_extensions(...) + void xine_get_mime_types(...) + void xine_gui_send_vo_data(...) + void xine_config_update_entry(...) + + //// POST + xine_post_init(...) + xine_list_post_plugins + xine_list_post_plugins_typed + xine_post_list_inputs + xine_post_list_outputs + xine_post_input + xine_post_output + xine_post_wire + xine_post_wire_video_port + xine_post_wire_audio_port + xine_get_video_source + xine_get_audio_source + xine_post_dispose + + ////post plugin types + XINE_POST_TYPE_VIDEO_FILTER 0x010000 + XINE_POST_TYPE_VIDEO_VISUALIZATION 0x010001 + XINE_POST_TYPE_AUDIO_FILTER 0x020000 + XINE_POST_TYPE_AUDIO_VISUALIZATION 0x020001 + + + ////post plugin data types + XINE_POST_DATA_VIDEO 0 + XINE_POST_DATA_AUDIO 1 + XINE_POST_DATA_INT 3 + XINE_POST_DATA_DOUBLE 4 + + + xine_config_register_string + xine_config_register_range (xine_t *self, + xine_config_register_enum (xine_t *self, + xine_config_register_num (xine_t *self, + xine_config_register_bool (xine_t *self, + + + xine_event_new_queue (xine_stream_t *stream); + xine_event_dispose_queue (xine_event_queue_t *queue); + + xine_event_get (xine_event_queue_t *queue); + xine_event_wait (xine_event_queue_t *queue); + xine_event_free (xine_event_t *event); + xine_event_create_listener_thread + + + ////////OSD + xine_osd_new (xine_stream_t *self, int x, int y, + xine_osd_draw_point (xine_osd_t *self, int x, int y, int color); + xine_osd_draw_line (xine_osd_t *self, int x1, int y1, + xine_osd_draw_rect (xine_osd_t *self, int x1, int y1, + xine_osd_draw_text (xine_osd_t *self, int x1, int y1, + xine_osd_get_text_size (xine_osd_t *self, const char *text, + xine_osd_set_font (xine_osd_t *self, const char *fontname, + xine_osd_set_position (xine_osd_t *self, int x, int y); + xine_osd_show (xine_osd_t *self, int64_t vpts); + xine_osd_hide (xine_osd_t *self, int64_t vpts); + xine_osd_clear (xine_osd_t *self); + xine_osd_free (xine_osd_t *self); + xine_osd_set_palette (xine_osd_t *self, + xine_osd_set_text_palette (xine_osd_t *self, + xine_osd_get_palette (xine_osd_t *self, uint32_t *color, + +*/ ///////////////////// /* void _xine_get_spu_channel(commands_t *, toxine_t *, void *); @@ -97,6 +173,10 @@ "Create a new xine instance.", \ "xine_new" \ }, \ + { "xine_stream_new", NO_ARGS, _xine_stream_new, \ + "Create a new stream object.", \ + "xine_stream_new" \ + }, \ { "xine_init", NO_ARGS, _xine_init, \ "Initialize xine engine.", \ "xine_init" \ @@ -470,112 +550,77 @@ #endif /* 0 */ + /* + xine_audio_port_t *xine_open_audio_driver (xine_t *self, const char *id, + void *data); + xine_video_port_t *xine_open_video_driver (xine_t *self, const char *id, + int visual, void *data); + + void xine_close_audio_driver (xine_t *self, xine_audio_port_t *driver); + void xine_close_video_driver (xine_t *self, xine_video_port_t *driver); + */ -/* -xine_ao_driver_p xine_open_audio_driver (xine_p self, const char *id, - void *data); -xine_vo_driver_p xine_open_video_driver (xine_p self, const char *id, - int visual, void *data); -int xine_get_current_frame (xine_p self, int *width, int *height, - int *ratio_code, int *format, - uint8_t *img); - -void xine_register_log_cb (xine_p self, xine_log_cb_t cb, void *user_data); -int xine_register_report_codec_cb(xine_p self, xine_report_codec_cb_t report_codec, void *user_data); - -int xine_gui_send_vo_data (xine_p self, int type, void *data); - -///// -TODO CONFIG - -const char *xine_config_register_string (xine_p self, - const char *key, - const char *def_value, - const char *description, - const char *help, - int exp_level, - xine_config_cb_t changed_cb, - void *cb_data); - -int xine_config_register_range (xine_p self, - const char *key, - int def_value, - int min, int max, - const char *description, - const char *help, - int exp_level, - xine_config_cb_t changed_cb, - void *cb_data); - -int xine_config_register_enum (xine_p self, - const char *key, - int def_value, - char **values, - const char *description, - const char *help, - int exp_level, - xine_config_cb_t changed_cb, - void *cb_data); - -int xine_config_register_num (xine_p self, - const char *key, - int def_value, - const char *description, - const char *help, - int exp_level, - xine_config_cb_t changed_cb, - void *cb_data); - -int xine_config_register_bool (xine_p self, - const char *key, - int def_value, - const char *description, - const char *help, - int exp_level, - xine_config_cb_t changed_cb, - void *cb_data); - -int xine_register_event_listener (xine_p self, - xine_event_listener_cb_t listener, - void *user_data); -int xine_remove_event_listener (xine_p self, - xine_event_listener_cb_t listener); - -////////////// - -////////////// -osd -xine_osd_p xine_osd_new (xine_p self, int x, int y, - int width, int height); -void xine_osd_draw_point (xine_osd_p self, int x, int y, int color); -void xine_osd_draw_line (xine_osd_p self, int x1, int y1, - int x2, int y2, int color); -void xine_osd_draw_rect (xine_osd_p self, int x1, int y1, - int x2, int y2, - int color, int filled ); -void xine_osd_draw_text (xine_osd_p self, int x1, int y1, - const char *text, int color_base); -void xine_osd_get_text_size (xine_osd_p self, const char *text, - int *width, int *height); -void xine_osd_set_font (xine_osd_p self, const char *fontname, - int size); -void xine_osd_set_position (xine_osd_p self, int x, int y); -void xine_osd_show (xine_osd_p self, int64_t vpts); -void xine_osd_hide (xine_osd_p self, int64_t vpts); -void xine_osd_clear (xine_osd_p self); - -void xine_osd_free (xine_osd_p self); -void xine_osd_set_palette (xine_osd_p self, - const uint32_t *const color, - const uint8_t *const trans ); -void xine_osd_set_text_palette (xine_osd_p self, - int palette_number, - int color_base ); -void xine_osd_get_palette (xine_osd_p self, const uint32_t *color, - const uint8_t *trans); -OSD -///////////// -*/ +#ifdef XINE_ENABLE_EXPERIMENTAL_FEATURES + +xine_video_port_t *xine_new_framegrab_video_port (xine_t *self); + +typedef struct { + + int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ + int64_t duration; + int width, height; + int colorspace; /* XINE_IMGFMT_* */ + double aspect_ratio; + + int pos_stream; /* bytes from stream start */ + int pos_time; /* milliseconds */ + + uint8_t *data; + void *xine_frame; /* used internally by xine engine */ +} xine_video_frame_t; + +int xine_get_next_video_frame (xine_video_port_t *port, + xine_video_frame_t *frame); + +void xine_free_video_frame (xine_video_port_t *port, xine_video_frame_t *frame); + +xine_audio_port_t *xine_new_framegrab_audio_port (xine_t *self); + +typedef struct { + + int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ + int num_samples; + int sample_rate; + int num_channels; + int bits_per_sample; /* per channel */ + + off_t pos_stream; /* bytes from stream start */ + int pos_time; /* milliseconds */ + + uint8_t *data; + void *xine_frame; /* used internally by xine engine */ +} xine_audio_frame_t; + +int xine_get_next_audio_frame (xine_audio_port_t *port, + xine_audio_frame_t *frame); + +void xine_free_audio_frame (xine_audio_port_t *port, xine_audio_frame_t *frame); + + /* + * maybe future aproach: + */ + +int xine_get_video_frame (xine_stream_t *stream, + int timestamp, /* msec */ + int *width, int *height, + int *ratio_code, + int *duration, /* msec */ + int *format, + uint8_t *img); + +/* TODO: xine_get_audio_frame */ + +#endif #endif |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-17 23:59:20
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv21743 Modified Files: common.h loader.c main.c utils.c Log Message: @@i see the prompt for the first time with 1.0 API, but it's enought for tonight Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- common.h 17 Jan 2003 23:39:52 -0000 1.20 +++ common.h 17 Jan 2003 23:59:15 -0000 1.21 @@ -53,6 +53,7 @@ #define XINE_INIT 0x000000001 #define XINE_NEW 0x000000002 #define XINE_OPEN 0x000000004 +#define XINE_STREAM 0x000000008 #define toxine_free(x) do { \ if((x)) { \ Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- loader.c 17 Jan 2003 23:39:53 -0000 1.6 +++ loader.c 17 Jan 2003 23:59:15 -0000 1.7 @@ -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" @@ -116,6 +116,10 @@ } } closedir(dir); + } + else { + fprintf(stderr, "Can't open plugin directory: '%s'\nGiving up.\n", TOXINE_PLUGINDIR); + exit(1); } tox->video.cur_plugin = NULL; Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- main.c 17 Jan 2003 23:39:53 -0000 1.21 +++ main.c 17 Jan 2003 23:59:15 -0000 1.22 @@ -73,8 +73,19 @@ * Display version/copyright banner. */ static void toxine_show_version(void) { + int major, minor, sub; + printf("This is toxine - xine shell v%s\n" "(c) 2002 by Daniel Caujolle-Bert <f1...@us...>.\n", VERSION); + + printf("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); + + printf("Found xine library version: %d.%d.%d (%s).\n", + major, minor, sub, xine_get_version_string()); + } /* @@ -147,11 +158,11 @@ int i; /* Check xine library version */ - if(!xine_check_version(0, 9, 14)) { + if(!xine_check_version(1, 0, 0)) { int major, minor, sub; xine_get_version(&major, &minor, &sub); - fprintf(stderr, "Require xine library version 0.9.14, found %d.%d.%d.\n", major, minor, sub); + fprintf(stderr, "Require xine library version 1.0.0, found %d.%d.%d.\n", major, minor, sub); exit(1); } @@ -161,6 +172,7 @@ tox->command.line = NULL; tox->command.command = NULL; tox->command.execute = 0; + tox->xine_state = 0; tox->msg_fd = -1; tox->playlist.cur = -1; tox->playlist.loop = 0; @@ -273,8 +285,9 @@ } tox->xine = xine_new(); + tox->xine_state |= XINE_NEW; + toxine_config_load(tox); - tox->xine_state = 0; tox->running = 1; tox->playlist.mmk = NULL; tox->playlist.thread_num = 0;; Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- utils.c 17 Jan 2003 23:39:56 -0000 1.18 +++ utils.c 17 Jan 2003 23:59:16 -0000 1.19 @@ -162,7 +162,7 @@ void toxine_update_prompt(toxine_t *tox) { int i = 0, s = -1; - if(tox->xine) + if(tox->xine_state & XINE_STREAM) s = xine_get_status(tox->stream); while(prompt_state[i].state != NULL) { |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-17 23:40:45
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1:/tmp/cvs-serv14721/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: @@sync to century ;-) Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- commands.c 17 Jan 2003 22:56:28 -0000 1.46 +++ commands.c 17 Jan 2003 23:39:51 -0000 1.47 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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: commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- commands.h 19 Sep 2002 21:04:06 -0000 1.3 +++ commands.h 17 Jan 2003 23:39:52 -0000 1.4 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- common.h 17 Jan 2003 22:56:30 -0000 1.19 +++ common.h 17 Jan 2003 23:39:52 -0000 1.20 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- loader.c 17 Sep 2002 21:54:45 -0000 1.5 +++ loader.c 17 Jan 2003 23:39:53 -0000 1.6 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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: loader.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- loader.h 17 Sep 2002 21:54:45 -0000 1.2 +++ loader.h 17 Jan 2003 23:39:53 -0000 1.3 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- main.c 17 Jan 2003 22:56:31 -0000 1.20 +++ main.c 17 Jan 2003 23:39:53 -0000 1.21 @@ -1,5 +1,5 @@ /* -** copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- mangen.c 1 Aug 2002 22:52:09 -0000 1.3 +++ mangen.c 17 Jan 2003 23:39:54 -0000 1.4 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- parse.c 21 Sep 2002 00:07:29 -0000 1.4 +++ parse.c 17 Jan 2003 23:39:54 -0000 1.5 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- parse.h 13 May 2002 20:46:35 -0000 1.1.1.1 +++ parse.h 17 Jan 2003 23:39:55 -0000 1.2 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- playlist.c 21 Sep 2002 00:07:29 -0000 1.9 +++ playlist.c 17 Jan 2003 23:39:56 -0000 1.10 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- playlist.h 19 Sep 2002 21:04:06 -0000 1.4 +++ playlist.h 17 Jan 2003 23:39:56 -0000 1.5 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- script.c 13 May 2002 20:46:41 -0000 1.1.1.1 +++ script.c 17 Jan 2003 23:39:56 -0000 1.2 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- script.h 13 May 2002 20:46:36 -0000 1.1.1.1 +++ script.h 17 Jan 2003 23:39:56 -0000 1.2 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sortcmds.c 21 Sep 2002 00:07:29 -0000 1.2 +++ sortcmds.c 17 Jan 2003 23:39:56 -0000 1.3 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- utils.c 17 Jan 2003 22:56:31 -0000 1.17 +++ utils.c 17 Jan 2003 23:39:56 -0000 1.18 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- utils.h 17 Sep 2002 21:54:45 -0000 1.7 +++ utils.h 17 Jan 2003 23:39:57 -0000 1.8 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- xine_commands.c 17 Jan 2003 22:56:32 -0000 1.30 +++ xine_commands.c 17 Jan 2003 23:39:57 -0000 1.31 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- xine_commands.h 17 Jan 2003 22:56:34 -0000 1.18 +++ xine_commands.h 17 Jan 2003 23:39:57 -0000 1.19 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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...> - 2003-01-17 23:40:24
|
Update of /cvsroot/toxine/toxine/m4 In directory sc8-pr-cvs1:/tmp/cvs-serv14721/m4 Modified Files: aa.m4 Log Message: @@sync to century ;-) Index: aa.m4 =================================================================== RCS file: /cvsroot/toxine/toxine/m4/aa.m4,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- aa.m4 13 May 2002 20:45:37 -0000 1.1.1.1 +++ aa.m4 17 Jan 2003 23:39:50 -0000 1.2 @@ -1,6 +1,6 @@ dnl Configure path and dependencies for aalib. dnl -dnl Copyright (C) 2001 Daniel Caujolle-Bert <seg...@cl...> +dnl Copyright (C) 2001-2003 Daniel Caujolle-Bert <seg...@cl...> dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by |
From: Daniel Caujolle-B. <f1...@us...> - 2003-01-17 23:40:06
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv14721/src/plugins Modified Files: vo_aa.c vo_dxr3.c vo_none.c vo_plugin.h vo_x11.c Log Message: @@sync to century ;-) Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- vo_aa.c 15 Jan 2003 20:34:19 -0000 1.11 +++ vo_aa.c 17 Jan 2003 23:39:58 -0000 1.12 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- vo_dxr3.c 15 Jan 2003 20:34:20 -0000 1.15 +++ vo_dxr3.c 17 Jan 2003 23:39:59 -0000 1.16 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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_none.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_none.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- vo_none.c 15 Jan 2003 20:34:20 -0000 1.7 +++ vo_none.c 17 Jan 2003 23:39:59 -0000 1.8 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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_plugin.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_plugin.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- vo_plugin.h 19 Sep 2002 21:04:07 -0000 1.8 +++ vo_plugin.h 17 Jan 2003 23:40:00 -0000 1.9 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- vo_x11.c 15 Jan 2003 20:34:20 -0000 1.19 +++ vo_x11.c 17 Jan 2003 23:40:00 -0000 1.20 @@ -1,5 +1,5 @@ /* -** Copyright (C) 2002 Daniel Caujolle-Bert <seg...@cl...> +** Copyright (C) 2002-2003 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...> - 2003-01-17 22:57:05
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1:/tmp/cvs-serv29478 Modified Files: configure.ac Log Message: @@it compile, but don't try to start it, that will not work Index: configure.ac =================================================================== RCS file: /cvsroot/toxine/toxine/configure.ac,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- configure.ac 15 Jan 2003 17:41:49 -0000 1.1 +++ configure.ac 17 Jan 2003 22:56:26 -0000 1.2 @@ -332,7 +332,7 @@ DEBUG_CFLAGS="$DEBUG_CFLAGS -O" fi - AC_DEFINE(__i386__,,[]) + AC_DEFINE(__i386__,1,[Define this if you're running x86 architecture]) AC_DEFINE([ARCH_X86],,[x86 architecture]) ;; |