toxine-cvs Mailing List for toxine (Page 2)
Brought to you by:
f1rmb
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(19) |
Jul
(81) |
Aug
(18) |
Sep
(38) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(24) |
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
(23) |
May
(36) |
Jun
(7) |
Jul
(29) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-18 20:31:48
|
Update of /cvsroot/toxine/toxine/doc/man/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19802/doc/man/en Modified Files: toxine.1 Log Message: -New command parser. -Fix stdin and -e bug. -Release all VOPs when leaving. -Fix interactive option (-i) -Support multiple variables usage in command arguments. -Rework script parsing code. Index: toxine.1 =================================================================== RCS file: /cvsroot/toxine/toxine/doc/man/en/toxine.1,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- toxine.1 6 Jul 2004 09:50:12 -0000 1.24 +++ toxine.1 18 Jul 2004 20:31:40 -0000 1.25 @@ -1,7 +1,7 @@ .\" -*-Nroff-*- .\"" .\"" -.TH TOXINE 1x 2004-07-06 "toxine" +.TH TOXINE 1x 2004-07-18 "toxine" .SH NAME toxine \- a text program, using xine library. .SH SYNOPSIS @@ -279,12 +279,6 @@ .br \ \ (*): display 'UNSET' when it's unspecified/unavailable. .br -\ \ -.br -\ \ variable name syntax can be $foo, $(foo) or ${foo} -.br -\ \ -.br .br .TP .BR exit |
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-14 21:34:43
|
Update of /cvsroot/toxine/toxine/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11961 Modified Files: readline.m4 Log Message: add /pkg as valid locations Index: readline.m4 =================================================================== RCS file: /cvsroot/toxine/toxine/m4/readline.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- readline.m4 8 Apr 2004 15:13:57 -0000 1.3 +++ readline.m4 14 Jul 2004 21:34:35 -0000 1.4 @@ -21,6 +21,7 @@ /usr/include: \ /usr/local/include:-L/usr/local/lib \ /usr/freeware/include:-L/usr/freeware/lib32 \ + /pkg/include:-L/pkg/lib \ /usr/pkg/include:-L/usr/pkg/lib \ /sw/include:-L/sw/lib \ /cw/include:-L/cw/lib \ |
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-06 09:55:13
|
Update of /cvsroot/toxine/toxine/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30715 Modified Files: dvdplayer.sh.in Log Message: @@update Index: dvdplayer.sh.in =================================================================== RCS file: /cvsroot/toxine/toxine/misc/dvdplayer.sh.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- dvdplayer.sh.in 1 Sep 2002 12:22:01 -0000 1.1 +++ dvdplayer.sh.in 6 Jul 2004 09:55:03 -0000 1.2 @@ -2,14 +2,12 @@ VERSION="0.2.0" VIDEO_DRIVER="xv" -AUDIO_DRIVER="alsa09" +AUDIO_DRIVER="alsa" ## ## this commands select french language, then start playback in MI2 ;-) ## -#COMMANDS="set interactive off; xine_init; xine_usec_sleep 500000; mmk add mrl dvd://; set audio volume 90; play; waitfor status PLAY; set video fullscreen; xine_usec_sleep 20000000; right; down; select; xine_usec_sleep 6000000; right; select; down; select; xine_usec_sleep 6000000; select" -# -COMMANDS="set interactive off; xine_init; xine_usec_sleep 500000; mmk add mrl dvd://; set audio volume 90; play; waitfor status PLAY; set video fullscreen" +COMMANDS="set interactive off; xine_init; xine_stream_new; mmk add mrl dvd://; set audio volume 90; play; set video fullscreen" start() { echo " + Using video driver '$VIDEO_DRIVER'" @@ -32,7 +30,7 @@ banner() { echo - echo "Toxine's DVD player script - v$VERSION - (c) 2002 Daniel Caujolle-Bert." + echo "Toxine's DVD player script - v$VERSION - (c) 2002-2004 Daniel Caujolle-Bert." echo } @@ -71,7 +69,3 @@ done main - - - - |
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-06 09:50:54
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29978 Modified Files: autogen.sh Log Message: @@update Index: autogen.sh =================================================================== RCS file: /cvsroot/toxine/toxine/autogen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- autogen.sh 15 Jan 2003 17:40:10 -0000 1.1 +++ autogen.sh 6 Jul 2004 09:50:45 -0000 1.2 @@ -20,14 +20,14 @@ # # $Id$ # -# Wrote by Stephen Torri <st...@us...> -# Stolen by me from xine-ui. +# Maintained by Stephen Torri <st...@us...> # # run this to generate all the initial makefiles, etc. PROG=toxine # Minimum value required to build +WANT_AUTOMAKE_1_6=1 export WANT_AUTOMAKE_1_6 AUTOMAKE_MIN=1.6.0 AUTOCONF_MIN=2.53 LIBTOOL_MIN=1.4.0 @@ -112,7 +112,7 @@ NUM_RESULT=$# RESULT_FILE=$3 if [ $RETVAL -eq 0 -a $NUM_RESULT -eq 3 -a -f "$RESULT_FILE" ]; then - LT="`libtool --version | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" + LT="`libtool --version | awk '{ print $4 }' | sed -e 's/[a-zA-Z\ \.\(\)\-\;]//g'`" LIBTOOL_MIN="`echo $LIBTOOL_MIN | sed -e 's/[a-zA-Z\ \.\(\)\-]//g'`" if test $LT -lt 100 ; then LT=`expr $LT \* 10` @@ -226,7 +226,7 @@ echo $_echo_n " + Running aclocal: $_echo_c" aclocalinclude=`xine-config --acflags` - aclocal $aclocalinclude -I m4 + aclocal -I m4 $aclocalinclude echo "done." } |
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-06 09:50:29
|
Update of /cvsroot/toxine/toxine/doc/man/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29767/man/en Modified Files: Makefile.am toxine.1 toxine.1.header Log Message: @@udpates, fix installation in debug mode Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/doc/man/en/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile.am 12 Jul 2002 14:31:00 -0000 1.3 +++ Makefile.am 6 Jul 2004 09:50:12 -0000 1.4 @@ -10,6 +10,9 @@ $(top_builddir)/src/mangen >> toxine.1; \ cat toxine.1.footer >> toxine.1 +debug: +install-debug: install + mostlyclean-generic: -rm -f *~ \#* .*~ .\#* Index: toxine.1 =================================================================== RCS file: /cvsroot/toxine/toxine/doc/man/en/toxine.1,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- toxine.1 6 May 2004 19:18:26 -0000 1.23 +++ toxine.1 6 Jul 2004 09:50:12 -0000 1.24 @@ -1,7 +1,7 @@ .\" -*-Nroff-*- .\"" .\"" -.TH TOXINE 1x 2004-04-16 "toxine" +.TH TOXINE 1x 2004-07-06 "toxine" .SH NAME toxine \- a text program, using xine library. .SH SYNOPSIS @@ -51,8 +51,9 @@ set video driver xv set audio driver alsa09 xine_init +xine_stream_new xine_play mrl ~/my_stream.mpg -waitfor PLAYBACK_FINISHED +waitfor UI_PLAYBACK_FINISHED xine_play mrl ~/test.mp3 xine_usec_sleep 9000000 xine_stop @@ -68,20 +69,23 @@ with two dashes (\`\-\'). A summary of options are included below. .TP -.BR \-s,\ \-\-script\ <filename> +.BR \-s,\ \-\-script\ <filename> Use <filename> as toxine script file. .TP -.BR \-e,\ \-\-execute <commands> +.BR \-S,\ \-\-stdin +Send command lines using standard input. +.TP +.BR \-e,\ \-\-execute\ <commands> Execute specified commands (like in prompt mode). .TP -.BR \-o,\ \-\-output [filename] +.BR \-o,\ \-\-output\ [filename] Save all messages in a file(*). *('toxine.out' if filename isn't specified). .TP -.BR \-V,\ \-\-video <name> +.BR \-V,\ \-\-video\ <name> Use video driver <name>. .TP -.BR \-A,\ \-\-audio <name> +.BR \-A,\ \-\-audio\ <name> Use audio driver <name>. .TP .BR \-i,\ \-\-interactive @@ -96,6 +100,9 @@ .TP .BR \-h,\ \-\-help Display this help text. +.TP +.BR \ \ \ \ \-\-error\-codes[=num] +Display errorcodes descriptions. If \fBnum\fP is specified, the error description will be printed. .br .SH COMMANDS .TP @@ -322,6 +329,19 @@ .br .br .TP +.BR gettime +.br +.BR action: +.br +Display current time. +.br + +.BR syntax: +.br +\ \ gettime +.br +.br +.TP .BR help .br .BR action: @@ -614,6 +634,21 @@ .br .br .TP +.BR repeat +.br +.BR action: +.br +repeat x time a set of commands +.br + +.BR syntax: +.br +\ \ repeat <x> <command> +.br +\ \ repeat <x> { <command><\;<command>...> } +.br +.br +.TP .BR right .br .BR action: @@ -682,6 +717,10 @@ .br \ \ set loop <[playlist | mrl]> .br +\ \ set watchdog <[yes | no | 1 | 0 | on | off]> +.br +\ \ set watchdog timeout <secs> +.br .br .TP .BR shell @@ -869,7 +908,7 @@ .br \ \ \- info type can be: .br -\ \ [XINE_STREAM_INFO_BITRATE | XINE_STREAM_INFO_SEEKABLE | XINE_STREAM_INFO_VIDEO_WIDTH | XINE_STREAM_INFO_VIDEO_HEIGHT | XINE_STREAM_INFO_VIDEO_RATIO | XINE_STREAM_INFO_VIDEO_CHANNELS | XINE_STREAM_INFO_VIDEO_STREAMS | XINE_STREAM_INFO_VIDEO_BITRATE | XINE_STREAM_INFO_VIDEO_FOURCC | XINE_STREAM_INFO_VIDEO_HANDLED | XINE_STREAM_INFO_FRAME_DURATION | XINE_STREAM_INFO_AUDIO_CHANNELS | XINE_STREAM_INFO_AUDIO_BITS | XINE_STREAM_INFO_AUDIO_SAMPLERATE | XINE_STREAM_INFO_AUDIO_BITRATE | XINE_STREAM_INFO_AUDIO_FOURCC | XINE_STREAM_INFO_AUDIO_HANDLED | XINE_STREAM_INFO_HAS_CHAPTERS | XINE_STREAM_INFO_HAS_VIDEO | XINE_STREAM_INFO_HAS_AUDIO | XINE_STREAM_INFO_IGNORE_VIDEO | XINE_STREAM_INFO_IGNORE_AUDIO | XINE_STREAM_INFO_IGNORE_SPU | XINE_STREAM_INFO_VIDEO_HAS_STILL | XINE_STREAM_INFO_MAX_AUDIO_CHANNEL | XINE_STREAM_INFO_MAX_SPU_CHANNEL] +\ \ [XINE_STREAM_INFO_BITRATE | XINE_STREAM_INFO_SEEKABLE | XINE_STREAM_INFO_VIDEO_WIDTH | XINE_STREAM_INFO_VIDEO_HEIGHT | XINE_STREAM_INFO_VIDEO_RATIO | XINE_STREAM_INFO_VIDEO_CHANNELS | XINE_STREAM_INFO_VIDEO_STREAMS | XINE_STREAM_INFO_VIDEO_BITRATE | XINE_STREAM_INFO_VIDEO_FOURCC | XINE_STREAM_INFO_VIDEO_HANDLED | XINE_STREAM_INFO_FRAME_DURATION | XINE_STREAM_INFO_AUDIO_CHANNELS | XINE_STREAM_INFO_AUDIO_BITS | XINE_STREAM_INFO_AUDIO_SAMPLERATE | XINE_STREAM_INFO_AUDIO_BITRATE | XINE_STREAM_INFO_AUDIO_FOURCC | XINE_STREAM_INFO_AUDIO_HANDLED | XINE_STREAM_INFO_HAS_CHAPTERS | XINE_STREAM_INFO_HAS_VIDEO | XINE_STREAM_INFO_HAS_AUDIO | XINE_STREAM_INFO_IGNORE_VIDEO | XINE_STREAM_INFO_IGNORE_AUDIO | XINE_STREAM_INFO_IGNORE_SPU | XINE_STREAM_INFO_VIDEO_HAS_STILL | XINE_STREAM_INFO_MAX_AUDIO_CHANNEL | XINE_STREAM_INFO_MAX_SPU_CHANNEL | XINE_STREAM_INFO_AUDIO_MODE | XINE_STREAM_INFO_SKIPPED_FRAMES | XINE_STREAM_INFO_DISCARDED_FRAMES] .br .br .TP @@ -886,7 +925,7 @@ .br \ \ \- info type can be: .br -\ \ [XINE_META_INFO_TITLE | XINE_META_INFO_COMMENT | XINE_META_INFO_ARTIST | XINE_META_INFO_GENRE | XINE_META_INFO_ALBUM | XINE_META_INFO_YEAR | XINE_META_INFO_VIDEOCODEC | XINE_META_INFO_AUDIOCODEC | XINE_META_INFO_SYSTEMLAYER | XINE_META_INFO_INPUT_PLUGIN] +\ \ [XINE_META_INFO_TITLE | XINE_META_INFO_COMMENT | XINE_META_INFO_ARTIST | XINE_META_INFO_GENRE | XINE_META_INFO_ALBUM | XINE_META_INFO_YEAR | XINE_META_INFO_VIDEOCODEC | XINE_META_INFO_AUDIOCODEC | XINE_META_INFO_SYSTEMLAYER | XINE_META_INFO_INPUT_PLUGIN | XINE_META_INFO_CDINDEX_DISCID] .br .br .TP @@ -968,7 +1007,7 @@ .br \ \ \- parameter can be: .br -\ \ [XINE_PARAM_SPEED | XINE_PARAM_AV_OFFSET | XINE_PARAM_AUDIO_CHANNEL_LOGICAL | XINE_PARAM_AUDIO_CHANNEL_LOGICAL | XINE_PARAM_SPU_CHANNEL | XINE_PARAM_VIDEO_CHANNEL | XINE_PARAM_AUDIO_VOLUME | XINE_PARAM_AUDIO_MUTE | XINE_PARAM_AUDIO_COMPR_LEVEL | XINE_PARAM_AUDIO_AMP_LEVEL | XINE_PARAM_AUDIO_REPORT_LEVEL | XINE_PARAM_VO_DEINTERLACE | XINE_PARAM_VO_ASPECT_RATIO | XINE_PARAM_VO_HUE | XINE_PARAM_VO_SATURATION | XINE_PARAM_VO_CONTRAST | XINE_PARAM_VO_BRIGHTNESS | XINE_PARAM_VO_ZOOM_X | XINE_PARAM_VO_ZOOM_Y | XINE_PARAM_VO_PAN_SCAN | XINE_PARAM_VO_TVMODE | XINE_PARAM_AO_MIXER_VOL | XINE_PARAM_AO_PCM_VOL | XINE_PARAM_AO_MUTE] +\ \ [XINE_PARAM_SPEED | XINE_PARAM_AV_OFFSET | XINE_PARAM_AUDIO_CHANNEL_LOGICAL | XINE_PARAM_SPU_CHANNEL | XINE_PARAM_VIDEO_CHANNEL | XINE_PARAM_AUDIO_VOLUME | XINE_PARAM_AUDIO_MUTE | XINE_PARAM_AUDIO_COMPR_LEVEL | XINE_PARAM_AUDIO_AMP_LEVEL | XINE_PARAM_AUDIO_REPORT_LEVEL | XINE_PARAM_VERBOSITY | XINE_PARAM_SPU_OFFSET | XINE_PARAM_IGNORE_VIDEO | XINE_PARAM_IGNORE_AUDIO | XINE_PARAM_IGNORE_SPU | XINE_PARAM_BROADCASTER_PORT | XINE_PARAM_METRONOM_PREBUFFER | XINE_PARAM_EQ_30HZ | XINE_PARAM_EQ_60HZ | XINE_PARAM_EQ_125HZ | XINE_PARAM_EQ_250HZ | XINE_PARAM_EQ_500HZ | XINE_PARAM_EQ_1000HZ | XINE_PARAM_EQ_2000HZ | XINE_PARAM_EQ_4000HZ | XINE_PARAM_EQ_8000HZ | XINE_PARAM_EQ_16000HZ | XINE_PARAM_AUDIO_CLOSE_DEVICE | XINE_PARAM_AUDIO_AMP_MUTE | XINE_PARAM_VO_DEINTERLACE | XINE_PARAM_VO_ASPECT_RATIO | XINE_PARAM_VO_HUE | XINE_PARAM_VO_SATURATION | XINE_PARAM_VO_CONTRAST | XINE_PARAM_VO_BRIGHTNESS | XINE_PARAM_VO_ZOOM_X | XINE_PARAM_VO_ZOOM_Y | XINE_PARAM_VO_PAN_SCAN | XINE_PARAM_VO_TVMODE] .br .br .TP @@ -985,9 +1024,7 @@ .br \ \ \- parameter can be: .br -\ \ [XINE_PARAM_SPEED | XINE_PARAM_AV_OFFSET | XINE_PARAM_AUDIO_CHANNEL_LOGICAL | XINE_PARAM_AUDIO_CHANNEL_LOGICAL | XINE_PARAM_SPU_CHANNEL | XINE_PARAM_VIDEO_CHANNEL | XINE_PARAM_AUDIO_VOLUME | XINE_PARAM_AUDIO_MUTE | XINE_PARAM_AUDIO_COMPR_LEVEL | XINE_PARAM_AUDIO_AMP_LEVEL | XINE_PARAM_AUDIO_REPORT_LEVEL | XINE_PARAM_VO_DEINTERLACE | XINE_PARAM_VO_ASPECT_RATIO | XINE_PARAM_VO_HUE | XINE_PARAM_VO_SATURATION | XINE_PARAM_VO_CONTRAST | XINE_PARAM_VO_BRIGHTNESS | XINE_PARAM_VO_ZOOM_X | XINE_PARAM_VO_ZOOM_Y | XINE_PARAM_VO_PAN_SCAN | XINE_PARAM_VO_TVMODE | XINE_PARAM_AO_MIXER_VOL | XINE_PARAM_AO_PCM_VOL | XINE_PARAM_AO_MUTE] -.br -\ \ \- value can be: +\ \ [XINE_PARAM_SPEED | XINE_PARAM_AV_OFFSET | XINE_PARAM_AUDIO_CHANNEL_LOGICAL | XINE_PARAM_SPU_CHANNEL | XINE_PARAM_VIDEO_CHANNEL | XINE_PARAM_AUDIO_VOLUME | XINE_PARAM_AUDIO_MUTE | XINE_PARAM_AUDIO_COMPR_LEVEL | XINE_PARAM_AUDIO_AMP_LEVEL | XINE_PARAM_AUDIO_REPORT_LEVEL | XINE_PARAM_VERBOSITY | XINE_PARAM_SPU_OFFSET | XINE_PARAM_IGNORE_VIDEO | XINE_PARAM_IGNORE_AUDIO | XINE_PARAM_IGNORE_SPU | XINE_PARAM_BROADCASTER_PORT | XINE_PARAM_METRONOM_PREBUFFER | XINE_PARAM_EQ_30HZ | XINE_PARAM_EQ_60HZ | XINE_PARAM_EQ_125HZ | XINE_PARAM_EQ_250HZ | XINE_PARAM_EQ_500HZ | XINE_PARAM_EQ_1000HZ | XINE_PARAM_EQ_2000HZ | XINE_PARAM_EQ_4000HZ | XINE_PARAM_EQ_8000HZ | XINE_PARAM_EQ_16000HZ | XINE_PARAM_AUDIO_CLOSE_DEVICE | XINE_PARAM_AUDIO_AMP_MUTE | XINE_PARAM_VO_DEINTERLACE | XINE_PARAM_VO_ASPECT_RATIO | XINE_PARAM_VO_HUE | XINE_PARAM_VO_SATURATION | XINE_PARAM_VO_CONTRAST | XINE_PARAM_VO_BRIGHTNESS | XINE_PARAM_VO_ZOOM_X | XINE_PARAM_VO_ZOOM_Y | XINE_PARAM_VO_PAN_SCAN | XINE_PARAM_VO_TVMODE] \- value can be: .br \ \ for XINE_PARAM_SPEED: .br @@ -1001,6 +1038,40 @@ .br .br .TP +.BR xine_engine_set_param +.br +.BR action: +.br +Set engine parameter +.br + +.BR syntax: +.br +\ \ xine_engine_set_param <parameter> <value> +.br +\ \ \- parameter can be: +.br +\ \ XINE_ENGINE_PARAM_VERBOSITY +.br +.br +.TP +.BR xine_engine_get_param +.br +.BR action: +.br +Get engine parameter value. +.br + +.BR syntax: +.br +\ \ xine_engine_get_param <parameter> +.br +\ \ \- parameter can be: +.br +\ \ XINE_ENGINE_PARAM_VERBOSITY +.br +.br +.TP .BR xine_get_audio_lang .br .BR action: Index: toxine.1.header =================================================================== RCS file: /cvsroot/toxine/toxine/doc/man/en/toxine.1.header,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- toxine.1.header 8 Jul 2002 21:15:14 -0000 1.4 +++ toxine.1.header 6 Jul 2004 09:50:13 -0000 1.5 @@ -51,8 +51,9 @@ set video driver xv set audio driver alsa09 xine_init +xine_stream_new xine_play mrl ~/my_stream.mpg -waitfor PLAYBACK_FINISHED +waitfor UI_PLAYBACK_FINISHED xine_play mrl ~/test.mp3 xine_usec_sleep 9000000 xine_stop @@ -68,20 +69,23 @@ with two dashes (\`\-\'). A summary of options are included below. .TP -.BR \-s,\ \-\-script\ <filename> +.BR \-s,\ \-\-script\ <filename> Use <filename> as toxine script file. .TP -.BR \-e,\ \-\-execute <commands> +.BR \-S,\ \-\-stdin +Send command lines using standard input. +.TP +.BR \-e,\ \-\-execute\ <commands> Execute specified commands (like in prompt mode). .TP -.BR \-o,\ \-\-output [filename] +.BR \-o,\ \-\-output\ [filename] Save all messages in a file(*). *('toxine.out' if filename isn't specified). .TP -.BR \-V,\ \-\-video <name> +.BR \-V,\ \-\-video\ <name> Use video driver <name>. .TP -.BR \-A,\ \-\-audio <name> +.BR \-A,\ \-\-audio\ <name> Use audio driver <name>. .TP .BR \-i,\ \-\-interactive @@ -96,5 +100,8 @@ .TP .BR \-h,\ \-\-help Display this help text. +.TP +.BR \ \ \ \ \-\-error\-codes[=num] +Display errorcodes descriptions. If \fBnum\fP is specified, the error description will be printed. .br .SH COMMANDS |
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-06 09:50:28
|
Update of /cvsroot/toxine/toxine/doc/man In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29767/man Modified Files: Makefile.am Log Message: @@udpates, fix installation in debug mode Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/doc/man/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Makefile.am 4 Jul 2002 15:56:04 -0000 1.1 +++ Makefile.am 6 Jul 2004 09:50:12 -0000 1.2 @@ -1,5 +1,8 @@ SUBDIRS = en +debug: +install-debug: install + mostlyclean-generic: -rm -f *~ \#* .*~ .\#* |
From: Daniel Caujolle-B. <f1...@us...> - 2004-07-06 09:50:28
|
Update of /cvsroot/toxine/toxine/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29767 Modified Files: Makefile.am Log Message: @@udpates, fix installation in debug mode Index: Makefile.am =================================================================== RCS file: /cvsroot/toxine/toxine/doc/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile.am 8 Jul 2002 12:54:48 -0000 1.2 +++ Makefile.am 6 Jul 2004 09:50:11 -0000 1.3 @@ -1,9 +1,8 @@ SUBDIRS = man - debug: -install-debug: +install-debug: install mostlyclean-generic: -rm -f *~ \#* .*~ .\#* |
From: Daniel Caujolle-B. <f1...@us...> - 2004-06-13 17:26:52
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16086 Modified Files: utils.c Log Message: @@fix echo command in script mode Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- utils.c 30 May 2004 22:25:05 -0000 1.31 +++ utils.c 13 Jun 2004 17:26:36 -0000 1.32 @@ -757,7 +757,10 @@ } char *toxine_get_var(toxine_t *tox, const char *var) { + static char buffer[32768]; + error_code_clear(tox); + memset(buffer, 0, sizeof(buffer)); if(tox && var) { char *variable; @@ -765,11 +768,9 @@ variable = strchr(var, '$'); if(variable && (*variable == '$') && (*(variable + 1) != '$')) { - static char buffer[32768]; char varname[1024]; int found = 0; - memset(buffer, 0, sizeof(buffer)); memset(varname, 0, sizeof(varname)); if(sscanf(variable, "$\(%[a-z-A-Z-0-9-_])", &varname[0]) == 1) @@ -868,7 +869,6 @@ char *p = varname; int isargv = 1; - while(p && *p != '\0') { if(!isdigit(*p)) { isargv = 0; @@ -876,7 +876,7 @@ } p++; } - + if(isargv) { char *p = varname; int val = strtol(p, &p, 10); @@ -894,7 +894,7 @@ } } } - - error_code_set(tox, TOX_ERR_WRONG_SYNTAX); - return NULL; + + snprintf(buffer, sizeof(buffer), "%s", var); + return &buffer[0]; } |
From: Daniel Caujolle-B. <f1...@us...> - 2004-06-12 23:52:53
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31716 Modified Files: xine_commands.h Log Message: @@update constant names Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- xine_commands.h 12 Jun 2004 11:39:20 -0000 1.30 +++ xine_commands.h 12 Jun 2004 23:52:41 -0000 1.31 @@ -173,7 +173,6 @@ void _NAPI_config(commands_t *, toxine_t *, void *); */ -#warning update contants list in syntax #define xine_commands \ { "xine_new", NO_ARGS, _xine_new, \ "Create a new xine instance.", \ @@ -224,7 +223,8 @@ " 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_STREAM_INFO_MAX_SPU_CHANNEL | XINE_STREAM_INFO_AUDIO_MODE |\n" \ + " XINE_STREAM_INFO_SKIPPED_FRAMES | XINE_STREAM_INFO_DISCARDED_FRAMES]" \ }, \ { "xine_get_meta_info", REQUIRE_ARGS, _xine_get_meta_info, \ "Get meta info.", \ @@ -233,7 +233,8 @@ " [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_META_INFO_SYSTEMLAYER | XINE_META_INFO_INPUT_PLUGIN |\n" \ + " XINE_META_INFO_CDINDEX_DISCID]" \ }, \ { "xine_stop", NO_ARGS, _xine_stop, \ "Stop playback", \ @@ -260,28 +261,36 @@ "xine_get_param <parameter>\n" \ " - parameter can be:\n" \ " [XINE_PARAM_SPEED | XINE_PARAM_AV_OFFSET | XINE_PARAM_AUDIO_CHANNEL_LOGICAL |\n" \ - " XINE_PARAM_AUDIO_CHANNEL_LOGICAL | XINE_PARAM_SPU_CHANNEL |\n" \ - " XINE_PARAM_VIDEO_CHANNEL | XINE_PARAM_AUDIO_VOLUME | XINE_PARAM_AUDIO_MUTE |\n" \ - " XINE_PARAM_AUDIO_COMPR_LEVEL | XINE_PARAM_AUDIO_AMP_LEVEL |\n" \ - " XINE_PARAM_AUDIO_REPORT_LEVEL | XINE_PARAM_VO_DEINTERLACE |\n" \ - " XINE_PARAM_VO_ASPECT_RATIO | XINE_PARAM_VO_HUE | XINE_PARAM_VO_SATURATION |\n" \ - " XINE_PARAM_VO_CONTRAST | XINE_PARAM_VO_BRIGHTNESS | XINE_PARAM_VO_ZOOM_X |\n" \ - " XINE_PARAM_VO_ZOOM_Y | XINE_PARAM_VO_PAN_SCAN | XINE_PARAM_VO_TVMODE |\n" \ - " XINE_PARAM_AO_MIXER_VOL | XINE_PARAM_AO_PCM_VOL | XINE_PARAM_AO_MUTE]" \ + " XINE_PARAM_SPU_CHANNEL | XINE_PARAM_VIDEO_CHANNEL | XINE_PARAM_AUDIO_VOLUME |\n" \ + " XINE_PARAM_AUDIO_MUTE | XINE_PARAM_AUDIO_COMPR_LEVEL | XINE_PARAM_AUDIO_AMP_LEVEL |\n" \ + " XINE_PARAM_AUDIO_REPORT_LEVEL | XINE_PARAM_VERBOSITY | XINE_PARAM_SPU_OFFSET |\n" \ + " XINE_PARAM_IGNORE_VIDEO | XINE_PARAM_IGNORE_AUDIO | XINE_PARAM_IGNORE_SPU |\n" \ + " XINE_PARAM_BROADCASTER_PORT | XINE_PARAM_METRONOM_PREBUFFER | XINE_PARAM_EQ_30HZ |\n" \ + " XINE_PARAM_EQ_60HZ | XINE_PARAM_EQ_125HZ | XINE_PARAM_EQ_250HZ | XINE_PARAM_EQ_500HZ |\n" \ + " XINE_PARAM_EQ_1000HZ | XINE_PARAM_EQ_2000HZ | XINE_PARAM_EQ_4000HZ | XINE_PARAM_EQ_8000HZ |\n" \ + " XINE_PARAM_EQ_16000HZ | XINE_PARAM_AUDIO_CLOSE_DEVICE | XINE_PARAM_AUDIO_AMP_MUTE |\n" \ + " XINE_PARAM_VO_DEINTERLACE | XINE_PARAM_VO_ASPECT_RATIO | XINE_PARAM_VO_HUE |\n" \ + " XINE_PARAM_VO_SATURATION | XINE_PARAM_VO_CONTRAST | XINE_PARAM_VO_BRIGHTNESS |\n" \ + " XINE_PARAM_VO_ZOOM_X | XINE_PARAM_VO_ZOOM_Y | XINE_PARAM_VO_PAN_SCAN |\n" \ + " XINE_PARAM_VO_TVMODE]" \ }, \ { "xine_set_param", REQUIRE_ARGS, _xine_set_param, \ "Set parameter value.", \ "xine_set_param <parameter> <value>\n" \ " - parameter can be:\n" \ " [XINE_PARAM_SPEED | XINE_PARAM_AV_OFFSET | XINE_PARAM_AUDIO_CHANNEL_LOGICAL |\n" \ - " XINE_PARAM_AUDIO_CHANNEL_LOGICAL | XINE_PARAM_SPU_CHANNEL |\n" \ - " XINE_PARAM_VIDEO_CHANNEL | XINE_PARAM_AUDIO_VOLUME | XINE_PARAM_AUDIO_MUTE |\n" \ - " XINE_PARAM_AUDIO_COMPR_LEVEL | XINE_PARAM_AUDIO_AMP_LEVEL |\n" \ - " XINE_PARAM_AUDIO_REPORT_LEVEL | XINE_PARAM_VO_DEINTERLACE |\n" \ - " XINE_PARAM_VO_ASPECT_RATIO | XINE_PARAM_VO_HUE | XINE_PARAM_VO_SATURATION |\n" \ - " XINE_PARAM_VO_CONTRAST | XINE_PARAM_VO_BRIGHTNESS | XINE_PARAM_VO_ZOOM_X |\n" \ - " XINE_PARAM_VO_ZOOM_Y | XINE_PARAM_VO_PAN_SCAN | XINE_PARAM_VO_TVMODE |\n" \ - " XINE_PARAM_AO_MIXER_VOL | XINE_PARAM_AO_PCM_VOL | XINE_PARAM_AO_MUTE]\n" \ + " XINE_PARAM_SPU_CHANNEL | XINE_PARAM_VIDEO_CHANNEL | XINE_PARAM_AUDIO_VOLUME |\n" \ + " XINE_PARAM_AUDIO_MUTE | XINE_PARAM_AUDIO_COMPR_LEVEL | XINE_PARAM_AUDIO_AMP_LEVEL |\n" \ + " XINE_PARAM_AUDIO_REPORT_LEVEL | XINE_PARAM_VERBOSITY | XINE_PARAM_SPU_OFFSET |\n" \ + " XINE_PARAM_IGNORE_VIDEO | XINE_PARAM_IGNORE_AUDIO | XINE_PARAM_IGNORE_SPU |\n" \ + " XINE_PARAM_BROADCASTER_PORT | XINE_PARAM_METRONOM_PREBUFFER | XINE_PARAM_EQ_30HZ |\n" \ + " XINE_PARAM_EQ_60HZ | XINE_PARAM_EQ_125HZ | XINE_PARAM_EQ_250HZ | XINE_PARAM_EQ_500HZ |\n" \ + " XINE_PARAM_EQ_1000HZ | XINE_PARAM_EQ_2000HZ | XINE_PARAM_EQ_4000HZ | XINE_PARAM_EQ_8000HZ |\n" \ + " XINE_PARAM_EQ_16000HZ | XINE_PARAM_AUDIO_CLOSE_DEVICE | XINE_PARAM_AUDIO_AMP_MUTE |\n" \ + " XINE_PARAM_VO_DEINTERLACE | XINE_PARAM_VO_ASPECT_RATIO | XINE_PARAM_VO_HUE |\n" \ + " XINE_PARAM_VO_SATURATION | XINE_PARAM_VO_CONTRAST | XINE_PARAM_VO_BRIGHTNESS |\n" \ + " XINE_PARAM_VO_ZOOM_X | XINE_PARAM_VO_ZOOM_Y | XINE_PARAM_VO_PAN_SCAN |\n" \ + " XINE_PARAM_VO_TVMODE]" \ " - value can be:\n" \ " for XINE_PARAM_SPEED:\n" \ " [XINE_SPEED_PAUSE | XINE_SPEED_SLOW_4 | XINE_SPEED_SLOW_2 | XINE_SPEED_NORMAL |\n" \ |
From: Daniel Caujolle-B. <f1...@us...> - 2004-06-12 11:45:05
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27379 Modified Files: xine_commands.c Log Message: @@fix function calling Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- xine_commands.c 12 Jun 2004 11:39:20 -0000 1.51 +++ xine_commands.c 12 Jun 2004 11:44:56 -0000 1.52 @@ -1390,7 +1390,7 @@ void _xine_engine_set_param(commands_t *command, toxine_t *tox, void *data) { toxine_unset_last_result(tox); - return_if_no_stream(tox); + return_if_no_new(tox); error_code_clear(tox); if((toxine_is_args(tox)) >= 2) { @@ -1434,7 +1434,7 @@ pinfo(buffer); start_watchdog(tox, "xine_engine_set_param"); - xine_engine_set_param(tox->stream, xine_engine_params[found].param, value); + xine_engine_set_param(tox->xine, xine_engine_params[found].param, value); stop_watchdog(tox); pinfo(".\n"); } @@ -1458,7 +1458,7 @@ int i, found = -1; toxine_unset_last_result(tox); - return_if_no_stream(tox); + return_if_no_new(tox); error_code_clear(tox); param = toxine_get_arg(tox, 1); @@ -1474,7 +1474,7 @@ pinfo("xine_engine_get_param(%s):\n", xine_engine_params[i].name); start_watchdog(tox, "xine_engine_get_param"); - result = xine_engine_get_param(tox->stream, xine_engine_params[i].param); + result = xine_engine_get_param(tox->xine, xine_engine_params[i].param); stop_watchdog(tox); toxine_set_last_int_result(tox, result); pinfo("returned [%d]:\n", result); |
From: Daniel Caujolle-B. <f1...@us...> - 2004-06-12 11:39:29
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21200 Modified Files: xine_commands.c xine_commands.h Log Message: add xine_engine_get/set_param Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.50 retrieving revision 1.51 diff -u -r1.50 -r1.51 --- xine_commands.c 1 Jun 2004 21:49:51 -0000 1.50 +++ xine_commands.c 12 Jun 2004 11:39:20 -0000 1.51 @@ -248,6 +248,14 @@ { NULL , 0 } }; +static struct xine_engine_params_s { + char *name; + int param; +} xine_engine_params[] = { + { "XINE_ENGINE_PARAM_VERBOSITY" , XINE_ENGINE_PARAM_VERBOSITY }, + { NULL , 0} +}; + static struct xine_speeds_s { char *name; int speed; @@ -1379,6 +1387,117 @@ /* * */ +void _xine_engine_set_param(commands_t *command, toxine_t *tox, void *data) { + + toxine_unset_last_result(tox); + return_if_no_stream(tox); + error_code_clear(tox); + + if((toxine_is_args(tox)) >= 2) { + const char *param; + const char *svalue; + int value; + int i, found = -1; + char buffer[2048]; + int value_found = -1; + + param = toxine_get_arg(tox, 1); + svalue = toxine_get_arg(tox, 2); + value = atoi(((char *)svalue)); + + memset(&buffer, 0, sizeof(buffer)); + + for(i = 0; xine_engine_params[i].name != NULL; i++) { + if(!strncasecmp(param, xine_engine_params[i].name, strlen(param))) { + found = i; + break; + } + } + + if(found >= 0) { + + sprintf(buffer, "xine_engine_set_param(%s", xine_engine_params[found].name); + + switch(xine_engine_params[i].param) { + + case XINE_ENGINE_PARAM_VERBOSITY: + sprintf(buffer, "%s, %d)\n", buffer, value); + value_found = 1; + break; + + } + + if(value_found == -1) { + sprintf(buffer, "%s, UNKNOWN[%d])\n", buffer, value); + error_code_set(tox, TOX_ERR_WRONG_SYNTAX); + } + + pinfo(buffer); + start_watchdog(tox, "xine_engine_set_param"); + xine_engine_set_param(tox->stream, xine_engine_params[found].param, value); + stop_watchdog(tox); + pinfo(".\n"); + } + else { + perr("Unknown xine engine parameter: '%s'\n", param); + error_code_set(tox, TOX_ERR_WRONG_SYNTAX); + } + + } + else { + perr("Argument(s) missing.\n"); + error_code_set(tox, TOX_ERR_WRONG_SYNTAX); + } +} + +/* + * + */ +void _xine_engine_get_param(commands_t *command, toxine_t *tox, void *data) { + const char *param; + int i, found = -1; + + toxine_unset_last_result(tox); + return_if_no_stream(tox); + error_code_clear(tox); + + param = toxine_get_arg(tox, 1); + for(i = 0; xine_engine_params[i].name != NULL; i++) { + if(!strncasecmp(param, xine_engine_params[i].name, strlen(param))) { + found = i; + break; + } + } + + if(found >= 0) { + int result; + + pinfo("xine_engine_get_param(%s):\n", xine_engine_params[i].name); + start_watchdog(tox, "xine_engine_get_param"); + result = xine_engine_get_param(tox->stream, xine_engine_params[i].param); + stop_watchdog(tox); + toxine_set_last_int_result(tox, result); + pinfo("returned [%d]:\n", result); + + switch(xine_engine_params[i].param) { + + case XINE_ENGINE_PARAM_VERBOSITY: + pinfo("verbosity: %d\n", result); + break; + + } + } + else { + perr("Unknown xine engine parameter: '%s'\n", param); + error_code_set(tox, TOX_ERR_WRONG_SYNTAX); + } + + pinfo(".\n"); +} + +/* + * + */ void _xine_get_audio_lang(commands_t *command, toxine_t *tox, void *data) { char lang[20]; int channel; Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- xine_commands.h 1 Jun 2004 21:49:51 -0000 1.29 +++ xine_commands.h 12 Jun 2004 11:39:20 -0000 1.30 @@ -38,6 +38,8 @@ void _xine_get_status(commands_t *, toxine_t *, void *); void _xine_set_param(commands_t *, toxine_t *, void *); void _xine_get_param(commands_t *, toxine_t *, void *); +void _xine_engine_set_param(commands_t *, toxine_t *, void *); +void _xine_engine_get_param(commands_t *, toxine_t *, void *); void _xine_get_audio_lang(commands_t *, toxine_t *, void *); void _xine_get_spu_lang(commands_t *, toxine_t *, void *); void _xine_get_pos_length(commands_t *, toxine_t *, void *); @@ -290,11 +292,23 @@ " XINE_VO_ASPECT_DONT_TOUCH]\n" \ " or any numeric value for any parameter." \ }, \ + { "xine_engine_set_param", REQUIRE_ARGS, _xine_engine_set_param, \ + "Set engine parameter", \ + "xine_engine_set_param <parameter> <value>\n" \ + " - parameter can be:\n" \ + " XINE_ENGINE_PARAM_VERBOSITY" \ + }, \ + { "xine_engine_get_param", REQUIRE_ARGS, _xine_engine_get_param, \ + "Get engine parameter value.", \ + "xine_engine_get_param <parameter>\n" \ + " - parameter can be:\n" \ + " XINE_ENGINE_PARAM_VERBOSITY" \ + }, \ { "xine_get_audio_lang", OPTIONAL_ARGS, _xine_get_audio_lang, \ "Get current audio channel language", \ "xine_get_audio_lang" \ }, \ - { "xine_get_spu_lang", OPTIONAL_ARGS, _xine_get_spu_lang, \ + { "xine_get_spu_lang", OPTIONAL_ARGS, _xine_get_spu_lang, \ "Get current spu channel language", \ "xine_get_spu_lang" \ }, \ |
From: Daniel Caujolle-B. <f1...@us...> - 2004-06-01 22:15:55
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5343/src Modified Files: common.h main.c Log Message: add backtrace printing (linux only) Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- common.h 30 May 2004 23:22:39 -0000 1.33 +++ common.h 1 Jun 2004 22:15:46 -0000 1.34 @@ -101,6 +101,7 @@ fflush(stdout); \ } \ } while(0) + #define pout(FMT,ARGS...) do { \ if(!tox->stdin) { \ fprintf(stdout, FMT, ##ARGS); \ @@ -115,6 +116,7 @@ fflush(stdout); \ } \ } while(0) + #define pinfo(FMT,ARGS...) do { \ if(!tox->stdin) { \ fprintf(stdout, "%s", INFO_PREFIX); \ Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- main.c 31 May 2004 20:37:05 -0000 1.38 +++ main.c 1 Jun 2004 22:15:46 -0000 1.39 @@ -36,6 +36,10 @@ #include <string.h> #include <fcntl.h> +#ifdef __linux__ +#include <execinfo.h> +#endif + #ifdef HAVE_GETOPT_LONG # include <getopt.h> #else @@ -83,6 +87,28 @@ switch(sig) { /* Segfault */ case SIGSEGV: + perr("SIGSEGV received.\n"); +#ifdef __linux__ + { + void *backtrace_array[255]; + char **backtrace_strings; + int entries, i; + + if((entries = backtrace(backtrace_array, 255))) { + if((backtrace_strings = backtrace_symbols(backtrace_array, entries))) { + perr("Backtrace:\n"); + + for(i = 0; i < entries; i++) { + poutalign(); + pout("[%d] %s\n", i, backtrace_strings[i]); + } + + free(backtrace_strings); + perr("--\n"); + } + } + } +#endif exit(TOX_ERR_SIGSEGV); break; |
From: Daniel Caujolle-B. <f1...@us...> - 2004-06-01 22:15:54
|
Update of /cvsroot/toxine/toxine In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5343 Modified Files: configure.ac Log Message: add backtrace printing (linux only) Index: configure.ac =================================================================== RCS file: /cvsroot/toxine/toxine/configure.ac,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- configure.ac 6 May 2004 19:18:25 -0000 1.9 +++ configure.ac 1 Jun 2004 22:15:46 -0000 1.10 @@ -253,8 +253,8 @@ AC_TRY_CFLAGS("$sarchopt=athlon", k7cpu="athlon", k7cpu="i686") dnl add x86 specific CFLAGS - 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" + CFLAGS="$CFLAGS -O3 -rdynamic -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 -rdynamic -O3" dnl enable x86 specific parts of the code |
From: Daniel Caujolle-B. <f1...@us...> - 2004-06-01 21:50:00
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31593 Modified Files: commands.c errors.c loader.c playlist.c xine_commands.c xine_commands.h Log Message: @@update xine's constants. Preliminary error codes descriptions. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.77 retrieving revision 1.78 diff -u -r1.77 -r1.78 --- commands.c 31 May 2004 20:37:05 -0000 1.77 +++ commands.c 1 Jun 2004 21:49:51 -0000 1.78 @@ -2039,7 +2039,7 @@ if(toxine_is_arg_contain(tox, 1, "current")) { if(toxine_is_arg_contain(tox, 2, "position")) { int ret, pos; -#warning Set last result + return_if_no_init(tox); start_watchdog(tox, "xine_get_pos_length"); @@ -2048,8 +2048,10 @@ if(!ret) error_code_set(tox, TOX_ERR_XINE_GET_POS_LENGTH); - else + else { toxine_draw_bar(tox, "Current position", 0, 65535, pos); + toxine_set_last_int_result(tox, pos); + } } else if(toxine_is_arg_contain(tox, 2, "time")) { int err, seconds; @@ -2065,6 +2067,7 @@ else { seconds /= 1000; pinfo("Current time: %02d:%02d:%02d\n", seconds / (60 * 60), (seconds / 60) % 60, seconds % 60); + toxine_set_last_int_result(tox, seconds); } } Index: errors.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/errors.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- errors.c 27 May 2004 21:23:43 -0000 1.3 +++ errors.c 1 Jun 2004 21:49:51 -0000 1.4 @@ -26,47 +26,111 @@ #include "common.h" static struct error_codes_s { + char *l_descr; char *descr; toxine_error_code_t code; } error_codes[] = { -#warning Write real description - { "TOX_ERR_SUCCESS", TOX_ERR_SUCCESS }, - { "TOX_ERR_DEADLOCK", TOX_ERR_DEADLOCK }, - { "TOX_ERR_SIGSEGV", TOX_ERR_SIGSEGV }, - { "TOX_ERR_SIGINT", TOX_ERR_SIGINT }, - { "TOX_ERR_SIGTERM", TOX_ERR_SIGTERM }, - { "TOX_ERR_SIGQUIT", TOX_ERR_SIGQUIT }, - { "TOX_ERR_INTERNAL", TOX_ERR_INTERNAL }, - { "TOX_ERR_BAD_CMDLINE", TOX_ERR_BAD_CMDLINE }, - { "TOX_ERR_UNKNOWN_CMD", TOX_ERR_UNKNOWN_CMD }, - { "TOX_ERR_WRONG_SYNTAX", TOX_ERR_WRONG_SYNTAX }, - { "TOX_ERR_MISSING_STEP", TOX_ERR_MISSING_STEP }, - { "TOX_ERR_SURNUM_STEP", TOX_ERR_SURNUM_STEP }, - - { "TOX_ERR_NO_VOP", TOX_ERR_NO_VOP }, - { "TOX_ERR_VOP_FAILURE", TOX_ERR_VOP_FAILURE }, - { "TOX_ERR_AOP_FAILURE", TOX_ERR_AOP_FAILURE }, - { "TOX_ERR_WRONG_VERSION", TOX_ERR_WRONG_VERSION }, + { "Success.", + "TOX_ERR_SUCCESS", TOX_ERR_SUCCESS + }, + { "Deadlock occured. Generally this returned value is set when watchdog was triggered.", + "TOX_ERR_DEADLOCK", TOX_ERR_DEADLOCK + }, + { "SIGSEGV received.", + "TOX_ERR_SIGSEGV", TOX_ERR_SIGSEGV + }, + { "SIGINT received.", + "TOX_ERR_SIGINT", TOX_ERR_SIGINT + }, + { "SIGTERM received.", + "TOX_ERR_SIGTERM", TOX_ERR_SIGTERM + }, + { "SIGQUIT received.", + "TOX_ERR_SIGQUIT", TOX_ERR_SIGQUIT + }, + { "Returned when toxine stumble on an internal error.", + "TOX_ERR_INTERNAL", TOX_ERR_INTERNAL + }, + { "Bad command line option syntax. Toxine was called with wrong parameters.", + "TOX_ERR_BAD_CMDLINE", TOX_ERR_BAD_CMDLINE + }, + { "An unknown command was typed.", + "TOX_ERR_UNKNOWN_CMD", TOX_ERR_UNKNOWN_CMD + }, + { "Wrong command syntax was typed.", + "TOX_ERR_WRONG_SYNTAX", TOX_ERR_WRONG_SYNTAX + }, + { "A step is missing, eg: you forgot to call xine_new before xine_init.", + "TOX_ERR_MISSING_STEP", TOX_ERR_MISSING_STEP + }, + { "A step happened twice or more, eg: you called xine_new twice without a xine_dispose.", + "TOX_ERR_SURNUM_STEP", TOX_ERR_SURNUM_STEP + }, + { "No video output plugin found. Toxine's plugin is missing.", + "TOX_ERR_NO_VOP", TOX_ERR_NO_VOP + }, + { "Video output plugin initialisation failure. Toxine's or xine's plugin failed to initialize.", + "TOX_ERR_VOP_FAILURE", TOX_ERR_VOP_FAILURE + }, + { "Audio output plugin initialization failure. xine's plugin failed to initialize, check you audio driver configuration.", + "TOX_ERR_AOP_FAILURE", TOX_ERR_AOP_FAILURE + }, + { "Wrong xine library version found. Check you installation, maybe an older xine-lib is installed somewhere.", + "TOX_ERR_WRONG_VERSION", TOX_ERR_WRONG_VERSION + }, /* xine API */ - { "TOX_ERR_XINE_OPEN_VIDEO_DRIVER", TOX_ERR_XINE_OPEN_VIDEO_DRIVER }, - { "TOX_ERR_XINE_OPEN_AUDIO_DRIVER", TOX_ERR_XINE_OPEN_AUDIO_DRIVER }, - { "TOX_ERR_XINE_STREAM_NEW", TOX_ERR_XINE_STREAM_NEW }, - { "TOX_ERR_XINE_OPEN", TOX_ERR_XINE_OPEN }, - { "TOX_ERR_XINE_PLAY", TOX_ERR_XINE_PLAY }, - { "TOX_ERR_XINE_TRICK_MODE", TOX_ERR_XINE_TRICK_MODE }, - { "TOX_ERR_XINE_GET_AUDIO_LANG", TOX_ERR_XINE_GET_AUDIO_LANG }, - { "TOX_ERR_XINE_GET_SPU_LANG", TOX_ERR_XINE_GET_SPU_LANG }, - { "TOX_ERR_XINE_GET_POS_LENGTH", TOX_ERR_XINE_GET_POS_LENGTH }, - { "TOX_ERR_XINE_GET_LOG_NAMES", TOX_ERR_XINE_GET_LOG_NAMES }, - { "TOX_ERR_XINE_CONFIG_GET_FIRST_ENTRY", TOX_ERR_XINE_CONFIG_GET_FIRST_ENTRY }, - { "TOX_ERR_XINE_CONFIG_GET_NEXT_ENTRY", TOX_ERR_XINE_CONFIG_GET_NEXT_ENTRY }, - { "TOX_ERR_XINE_CONFIG_LOOKUP_ENTRY", TOX_ERR_XINE_CONFIG_LOOKUP_ENTRY }, - { "TOX_ERR_XINE_GET_VERSION_STRING", TOX_ERR_XINE_GET_VERSION_STRING }, - { "TOX_ERR_XINE_CHECK_VERSION", TOX_ERR_XINE_CHECK_VERSION }, - { "TOX_ERR_XINE_GET_CURRENT_FRAME", TOX_ERR_XINE_GET_CURRENT_FRAME }, - - - { NULL, 0 } + { "xine_open_video_driver() failed.", + "TOX_ERR_XINE_OPEN_VIDEO_DRIVER", TOX_ERR_XINE_OPEN_VIDEO_DRIVER + }, + { "xine_open_audio_driver() failed.", + "TOX_ERR_XINE_OPEN_AUDIO_DRIVER", TOX_ERR_XINE_OPEN_AUDIO_DRIVER + }, + { "xine_stream_new() failed.", + "TOX_ERR_XINE_STREAM_NEW", TOX_ERR_XINE_STREAM_NEW + }, + { "xine_open() failed.", + "TOX_ERR_XINE_OPEN", TOX_ERR_XINE_OPEN + }, + { "xine_play() failed.", + "TOX_ERR_XINE_PLAY", TOX_ERR_XINE_PLAY + }, + { "xine_trick_mode() failed.", + "TOX_ERR_XINE_TRICK_MODE", TOX_ERR_XINE_TRICK_MODE + }, + { "xine_get_audio_lang() failed.", + "TOX_ERR_XINE_GET_AUDIO_LANG", TOX_ERR_XINE_GET_AUDIO_LANG + }, + { "xine_get_spu_lang() failed.", + "TOX_ERR_XINE_GET_SPU_LANG", TOX_ERR_XINE_GET_SPU_LANG + }, + { "xine_get_pos_length() failed.", + "TOX_ERR_XINE_GET_POS_LENGTH", TOX_ERR_XINE_GET_POS_LENGTH + }, + { "xine_get_log_names() failed.", + "TOX_ERR_XINE_GET_LOG_NAMES", TOX_ERR_XINE_GET_LOG_NAMES + }, + { "xine_config_get_first_entry() failed.", + "TOX_ERR_XINE_CONFIG_GET_FIRST_ENTRY", TOX_ERR_XINE_CONFIG_GET_FIRST_ENTRY + }, + { "xine_config_get_next_entry() failed.", + "TOX_ERR_XINE_CONFIG_GET_NEXT_ENTRY", TOX_ERR_XINE_CONFIG_GET_NEXT_ENTRY + }, + { "xine_config_lookup_entry() failed.", + "TOX_ERR_XINE_CONFIG_LOOKUP_ENTRY", TOX_ERR_XINE_CONFIG_LOOKUP_ENTRY + }, + { "xine_get_version_string() failed.", + "TOX_ERR_XINE_GET_VERSION_STRING", TOX_ERR_XINE_GET_VERSION_STRING + }, + { "xine_check_version() failed.", + "TOX_ERR_XINE_CHECK_VERSION", TOX_ERR_XINE_CHECK_VERSION + }, + { "xine_get_current_frame() failed.", + "TOX_ERR_XINE_GET_CURRENT_FRAME", TOX_ERR_XINE_GET_CURRENT_FRAME + }, + + { NULL, + NULL, 0 + } }; void toxine_print_error_codes(toxine_t *tox) { @@ -74,7 +138,7 @@ pout("Return codes are:\n"); for(i = 0; error_codes[i].descr; i++) - pout("%3d => \t%s\n", error_codes[i].code, error_codes[i].descr); + pout("- %s [%3d]:\n\t* %s\n\n", error_codes[i].descr, error_codes[i].code, error_codes[i].l_descr); pout("--\n"); } Index: loader.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/loader.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- loader.c 27 May 2004 00:27:39 -0000 1.20 +++ loader.c 1 Jun 2004 21:49:51 -0000 1.21 @@ -34,7 +34,6 @@ #include "common.h" #ifdef LOCAL_BUILD -#warning "Load plugins from plugins/.libs" #undef TOXINE_PLUGINDIR #define TOXINE_PLUGINDIR "plugins/.libs" #endif Index: playlist.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/playlist.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- playlist.c 27 May 2004 00:27:39 -0000 1.14 +++ playlist.c 1 Jun 2004 21:49:51 -0000 1.15 @@ -596,19 +596,9 @@ } void playlist_add_entry(toxine_t *tox, const char *mrl, const char *ident, int start, int end) { -#warning FIXME - /* - if(!tox->playlist.num) - tox->playlist.mmk = (mediamark_t **) xine_xmalloc(sizeof(mediamark_t *) * 2); - else { - if(tox->playlist.num > 1) { - */ tox->playlist.mmk = (mediamark_t **) realloc(tox->playlist.mmk, sizeof(mediamark_t *) * (tox->playlist.num + 1)); - /* - } - } - */ + if(_playlist_store_mmk(&tox->playlist.mmk[tox->playlist.num], mrl, ident, start, end)) tox->playlist.num++; } Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- xine_commands.c 31 May 2004 20:37:05 -0000 1.49 +++ xine_commands.c 1 Jun 2004 21:49:51 -0000 1.50 @@ -54,43 +54,20 @@ }; #if 0 -static struct video_props_s { - char *name; - int prop; -} video_props[] = { - /* Property name Property value Require capability */ - { "XINE_PARAM_VO_DEINTERLACE", XINE_PARAM_VO_DEINTERLACE }, - { "XINE_PARAM_VO_ASPECT_RATIO", XINE_PARAM_VO_ASPECT_RATIO }, - { "XINE_PARAM_VO_HUE", XINE_PARAM_VO_HUE }, - { "XINE_PARAM_VO_SATURATION", XINE_PARAM_VO_SATURATION }, - { "XINE_PARAM_VO_CONTRAST", XINE_PARAM_VO_CONTRAST }, - { "XINE_PARAM_VO_BRIGHTNESS", XINE_PARAM_VO_BRIGHTNESS }, - { "XINE_PARAM_VO_ZOOM_X", XINE_PARAM_VO_ZOOM_X }, - { "XINE_PARAM_VO_ZOOM_Y", XINE_PARAM_VO_ZOOM_Y }, - { "XINE_PARAM_VO_PAN_SCAN", XINE_PARAM_VO_PAN_SCAN }, - { "XINE_PARAM_VO_TVMODE", XINE_PARAM_VO_TVMODE }, - { NULL, 0 } - /* What is do it for ? - XINE_VO_ZOOM_STEP - XINE_VO_ZOOM_MAX - XINE_VO_ZOOM_MIN - */ -}; -#endif - -#if 0 static struct visual_types_s { char *name; int type; } visual_types[] = { - { "XINE_VISUAL_TYPE_NONE", XINE_VISUAL_TYPE_NONE }, - { "XINE_VISUAL_TYPE_X11" , XINE_VISUAL_TYPE_X11 }, - { "XINE_VISUAL_TYPE_AA" , XINE_VISUAL_TYPE_AA }, - { "XINE_VISUAL_TYPE_FB" , XINE_VISUAL_TYPE_FB }, - { "XINE_VISUAL_TYPE_GTK" , XINE_VISUAL_TYPE_GTK }, - { "XINE_VISUAL_TYPE_DFB" , XINE_VISUAL_TYPE_DFB }, - { "XINE_VISUAL_TYPE_PM" , XINE_VISUAL_TYPE_PM }, - { NULL , 0 } + { "XINE_VISUAL_TYPE_NONE" , XINE_VISUAL_TYPE_NONE }, + { "XINE_VISUAL_TYPE_X11" , XINE_VISUAL_TYPE_X11 }, + { "XINE_VISUAL_TYPE_AA" , XINE_VISUAL_TYPE_AA }, + { "XINE_VISUAL_TYPE_FB" , XINE_VISUAL_TYPE_FB }, + { "XINE_VISUAL_TYPE_GTK" , XINE_VISUAL_TYPE_GTK }, + { "XINE_VISUAL_TYPE_DFB" , XINE_VISUAL_TYPE_DFB }, + { "XINE_VISUAL_TYPE_PM" , XINE_VISUAL_TYPE_PM }, + { "XINE_VISUAL_TYPE_DIRECTX", XINE_VISUAL_TYPE_DIRECTX }, + { "XINE_VISUAL_TYPE_CACA" , XINE_VISUAL_TYPE_CACA }, + { NULL , 0 } }; #endif @@ -149,6 +126,28 @@ { NULL , 0 } }; +#warning HANDLE +static struct ui_messages_s { + char *name; + int type; +} ui_messages[] = { + { "XINE_MSG_NO_ERROR" , XINE_MSG_NO_ERROR }, + { "XINE_MSG_GENERAL_WARNING" , XINE_MSG_GENERAL_WARNING }, + { "XINE_MSG_UNKNOWN_HOST" , XINE_MSG_UNKNOWN_HOST }, + { "XINE_MSG_UNKNOWN_DEVICE" , XINE_MSG_UNKNOWN_DEVICE }, + { "XINE_MSG_NETWORK_UNREACHABLE" , XINE_MSG_NETWORK_UNREACHABLE }, + { "XINE_MSG_CONNECTION_REFUSED" , XINE_MSG_CONNECTION_REFUSED }, + { "XINE_MSG_FILE_NOT_FOUND" , XINE_MSG_FILE_NOT_FOUND }, + { "XINE_MSG_READ_ERROR" , XINE_MSG_READ_ERROR }, + { "XINE_MSG_LIBRARY_LOAD_ERROR" , XINE_MSG_LIBRARY_LOAD_ERROR }, + { "XINE_MSG_ENCRYPTED_SOURCE" , XINE_MSG_ENCRYPTED_SOURCE }, + { "XINE_MSG_SECURITY" , XINE_MSG_SECURITY }, + { "XINE_MSG_AUDIO_OUT_UNAVAILABLE", XINE_MSG_AUDIO_OUT_UNAVAILABLE }, + { "XINE_MSG_PERMISSION_ERROR" , XINE_MSG_PERMISSION_ERROR }, + { NULL , 0 }, + +}; + static struct stream_infos_s { char *name; int type; @@ -179,6 +178,9 @@ { "XINE_STREAM_INFO_VIDEO_HAS_STILL" , XINE_STREAM_INFO_VIDEO_HAS_STILL }, { "XINE_STREAM_INFO_MAX_AUDIO_CHANNEL", XINE_STREAM_INFO_MAX_AUDIO_CHANNEL }, { "XINE_STREAM_INFO_MAX_SPU_CHANNEL" , XINE_STREAM_INFO_MAX_SPU_CHANNEL }, + { "XINE_STREAM_INFO_AUDIO_MODE" , XINE_STREAM_INFO_AUDIO_MODE }, + { "XINE_STREAM_INFO_SKIPPED_FRAMES" , XINE_STREAM_INFO_SKIPPED_FRAMES }, + { "XINE_STREAM_INFO_DISCARDED_FRAMES" , XINE_STREAM_INFO_DISCARDED_FRAMES }, { NULL , 0 } }; @@ -186,17 +188,18 @@ char *name; int type; } meta_infos[] = { - { "XINE_META_INFO_TITLE" , XINE_META_INFO_TITLE }, - { "XINE_META_INFO_COMMENT" , XINE_META_INFO_COMMENT }, - { "XINE_META_INFO_ARTIST" , XINE_META_INFO_ARTIST }, - { "XINE_META_INFO_GENRE" , XINE_META_INFO_GENRE }, - { "XINE_META_INFO_ALBUM" , XINE_META_INFO_ALBUM }, - { "XINE_META_INFO_YEAR" , XINE_META_INFO_YEAR }, - { "XINE_META_INFO_VIDEOCODEC" , XINE_META_INFO_VIDEOCODEC }, - { "XINE_META_INFO_AUDIOCODEC" , XINE_META_INFO_AUDIOCODEC }, - { "XINE_META_INFO_SYSTEMLAYER" , XINE_META_INFO_SYSTEMLAYER }, - { "XINE_META_INFO_INPUT_PLUGIN" , XINE_META_INFO_INPUT_PLUGIN }, - { NULL , 0 } + { "XINE_META_INFO_TITLE" , XINE_META_INFO_TITLE }, + { "XINE_META_INFO_COMMENT" , XINE_META_INFO_COMMENT }, + { "XINE_META_INFO_ARTIST" , XINE_META_INFO_ARTIST }, + { "XINE_META_INFO_GENRE" , XINE_META_INFO_GENRE }, + { "XINE_META_INFO_ALBUM" , XINE_META_INFO_ALBUM }, + { "XINE_META_INFO_YEAR" , XINE_META_INFO_YEAR }, + { "XINE_META_INFO_VIDEOCODEC" , XINE_META_INFO_VIDEOCODEC }, + { "XINE_META_INFO_AUDIOCODEC" , XINE_META_INFO_AUDIOCODEC }, + { "XINE_META_INFO_SYSTEMLAYER" , XINE_META_INFO_SYSTEMLAYER }, + { "XINE_META_INFO_INPUT_PLUGIN" , XINE_META_INFO_INPUT_PLUGIN }, + { "XINE_META_INFO_CDINDEX_DISCID", XINE_META_INFO_CDINDEX_DISCID }, + { NULL , 0 } }; static struct xine_params_s { @@ -215,6 +218,23 @@ { "XINE_PARAM_AUDIO_REPORT_LEVEL" , XINE_PARAM_AUDIO_REPORT_LEVEL }, { "XINE_PARAM_VERBOSITY" , XINE_PARAM_VERBOSITY }, { "XINE_PARAM_SPU_OFFSET" , XINE_PARAM_SPU_OFFSET }, + { "XINE_PARAM_IGNORE_VIDEO" , XINE_PARAM_IGNORE_VIDEO }, + { "XINE_PARAM_IGNORE_AUDIO" , XINE_PARAM_IGNORE_AUDIO }, + { "XINE_PARAM_IGNORE_SPU" , XINE_PARAM_IGNORE_SPU }, + { "XINE_PARAM_BROADCASTER_PORT" , XINE_PARAM_BROADCASTER_PORT }, + { "XINE_PARAM_METRONOM_PREBUFFER" , XINE_PARAM_METRONOM_PREBUFFER }, + { "XINE_PARAM_EQ_30HZ" , XINE_PARAM_EQ_30HZ }, + { "XINE_PARAM_EQ_60HZ" , XINE_PARAM_EQ_60HZ }, + { "XINE_PARAM_EQ_125HZ" , XINE_PARAM_EQ_125HZ }, + { "XINE_PARAM_EQ_250HZ" , XINE_PARAM_EQ_250HZ }, + { "XINE_PARAM_EQ_500HZ" , XINE_PARAM_EQ_500HZ }, + { "XINE_PARAM_EQ_1000HZ" , XINE_PARAM_EQ_1000HZ }, + { "XINE_PARAM_EQ_2000HZ" , XINE_PARAM_EQ_2000HZ }, + { "XINE_PARAM_EQ_4000HZ" , XINE_PARAM_EQ_4000HZ }, + { "XINE_PARAM_EQ_8000HZ" , XINE_PARAM_EQ_8000HZ }, + { "XINE_PARAM_EQ_16000HZ" , XINE_PARAM_EQ_16000HZ }, + { "XINE_PARAM_AUDIO_CLOSE_DEVICE" , XINE_PARAM_AUDIO_CLOSE_DEVICE }, + { "XINE_PARAM_AUDIO_AMP_MUTE" , XINE_PARAM_AUDIO_AMP_MUTE }, { "XINE_PARAM_VO_DEINTERLACE" , XINE_PARAM_VO_DEINTERLACE }, { "XINE_PARAM_VO_ASPECT_RATIO" , XINE_PARAM_VO_ASPECT_RATIO }, { "XINE_PARAM_VO_HUE" , XINE_PARAM_VO_HUE }, @@ -253,38 +273,6 @@ { NULL , 0 } }; -#if 0 -static struct xine_vo_params_s { - char *name; - int param; -} xine_vo_params[] = { - /* XINE_PARAM_VIDEO VALUE */ - { "XINE_PARAM_VO_DEINTERLACE" , XINE_PARAM_VO_DEINTERLACE }, - { "XINE_PARAM_VO_ASPECT_RATIO" , XINE_PARAM_VO_ASPECT_RATIO }, - { "XINE_PARAM_VO_HUE" , XINE_PARAM_VO_HUE }, - { "XINE_PARAM_VO_SATURATION" , XINE_PARAM_VO_SATURATION }, - { "XINE_PARAM_VO_CONTRAST" , XINE_PARAM_VO_CONTRAST }, - { "XINE_PARAM_VO_BRIGHTNESS" , XINE_PARAM_VO_BRIGHTNESS }, - { "XINE_PARAM_VO_ZOOM_X" , XINE_PARAM_VO_ZOOM_X }, - { "XINE_PARAM_VO_ZOOM_Y" , XINE_PARAM_VO_ZOOM_Y }, - { "XINE_PARAM_VO_PAN_SCAN" , XINE_PARAM_VO_PAN_SCAN }, - { "XINE_PARAM_VO_TVMODE" , XINE_PARAM_VO_TVMODE }, - { NULL , 0 } -}; -#endif - -#if 0 -static struct xine_vo_zooms_s { - char *name; - int factor; -} xine_vo_zooms[] = { - { "XINE_VO_ZOOM_STEP", XINE_VO_ZOOM_STEP }, - { "XINE_VO_ZOOM_MAX" , XINE_VO_ZOOM_MAX }, - { "XINE_VO_ZOOM_MIN" , XINE_VO_ZOOM_MIN }, - { NULL , 0 } -}; -#endif - static struct xine_vo_aspects_s { char *name; int aspect; @@ -1126,6 +1114,23 @@ case XINE_PARAM_AUDIO_REPORT_LEVEL: case XINE_PARAM_VERBOSITY: case XINE_PARAM_SPU_OFFSET: + case XINE_PARAM_IGNORE_VIDEO: + case XINE_PARAM_IGNORE_AUDIO: + case XINE_PARAM_IGNORE_SPU: + case XINE_PARAM_BROADCASTER_PORT: + case XINE_PARAM_METRONOM_PREBUFFER: + case XINE_PARAM_EQ_30HZ: + case XINE_PARAM_EQ_60HZ: + case XINE_PARAM_EQ_125HZ: + case XINE_PARAM_EQ_250HZ: + case XINE_PARAM_EQ_500HZ: + case XINE_PARAM_EQ_1000HZ: + case XINE_PARAM_EQ_2000HZ: + case XINE_PARAM_EQ_4000HZ: + case XINE_PARAM_EQ_8000HZ: + case XINE_PARAM_EQ_16000HZ: + case XINE_PARAM_AUDIO_CLOSE_DEVICE: + case XINE_PARAM_AUDIO_AMP_MUTE: case XINE_PARAM_VO_DEINTERLACE: case XINE_PARAM_VO_HUE: case XINE_PARAM_VO_SATURATION: @@ -1243,10 +1248,78 @@ 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_IGNORE_VIDEO: + pinfo("ignore video: %s", (result) ? "yes" : "no"); + break; + + case XINE_PARAM_IGNORE_AUDIO: + pinfo("ignore audio: %s", (result) ? "yes" : "no"); + break; + + case XINE_PARAM_IGNORE_SPU: + pinfo("ignore spu: %s", (result) ? "yes" : "no"); + break; + + case XINE_PARAM_BROADCASTER_PORT: + pinfo("broadcast port: %d", result); + break; + + case XINE_PARAM_METRONOM_PREBUFFER: + pinfo("metronom prebuffer: %d * (1/90000 sec)", result); + break; + + case XINE_PARAM_EQ_30HZ: + toxine_draw_bar(tox, "equalizer 30Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_60HZ: + toxine_draw_bar(tox, "equalizer 60Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_125HZ: + toxine_draw_bar(tox, "equalizer 125Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_250HZ: + toxine_draw_bar(tox, "equalizer 250Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_500HZ: + toxine_draw_bar(tox, "equalizer 500Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_1000HZ: + toxine_draw_bar(tox, "equalizer 1000Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_2000HZ: + toxine_draw_bar(tox, "equalizer 2000Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_4000HZ: + toxine_draw_bar(tox, "equalizer 4000Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_8000HZ: + toxine_draw_bar(tox, "equalizer 8000Hz gains", -100, 100, result); + break; + + case XINE_PARAM_EQ_16000HZ: + toxine_draw_bar(tox, "equalizer 16000Hz gains", -100, 100, result); + break; + + case XINE_PARAM_AUDIO_CLOSE_DEVICE: + pinfo("force audio device: %s", (result) ? "yes" : "no"); + break; + + case XINE_PARAM_AUDIO_AMP_MUTE: + pinfo("audio amp mute: %s", (result) ? "yes" : "no"); + break; case XINE_PARAM_VO_DEINTERLACE: pinfo("video out deinterlace: %s", (result) ? "yes" : "no"); Index: xine_commands.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- xine_commands.h 17 May 2004 19:53:25 -0000 1.28 +++ xine_commands.h 1 Jun 2004 21:49:51 -0000 1.29 @@ -171,6 +171,7 @@ void _NAPI_config(commands_t *, toxine_t *, void *); */ +#warning update contants list in syntax #define xine_commands \ { "xine_new", NO_ARGS, _xine_new, \ "Create a new xine instance.", \ |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-31 20:37:14
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24642/plugins Modified Files: vo_x11.c Log Message: @@fix watchdog and X11 vop. show all xine_play() calls. Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- vo_x11.c 30 May 2004 23:22:39 -0000 1.33 +++ vo_x11.c 31 May 2004 20:37:06 -0000 1.34 @@ -257,10 +257,8 @@ #endif if(tox->video.port && (tox->xine_state & XINE_STREAM)) { - start_watchdog(tox, "xine_gui_send_vo_data"); xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_DRAWABLE_CHANGED, (void*) private->x11_drawable[private->fullscreen].video_window); - stop_watchdog(tox); } @@ -346,9 +344,7 @@ if(tox->video.port && (tox->xine_state & XINE_STREAM)) { int result; - start_watchdog(tox, "xine_gui_send_vo_data"); result = xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, (void*)&rect); - stop_watchdog(tox); if(result != -1) { /* driver implements gui->video coordinate space translation, use it */ @@ -467,9 +463,7 @@ XLockDisplay (private->display); if(tox->video.port && (tox->xine_state & XINE_STREAM)) { - start_watchdog(tox, "xine_gui_send_vo_data"); xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_SELECT_VISUAL, (void *)&vinfo); - stop_watchdog(tox); if(vinfo != (XVisualInfo *) -1) { if(!vinfo) { perr("Output driver cannot select a working visual\n"); @@ -849,15 +843,11 @@ if(tox->xine_state & XINE_STREAM) { int speed; - start_watchdog(tox, "xine_config_register_enum"); speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); - stop_watchdog(tox); - if(speed != XINE_SPEED_NORMAL) { - start_watchdog(tox, "xine_set_param"); + if(speed != XINE_SPEED_NORMAL) xine_set_param(tox->stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL); - stop_watchdog(tox); - } + } break; @@ -866,26 +856,17 @@ if(tox->xine_state & XINE_STREAM) { int speed; - start_watchdog(tox, "xine_get_param"); speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); - stop_watchdog(tox); if(speed < XINE_SPEED_FAST_4) { - start_watchdog(tox, "xine_get_param"); speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); - stop_watchdog(tox); - if(speed > XINE_SPEED_PAUSE) { - start_watchdog(tox, "xine_get_param"); + if(speed > XINE_SPEED_PAUSE) speed = xine_get_param(tox->stream, XINE_PARAM_SPEED) * 2; - stop_watchdog(tox); - } else speed = XINE_SPEED_SLOW_4; - start_watchdog(tox, "xine_set_param"); xine_set_param(tox->stream, XINE_PARAM_SPEED, speed); - stop_watchdog(tox); } } break; @@ -895,19 +876,12 @@ if(tox->xine_state & XINE_STREAM) { int speed; - start_watchdog(tox, "xine_get_param"); speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); - stop_watchdog(tox); if(speed > XINE_SPEED_PAUSE) { - start_watchdog(tox, "xine_get_param"); speed = xine_get_param(tox->stream, XINE_PARAM_SPEED) / 2; - stop_watchdog(tox); - - start_watchdog(tox, "xine_set_param"); xine_set_param(tox->stream, XINE_PARAM_SPEED, speed); - stop_watchdog(tox); } } break; @@ -916,18 +890,14 @@ if(tox->xine_state & XINE_STREAM) { int speed; - start_watchdog(tox, "xine_get_param"); speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); - stop_watchdog(tox); if(speed != XINE_SPEED_PAUSE) speed = XINE_SPEED_PAUSE; else speed = XINE_SPEED_NORMAL; - start_watchdog(tox, "xine_set_param"); xine_set_param(tox->stream, XINE_PARAM_SPEED, speed); - stop_watchdog(tox); } break; } @@ -958,9 +928,7 @@ input.button = 0; /* No buttons, just motion. */ input.x = x; input.y = y; - start_watchdog(tox, "xine_event_send"); xine_event_send(tox->stream, &event); - stop_watchdog(tox); } } break; @@ -988,9 +956,7 @@ input.button = 1; input.x = x; input.y = y; - start_watchdog(tox, "xine_event_send"); xine_event_send(tox->stream, &event); - stop_watchdog(tox); } } } @@ -1002,11 +968,8 @@ if (xevent->count == 0) { if((xev->xany.window == private->x11_drawable[private->fullscreen].video_window) - && tox->video.port && (tox->xine_state & XINE_STREAM)) { - start_watchdog(tox, "xine_gui_send_vo_data"); + && tox->video.port && (tox->xine_state & XINE_STREAM)) xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_EXPOSE_EVENT, (void *)xev); - stop_watchdog(tox); - } } } |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-31 20:37:14
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24642 Modified Files: commands.c main.c xine_commands.c Log Message: @@fix watchdog and X11 vop. show all xine_play() calls. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- commands.c 30 May 2004 23:24:56 -0000 1.76 +++ commands.c 31 May 2004 20:37:05 -0000 1.77 @@ -550,7 +550,7 @@ } if(tox->display_events) { - pinfo("Get xine event:\n"); + pinfo("Got xine event:\n"); poutalign(); for(i = 0; event_struct[i].name != NULL; i++) { if(event_struct[i].event == tox->event.last.type) { @@ -1412,12 +1412,14 @@ pos = atoi((toxine_get_arg(tox, 1))); start_watchdog(tox, "xine_play"); + pinfo("xine_play(%d, 0):\n", pos); result = xine_play(tox->stream, pos, 0); stop_watchdog(tox); if(!result) { perr("xine_play() failed.\n"); error_code_set(tox, TOX_ERR_XINE_PLAY); } + pinfo(".\n"); } @@ -1451,12 +1453,14 @@ msec = 0; start_watchdog(tox, "xine_play"); + pinfo("xine_play(0, %d)\n", msec); result = xine_play(tox->stream, 0, msec); stop_watchdog(tox); if(!result) { perr("xine_play() failed.\n"); error_code_set(tox, TOX_ERR_XINE_PLAY); } + pinfo(".\n"); } /* Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- main.c 30 May 2004 23:22:39 -0000 1.37 +++ main.c 31 May 2004 20:37:05 -0000 1.38 @@ -116,12 +116,13 @@ while(tox->running) { if(tox->watchdog.enabled) { + if(i % 2) { - + if(tox->watchdog.running) { long int timeout; struct timeval tv, tvd; - + pthread_mutex_lock(&tox->watchdog.mutex); gettimeofday(&tv, NULL); Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- xine_commands.c 30 May 2004 22:25:05 -0000 1.48 +++ xine_commands.c 31 May 2004 20:37:05 -0000 1.49 @@ -358,8 +358,8 @@ pinfo(" entry->type: XINE_CONFIG_TYPE_STRING\n"); pinfo(" entry->str_value: '%s'\n", entry->str_value); pinfo(" entry->str_default: '%s'\n", entry->str_default); - // if(tox) - // toxine_set_last_char_result(tox, entry->str_value); + if(tox) + toxine_set_last_char_result(tox, entry->str_value); break; case XINE_CONFIG_TYPE_RANGE: @@ -368,8 +368,8 @@ pinfo(" entry->num_default: '%d'\n", entry->num_default); pinfo(" entry->range_min: '%d'\n", entry->range_min); pinfo(" entry->range_max: '%d'\n", entry->range_max); - // if(tox) - // toxine_set_last_int_result(tox, entry->num_value); + if(tox) + toxine_set_last_int_result(tox, entry->num_value); break; case XINE_CONFIG_TYPE_ENUM: @@ -380,8 +380,8 @@ int i; pinfo(" entry->enum_values: "); - // if(tox) - // toxine_set_last_achar_result(tox, (const char* const*)entry->enum_values); + if(tox) + toxine_set_last_achar_result(tox, (const char* const*)entry->enum_values); for(i = 0; entry->enum_values[i]; i++) pout("'%s' ", entry->enum_values[i]); @@ -394,16 +394,16 @@ pinfo(" entry->type: XINE_CONFIG_TYPE_NUM\n"); pinfo(" entry->num_value: '%d'\n", entry->num_value); pinfo(" entry->num_default: '%d'\n", entry->num_default); - // if(tox) - // toxine_set_last_int_result(tox, entry->num_value); + if(tox) + toxine_set_last_int_result(tox, entry->num_value); break; case XINE_CONFIG_TYPE_BOOL: pinfo(" entry->type: XINE_CONFIG_TYPE_BOOL\n"); pinfo(" entry->num_value: '%d'\n", entry->num_value); pinfo(" entry->num_default: '%d'\n", entry->num_default); - // if(tox) - // toxine_set_last_int_result(tox, entry->num_value); + if(tox) + toxine_set_last_int_result(tox, entry->num_value); break; case XINE_CONFIG_TYPE_UNKNOWN: |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-31 20:08:59
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18719 Modified Files: mangen.c sortcmds.c Log Message: fix compilation Index: mangen.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/mangen.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mangen.c 7 Apr 2004 18:21:07 -0000 1.5 +++ mangen.c 31 May 2004 20:08:49 -0000 1.6 @@ -88,6 +88,10 @@ return buffer; } +void toxine_signals_handler (int sig) { + /* Dummy */ +} + int main(int argc, char **argv) { int i = 0; Index: sortcmds.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/sortcmds.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- sortcmds.c 7 Apr 2004 18:21:07 -0000 1.4 +++ sortcmds.c 31 May 2004 20:08:49 -0000 1.5 @@ -382,6 +382,10 @@ printf("\n"); } +void toxine_signals_handler (int sig) { + /* Dummy */ +} + int main(int argc, char **argv) { int i = 0; int clen = (sizeof(commands) / sizeof(commands[0])) - 1; |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-30 23:25:07
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30535 Modified Files: commands.c Log Message: @@typo Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.75 retrieving revision 1.76 diff -u -r1.75 -r1.76 --- commands.c 30 May 2004 22:25:05 -0000 1.75 +++ commands.c 30 May 2004 23:24:56 -0000 1.76 @@ -2022,7 +2022,7 @@ pinfo(" loop: '%s' [%s]\n", (tox->playlist.loop) ? "YES" : "NO", loop_modes[tox->loop_mode].name); pinfo(" Watchdog:\n"); - pinfo(" enabled: '%s'\n", (tox->watchdog.enabled) ? "yes" : "no"); + pinfo(" enabled: '%s'\n", (tox->watchdog.enabled) ? "YES" : "NO"); pinfo(" timeout: '%d' second(s)\n", tox->watchdog.timeout); pinfo(" Script:\n"); pinfo(" in use: '%s'\n", (tox->script.in_use) ? "YES" : "NO"); |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-30 23:23:05
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30211 Modified Files: common.h main.c Log Message: more accurate when reporting deadlock Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- common.h 30 May 2004 22:25:05 -0000 1.32 +++ common.h 30 May 2004 23:22:39 -0000 1.33 @@ -200,22 +200,23 @@ } while(0) -#define start_watchdog(x,f) do { \ - pthread_mutex_lock(&(x)->watchdog.mutex); \ - if((x)->watchdog.running) { \ - perr("GASP! Watchdog is already running for '%s()'\n", (x)->watchdog.function); \ - abort(); \ - } \ - snprintf((x)->watchdog.function, sizeof((x)->watchdog.function), "%s", (f)); \ - (x)->watchdog.running = 1; \ - gettimeofday(&(x)->watchdog.tv, NULL); \ - pthread_mutex_unlock(&(x)->watchdog.mutex); \ +#define start_watchdog(x,f) do { \ + if((x)->watchdog.enabled) { \ + pthread_mutex_lock(&(x)->watchdog.mutex); \ + snprintf((x)->watchdog.function, sizeof((x)->watchdog.function), "%s(%s:%d)", \ + (f), __tox_func__, __LINE__); \ + (x)->watchdog.running = 1; \ + gettimeofday(&(x)->watchdog.tv, NULL); \ + pthread_mutex_unlock(&(x)->watchdog.mutex); \ + } \ } while(0) -#define stop_watchdog(x) do { \ - pthread_mutex_lock(&(x)->watchdog.mutex); \ - (x)->watchdog.running = 0; \ - pthread_mutex_unlock(&(x)->watchdog.mutex); \ +#define stop_watchdog(x) do { \ + if((x)->watchdog.enabled) { \ + pthread_mutex_lock(&(x)->watchdog.mutex); \ + (x)->watchdog.running = 0; \ + pthread_mutex_unlock(&(x)->watchdog.mutex); \ + } \ } while(0) #ifndef NAME_MAX Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- main.c 30 May 2004 22:25:05 -0000 1.36 +++ main.c 30 May 2004 23:22:39 -0000 1.37 @@ -131,7 +131,7 @@ if(timeout > tox->watchdog.timeout) { pout("\n"); perr("Watchdog triggered:\n"); - perr(" Time exceeded, >%ds, in function '%s()', exiting...\n", + perr(" Time exceeded, >%ds, in function '%s', exiting...\n", tox->watchdog.timeout, tox->watchdog.function); exit(TOX_ERR_DEADLOCK); |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-30 23:23:04
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30211/plugins Modified Files: vo_x11.c Log Message: more accurate when reporting deadlock Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- vo_x11.c 30 May 2004 22:45:27 -0000 1.32 +++ vo_x11.c 30 May 2004 23:22:39 -0000 1.33 @@ -301,9 +301,8 @@ if(tox->xine_state & XINE_STREAM) { if(tox->xine != NULL) { - start_watchdog(tox, "xine_get_status"); + status = xine_get_status(tox->stream); - stop_watchdog(tox); if(status == XINE_STATUS_PLAY) { screensaver_timer++; |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-30 22:45:40
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24057 Modified Files: vo_aa.c vo_caca.c vo_dxr3.c vo_none.c vo_x11.c Log Message: @@forgotten watchdog usage. Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- vo_aa.c 27 May 2004 00:27:40 -0000 1.17 +++ vo_aa.c 30 May 2004 22:45:26 -0000 1.18 @@ -57,11 +57,10 @@ aa_hidecursor(private->context); - tox->video.port = xine_open_video_driver(tox->xine, - tox->video.name, - XINE_VISUAL_TYPE_AA, - (void *) private->context); - + start_watchdog(tox, "xine_open_video_driver"); + tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, XINE_VISUAL_TYPE_AA, (void *) private->context); + stop_watchdog(tox); + if(tox->video.port == NULL) { perr("xine_open_video_driver() failed to load '%s' driver.\n", tox->video.name); exit(TOX_ERR_XINE_OPEN_VIDEO_DRIVER); @@ -74,7 +73,9 @@ toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; aa_private_t *private = (aa_private_t *) vop->private; + start_watchdog(tox, "xine_close_video_driver"); xine_close_video_driver(tox->xine, tox->video.port); + stop_watchdog(tox); tox->video.port = NULL; private->init = 0; Index: vo_caca.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_caca.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- vo_caca.c 27 May 2004 00:27:40 -0000 1.3 +++ vo_caca.c 30 May 2004 22:45:27 -0000 1.4 @@ -75,7 +75,9 @@ private->init = 1; + start_watchdog(tox, "xine_open_video_driver"); tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, XINE_VISUAL_TYPE_CACA, NULL); + stop_watchdog(tox); if(tox->video.port == NULL) { perr("xine_open_video_driver() failed to load '%s' driver.\n", tox->video.name); @@ -90,7 +92,9 @@ toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; caca_private_t *private = (caca_private_t *) vop->private; + start_watchdog(tox, "xine_close_video_driver"); xine_close_video_driver(tox->xine, tox->video.port); + stop_watchdog(tox); tox->video.port = NULL; private->init = 0; Index: vo_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- vo_dxr3.c 27 May 2004 00:27:40 -0000 1.21 +++ vo_dxr3.c 30 May 2004 22:45:27 -0000 1.22 @@ -52,9 +52,11 @@ mode = 1; /* First, we have to initialize the config entry */ + start_watchdog(tox, "xine_config_register_enum"); (void *) xine_config_register_enum(tox->xine, "dxr3.videoout_mode", 0, videoout_modes, "Dxr3: videoout mode (tv or overlay)", NULL, 0, NULL, NULL); + stop_watchdog(tox); /* Then, force it to TV mode */ toxine_config_update_num(tox, "dxr3.videoout_mode", mode); @@ -63,7 +65,9 @@ /* Reload config file now */ toxine_config_load(tox); + start_watchdog(tox, "xine_open_video_driver"); tox->video.port = xine_open_video_driver(tox->xine, drivername, XINE_VISUAL_TYPE_X11, NULL); + stop_watchdog(tox); private->init = 1; @@ -80,7 +84,9 @@ toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; dxr3_private_t *private = (dxr3_private_t *) vop->private; + start_watchdog(tox, "xine_close_video_driver"); xine_close_video_driver(tox->xine, tox->video.port); + stop_watchdog(tox); tox->video.port = NULL; private->init = 0; Index: vo_none.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_none.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- vo_none.c 27 May 2004 00:27:40 -0000 1.14 +++ vo_none.c 30 May 2004 22:45:27 -0000 1.15 @@ -33,8 +33,9 @@ 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, XINE_VISUAL_TYPE_NONE, - (void *)NULL); + start_watchdog(tox, "xine_open_video_driver"); + tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, XINE_VISUAL_TYPE_NONE, (void *)NULL); + stop_watchdog(tox); private->init = 1; @@ -51,7 +52,9 @@ toxine_vo_plugin_t *vop = (toxine_vo_plugin_t *) tox->video.cur_plugin; none_private_t *private = (none_private_t *) vop->private; + start_watchdog(tox, "xine_close_video_driver"); xine_close_video_driver(tox->xine, tox->video.port); + stop_watchdog(tox); tox->video.port = NULL; private->init = 0; Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- vo_x11.c 27 May 2004 00:27:40 -0000 1.31 +++ vo_x11.c 30 May 2004 22:45:27 -0000 1.32 @@ -256,9 +256,13 @@ private->x11_drawable[private->fullscreen].y); #endif - if(tox->video.port && (tox->xine_state & XINE_STREAM)) + if(tox->video.port && (tox->xine_state & XINE_STREAM)) { + start_watchdog(tox, "xine_gui_send_vo_data"); xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_DRAWABLE_CHANGED, (void*) private->x11_drawable[private->fullscreen].video_window); + stop_watchdog(tox); + + } pthread_mutex_unlock(&private->mutex); @@ -297,7 +301,9 @@ if(tox->xine_state & XINE_STREAM) { if(tox->xine != NULL) { + start_watchdog(tox, "xine_get_status"); status = xine_get_status(tox->stream); + stop_watchdog(tox); if(status == XINE_STATUS_PLAY) { screensaver_timer++; @@ -338,13 +344,19 @@ rect.w = 0; rect.h = 0; - 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 */ - *video_x = rect.x; - *video_y = rect.y; - return 1; + if(tox->video.port && (tox->xine_state & XINE_STREAM)) { + int result; + + start_watchdog(tox, "xine_gui_send_vo_data"); + result = xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, (void*)&rect); + stop_watchdog(tox); + + if(result != -1) { + /* driver implements gui->video coordinate space translation, use it */ + *video_x = rect.x; + *video_y = rect.y; + return 1; + } } /* Driver cannot convert gui->video space, fall back to old code... */ @@ -456,7 +468,9 @@ XLockDisplay (private->display); if(tox->video.port && (tox->xine_state & XINE_STREAM)) { + start_watchdog(tox, "xine_gui_send_vo_data"); xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_SELECT_VISUAL, (void *)&vinfo); + stop_watchdog(tox); if(vinfo != (XVisualInfo *) -1) { if(!vinfo) { perr("Output driver cannot select a working visual\n"); @@ -719,10 +733,12 @@ if(!strcasecmp(tox->video.name, "dxr3_ov")) { /* First, we have to initialize the config entry */ + start_watchdog(tox, "xine_config_register_enum"); (void *) xine_config_register_enum(tox->xine, "dxr3.videoout_mode", 0, videoout_modes, "Dxr3: videoout mode (tv or overlay)", NULL, 0, NULL, NULL); - + stop_watchdog(tox); + /* Then, force it to Overlay mode */ toxine_config_update_num(tox, "dxr3.videoout_mode", mode); /* Force saving */ @@ -736,8 +752,9 @@ xine_strdupa(drivername, tox->video.name); - tox->video.port = xine_open_video_driver(tox->xine, drivername, - XINE_VISUAL_TYPE_X11, (void *)&vis); + start_watchdog(tox, "xine_open_video_driver"); + tox->video.port = xine_open_video_driver(tox->xine, drivername, XINE_VISUAL_TYPE_X11, (void *)&vis); + stop_watchdog(tox); if(tox->video.port == NULL) { perr("xine_open_video_driver() failed to load '%s' driver.\n", drivername); @@ -831,20 +848,45 @@ case XK_BackSpace: /* speed == * 1 */ if(tox->xine_state & XINE_STREAM) { - if((xine_get_param(tox->stream, XINE_PARAM_SPEED)) != XINE_SPEED_NORMAL) + int speed; + + start_watchdog(tox, "xine_config_register_enum"); + speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); + stop_watchdog(tox); + + if(speed != XINE_SPEED_NORMAL) { + start_watchdog(tox, "xine_set_param"); xine_set_param(tox->stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL); + stop_watchdog(tox); + } } break; case XK_Up: /* speed++ */ 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, - ((xine_get_param(tox->stream, XINE_PARAM_SPEED)) * 2)); + int speed; + + start_watchdog(tox, "xine_get_param"); + speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); + stop_watchdog(tox); + + if(speed < XINE_SPEED_FAST_4) { + start_watchdog(tox, "xine_get_param"); + speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); + stop_watchdog(tox); + + if(speed > XINE_SPEED_PAUSE) { + start_watchdog(tox, "xine_get_param"); + speed = xine_get_param(tox->stream, XINE_PARAM_SPEED) * 2; + stop_watchdog(tox); + } else - xine_set_param(tox->stream, XINE_PARAM_SPEED, XINE_SPEED_SLOW_4); + speed = XINE_SPEED_SLOW_4; + + start_watchdog(tox, "xine_set_param"); + xine_set_param(tox->stream, XINE_PARAM_SPEED, speed); + stop_watchdog(tox); } } break; @@ -852,18 +894,41 @@ case XK_Down: /* speed-- */ 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)); + int speed; + + start_watchdog(tox, "xine_get_param"); + speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); + stop_watchdog(tox); + + if(speed > XINE_SPEED_PAUSE) { + + start_watchdog(tox, "xine_get_param"); + speed = xine_get_param(tox->stream, XINE_PARAM_SPEED) / 2; + stop_watchdog(tox); + + start_watchdog(tox, "xine_set_param"); + xine_set_param(tox->stream, XINE_PARAM_SPEED, speed); + stop_watchdog(tox); + } } break; case XK_space: 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); + int speed; + + start_watchdog(tox, "xine_get_param"); + speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); + stop_watchdog(tox); + + if(speed != XINE_SPEED_PAUSE) + speed = XINE_SPEED_PAUSE; else - xine_set_param(tox->stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL); + speed = XINE_SPEED_NORMAL; + + start_watchdog(tox, "xine_set_param"); + xine_set_param(tox->stream, XINE_PARAM_SPEED, speed); + stop_watchdog(tox); } break; } @@ -894,7 +959,9 @@ input.button = 0; /* No buttons, just motion. */ input.x = x; input.y = y; + start_watchdog(tox, "xine_event_send"); xine_event_send(tox->stream, &event); + stop_watchdog(tox); } } break; @@ -922,7 +989,9 @@ input.button = 1; input.x = x; input.y = y; + start_watchdog(tox, "xine_event_send"); xine_event_send(tox->stream, &event); + stop_watchdog(tox); } } } @@ -934,8 +1003,11 @@ if (xevent->count == 0) { if((xev->xany.window == private->x11_drawable[private->fullscreen].video_window) - && tox->video.port && (tox->xine_state & XINE_STREAM)) + && tox->video.port && (tox->xine_state & XINE_STREAM)) { + start_watchdog(tox, "xine_gui_send_vo_data"); xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_EXPOSE_EVENT, (void *)xev); + stop_watchdog(tox); + } } } @@ -1037,7 +1109,9 @@ pthread_mutex_lock(&private->mutex); pthread_join(private->timed_thread, NULL); + start_watchdog(tox, "xine_close_video_driver"); xine_close_video_driver(tox->xine, tox->video.port); + stop_watchdog(tox); tox->video.port = NULL; XLockDisplay(private->display); |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-30 22:25:19
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20943 Modified Files: commands.c common.h main.c utils.c xine_commands.c Log Message: watchdog added (see 'set' command). Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- commands.c 30 May 2004 19:25:23 -0000 1.74 +++ commands.c 30 May 2004 22:25:05 -0000 1.75 @@ -375,7 +375,9 @@ "set audio volume <level>\n" "set interative <[yes | no | 1 | 0 | true | false]>\n" "set mrl <mrl>\n" - "set loop <[playlist | mrl]>" + "set loop <[playlist | mrl]>\n" + "set watchdog <[yes | no | 1 | 0 | on | off]>\n" + "set watchdog timeout <secs>" }, { "shell", OPTIONAL_ARGS, do_shell, "Execute a shell, or a command if an argument to this command is given.", @@ -428,6 +430,7 @@ * Callback called on XINE_EVENT_PLAYBACK_FINISHED event */ static void finished_cb(toxine_t *tox) { + int result; if(tox->ignore_finished) return; @@ -445,7 +448,11 @@ error_code_clear(tox); pinfo("xine_open(%s):", tox->current_mrl); - if(xine_open(tox->stream, tox->current_mrl)) { + start_watchdog(tox, "xine_open"); + result = xine_open(tox->stream, tox->current_mrl); + stop_watchdog(tox); + + if(result) { tox->xine_state |= XINE_OPEN; _xine_play(NULL, tox, (void *)NO_ARGS); } @@ -489,7 +496,11 @@ int err; error_code_clear(tox); - if((err = xine_get_pos_length(tox->stream, NULL, &secs, NULL))) + start_watchdog(tox, "xine_get_pos_length"); + err = xine_get_pos_length(tox->stream, NULL, &secs, NULL); + stop_watchdog(tox); + + if(err) secs /= 1000; else error_code_set(tox, TOX_ERR_XINE_GET_POS_LENGTH); @@ -654,7 +665,9 @@ tox->audio.mixer.enable = 0; tox->audio.mixer.caps = 0; + start_watchdog(tox, "xine_open_audio_driver"); tox->audio.port = xine_open_audio_driver(tox->xine, (const char*)tox->audio.name, NULL); + stop_watchdog(tox); if(tox->audio.port == NULL) { perr("xine_load_audio_output_plugin() failed to load '%s' driver.\n", tox->audio.name); error_code_set(tox, TOX_ERR_XINE_OPEN_AUDIO_DRIVER); @@ -919,6 +932,17 @@ _xine_stream_new(NULL, tox, NULL); } +#ifdef LOCAL_BUILD + { + char cwd[_PATH_MAX]; + + getcwd(&cwd[0], sizeof(cwd)); + pinfo("****************************************************\n"); + pinfo("BIG FAT WARNING: You're loading output plugins from '%s/plugins/.libs'.\n", cwd); + pinfo("****************************************************\n"); + } +#endif + if(tox->stdin) { tox->interactive = 0; toxine_handle_stdin(tox); @@ -1114,7 +1138,7 @@ if(toxine_is_arg_contain(tox, 1, "mrl")) toxine_set_current_mrl(tox, (toxine_get_arg(tox, 2))); - if(toxine_is_arg_contain(tox, 1, "loop")) { + else if(toxine_is_arg_contain(tox, 1, "loop")) { const char *lmode = toxine_get_arg(tox, 2); int i, mode = -1; @@ -1230,6 +1254,29 @@ } } } + else if(toxine_is_arg_contain(tox, 1, "watchdog")) { + if(nargs >= 3) { + + if(toxine_is_arg_contain(tox, 2, "timeout")) { + const char *arg = toxine_get_arg(tox, 3); + int value = strtol(arg, (char **)&arg, 10); + + if(value >= 1) { + pinfo("new watchdog timeout: %d sec(s)\n", value); + tox->watchdog.timeout = value; + } + else + perr("watchdog timeout value should be >= 1.\n"); + } + } + else { + const char *arg = toxine_get_arg(tox, 2); + int bool = toxine_get_bool_value(arg); + + pinfo("Watchdog is '%s'\n", (bool) ? "enable" : "disable"); + tox->watchdog.enabled = bool; + } + } } } @@ -1270,6 +1317,7 @@ * Start to playback an mrl. */ static void do_play(commands_t *command, toxine_t *tox, void *data) { + int result; return_if_no_init(tox); return_if_no_stream(tox); @@ -1286,7 +1334,10 @@ } pinfo("xine_open(%s):", tox->current_mrl); - if(xine_open(tox->stream, tox->current_mrl)) { + start_watchdog(tox, "xine_open"); + result = xine_open(tox->stream, tox->current_mrl); + stop_watchdog(tox); + if(result) { tox->xine_state |= XINE_OPEN; _xine_play(command, tox, (void *)NO_ARGS); } @@ -1311,27 +1362,43 @@ * Pause/Resume playback. */ static void do_pause(commands_t *command, toxine_t *tox, void *data) { + int speed; return_if_no_init(tox); error_code_clear(tox); - if((xine_get_param(tox->stream, XINE_PARAM_SPEED)) != XINE_SPEED_PAUSE) - xine_set_param(tox->stream, XINE_PARAM_SPEED, XINE_SPEED_PAUSE); + pinfo("xine_get_param():\n"); + start_watchdog(tox, "xine_get_param"); + speed = xine_get_param(tox->stream, XINE_PARAM_SPEED); + stop_watchdog(tox); + pinfo(".\n"); + + if(speed != XINE_SPEED_PAUSE) + speed = XINE_SPEED_PAUSE; else - xine_set_param(tox->stream, XINE_PARAM_SPEED, XINE_SPEED_NORMAL); + speed = XINE_SPEED_NORMAL; + pinfo("xine_set_param(%d):\n", speed); + start_watchdog(tox, "xine_set_param"); + xine_set_param(tox->stream, XINE_PARAM_SPEED, speed); + stop_watchdog(tox); + pinfo(".\n"); } /* * Jump in stream. */ static void do_jump(commands_t *command, toxine_t *tox, void *data) { - int pos; + int pos, seekable, result; return_if_no_init(tox); error_code_clear(tox); - if((xine_get_stream_info(tox->stream, XINE_STREAM_INFO_SEEKABLE)) == 0) { + start_watchdog(tox, "ine_get_stream_info"); + seekable = xine_get_stream_info(tox->stream, XINE_STREAM_INFO_SEEKABLE); + stop_watchdog(tox); + + if(seekable == 0) { pinfo("Stream is not seekable\n"); return; } @@ -1344,7 +1411,10 @@ pos = atoi((toxine_get_arg(tox, 1))); - if(!xine_play(tox->stream, pos, 0)) { + start_watchdog(tox, "xine_play"); + result = xine_play(tox->stream, pos, 0); + stop_watchdog(tox); + if(!result) { perr("xine_play() failed.\n"); error_code_set(tox, TOX_ERR_XINE_PLAY); } @@ -1355,12 +1425,16 @@ * Seek in stream. */ static void do_seek(commands_t *command, toxine_t *tox, void *data) { - int msec; + int msec, seekable, result; return_if_no_init(tox); error_code_clear(tox); - if((xine_get_stream_info(tox->stream, XINE_STREAM_INFO_SEEKABLE)) == 0) { + start_watchdog(tox, "xine_get_stream_info"); + seekable = xine_get_stream_info(tox->stream, XINE_STREAM_INFO_SEEKABLE); + stop_watchdog(tox); + + if(seekable == 0) { pinfo("Stream is not seekable\n"); return; } @@ -1375,8 +1449,11 @@ if(msec < 0) msec = 0; - - if(!xine_play(tox->stream, 0, msec)) { + + start_watchdog(tox, "xine_play"); + result = xine_play(tox->stream, 0, msec); + stop_watchdog(tox); + if(!result) { perr("xine_play() failed.\n"); error_code_set(tox, TOX_ERR_XINE_PLAY); } @@ -1410,6 +1487,7 @@ */ static void do_version(commands_t *command, toxine_t *tox, void *data) { int major, minor, sub; + const char *str; error_code_clear(tox); @@ -1417,9 +1495,16 @@ pinfo("Copyright 2002-2004, Daniel Caujolle-Bert <f1...@us...>.\n"); pinfo("Built with xine library %d.%d.%d (%s).\n", XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION, XINE_VERSION); + + start_watchdog(tox, "xine_get_version"); xine_get_version(&major, &minor, &sub); - pinfo("Found xine library version: %d.%d.%d (%s).\n", - major, minor, sub, xine_get_version_string()); + stop_watchdog(tox); + + start_watchdog(tox, "xine_get_version_string"); + str = xine_get_version_string(); + stop_watchdog(tox); + + pinfo("Found xine library version: %d.%d.%d (%s).\n", major, minor, sub, str); pinfo("Using readline version %s.\n", rl_library_version); pinfo(".\n"); } @@ -1576,7 +1661,11 @@ if(status_value >= 0) { /* STOP PLAY QUIT */ do { xine_usec_sleep((1/90000.0)*2); + + start_watchdog(tox, "xine_get_status"); status = xine_get_status(tox->stream); + stop_watchdog(tox); + status_happend = (status == status_value) ? 1 : 0; } while(!status_happend); @@ -1612,7 +1701,11 @@ do { xine_usec_sleep((1/90000.0)*2); + + start_watchdog(tox, "xine_get_param"); speed_status = xine_get_param(tox->stream, XINE_PARAM_SPEED); + stop_watchdog(tox); + status_happend = (speed == speed_status) ? 1 : 0; } while(!status_happend); @@ -1743,7 +1836,11 @@ * start playback with new selected stream */ if(tox->xine && (old_cur != tox->playlist.cur)) { - int status = xine_get_status(tox->stream); + int status; + + start_watchdog(tox, "xine_get_status"); + status = xine_get_status(tox->stream); + stop_watchdog(tox); if(status == XINE_STATUS_PLAY) _xine_play(NULL, tox, (void *)NO_ARGS); @@ -1784,7 +1881,11 @@ plugname = toxine_get_arg(tox, 2); pinfo("Grab mrls from '%s' input plugin.\n", plugname); + + start_watchdog(tox, "xine_get_autoplay_mrls"); ap = xine_get_autoplay_mrls(tox->xine, plugname, &mrls); + stop_watchdog(tox); + if(ap && mrls) { for(i = 0; i < mrls; i++) @@ -1920,6 +2021,9 @@ pinfo(" current: '%d'\n", tox->playlist.cur); pinfo(" loop: '%s' [%s]\n", (tox->playlist.loop) ? "YES" : "NO", loop_modes[tox->loop_mode].name); + pinfo(" Watchdog:\n"); + pinfo(" enabled: '%s'\n", (tox->watchdog.enabled) ? "yes" : "no"); + pinfo(" timeout: '%d' second(s)\n", tox->watchdog.timeout); pinfo(" Script:\n"); pinfo(" in use: '%s'\n", (tox->script.in_use) ? "YES" : "NO"); pinfo(" file: '%s'\n", (tox->script.filename) ? tox->script.filename : "not set"); @@ -1933,8 +2037,12 @@ int ret, pos; #warning Set last result return_if_no_init(tox); + + start_watchdog(tox, "xine_get_pos_length"); + ret = xine_get_pos_length(tox->stream, &pos, NULL, NULL); + stop_watchdog(tox); - if(!(ret = xine_get_pos_length(tox->stream, &pos, NULL, NULL))) + if(!ret) error_code_set(tox, TOX_ERR_XINE_GET_POS_LENGTH); else toxine_draw_bar(tox, "Current position", 0, 65535, pos); @@ -1943,13 +2051,16 @@ int err, seconds; return_if_no_init(tox); + + start_watchdog(tox, "xine_get_pos_length"); + err = xine_get_pos_length(tox->stream, NULL, &seconds, NULL); + stop_watchdog(tox); - if(!(err = xine_get_pos_length(tox->stream, NULL, &seconds, NULL))) + if(!err) error_code_set(tox, TOX_ERR_XINE_GET_POS_LENGTH); else { seconds /= 1000; - pinfo("Current time: %02d:%02d:%02d\n", - seconds / (60 * 60), (seconds / 60) % 60, seconds % 60); + pinfo("Current time: %02d:%02d:%02d\n", seconds / (60 * 60), (seconds / 60) % 60, seconds % 60); } } @@ -2381,7 +2492,11 @@ * start playback with new selected stream */ if(tox->xine && (old_cur != tox->playlist.cur)) { - int status = xine_get_status(tox->stream); + int status; + + start_watchdog(tox, "xine_get_status"); + status = xine_get_status(tox->stream); + stop_watchdog(tox); if(status == XINE_STATUS_PLAY) _xine_play(NULL, tox, (void *)NO_ARGS); @@ -2446,16 +2561,27 @@ } static void do_dumpconfig(commands_t *command, toxine_t *tox, void *data) { + int result; _cfg_entry_t cfg_entry; return_if_no_new(tox); error_code_clear(tox); pinfo("Dumping all config object:\n"); - if((xine_config_get_first_entry(tox->xine, &cfg_entry))) { + + start_watchdog(tox, "xine_config_get_first_entry"); + result = xine_config_get_first_entry(tox->xine, &cfg_entry); + stop_watchdog(tox); + + if(result) { do { toxine_dump_config_entry(tox, &cfg_entry); - } while((xine_config_get_next_entry(tox->xine, &cfg_entry))); + + start_watchdog(tox, "xine_config_get_next_entry"); + result = xine_config_get_next_entry(tox->xine, &cfg_entry); + stop_watchdog(tox); + + } while(result); } else error_code_set(tox, TOX_ERR_XINE_CONFIG_GET_FIRST_ENTRY); Index: common.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/common.h,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- common.h 27 May 2004 00:27:39 -0000 1.31 +++ common.h 30 May 2004 22:25:05 -0000 1.32 @@ -36,6 +36,18 @@ #include "vo_plugin.h" #include "errors.h" +#ifndef timersub +#define timersub(a, b, result) \ + do { \ + (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ + if ((result)->tv_usec < 0) { \ + --(result)->tv_sec; \ + (result)->tv_usec += 1000000; \ + } \ + } while (0) +#endif + #ifndef __GNUC__ #define __tox_func__ __func__ #else @@ -188,6 +200,24 @@ } while(0) +#define start_watchdog(x,f) do { \ + pthread_mutex_lock(&(x)->watchdog.mutex); \ + if((x)->watchdog.running) { \ + perr("GASP! Watchdog is already running for '%s()'\n", (x)->watchdog.function); \ + abort(); \ + } \ + snprintf((x)->watchdog.function, sizeof((x)->watchdog.function), "%s", (f)); \ + (x)->watchdog.running = 1; \ + gettimeofday(&(x)->watchdog.tv, NULL); \ + pthread_mutex_unlock(&(x)->watchdog.mutex); \ + } while(0) + +#define stop_watchdog(x) do { \ + pthread_mutex_lock(&(x)->watchdog.mutex); \ + (x)->watchdog.running = 0; \ + pthread_mutex_unlock(&(x)->watchdog.mutex); \ + } while(0) + #ifndef NAME_MAX #define _NAME_MAX 256 #else @@ -214,6 +244,16 @@ struct toxine_s { pid_t pid; + + struct { + int enabled; + pthread_mutex_t mutex; + char function[256]; + int running; + int timeout; /* in secs */ + struct timeval tv; + } watchdog; + int argc; char **argv; Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- main.c 27 May 2004 21:23:43 -0000 1.35 +++ main.c 30 May 2004 22:25:05 -0000 1.36 @@ -109,11 +109,52 @@ } } +static void *_watchdog_loop(void *data) { + toxine_t *tox = (toxine_t *) data; + int i = 0; + + while(tox->running) { + + if(tox->watchdog.enabled) { + if(i % 2) { + + if(tox->watchdog.running) { + long int timeout; + struct timeval tv, tvd; + + pthread_mutex_lock(&tox->watchdog.mutex); + + gettimeofday(&tv, NULL); + timersub(&tv, &tox->watchdog.tv, &tvd); + timeout = tvd.tv_sec + (tvd.tv_usec / 1000000.0); + + if(timeout > tox->watchdog.timeout) { + pout("\n"); + perr("Watchdog triggered:\n"); + perr(" Time exceeded, >%ds, in function '%s()', exiting...\n", + tox->watchdog.timeout, tox->watchdog.function); + + exit(TOX_ERR_DEADLOCK); + } + + pthread_mutex_unlock(&tox->watchdog.mutex); + } + } + } + + xine_usec_sleep(500000.0); + i++; + } + + pthread_exit(NULL); +} + /* * Display version/copyright banner. */ static void toxine_show_version(toxine_t *tox) { - int major, minor, sub; + int major, minor, sub; + const char *str; pout("This is toxine - xine shell v%s\n" "(c) 2002-2003 by Daniel Caujolle-Bert <f1...@us...>.\n", VERSION); @@ -121,10 +162,16 @@ pout("Built with xine library %d.%d.%d (%s)\n", XINE_MAJOR_VERSION, XINE_MINOR_VERSION, XINE_SUB_VERSION, XINE_VERSION); + start_watchdog(tox, "xine_get_version"); xine_get_version (&major, &minor, &sub); + stop_watchdog(tox); + - pout("Found xine library version: %d.%d.%d (%s).\n", - major, minor, sub, xine_get_version_string()); + start_watchdog(tox, "xine_get_version_string"); + str = xine_get_version_string(); + stop_watchdog(tox); + + pout("Found xine library version: %d.%d.%d (%s).\n", major, minor, sub, str); } @@ -159,6 +206,8 @@ if(tox) { int i; + pthread_mutex_destroy(&tox->watchdog.mutex); + if(tox->msg_fd >= 0) close(tox->msg_fd); @@ -221,29 +270,36 @@ int interactive = 1; int i; toxine_error_code_t last_error; - + pthread_t pth; + /* Check xine library version */ if(!xine_check_version(1, 0, 0)) { int major, minor, sub; - + xine_get_version(&major, &minor, &sub); + fprintf(stderr, "Require xine library version 1.0.0, found %d.%d.%d.\n", major, minor, sub); exit(TOX_ERR_WRONG_VERSION); } tox = (toxine_t *) xine_xmalloc(sizeof(toxine_t)); - tox->pid = getppid(); - tox->command.remain = NULL; - 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; - tox->argc = 0; - tox->argv = NULL; + tox->pid = getppid(); + + pthread_mutex_init(&tox->watchdog.mutex, NULL); + tox->watchdog.enabled = 0; + tox->watchdog.running = 0; + tox->watchdog.timeout = 15; /* 15 secs timeout */ + tox->command.remain = NULL; + 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; + tox->argc = 0; + tox->argv = NULL; /* * parse command line @@ -351,6 +407,9 @@ perr("Cannot dup2 stderr: %s\n", strerror(errno)); } + tox->running = 1; + pthread_create(&pth, NULL, _watchdog_loop, (void *)tox); + toxine_show_version(tox); toxine_get_extra_argv(tox, argc - optind, &argv[optind], argv[0]); @@ -362,13 +421,18 @@ char *cfgfile = ".xine/toxine_config"; if (!(tox->configfile = getenv ("XINERC"))) { - tox->configfile = (char *) xine_xmalloc((strlen((xine_get_homedir())) + strlen(cfgfile))+2); - sprintf(tox->configfile, "%s/%s", (xine_get_homedir()), cfgfile); + const char *homedir; + + start_watchdog(tox, "xine_get_homedir"); + homedir = xine_get_homedir(); + stop_watchdog(tox); + + tox->configfile = (char *) xine_xmalloc((strlen(homedir) + strlen(cfgfile))+2); + sprintf(tox->configfile, "%s/%s", homedir, cfgfile); } } - tox->running = 1; tox->playlist.mmk = NULL; tox->playlist.thread_num = 0;; tox->loop_mode = PLAYLIST_LOOP; Index: utils.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/utils.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- utils.c 27 May 2004 00:27:39 -0000 1.30 +++ utils.c 30 May 2004 22:25:05 -0000 1.31 @@ -194,8 +194,11 @@ void toxine_update_prompt(toxine_t *tox) { int i = 0, s = -1; - if(tox->xine_state & XINE_STREAM) + if(tox->xine_state & XINE_STREAM) { + start_watchdog(tox, "xine_get_status"); s = xine_get_status(tox->stream); + stop_watchdog(tox); + } while(prompt_state[i].state != NULL) { if(prompt_state[i].xine_state == s) { @@ -584,15 +587,23 @@ break; } + start_watchdog(tox, "xine_config_update_entry"); xine_config_update_entry(tox->xine, entry); + stop_watchdog(tox); } void toxine_config_update_range(toxine_t *tox, char *key, int min, int max) { + int result; _cfg_entry_t entry; error_code_clear(tox); memset(&entry, 0, sizeof(_cfg_entry_t)); - if(xine_config_lookup_entry(tox->xine, key, &entry)) + + start_watchdog(tox, "xine_config_lookup_entry"); + result = xine_config_lookup_entry(tox->xine, key, &entry); + stop_watchdog(tox); + + if(result) _config_update(tox, &entry, XINE_CONFIG_TYPE_RANGE, min, max, 0, NULL); else { perr("WOW, range key %s isn't registered\n", key); @@ -601,11 +612,17 @@ } void toxine_config_update_string(toxine_t *tox, char *key, char *string) { + int result; _cfg_entry_t entry; error_code_clear(tox); memset(&entry, 0, sizeof(_cfg_entry_t)); - if((xine_config_lookup_entry(tox->xine, key, &entry)) && string) + + start_watchdog(tox, "xine_config_lookup_entry"); + result = xine_config_lookup_entry(tox->xine, key, &entry); + stop_watchdog(tox); + + if(result && string) _config_update(tox, &entry, XINE_CONFIG_TYPE_STRING, 0, 0, 0, string); else { if(string == NULL) @@ -618,11 +635,17 @@ } void toxine_config_update_enum(toxine_t *tox, char *key, int value) { + int result; _cfg_entry_t entry; error_code_clear(tox); memset(&entry, 0, sizeof(_cfg_entry_t)); - if(xine_config_lookup_entry(tox->xine, key, &entry)) + + start_watchdog(tox, "xine_config_lookup_entry"); + result = xine_config_lookup_entry(tox->xine, key, &entry); + stop_watchdog(tox); + + if(result) _config_update(tox, &entry, XINE_CONFIG_TYPE_ENUM, 0, 0, value, NULL); else { perr("WOW, enum key %s isn't registered\n", key); @@ -631,11 +654,17 @@ } void toxine_config_update_bool(toxine_t *tox, char *key, int value) { + int result; _cfg_entry_t entry; error_code_clear(tox); memset(&entry, 0, sizeof(_cfg_entry_t)); - if(xine_config_lookup_entry(tox->xine, key, &entry)) + + start_watchdog(tox, "xine_config_lookup_entry"); + result = xine_config_lookup_entry(tox->xine, key, &entry); + stop_watchdog(tox); + + if(result) _config_update(tox, &entry, XINE_CONFIG_TYPE_BOOL, 0, 0, ((value > 0) ? 1 : 0), NULL); else { perr("WOW, bool key %s isn't registered\n", key); @@ -644,11 +673,17 @@ } void toxine_config_update_num(toxine_t *tox, char *key, int value) { + int result; _cfg_entry_t entry; error_code_clear(tox); memset(&entry, 0, sizeof(_cfg_entry_t)); - if(xine_config_lookup_entry(tox->xine, key, &entry)) + + start_watchdog(tox, "xine_config_lookup_entry"); + result = xine_config_lookup_entry(tox->xine, key, &entry); + stop_watchdog(tox); + + if(result) _config_update(tox, &entry, XINE_CONFIG_TYPE_NUM, 0, 0, value, NULL); else { perr("WOW, num key %s isn't registered\n", key); @@ -658,15 +693,20 @@ void toxine_config_load(toxine_t *tox) { error_code_clear(tox); - if(tox) + if(tox) { + start_watchdog(tox, "xine_config_load"); xine_config_load(tox->xine, tox->configfile); + stop_watchdog(tox); + } } void toxine_config_save(toxine_t *tox) { error_code_clear(tox); if(tox) { return_if_no_new(tox); + start_watchdog(tox, "xine_config_save"); xine_config_save(tox->xine, tox->configfile); + stop_watchdog(tox); } } Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- xine_commands.c 30 May 2004 19:25:23 -0000 1.47 +++ xine_commands.c 30 May 2004 22:25:05 -0000 1.48 @@ -307,7 +307,9 @@ return_if_no_stream(tox); + start_watchdog(tox, "xine_get_error"); err = xine_get_error(tox->stream); + stop_watchdog(tox); switch(err) { case XINE_ERROR_NONE: @@ -444,7 +446,9 @@ } pinfo("xine_new():\n"); + start_watchdog(tox, "xine_new"); tox->xine = xine_new(); + stop_watchdog(tox); pinfo(".\n"); tox->xine_state |= XINE_NEW; @@ -470,7 +474,9 @@ } pinfo("xine_stream_new():\n"); + start_watchdog(tox, "xine_steam_new"); tox->stream = xine_stream_new(tox->xine, tox->audio.port, tox->video.port); + stop_watchdog(tox); pinfo(".\n"); if(tox->stream) { @@ -482,8 +488,13 @@ error_code_set(tox, TOX_ERR_XINE_STREAM_NEW); } + start_watchdog(tox, "xine_event_new_queue"); tox->event_queue = xine_event_new_queue(tox->stream); + stop_watchdog(tox); + + start_watchdog(tox, "xine_event_create_listenen_thread"); xine_event_create_listener_thread(tox->event_queue, toxine_event_listener, (void *) tox); + stop_watchdog(tox); } /* @@ -504,7 +515,9 @@ _xine_new(NULL, tox, NULL); pinfo("xine_init():\n"); + start_watchdog(tox, "xine_init"); xine_init(tox->xine); + stop_watchdog(tox); pinfo(".\n"); tox->xine_state |= XINE_INIT; pthread_mutex_init(&tox->event.mutex, NULL); @@ -543,9 +556,13 @@ toxine_set_current_mrl(tox, mrl); pinfo("xine_open(%s):\n", tox->current_mrl); - if(!(result = xine_open(tox->stream, tox->current_mrl))) - error_code_set(tox, TOX_ERR_XINE_OPEN); + start_watchdog(tox, "xine_open"); + result = xine_open(tox->stream, tox->current_mrl); + stop_watchdog(tox); + if(!result) + error_code_set(tox, TOX_ERR_XINE_OPEN); + toxine_set_last_int_result(tox, result); pinfo("-- returned %d\n", result); tox->xine_state |= XINE_OPEN; @@ -717,13 +734,23 @@ if(need_open) { pinfo("xine_open(%s) && xine_play(%d, %d):\n", mrl, start, time); - if((!(open_result = xine_open(tox->stream, mrl))) || (!(result = xine_play(tox->stream, start, time)))) { + + start_watchdog(tox, "xine_open"); + open_result = xine_open(tox->stream, mrl); + stop_watchdog(tox); + + start_watchdog(tox, "xine_play"); + result = xine_play(tox->stream, start, time); + stop_watchdog(tox); + + if(!open_result || !result) { if(!open_result) { error_code_set(tox, TOX_ERR_XINE_OPEN); result = open_result; } else error_code_set(tox, TOX_ERR_XINE_PLAY); + toxine_handle_xine_errors(tox); } else @@ -732,7 +759,11 @@ } else { pinfo("xine_play(%d, %d):\n", start, time); - if(!(result = xine_play(tox->stream, start, time))) { + start_watchdog(tox, "xine_play"); + result = xine_play(tox->stream, start, time); + stop_watchdog(tox); + + if(!result) { error_code_set(tox, TOX_ERR_XINE_PLAY); toxine_handle_xine_errors(tox); } @@ -770,9 +801,13 @@ value = atoi(((char *)toxine_get_arg(tox, 2))); pinfo("xine_trick_mode(%s, %d):\n", xine_tricks[i].name, value); + start_watchdog(tox, "xine_trick_mode"); result = xine_trick_mode(tox->stream, trick_mode, value); + stop_watchdog(tox); + if(!result) error_code_set(tox, TOX_ERR_XINE_TRICK_MODE); + toxine_set_last_int_result(tox, result); pinfo("--returned %d\n", result); } @@ -810,7 +845,10 @@ uint32_t stream_info; pinfo("xine_get_stream_info(%s):\n", stream_infos[i].name); + start_watchdog(tox, "xine_get_stream_info"); stream_info = xine_get_stream_info(tox->stream, stream_infos[i].type); + stop_watchdog(tox); + toxine_set_last_int_result(tox, stream_info); toxine_show_stream_info(tox, stream_infos[i].type, stream_info); pinfo(".\n"); @@ -840,7 +878,10 @@ const char *meta_info; pinfo("xine_get_meta_info(%s):\n", meta_infos[i].name); + start_watchdog(tox, "xine_get_meta_info"); meta_info = xine_get_meta_info(tox->stream, stream_infos[i].type); + stop_watchdog(tox); + toxine_set_last_char_result(tox, meta_info); switch(meta_infos[i].type) { @@ -872,7 +913,9 @@ error_code_clear(tox); tox->ignore_finished = 1; pinfo("xine_stop():\n"); + start_watchdog(tox, "xine_stop"); xine_stop(tox->stream); + stop_watchdog(tox); pinfo(".\n"); } @@ -886,7 +929,9 @@ return_if_no_stream(tox); pinfo("xine_eject():\n"); + start_watchdog(tox, "xine_eject"); retval = xine_eject(tox->stream); + stop_watchdog(tox); toxine_set_last_int_result(tox, retval); pinfo("returned %d.\n", retval); pinfo(".\n"); @@ -902,7 +947,7 @@ error_code_clear(tox); toxine_config_save(tox); - + if(tox->xine_state & XINE_STREAM) { _xine_close(NULL, tox, NULL); _xine_dispose(NULL, tox, NULL); @@ -911,7 +956,9 @@ if(tox->xine_state & XINE_INIT) { if(tox->event_queue) { pinfo("xine_event_dispose_queue():\n"); + start_watchdog(tox, "xine_event_dispose_queue"); xine_event_dispose_queue(tox->event_queue); + stop_watchdog(tox); pinfo(".\n"); tox->event_queue = NULL; } @@ -926,12 +973,16 @@ tox->video.cur_plugin = NULL; if(tox->audio.port) { + start_watchdog(tox, "xine_close_audio_driver"); xine_close_audio_driver(tox->xine, tox->audio.port); + stop_watchdog(tox); tox->audio.port = NULL; } pinfo("xine_exit():\n"); + start_watchdog(tox, "xine_exit"); xine_exit(tox->xine); + stop_watchdog(tox); pinfo(".\n"); tox->xine = NULL; tox->xine_state = 0; @@ -943,7 +994,7 @@ * */ void _xine_get_error(commands_t *command, toxine_t *tox, void *data) { - int xine_errno; + int xine_errno; char buffer[2048]; toxine_unset_last_result(tox); @@ -951,7 +1002,9 @@ error_code_clear(tox); pinfo("xine_get_error():\n"); + start_watchdog(tox, "xine_get_error"); xine_errno = xine_get_error(tox->stream); + stop_watchdog(tox); toxine_set_last_int_result(tox, xine_errno); sprintf(buffer, "returned %d (", xine_errno); @@ -988,7 +1041,9 @@ error_code_clear(tox); pinfo("xine_get_status():\n"); + start_watchdog(tox, "xine_get_status"); status = xine_get_status(tox->stream); + stop_watchdog(tox); toxine_set_last_int_result(tox, status); for(i = 0; xine_status[i].name != NULL; i++) { @@ -1092,7 +1147,9 @@ } pinfo(buffer); + start_watchdog(tox, "xine_set_param"); xine_set_param(tox->stream, xine_params[found].param, value); + stop_watchdog(tox); pinfo(".\n"); } else { @@ -1130,7 +1187,9 @@ int result; pinfo("xine_get_param(%s):\n", xine_params[i].name); + start_watchdog(tox, "xine_get_param"); result = xine_get_param(tox->stream, xine_params[i].param); + stop_watchdog(tox); toxine_set_last_int_result(tox, result); pinfo("returned [%d]:\n", result); @@ -1262,9 +1321,13 @@ channel = tox->audio.channel; pinfo("xine_get_audio_lang(%d):\n", channel); + start_watchdog(tox, "xine_get_audio_lang"); ret = xine_get_audio_lang(tox->stream, channel, &lang[0]); + stop_watchdog(tox); + if(!ret) error_code_set(tox, TOX_ERR_XINE_GET_AUDIO_LANG); + toxine_set_last_int_result(tox, ret); poutalign(); pout("'%s'\n", lang); @@ -1290,9 +1353,13 @@ pinfo("xine_get_spu_lang(%d):\n", channel); + start_watchdog(tox, "xine_get_spu_lang"); ret = xine_get_spu_lang(tox->stream, channel, &lang[0]); + stop_watchdog(tox); + if(!ret) error_code_set(tox, TOX_ERR_XINE_GET_SPU_LANG); + toxine_set_last_int_result(tox, ret); poutalign(); pout("'%s'\n", lang); @@ -1311,9 +1378,13 @@ error_code_clear(tox); pinfo("xine_get_pos_length():\n"); + start_watchdog(tox, "xine_get_pos_length"); result = xine_get_pos_length (tox->stream, &stream, &time, &length); + stop_watchdog(tox); + if(!result) error_code_set(tox, TOX_ERR_XINE_GET_POS_LENGTH); + toxine_set_last_int_result(tox, result); stime = time / 1000; slength = length / 1000; @@ -1342,11 +1413,13 @@ bufname = toxine_get_arg(tox, 1); + start_watchdog(tox, "xine_get_log_names"); log_names = xine_get_log_names(tox->xine); + stop_watchdog(tox); if(!log_names) error_code_set(tox, TOX_ERR_XINE_GET_LOG_NAMES); toxine_set_last_achar_result(tox, log_names); - + if(log_names) { int i; @@ -1370,7 +1443,9 @@ else pinfo("xine_get_log(%s):\n", log); + start_watchdog(tox, "xine_get_log"); logs = xine_get_log(tox->xine, buftype); + stop_watchdog(tox); toxine_set_last_achar_result(tox, logs); if(logs) { char buffer[2048]; @@ -1402,7 +1477,9 @@ memset(&buffer, 0, sizeof(buffer)); pinfo("xine_get_log_names():\n"); + start_watchdog(tox, "xine_get_log_names"); log_names = xine_get_log_names(tox->xine); + stop_watchdog(tox); if(!log_names) error_code_set(tox, TOX_ERR_XINE_GET_LOG_NAMES); toxine_set_last_achar_result(tox, log_names); @@ -1430,7 +1507,9 @@ error_code_clear(tox); pinfo("xine_get_log_section_count():\n"); + start_watchdog(tox, "xine_get_log_section_count"); count = xine_get_log_section_count(tox->xine); + stop_watchdog(tox); toxine_set_last_int_result(tox, count); pinfo("returned %d\n", count); pinfo(".\n"); @@ -1450,7 +1529,9 @@ error_code_clear(tox); bufname = toxine_get_arg(tox, 1); + start_watchdog(tox, "xine_get_log_names"); log_names = xine_get_log_names(tox->xine); + stop_watchdog(tox); if(!log_names) error_code_set(tox, TOX_ERR_XINE_GET_LOG_NAMES); else { @@ -1478,7 +1559,9 @@ else pinfo("xine_log(%s, '%s')\n", log, msg); + start_watchdog(tox, "xine_log"); xine_log(tox->xine, buftype, msg); + stop_watchdog(tox); pinfo(".\n"); } @@ -1493,7 +1576,9 @@ error_code_clear(tox); pinfo("xine_get_browsable_input_plugin_ids():\n"); + start_watchdog(tox, "xine_get_browsable_input_plugin_ids"); inpp = xine_get_browsable_input_plugin_ids(tox->xine); + stop_watchdog(tox); toxine_set_last_achar_result(tox, inpp); if(inpp) { char buffer[4096]; @@ -1541,7 +1626,9 @@ smrl = toxine_get_arg(tox, 2); pinfo("xine_get_browse_mrls(%s,%s):\n", pname, smrl); + start_watchdog(tox, "xine_get_browse_mrls"); bmrls = xine_get_browse_mrls(tox->xine, pname, smrl, &mrls); + stop_watchdog(tox); { char *p[mrls + 1]; @@ -1622,7 +1709,9 @@ error_code_clear(tox); pinfo("xine_get_autoplay_input_plugin_ids():\n"); + start_watchdog(tox, "xine_get_autoplay_input_plugin_ids"); inpp = xine_get_autoplay_input_plugin_ids(tox->xine); + stop_watchdog(tox); toxine_set_last_achar_result(tox, inpp); if(inpp) { @@ -1665,7 +1754,9 @@ pname = toxine_get_arg(tox, 1); pinfo("xine_get_autoplay_mrls(%s):\n", pname); + start_watchdog(tox, "xine_get_autoplay_mrls"); ap = xine_get_autoplay_mrls(tox->xine, pname, &mrls); + stop_watchdog(tox); toxine_set_last_achar_result(tox, (const char *const *)ap); if(ap) { @@ -1694,7 +1785,9 @@ pname = toxine_get_arg(tox, 1); pinfo("xine_get_input_plugin_description(%s):\n", pname); + start_watchdog(tox, "xine_get_input_plugin_description"); ipd = xine_get_input_plugin_description(tox->xine, pname); + stop_watchdog(tox); toxine_set_last_char_result(tox, ipd); if(ipd) { pinfo("description of '%s' plugin id is:\n", pname); @@ -1719,7 +1812,9 @@ error_code_clear(tox); pinfo("xine_list_audio_output_plugins():\n"); + start_watchdog(tox, "xine_list_audio_output_plugins"); aop = xine_list_audio_output_plugins(tox->xine); + stop_watchdog(tox); toxine_set_last_achar_result(tox, aop); if(aop) { @@ -1757,7 +1852,9 @@ error_code_clear(tox); pinfo("xine_list_video_output_plugins():\n"); + start_watchdog(tox, "xine_list_video_output_plugins"); vop = xine_list_video_output_plugins(tox->xine); + stop_watchdog(tox); toxine_set_last_achar_result(tox, vop); if(vop) { @@ -1818,7 +1915,9 @@ gettimeofday(&xine_event.tv, NULL); pinfo("xine_event_send(%d):\n", event_type); + start_watchdog(tox, "xine_event_send"); xine_event_send(tox->stream, &xine_event); + stop_watchdog(tox); pinfo(".\n"); } else { @@ -1838,6 +1937,7 @@ * ****** CONFIG ****** */ void _xine_config_get_first_entry(commands_t *command, toxine_t *tox, void *data) { + int result; _cfg_entry_t cfg_entry; toxine_unset_last_result(tox); @@ -1845,7 +1945,11 @@ error_code_clear(tox); pinfo("xine_config_get_first_entry():\n"); - if((xine_config_get_first_entry(tox->xine, &cfg_entry))) + start_watchdog(tox, "xine_config_get_first_entry"); + result = xine_config_get_first_entry(tox->xine, &cfg_entry); + stop_watchdog(tox); + + if(result) toxine_dump_config_entry(tox, &cfg_entry); else { perr("xine_config_get_first_entry() returned NULL\n"); @@ -1855,6 +1959,7 @@ pinfo(".\n"); } void _xine_config_get_next_entry(commands_t *command, toxine_t *tox, void *data) { + int result; _cfg_entry_t cfg_entry; toxine_unset_last_result(tox); @@ -1862,7 +1967,11 @@ error_code_clear(tox); pinfo("xine_config_get_next_entry():\n"); - if((xine_config_get_next_entry(tox->xine, &cfg_entry))) + start_watchdog(tox, "xine_config_get_next_entry"); + result = xine_config_get_next_entry(tox->xine, &cfg_entry); + stop_watchdog(tox); + + if(result) toxine_dump_config_entry(tox, &cfg_entry); else { perr("xine_config_get_next_entry() returned NULL\n"); @@ -1872,7 +1981,8 @@ pinfo(".\n"); } void _xine_config_lookup_entry(commands_t *command, toxine_t *tox, void *data) { - const char *key; + const char *key; + int result; _cfg_entry_t cfg_entry; toxine_unset_last_result(tox); @@ -1881,7 +1991,11 @@ key = toxine_get_arg(tox, 1); pinfo("xine_config_lookup_entry(%s):\n", key); - if((xine_config_lookup_entry(tox->xine, key, &cfg_entry))) + start_watchdog(tox, "xine_config_lookup_entry"); + result = xine_config_lookup_entry(tox->xine, key, &cfg_entry); + stop_watchdog(tox); + + if(result) toxine_dump_config_entry(tox, &cfg_entry); else { perr("Entry '%s' doesn't exist.\n", key); @@ -1901,6 +2015,7 @@ if(toxine_is_args(tox) >= 2) { const char *svalue; + int result; int valid_entry = 0; key = toxine_get_arg(tox, 1); @@ -1908,7 +2023,11 @@ value = atoi(((char *) svalue)); pinfo("xine_config_lookup_entry(%s):\n", key); - if((xine_config_lookup_entry(tox->xine, key, &cfg_entry))) { + start_watchdog(tox, "xine_config_lookup_entry"); + result = xine_config_lookup_entry(tox->xine, key, &cfg_entry); + stop_watchdog(tox); + + if(result) { switch(cfg_entry.type) { @@ -1936,7 +2055,9 @@ if(valid_entry) { pinfo("xine_config_update_entry(%s):\n", key); + start_watchdog(tox, "xine_config_update_entry"); xine_config_update_entry(tox->xine, &cfg_entry); + stop_watchdog(tox); pinfo(".\n"); } } @@ -1968,7 +2089,9 @@ } pinfo("xine_config_load(%s):\n", tox->configfile); + start_watchdog(tox, "xine_config_load"); xine_config_load(tox->xine, tox->configfile); + stop_watchdog(tox); pinfo(".\n"); } @@ -1983,7 +2106,9 @@ filename = toxine_get_arg(tox, 1); pinfo("xine_config_save(%s):\n", (filename) ? filename : tox->configfile); + start_watchdog(tox, "xine_config_save"); xine_config_save(tox->xine, ((filename) ? filename : tox->configfile)); + stop_watchdog(tox); pinfo(".\n"); } @@ -1994,7 +2119,9 @@ error_code_clear(tox); pinfo("xine_config_reset():\n"); + start_watchdog(tox, "xine_config_reset"); xine_config_reset(tox->xine); + stop_watchdog(tox); pinfo(".\n"); } /* @@ -2012,7 +2139,9 @@ error_code_clear(tox); pinfo("xine_get_version():\n"); + start_watchdog(tox, "xine_get_version"); xine_get_version(&major, &minor, &sub); + stop_watchdog(tox); sprintf(buffer, "%d.%d.%d", major, minor, sub); toxine_set_last_char_result(tox, buffer); @@ -2031,7 +2160,9 @@ error_code_clear(tox); pinfo("xine_get_version_string():\n"); + start_watchdog(tox, "xine_get_version_string"); result = xine_get_version_string(); + stop_watchdog(tox); if(!result) error_code_set(tox, TOX_ERR_XINE_GET_VERSION_STRING); toxine_set_last_char_result(tox, result); @@ -2052,7 +2183,9 @@ if(toxine_is_args(tox) >= 1) { if((sscanf((toxine_get_arg(tox, 1)), "%d.%d.%d", &major, &minor, &sub)) == 3) { pinfo("xine_check_version(%d,%d,%d):\n", major, minor, sub); + start_watchdog(tox, "xine_check_version"); retval = xine_check_version(major, minor, sub); + stop_watchdog(tox); if(!retval) error_code_set(tox, TOX_ERR_XINE_CHECK_VERSION); toxine_set_last_int_result(tox, retval); @@ -2068,7 +2201,9 @@ error_code_clear(tox); pinfo("xine_close():\n"); + start_watchdog(tox, "xine_close"); xine_close(tox->stream); + stop_watchdog(tox); pinfo(".\n"); tox->xine_state &= ~XINE_OPEN; } @@ -2080,13 +2215,17 @@ if(tox->event_queue) { pinfo("xine_event_dispose_queue():\n"); + start_watchdog(tox, "xine_event_dispose_queue"); xine_event_dispose_queue(tox->event_queue); + stop_watchdog(tox); pinfo(".\n"); tox->event_queue = NULL; } pinfo("xine_dispose():\n"); + start_watchdog(tox, "xine_dispose"); xine_dispose(tox->stream); + stop_watchdog(tox); tox->stream = NULL; tox->xine_state &= ~(XINE_OPEN | XINE_STREAM); pinfo(".\n"); @@ -2100,7 +2239,9 @@ error_code_clear(tox); pinfo("xine_get_file_extensions():\n"); + start_watchdog(tox, "xine_get_file_extensions"); exts = xine_get_file_extensions(tox->xine); + stop_watchdog(tox); toxine_set_last_char_result(tox, exts); pinfo("returned: '%s'\n", (exts) ? exts : "NONE"); pinfo(".\n"); @@ -2115,7 +2256,9 @@ error_code_clear(tox); pinfo("xine_get_mime_types():\n"); + start_watchdog(tox, "xine_get_mime_types"); mimes = xine_get_mime_types(tox->xine); + stop_watchdog(tox); toxine_set_last_char_result(tox, mimes); pinfo("returned: '%s'\n", (mimes) ? mimes : "NONE"); pinfo(".\n"); @@ -2143,9 +2286,13 @@ sprintf(buffer, "xine_frame-%d.frm", (unsigned int)(time(NULL))); filename = buffer; } - + + start_watchdog(tox, "xine_get_stream_info"); width = xine_get_stream_info(tox->stream,XINE_STREAM_INFO_VIDEO_WIDTH); + stop_watchdog(tox); + start_watchdog(tox, "xine_get_stream_info"); height = xine_get_stream_info(tox->stream,XINE_STREAM_INFO_VIDEO_HEIGHT); + stop_watchdog(tox); if((!width) || (!height)) { perr("Wrong frame size: %dx%d\n", width, height); @@ -2157,7 +2304,11 @@ frame = (uint8_t *) xine_xmalloc(sizeof(uint8_t) * size); pinfo("xine_get_current_frame():\n"); - if((result = xine_get_current_frame(tox->stream, &width, &height, &ratio_code, &format, frame))) { + start_watchdog(tox, "xine_get_current_frame"); + result = xine_get_current_frame(tox->stream, &width, &height, &ratio_code, &format, frame); + stop_watchdog(tox); + + if(result) { toxine_set_last_int_result(tox, result); pinfo("get frame: %dx%d, ratio %d, format %d\n", width, height, ratio_code, format); @@ -2211,14 +2362,18 @@ pinfo("Meta info:\n"); for(i = 0; meta_infos[i].name != NULL; i++) { + start_watchdog(tox, "xine_get_meta_info"); minfo = xine_get_meta_info(tox->stream, meta_infos[i].type); + stop_watchdog(tox); toxine_set_last_char_result(tox, minfo); pinfo("%s: %s\n", meta_infos[i].name, (minfo) ? (char *) minfo : "Unavailable"); } pinfo("\n"); pinfo("Stream info:\n"); for(i = 0; stream_infos[i].name != NULL; i++) { + start_watchdog(tox, "xine_get_stream_info"); iinfo = xine_get_stream_info(tox->stream, stream_infos[i].type); + stop_watchdog(tox); toxine_set_last_int_result(tox, iinfo); pinfo("%s: ", stream_infos[i].name); toxine_show_stream_info(tox, stream_infos[i].type, iinfo); |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-30 19:25:47
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24143 Modified Files: commands.c xine_commands.c Log Message: fix double xine_open() bug. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- commands.c 27 May 2004 21:23:42 -0000 1.73 +++ commands.c 30 May 2004 19:25:23 -0000 1.74 @@ -443,12 +443,16 @@ __playmrloop: toxine_set_current_mrl_from_cur(tox); error_code_clear(tox); + + pinfo("xine_open(%s):", tox->current_mrl); if(xine_open(tox->stream, tox->current_mrl)) { tox->xine_state |= XINE_OPEN; _xine_play(NULL, tox, (void *)NO_ARGS); } else error_code_set(tox, TOX_ERR_XINE_OPEN); + + pinfo(".\n"); } else { if(tox->playlist.loop && tox->playlist.num) { @@ -1281,6 +1285,7 @@ return; } + pinfo("xine_open(%s):", tox->current_mrl); if(xine_open(tox->stream, tox->current_mrl)) { tox->xine_state |= XINE_OPEN; _xine_play(command, tox, (void *)NO_ARGS); @@ -1288,6 +1293,7 @@ else error_code_set(tox, TOX_ERR_XINE_OPEN); + pinfo(".\n"); } /* Index: xine_commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/xine_commands.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- xine_commands.c 27 May 2004 00:27:39 -0000 1.46 +++ xine_commands.c 30 May 2004 19:25:23 -0000 1.47 @@ -610,6 +610,8 @@ pthread_create(&tox->playlist.end_thread, &pth_attrs, toxine_end_thread,(void *)tox); } } + + need_open = 0; } } else { |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-27 21:23:53
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24943 Modified Files: commands.c errors.c errors.h main.c Log Message: @@handle segfault. Index: commands.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/commands.c,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- commands.c 27 May 2004 00:27:39 -0000 1.72 +++ commands.c 27 May 2004 21:23:42 -0000 1.73 @@ -892,6 +892,12 @@ if(sigaction(SIGALRM, &action, NULL) != 0) fprintf(stderr, "sigaction(SIGALRM) failed: %s\n", strerror(errno)); + action.sa_handler = toxine_signals_handler; + sigemptyset(&(action.sa_mask)); + action.sa_flags = 0; + if(sigaction(SIGSEGV, &action, NULL) != 0) + fprintf(stderr, "sigaction(SIGSEGV) failed: %s\n", strerror(errno)); + if(argc) { int i; Index: errors.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/errors.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- errors.c 27 May 2004 01:08:42 -0000 1.2 +++ errors.c 27 May 2004 21:23:43 -0000 1.3 @@ -32,7 +32,7 @@ #warning Write real description { "TOX_ERR_SUCCESS", TOX_ERR_SUCCESS }, { "TOX_ERR_DEADLOCK", TOX_ERR_DEADLOCK }, - { "TOX_ERR_SEGFAULT", TOX_ERR_SEGFAULT }, + { "TOX_ERR_SIGSEGV", TOX_ERR_SIGSEGV }, { "TOX_ERR_SIGINT", TOX_ERR_SIGINT }, { "TOX_ERR_SIGTERM", TOX_ERR_SIGTERM }, { "TOX_ERR_SIGQUIT", TOX_ERR_SIGQUIT }, @@ -87,5 +87,5 @@ } } - return NULL; + return "Unknown error code."; } Index: errors.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/errors.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- errors.h 27 May 2004 01:08:42 -0000 1.2 +++ errors.h 27 May 2004 21:23:43 -0000 1.3 @@ -25,7 +25,7 @@ typedef enum { TOX_ERR_SUCCESS, /* Everything was fine */ TOX_ERR_DEADLOCK, /* Deadlock happened */ - TOX_ERR_SEGFAULT, /* SEGFAULT received */ + TOX_ERR_SIGSEGV, /* SIGSEGV received */ TOX_ERR_SIGINT, /* SIGINT received */ TOX_ERR_SIGTERM, /* SIGTERM received */ TOX_ERR_SIGQUIT, /* SIGQUIT received */ Index: main.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/main.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- main.c 27 May 2004 00:27:39 -0000 1.34 +++ main.c 27 May 2004 21:23:43 -0000 1.35 @@ -81,6 +81,11 @@ if(pid == tox->pid) { switch(sig) { + /* Segfault */ + case SIGSEGV: + exit(TOX_ERR_SIGSEGV); + break; + /* Kill the line on C-c */ case SIGINT: case SIGTERM: |
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-27 01:08:52
|
Update of /cvsroot/toxine/toxine/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5501 Modified Files: errors.c errors.h Log Message: @@remove unneeded error code Index: errors.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/errors.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- errors.c 27 May 2004 00:42:57 -0000 1.1 +++ errors.c 27 May 2004 01:08:42 -0000 1.2 @@ -47,7 +47,6 @@ { "TOX_ERR_VOP_FAILURE", TOX_ERR_VOP_FAILURE }, { "TOX_ERR_AOP_FAILURE", TOX_ERR_AOP_FAILURE }, { "TOX_ERR_WRONG_VERSION", TOX_ERR_WRONG_VERSION }, - { "TOX_ERR_XINE_GET_ERROR", TOX_ERR_XINE_GET_ERROR }, /* xine API */ { "TOX_ERR_XINE_OPEN_VIDEO_DRIVER", TOX_ERR_XINE_OPEN_VIDEO_DRIVER }, { "TOX_ERR_XINE_OPEN_AUDIO_DRIVER", TOX_ERR_XINE_OPEN_AUDIO_DRIVER }, Index: errors.h =================================================================== RCS file: /cvsroot/toxine/toxine/src/errors.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- errors.h 27 May 2004 00:42:57 -0000 1.1 +++ errors.h 27 May 2004 01:08:42 -0000 1.2 @@ -41,10 +41,8 @@ TOX_ERR_AOP_FAILURE, /* Audio Output Plugin failed to initialize */ TOX_ERR_WRONG_VERSION, /* Wrong version of xine-lib */ - - TOX_ERR_XINE_GET_ERROR = 100, /* xine_get_error returned != XINE_ERROR_NONE */ /* xine's fonctions error code, self explanatory */ - TOX_ERR_XINE_OPEN_VIDEO_DRIVER, + TOX_ERR_XINE_OPEN_VIDEO_DRIVER = 100, TOX_ERR_XINE_OPEN_AUDIO_DRIVER, TOX_ERR_XINE_STREAM_NEW, TOX_ERR_XINE_OPEN, |