]> git.sesse.net Git - vlc/commitdiff
* Got rid of TRACE and intf_DbgMsg which were seldom used anyway.
authorSam Hocevar <sam@videolan.org>
Tue, 19 Feb 2002 00:50:20 +0000 (00:50 +0000)
committerSam Hocevar <sam@videolan.org>
Tue, 19 Feb 2002 00:50:20 +0000 (00:50 +0000)
   * All intf_*Msg functions now write to stderr.
   * Implemented a message queue interface plugins can subscribe to.
   * Wrote the logger interface plugin. Usage:
      vlc -I logger:filename.log
   * Lots of fixes in the SPU renderer.

53 files changed:
Makefile
Makefile.opts.in
configure
configure.in
include/common.h
include/config.h
include/defs.h.in
include/interface.h
include/intf_msg.h
include/video.h
ipkg/patch
plugins/ac3_adec/ac3_adec.c
plugins/ac3_adec/ac3_parse.c
plugins/ac3_spdif/ac3_spdif.c
plugins/alsa/aout_alsa.c
plugins/directx/vout_events.c
plugins/dvd/input_dvd.c
plugins/ggi/ggi.c
plugins/gtk/gnome.c
plugins/lirc/lirc.c
plugins/lpcm_adec/lpcm_adec.c
plugins/macosx/aout_macosx.c
plugins/mad/mad_libmad.c
plugins/mga/xmga.c
plugins/mpeg_adec/mpeg_adec.c
plugins/mpeg_vdec/video_decoder.c
plugins/mpeg_vdec/video_parser.c
plugins/mpeg_vdec/vpar_headers.c
plugins/mpeg_vdec/vpar_synchro.c
plugins/qnx/vout_qnx.c
plugins/sdl/vout_sdl.c
plugins/spudec/spu_decoder.c
plugins/text/Makefile
plugins/text/logger.c [new file with mode: 0644]
plugins/vcd/input_vcd.c
plugins/vcd/linux_cdrom_tools.c
plugins/x11/x11.c
plugins/x11/xcommon.c
src/audio_output/aout_common.c
src/audio_output/aout_spdif.c
src/input/input.c
src/input/input_dec.c
src/input/input_programs.c
src/input/mpeg_system.c
src/interface/interface.c
src/interface/intf_msg.c
src/interface/main.c
src/misc/modules.c
src/misc/modules_plugin.h
src/video_output/video_output.c
src/video_output/video_text.c
src/video_output/vout_pictures.c
src/video_output/vout_subpictures.c

index bd0f6d894972008bc3c4fe40184b24dfc61fab43..5591ba9aa09e22f04bb9e37350733221e3f43755 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -119,6 +119,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
                qt/qt \
                sdl/sdl \
                spudec/spudec \
                qt/qt \
                sdl/sdl \
                spudec/spudec \
+               text/logger \
                text/ncurses \
                text/rc \
                vcd/vcd \
                text/ncurses \
                text/rc \
                vcd/vcd \
index 8606424850bb3f72a39dba18a2f2333bb2cc2e3f..40ce42c636faa1570e1d979c5552c29aa9530f0d 100644 (file)
@@ -35,7 +35,6 @@ ARCH = @ARCH@
 # Compilation options
 #
 DEBUG = @DEBUG@
 # Compilation options
 #
 DEBUG = @DEBUG@
-TRACE = @TRACE@
 CPROF = @CPROF@
 GPROF = @GPROF@
 OPTIMS = @OPTIMS@
 CPROF = @CPROF@
 GPROF = @GPROF@
 OPTIMS = @OPTIMS@
@@ -147,10 +146,6 @@ ifeq ($(DEBUG),1)
 PROGRAM_OPTIONS += DEBUG
 DEFINE += -DDEBUG
 endif
 PROGRAM_OPTIONS += DEBUG
 DEFINE += -DDEBUG
 endif
-ifeq ($(TRACE),1)
-PROGRAM_OPTIONS += TRACE
-DEFINE += -DTRACE
-endif
 ifeq ($(CPROF),1)
 PROGRAM_OPTIONS += CPROF
 DEFINE += -DCPROF
 ifeq ($(CPROF),1)
 PROGRAM_OPTIONS += CPROF
 DEFINE += -DCPROF
index d635156eb55373cd6bc7998f1eaf987935f5cb29..5e949b3b50fd29c009119d9ffe7126d1d22e1961 100755 (executable)
--- a/configure
+++ b/configure
@@ -28,8 +28,6 @@ ac_help="$ac_help
   --disable-altivec       Disable altivec optimizations (default enabled on PPC)"
 ac_help="$ac_help
   --enable-debug          Enable debug mode (default disabled)"
   --disable-altivec       Disable altivec optimizations (default enabled on PPC)"
 ac_help="$ac_help
   --enable-debug          Enable debug mode (default disabled)"
-ac_help="$ac_help
-  --enable-trace          Enable trace mode (default disabled)"
 ac_help="$ac_help
   --enable-gprof          Enable gprof profiling (default disabled)"
 ac_help="$ac_help
 ac_help="$ac_help
   --enable-gprof          Enable gprof profiling (default disabled)"
 ac_help="$ac_help
@@ -50,6 +48,8 @@ ac_help="$ac_help
   --enable-vcd            VCD support for Linux (default enabled)"
 ac_help="$ac_help
   --disable-dummy         dummy module (default enabled)"
   --enable-vcd            VCD support for Linux (default enabled)"
 ac_help="$ac_help
   --disable-dummy         dummy module (default enabled)"
+ac_help="$ac_help
+  --disable-logger        file logger module (default enabled)"
 ac_help="$ac_help
   --disable-null          Null module (default enabled)"
 ac_help="$ac_help
 ac_help="$ac_help
   --disable-null          Null module (default enabled)"
 ac_help="$ac_help
@@ -6234,14 +6234,6 @@ if test "${enable_debug+set}" = set; then
 fi
 
 
 fi
 
 
-TRACE=0
-# Check whether --enable-trace or --disable-trace was given.
-if test "${enable_trace+set}" = set; then
-  enableval="$enable_trace"
-   if test x$enableval = xyes; then TRACE=1; fi 
-fi
-
-
 GPROF=0
 # Check whether --enable-gprof or --disable-gprof was given.
 if test "${enable_gprof+set}" = set; then
 GPROF=0
 # Check whether --enable-gprof or --disable-gprof was given.
 if test "${enable_gprof+set}" = set; then
@@ -6277,7 +6269,7 @@ if test "${enable_pth+set}" = set; then
   enableval="$enable_pth"
    if test x$enableval = xyes; then
     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
   enableval="$enable_pth"
    if test x$enableval = xyes; then
     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
-echo "configure:6281: checking for pth_init in -lpth" >&5
+echo "configure:6273: checking for pth_init in -lpth" >&5
 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6285,7 +6277,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lpth  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6289 "configure"
+#line 6281 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6296,7 +6288,7 @@ int main() {
 pth_init()
 ; return 0; }
 EOF
 pth_init()
 ; return 0; }
 EOF
-if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6324,7 +6316,7 @@ else
 fi
 
     cat > conftest.$ac_ext <<EOF
 fi
 
     cat > conftest.$ac_ext <<EOF
-#line 6328 "configure"
+#line 6320 "configure"
 #include "confdefs.h"
 #include <pth.h>
 EOF
 #include "confdefs.h"
 #include <pth.h>
 EOF
@@ -6482,7 +6474,7 @@ fi
 if test x$enable_vcd != xno
 then
   cat > conftest.$ac_ext <<EOF
 if test x$enable_vcd != xno
 then
   cat > conftest.$ac_ext <<EOF
-#line 6486 "configure"
+#line 6478 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -6511,7 +6503,19 @@ fi
 
 if test x$enable_dummy != xno
 then
 
 if test x$enable_dummy != xno
 then
-  BUILTINS="${BUILTINS} dummy"
+  PLUGINS="${PLUGINS} dummy"
+fi
+
+# Check whether --enable-logger or --disable-logger was given.
+if test "${enable_logger+set}" = set; then
+  enableval="$enable_logger"
+  :
+fi
+
+
+if test x$enable_logger != xno
+then
+  PLUGINS="${PLUGINS} logger"
 fi
 
 # Check whether --enable-null or --disable-null was given.
 fi
 
 # Check whether --enable-null or --disable-null was given.
@@ -6523,7 +6527,7 @@ fi
 
 if test x$enable_null != xno
 then
 
 if test x$enable_null != xno
 then
-  BUILTINS="${BUILTINS} null"
+  PLUGINS="${PLUGINS} null"
 fi
 
 # Check whether --enable-rc or --disable-rc was given.
 fi
 
 # Check whether --enable-rc or --disable-rc was given.
@@ -6535,7 +6539,7 @@ fi
 
 if test x$enable_rc != xno
 then
 
 if test x$enable_rc != xno
 then
-  BUILTINS="${BUILTINS} rc"
+  PLUGINS="${PLUGINS} rc"
 fi
 
 # Check whether --with-mad or --without-mad was given.
 fi
 
 # Check whether --with-mad or --without-mad was given.
@@ -6556,17 +6560,17 @@ if test "${with_mad+set}" = set; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6560: checking for $ac_hdr" >&5
+echo "configure:6564: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6565 "configure"
+#line 6569 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6596,7 +6600,7 @@ fi
 done
 
       echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
 done
 
       echo $ac_n "checking for mad_bit_init in -lmad""... $ac_c" 1>&6
-echo "configure:6600: checking for mad_bit_init in -lmad" >&5
+echo "configure:6604: checking for mad_bit_init in -lmad" >&5
 ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo mad'_'mad_bit_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -6604,7 +6608,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmad  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lmad  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 6608 "configure"
+#line 6612 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -6615,7 +6619,7 @@ int main() {
 mad_bit_init()
 ; return 0; }
 EOF
 mad_bit_init()
 ; return 0; }
 EOF
-if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -6672,17 +6676,17 @@ then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6676: checking for $ac_hdr" >&5
+echo "configure:6680: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6681 "configure"
+#line 6685 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6720,7 +6724,7 @@ if test "${enable_esd+set}" = set; then
      # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
      # Extract the first word of "esd-config", so it can be a program name with args.
 set dummy esd-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6724: checking for $ac_word" >&5
+echo "configure:6728: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_path_ESD_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6771,7 +6775,7 @@ if test "${enable_arts+set}" = set; then
      # Extract the first word of "artsc-config", so it can be a program name with args.
 set dummy artsc-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
      # Extract the first word of "artsc-config", so it can be a program name with args.
 set dummy artsc-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6775: checking for $ac_word" >&5
+echo "configure:6779: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_path_ARTS_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -6829,17 +6833,17 @@ else
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6833: checking for $ac_hdr" >&5
+echo "configure:6837: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6838 "configure"
+#line 6842 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6884,17 +6888,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6888: checking for $ac_hdr" >&5
+echo "configure:6892: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6893 "configure"
+#line 6897 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -6937,17 +6941,17 @@ if ((test "x$enableval" != "xno") && (test x$SYS != xmingw32))
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6941: checking for $ac_hdr" >&5
+echo "configure:6945: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 6946 "configure"
+#line 6950 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7035,7 +7039,7 @@ fi
   # Extract the first word of "sdl12-config", so it can be a program name with args.
 set dummy sdl12-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "sdl12-config", so it can be a program name with args.
 set dummy sdl12-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7039: checking for $ac_word" >&5
+echo "configure:7043: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_path_SDL12_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7075,7 +7079,7 @@ fi
     # Extract the first word of "sdl11-config", so it can be a program name with args.
 set dummy sdl11-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     # Extract the first word of "sdl11-config", so it can be a program name with args.
 set dummy sdl11-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7079: checking for $ac_word" >&5
+echo "configure:7083: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_path_SDL11_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7116,7 +7120,7 @@ fi
     # Extract the first word of "sdl-config", so it can be a program name with args.
 set dummy sdl-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     # Extract the first word of "sdl-config", so it can be a program name with args.
 set dummy sdl-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7120: checking for $ac_word" >&5
+echo "configure:7124: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_path_SDL_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7162,17 +7166,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7166: checking for $ac_hdr" >&5
+echo "configure:7170: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7171 "configure"
+#line 7175 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7242,17 +7246,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7246: checking for $ac_hdr" >&5
+echo "configure:7250: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7251 "configure"
+#line 7255 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7281,7 +7285,7 @@ done
 
     else
       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
 
     else
       echo $ac_n "checking for directX headers in ${withval}""... $ac_c" 1>&6
-echo "configure:7285: checking for directX headers in ${withval}" >&5
+echo "configure:7289: checking for directX headers in ${withval}" >&5
       if test -f ${withval}/include/ddraw.h
       then
         PLUGINS="${PLUGINS} directx"
       if test -f ${withval}/include/ddraw.h
       then
         PLUGINS="${PLUGINS} directx"
@@ -7390,7 +7394,7 @@ if test "${enable_gnome+set}" = set; then
     # Extract the first word of "gnome-config", so it can be a program name with args.
 set dummy gnome-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
     # Extract the first word of "gnome-config", so it can be a program name with args.
 set dummy gnome-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7394: checking for $ac_word" >&5
+echo "configure:7398: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_path_GNOME_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7435,17 +7439,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7439: checking for $ac_hdr" >&5
+echo "configure:7443: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7444 "configure"
+#line 7448 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7505,7 +7509,7 @@ fi
   # Extract the first word of "gtk-config", so it can be a program name with args.
 set dummy gtk-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
   # Extract the first word of "gtk-config", so it can be a program name with args.
 set dummy gtk-config; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7509: checking for $ac_word" >&5
+echo "configure:7513: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -7555,17 +7559,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7559: checking for $ac_hdr" >&5
+echo "configure:7563: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7564 "configure"
+#line 7568 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7622,17 +7626,17 @@ if test x$enable_x11 != xno &&
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7626: checking for $ac_hdr" >&5
+echo "configure:7630: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7631 "configure"
+#line 7635 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7685,17 +7689,17 @@ if test x$enable_xvideo != xno &&
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7689: checking for $ac_hdr" >&5
+echo "configure:7693: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7694 "configure"
+#line 7698 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7719,7 +7723,7 @@ EOF
     saved_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
     echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
     saved_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS -L$x_libraries -lX11 -lXext"
     echo $ac_n "checking for XvSetPortAttribute in -lXv_pic""... $ac_c" 1>&6
-echo "configure:7723: checking for XvSetPortAttribute in -lXv_pic" >&5
+echo "configure:7727: checking for XvSetPortAttribute in -lXv_pic" >&5
 ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo Xv_pic'_'XvSetPortAttribute | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7727,7 +7731,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lXv_pic  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lXv_pic  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7731 "configure"
+#line 7735 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7738,7 +7742,7 @@ int main() {
 XvSetPortAttribute()
 ; return 0; }
 EOF
 XvSetPortAttribute()
 ; return 0; }
 EOF
-if { (eval echo configure:7742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7785,17 +7789,17 @@ if test x$enable_lirc = xyes
 then
   ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
 then
   ac_safe=`echo "lirc/lirc_client.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for lirc/lirc_client.h""... $ac_c" 1>&6
-echo "configure:7789: checking for lirc/lirc_client.h" >&5
+echo "configure:7793: checking for lirc/lirc_client.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7794 "configure"
+#line 7798 "configure"
 #include "confdefs.h"
 #include <lirc/lirc_client.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <lirc/lirc_client.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7812,7 +7816,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for lirc_init in -llirc_client""... $ac_c" 1>&6
-echo "configure:7816: checking for lirc_init in -llirc_client" >&5
+echo "configure:7820: checking for lirc_init in -llirc_client" >&5
 ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo lirc_client'_'lirc_init | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7820,7 +7824,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-llirc_client  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-llirc_client  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7824 "configure"
+#line 7828 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -7831,7 +7835,7 @@ int main() {
 lirc_init()
 ; return 0; }
 EOF
 lirc_init()
 ; return 0; }
 EOF
-if { (eval echo configure:7835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -7871,17 +7875,17 @@ if test "${enable_alsa+set}" = set; then
    then
      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
    then
      ac_safe=`echo "alsa/asoundlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for alsa/asoundlib.h""... $ac_c" 1>&6
-echo "configure:7875: checking for alsa/asoundlib.h" >&5
+echo "configure:7879: checking for alsa/asoundlib.h" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 7880 "configure"
+#line 7884 "configure"
 #include "confdefs.h"
 #include <alsa/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
 #include "confdefs.h"
 #include <alsa/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -7898,7 +7902,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
   echo "$ac_t""yes" 1>&6
   echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
-echo "configure:7902: checking for main in -lasound" >&5
+echo "configure:7906: checking for main in -lasound" >&5
 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -7906,14 +7910,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 7910 "configure"
+#line 7914 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:7917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -8084,7 +8088,6 @@ PLUGIN_PATH="${ac_tool_prefix}/share/videolan"
 
 
 
 
 
 
-
 
 
 trap '' 1 2 15
 
 
 trap '' 1 2 15
@@ -8283,7 +8286,6 @@ s%@ALIASES@%$ALIASES%g
 s%@INCLUDE@%$INCLUDE%g
 s%@DEBUG@%$DEBUG%g
 s%@ASM@%$ASM%g
 s%@INCLUDE@%$INCLUDE%g
 s%@DEBUG@%$DEBUG%g
 s%@ASM@%$ASM%g
-s%@TRACE@%$TRACE%g
 s%@CPROF@%$CPROF%g
 s%@GPROF@%$GPROF%g
 s%@OPTIMS@%$OPTIMS%g
 s%@CPROF@%$CPROF%g
 s%@GPROF@%$GPROF%g
 s%@OPTIMS@%$OPTIMS%g
@@ -8624,7 +8626,6 @@ vlc configuration
 -----------------
 vlc version           : ${VLC_VERSION}
 debug mode            : ${DEBUG}
 -----------------
 vlc version           : ${VLC_VERSION}
 debug mode            : ${DEBUG}
-trace mode            : ${TRACE}
 cprof/gprof support   : ${CPROF}/${GPROF}
 need builtin getopt   : ${NEED_GETOPT}
 built-in modules      :${BUILTINS}
 cprof/gprof support   : ${CPROF}/${GPROF}
 need builtin getopt   : ${NEED_GETOPT}
 built-in modules      :${BUILTINS}
index 9e7b8bf7771b2e12db5dae6319ec92010a1f3355..0a7c58b58cef523f1a5b2536ca5404d15dda5a86 100644 (file)
@@ -715,14 +715,6 @@ AC_ARG_ENABLE(debug,
 [  --enable-debug          Enable debug mode (default disabled)],
 [ if test x$enableval = xyes; then DEBUG=1; fi ])
 
 [  --enable-debug          Enable debug mode (default disabled)],
 [ if test x$enableval = xyes; then DEBUG=1; fi ])
 
-dnl
-dnl  Trace mode
-dnl
-TRACE=0
-AC_ARG_ENABLE(trace,
-[  --enable-trace          Enable trace mode (default disabled)],
-[ if test x$enableval = xyes; then TRACE=1; fi ])
-
 dnl
 dnl  Profiling
 dnl
 dnl
 dnl  Profiling
 dnl
@@ -919,7 +911,18 @@ AC_ARG_ENABLE(dummy,
 
 if test x$enable_dummy != xno
 then
 
 if test x$enable_dummy != xno
 then
-  BUILTINS="${BUILTINS} dummy"
+  PLUGINS="${PLUGINS} dummy"
+fi
+
+dnl
+dnl  log plugin
+dnl
+AC_ARG_ENABLE(logger,
+  [  --disable-logger        file logger module (default enabled)])
+
+if test x$enable_logger != xno
+then
+  PLUGINS="${PLUGINS} logger"
 fi
 
 dnl
 fi
 
 dnl
@@ -930,7 +933,7 @@ AC_ARG_ENABLE(null,
 
 if test x$enable_null != xno
 then
 
 if test x$enable_null != xno
 then
-  BUILTINS="${BUILTINS} null"
+  PLUGINS="${PLUGINS} null"
 fi
 
 dnl
 fi
 
 dnl
@@ -941,7 +944,7 @@ AC_ARG_ENABLE(rc,
 
 if test x$enable_rc != xno
 then
 
 if test x$enable_rc != xno
 then
-  BUILTINS="${BUILTINS} rc"
+  PLUGINS="${PLUGINS} rc"
 fi
 
 dnl
 fi
 
 dnl
@@ -1489,7 +1492,6 @@ AC_SUBST(ALIASES)
 AC_SUBST(INCLUDE)
 AC_SUBST(DEBUG)
 AC_SUBST(ASM)
 AC_SUBST(INCLUDE)
 AC_SUBST(DEBUG)
 AC_SUBST(ASM)
-AC_SUBST(TRACE)
 AC_SUBST(CPROF)
 AC_SUBST(GPROF)
 AC_SUBST(OPTIMS)
 AC_SUBST(CPROF)
 AC_SUBST(GPROF)
 AC_SUBST(OPTIMS)
@@ -1590,7 +1592,6 @@ vlc configuration
 -----------------
 vlc version           : ${VLC_VERSION}
 debug mode            : ${DEBUG}
 -----------------
 vlc version           : ${VLC_VERSION}
 debug mode            : ${DEBUG}
-trace mode            : ${TRACE}
 cprof/gprof support   : ${CPROF}/${GPROF}
 need builtin getopt   : ${NEED_GETOPT}
 built-in modules      :${BUILTINS}
 cprof/gprof support   : ${CPROF}/${GPROF}
 need builtin getopt   : ${NEED_GETOPT}
 built-in modules      :${BUILTINS}
index 55a91e110951856aa57c5d3d00d6a88b293301dc..ea3a14a461996b29840b7448c0256e523af4d75d 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: common.h,v 1.73 2002/02/15 13:32:52 sam Exp $
+ * $Id: common.h,v 1.74 2002/02/19 00:50:18 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -167,6 +167,7 @@ struct pgrm_descriptor_s;
 struct pes_packet_s;
 struct input_area_s;
 struct bit_stream_s;
 struct pes_packet_s;
 struct input_area_s;
 struct bit_stream_s;
+struct intf_subscription_s;
 
 /*****************************************************************************
  * Macros and inline functions
 
 /*****************************************************************************
  * Macros and inline functions
@@ -444,18 +445,13 @@ typedef struct module_symbols_s
     void   ( * main_PutIntVariable ) ( char *, int );
     void   ( * main_PutPszVariable ) ( char *, char * );
 
     void   ( * main_PutIntVariable ) ( char *, int );
     void   ( * main_PutPszVariable ) ( char *, char * );
 
-    int  ( * intf_ProcessKey ) ( struct intf_thread_s *, int );
-    void ( * intf_AssignKey )  ( struct intf_thread_s *, int, int, int );
+    struct intf_subscription_s * ( * intf_MsgSub ) ( void );
+    void ( * intf_MsgUnsub )   ( struct intf_subscription_s * );
 
     void ( * intf_Msg )        ( char *, ... );
     void ( * intf_ErrMsg )     ( char *, ... );
     void ( * intf_StatMsg )    ( char *, ... );
     void ( * intf_WarnMsg )    ( int, char *, ... );
 
     void ( * intf_Msg )        ( char *, ... );
     void ( * intf_ErrMsg )     ( char *, ... );
     void ( * intf_StatMsg )    ( char *, ... );
     void ( * intf_WarnMsg )    ( int, char *, ... );
-    void ( * intf_WarnMsgImm ) ( int, char *, ... );
-#ifdef TRACE
-    void ( * intf_DbgMsg )     ( char *, char *, int, char *, ... );
-    void ( * intf_DbgMsgImm )  ( char *, char *, int, char *, ... );
-#endif
 
     int  ( * intf_PlaylistAdd )     ( struct playlist_s *, int, const char* );
     int  ( * intf_PlaylistDelete )  ( struct playlist_s *, int );
 
     int  ( * intf_PlaylistAdd )     ( struct playlist_s *, int, const char* );
     int  ( * intf_PlaylistDelete )  ( struct playlist_s *, int );
index b77ee0fee59132018ce2fb868924033fa57cfe4f..56d107fedca726e713e835f49ea122e8335e20b0 100644 (file)
  *
  */
 
  *
  */
 
-/*****************************************************************************
- * Debugging options - define or undefine symbols
- *****************************************************************************/
-#ifdef TRACE
-/* General trace support, which depends of the TRACE define, is determined
- * in the Makefile */
-
-/* Modules specific debugging - this will produce a lot of output, but can be
- * useful to track a bug */
-//#define TRACE_INTF
-//#define TRACE_INPUT
-//#define TRACE_AUDIO
-#define TRACE_VOUT
-#define TRACE_VPAR
-
-/* Trace log file - if defined, a file can be used to store all messages. If
- * TRACE_LOG_ONLY is defined, debug messages will only be printed to the log and
- * will not appear on the screen */
-#define TRACE_LOG                       "vlc-trace.log"
-#define TRACE_LOG_ONLY
-
-#endif
-
 /*****************************************************************************
  * General configuration
  *****************************************************************************/
 /*****************************************************************************
  * General configuration
  *****************************************************************************/
 #define INTF_PATH_VAR                   "vlc_search_path"
 #define INTF_PATH_DEFAULT               ""
 
 #define INTF_PATH_VAR                   "vlc_search_path"
 #define INTF_PATH_DEFAULT               ""
 
-/* Environment variable containing the standard output method */
-#define INTF_STDOUT_VAR                 "vlc_stdout"
-#define INTF_STDOUT_DEFAULT             ""
-
 /*****************************************************************************
  * Input thread configuration
  *****************************************************************************/
 /*****************************************************************************
  * Input thread configuration
  *****************************************************************************/
 
 /* Maximal size of a message to be stored in the mesage queue,
  * it is needed when vasprintf is not avalaible */
 
 /* Maximal size of a message to be stored in the mesage queue,
  * it is needed when vasprintf is not avalaible */
-#define INTF_MAX_MSG_SIZE              512
+#define INTF_MAX_MSG_SIZE               512
 
 /* Maximal size of the message queue - in case of overflow, all messages in the
 
 /* Maximal size of the message queue - in case of overflow, all messages in the
- * queue are printed by the calling thread */
-#define INTF_MSG_QSIZE                  64
+ * queue are printed, but not sent to the threads */
+#define INTF_MSG_QSIZE                  256
 
 /* Interface warnig message level */
 #define INTF_WARNING_VAR                "vlc_warning_level"
 #define INTF_WARNING_DEFAULT            0
 
 
 /* Interface warnig message level */
 #define INTF_WARNING_VAR                "vlc_warning_level"
 #define INTF_WARNING_DEFAULT            0
 
-/* Define to enable messages queues - disabling messages queue can be useful
- * when debugging, since it allows messages which would not be printed
- * due to a crash to be printed anyway */
-#ifndef DEBUG
-#define INTF_MSG_QUEUE
-#endif
-
-/* Format of the header for debug messages. The arguments following this header
- * are the file (char *), the function (char *) and the line (int) in which the
- * message function was called */
-#define INTF_MSG_DBG_FORMAT             "## %s:%s(),%i: "
-
-/* Max number of arguments on a command line, including the function name */
-#define INTF_MAX_ARGS                   20
-
-/* Maximal size of a command line in a script */
-#define INTF_MAX_CMD_SIZE               240
-
-/* Number of memorized lines in console window text zone */
-#define INTF_CONSOLE_MAX_TEXT           100
-
-/* Maximal number of commands which can be saved in history list */
-#define INTF_CONSOLE_MAX_HISTORY        20
-
 /****************************************************************************
  * Playlist defaults
  ****************************************************************************/
 /****************************************************************************
  * Playlist defaults
  ****************************************************************************/
index 6529224e51ee083545b3428821791d27c3e123db..87c82cfe3adb985ccf1d8f72fc1a67e47912f13e 100644 (file)
 /* Define if you have the <cthreads.h> header file.  */
 #undef HAVE_CTHREADS_H
 
 /* Define if you have the <cthreads.h> header file.  */
 #undef HAVE_CTHREADS_H
 
-/* Define if you have the <directx.h> header file.  */
-#undef HAVE_DIRECTX_H
+/* Define if you have the <ddraw.h> header file.  */
+#undef HAVE_DDRAW_H
 
 /* Define if you have the <dlfcn.h> header file.  */
 #undef HAVE_DLFCN_H
 
 /* Define if you have the <dlfcn.h> header file.  */
 #undef HAVE_DLFCN_H
index a5947c210cac66432a5d3260c523a8ac249697c6..95e56afae90921118f4f0294ce75f917bb2f46ef 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
  * interface, such as message output.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: interface.h,v 1.26 2002/01/07 02:12:29 sam Exp $
+ * $Id: interface.h,v 1.27 2002/02/19 00:50:18 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -53,9 +53,58 @@ typedef struct intf_thread_s
     
 } intf_thread_t;
 
     
 } intf_thread_t;
 
+/*****************************************************************************
+ * msg_item_t
+ *****************************************************************************
+ * Store a single message. Messages have a maximal size of INTF_MSG_MSGSIZE.
+ *****************************************************************************/
+typedef struct
+{
+    int     i_type;                               /* message type, see below */
+    char *  psz_msg;                                   /* the message itself */
+
+#if 0
+    mtime_t date;                                     /* date of the message */
+    char *  psz_file;               /* file in which the function was called */
+    char *  psz_function;     /* function from which the function was called */
+    int     i_line;                 /* line at which the function was called */
+#endif
+} msg_item_t;
+
+/* Message types */
+#define INTF_MSG_STD    0                                /* standard message */
+#define INTF_MSG_ERR    1                                   /* error message */
+#define INTF_MSG_WARN   2                                 /* warning message */
+#define INTF_MSG_STAT   3                               /* statistic message */
+
+/*****************************************************************************
+ * intf_subscription_t
+ *****************************************************************************
+ * Used by interface plugins which subscribe to the message queue.
+ *****************************************************************************/
+typedef struct intf_subscription_s
+{
+    int   i_start;
+    int*  pi_stop;
+
+    msg_item_t*  p_msg;
+    vlc_mutex_t* p_lock;
+} intf_subscription_t;
+
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
-intf_thread_t * intf_Create             ( void );
-void            intf_Destroy            ( intf_thread_t * p_intf );
+intf_thread_t * intf_Create       ( void );
+void            intf_Destroy      ( intf_thread_t * p_intf );
+
+void            intf_MsgCreate    ( void );
+void            intf_MsgDestroy   ( void );
+
+#ifndef PLUGIN
+intf_subscription_t* intf_MsgSub    ( void );
+void                 intf_MsgUnsub  ( intf_subscription_t * );
+#else
+#   define intf_MsgSub p_symbols->intf_MsgSub
+#   define intf_MsgUnsub p_symbols->intf_MsgUnsub
+#endif
 
 
index f5bdbfa4294bcc6b4efd04b4bd889bed98d41416..c55fb9eaf79125a2e318e90473c836c2eeb9d728 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: intf_msg.h,v 1.17 2001/12/30 07:09:54 sam Exp $
+ * $Id: intf_msg.h,v 1.18 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-/*****************************************************************************
- * intf_DbgMsg macros and functions
- *****************************************************************************
- * The intf_DbgMsg* functions are defined as macro to be able to use the
- * compiler extensions and print the file, the function and the line number
- * from which they have been called. They call _intf_DbgMsg*() functions after
- * having added debugging informations.
- * Outside trace mode, intf_DbgMsg* functions do nothing.
- *****************************************************************************/
-#ifdef TRACE
-
-/* TRACE mode */
-void    _intf_DbgMsg        ( char *psz_file, char *psz_function, int i_line,
-                              char *psz_format, ... );
-void    _intf_DbgMsgImm     ( char *psz_file, char *psz_function, int i_line,
-                              char *psz_format, ... );
-
-#define intf_DbgMsg( format, args... ) \
-    _intf_DbgMsg( __FILE__, __FUNCTION__, __LINE__, format, ## args )
-#define intf_DbgMsgImm( format, args... ) \
-    _intf_DbgMsg( __FILE__, __FUNCTION__, __LINE__, format, ## args )
-
-#else
-
-/* Non-TRACE mode */
-#if defined( _MSC_VER )
-#   define intf_DbgMsg
-#   define intf_DbgMsgImm
-#else
-#   define intf_DbgMsg( format, args... )
-#   define intf_DbgMsgImm( format, args...)
-#endif
-
-#endif
-
-/*****************************************************************************
- * intf_FlushMsg macro and function
- *****************************************************************************
- * intf_FlushMsg is a function which flushs message queue and print all messages
- * remaining. It is only useful if INTF_MSG_QUEUE is defined. In this case, it
- * is really a function. In the other case, it is a macro doing nothing.
- *****************************************************************************/
-#ifdef INTF_MSG_QUEUE
-
-/* Message queue mode */
-void    intf_FlushMsg       ( void );
-
-#else
-
-/* Direct mode */
-#define intf_FlushMsg()     ;
-
-#endif
-
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
 #ifndef PLUGIN
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
 #ifndef PLUGIN
-p_intf_msg_t intf_MsgCreate      ( void );
-void         intf_MsgDestroy     ( void );
+void intf_Msg            ( char *psz_format, ... );
+void intf_ErrMsg         ( char *psz_format, ... );
+void intf_WarnMsg        ( int i_level, char *psz_format, ... );
+void intf_StatMsg        ( char *psz_format, ... );
 
 
-void         intf_Msg            ( char *psz_format, ... );
-void         intf_ErrMsg         ( char *psz_format, ... );
-void         intf_WarnMsg        ( int i_level, char *psz_format, ... );
-void         intf_StatMsg        ( char *psz_format, ... );
-
-void         intf_MsgImm         ( char *psz_format, ... );
-void         intf_ErrMsgImm      ( char *psz_format, ... );
-void         intf_WarnMsgImm     ( int i_level, char *psz_format, ... );
-void         intf_WarnHexDump    ( int i_level, void *p_data, int i_size );
+void intf_WarnHexDump    ( int i_level, void *p_data, int i_size );
 #else
 #else
+#   define intf_MsgSub p_symbols->intf_MsgSub
+#   define intf_MsgUnsub p_symbols->intf_MsgUnsub
+
 #   define intf_Msg p_symbols->intf_Msg
 #   define intf_ErrMsg p_symbols->intf_ErrMsg
 #   define intf_StatMsg p_symbols->intf_StatMsg
 #   define intf_WarnMsg p_symbols->intf_WarnMsg
 #   define intf_Msg p_symbols->intf_Msg
 #   define intf_ErrMsg p_symbols->intf_ErrMsg
 #   define intf_StatMsg p_symbols->intf_StatMsg
 #   define intf_WarnMsg p_symbols->intf_WarnMsg
-#   define intf_WarnMsgImm p_symbols->intf_WarnMsgImm
-#   ifdef TRACE
-#       undef  intf_DbgMsg
-#       undef  intf_DbgMsgImm
-#       define intf_DbgMsg( format, args... ) \
-        p_symbols->intf_DbgMsg( __FILE__, __FUNCTION__, \
-                                __LINE__, format, ## args )
-#       define intf_DbgMsgImm( format, args... ) \
-            p_symbols->intf_DbgMsgImm( __FILE__, __FUNCTION__, \
-                                       __LINE__, format, ## args )
-#   endif
-
 #endif
 
 #endif
 
index 52797e5d30f1db0e86facf433847d91ebcb5d35c..3c01da1b43c453da59ae65c47b30e5ee1eb7aa59 100644 (file)
@@ -4,7 +4,7 @@
  * includes all common video types and constants.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
  * includes all common video types and constants.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video.h,v 1.42 2002/02/08 15:57:29 sam Exp $
+ * $Id: video.h,v 1.43 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -318,8 +318,6 @@ typedef struct subpicture_s
     int             i_y;                   /* offset from alignment position */
     int             i_width;                                /* picture width */
     int             i_height;                              /* picture height */
     int             i_y;                   /* offset from alignment position */
     int             i_width;                                /* picture width */
     int             i_height;                              /* picture height */
-    int             i_horizontal_align;              /* horizontal alignment */
-    int             i_vertical_align;                  /* vertical alignment */
 
     /* Additionnal properties depending of the subpicture type */
     union
 
     /* Additionnal properties depending of the subpicture type */
     union
@@ -357,19 +355,3 @@ typedef struct subpicture_s
 #define READY_SUBPICTURE       2                        /* ready for display */
 #define DESTROYED_SUBPICTURE   3           /* allocated but not used anymore */
 
 #define READY_SUBPICTURE       2                        /* ready for display */
 #define DESTROYED_SUBPICTURE   3           /* allocated but not used anymore */
 
-/* Alignment types */
-#define RIGHT_ALIGN            10                 /* x is absolute for right */
-#define LEFT_ALIGN             11                  /* x is absolute for left */
-#define RIGHT_RALIGN           12      /* x is relative for right from right */
-#define LEFT_RALIGN            13        /* x is relative for left from left */
-
-#define CENTER_ALIGN           20            /* x, y are absolute for center */
-#define CENTER_RALIGN          21 /* x,y are relative for center from center */
-
-#define BOTTOM_ALIGN           30                /* y is absolute for bottom */
-#define TOP_ALIGN              31                   /* y is absolute for top */
-#define BOTTOM_RALIGN          32    /* y is relative for bottom from bottom */
-#define TOP_RALIGN             33          /* y is relative for top from top */
-#define SUBTITLE_RALIGN        34  /* y is relative for center from subtitle */
-
-
index 262f599808799f5c9e9ec20c3a667527aebd69db..3948951928564cbcde9fd0c034f0aa18459c6d68 100644 (file)
@@ -12,7 +12,7 @@
                  break;
              }
 +#else
                  break;
              }
 +#else
-+            intf_ProcessKey( p_main->p_intf, SDLK_q );
++            //intf_ProcessKey( p_main->p_intf, SDLK_q );
 +#endif
              break;
  
 +#endif
              break;
  
index 8ac89fc55f523e12cccb8c32be39df1be7143a6f..caf44b2474a7b23a3c9ce269745d61a14540b4be 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_adec.c: ac3 decoder module main file
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * ac3_adec.c: ac3 decoder module main file
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_adec.c,v 1.19 2002/02/15 13:32:52 sam Exp $
+ * $Id: ac3_adec.c,v 1.20 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *
  *
  * Authors: Michel Lespinasse <walken@zoy.org>
  *
@@ -194,9 +194,6 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
      */
     p_ac3thread->p_aout_fifo = NULL;
 
      */
     p_ac3thread->p_aout_fifo = NULL;
 
-    intf_DbgMsg ( "ac3_adec debug: ac3_adec thread (%p) initialized", 
-                  p_ac3thread );
-
     /*
      * Bit stream
      */
     /*
      * Bit stream
      */
@@ -204,8 +201,6 @@ static int InitThread( ac3dec_thread_t * p_ac3thread )
             p_ac3thread->p_config->p_decoder_fifo,
             BitstreamCallback, (void *) p_ac3thread );
     
             p_ac3thread->p_config->p_decoder_fifo,
             BitstreamCallback, (void *) p_ac3thread );
     
-    intf_DbgMsg("ac3dec debug: ac3 decoder thread %p initialized", p_ac3thread);
-    
     return( 0 );
 }
 
     return( 0 );
 }
 
@@ -217,8 +212,6 @@ static int decoder_Run ( decoder_config_t * p_config )
     ac3dec_thread_t *   p_ac3thread;
     boolean_t           b_sync = 0;
 
     ac3dec_thread_t *   p_ac3thread;
     boolean_t           b_sync = 0;
 
-    intf_DbgMsg( "ac3_adec debug: ac3_adec thread launched, initializing" );
-
     /* Allocate the memory needed to store the thread's structure */
     p_ac3thread = (ac3dec_thread_t *)memalign(16, sizeof(ac3dec_thread_t));
 
     /* Allocate the memory needed to store the thread's structure */
     p_ac3thread = (ac3dec_thread_t *)memalign(16, sizeof(ac3dec_thread_t));
 
@@ -379,8 +372,6 @@ static int decoder_Run ( decoder_config_t * p_config )
  *****************************************************************************/
 static void EndThread (ac3dec_thread_t * p_ac3thread)
 {
  *****************************************************************************/
 static void EndThread (ac3dec_thread_t * p_ac3thread)
 {
-    intf_DbgMsg ("ac3dec debug: destroying ac3 decoder thread %p", p_ac3thread);
-
     /* If the audio output fifo was created, we destroy it */
     if (p_ac3thread->p_aout_fifo != NULL)
     {
     /* If the audio output fifo was created, we destroy it */
     if (p_ac3thread->p_aout_fifo != NULL)
     {
@@ -424,8 +415,6 @@ static void EndThread (ac3dec_thread_t * p_ac3thread)
     /* Free what's left of the decoder */
     free( p_ac3thread->ac3_decoder->imdct );
     free( p_ac3thread->ac3_decoder );
     /* Free what's left of the decoder */
     free( p_ac3thread->ac3_decoder->imdct );
     free( p_ac3thread->ac3_decoder );
-
-    intf_DbgMsg( "ac3dec debug: ac3 decoder thread %p destroyed", p_ac3thread );
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
index 9f35319df67150f5e06c4ee8f6aee405c820ab38..9555fe98a9d451322435e56daff399cc44ea5f2c 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_parse.c: ac3 parsing procedures
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * ac3_parse.c: ac3 parsing procedures
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: ac3_parse.c,v 1.6 2001/12/30 07:09:54 sam Exp $
+ * $Id: ac3_parse.c,v 1.7 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Aaron Holtzman <aholtzma@engr.uvic.ca>
@@ -95,10 +95,8 @@ static const struct frmsize_s frmsizecod_tbl[] =
 static const int fscod_tbl[] = {48000, 44100, 32000};
 
 /* Some internal functions */
 static const int fscod_tbl[] = {48000, 44100, 32000};
 
 /* Some internal functions */
-#ifdef TRACE
 static void parse_bsi_stats (ac3dec_t * p_ac3dec);
 static void parse_audblk_stats (ac3dec_t * p_ac3dec);
 static void parse_bsi_stats (ac3dec_t * p_ac3dec);
 static void parse_audblk_stats (ac3dec_t * p_ac3dec);
-#endif
 
 /* Parse a syncinfo structure */
 int ac3_sync_frame (ac3dec_t * p_ac3dec, ac3_sync_info_t * p_sync_info) 
 
 /* Parse a syncinfo structure */
 int ac3_sync_frame (ac3dec_t * p_ac3dec, ac3_sync_info_t * p_sync_info) 
@@ -300,9 +298,10 @@ int parse_bsi (ac3dec_t * p_ac3dec)
     }
     p_ac3dec->total_bits_read += 25;
     
     }
     p_ac3dec->total_bits_read += 25;
     
-#ifdef TRACE
-    parse_bsi_stats (p_ac3dec);
-#endif
+    if( p_main->b_stats )
+    {
+        parse_bsi_stats (p_ac3dec);
+    }
 
     return 0;
 }
 
     return 0;
 }
@@ -777,9 +776,10 @@ int parse_audblk (ac3dec_t * p_ac3dec, int blknum)
         p_ac3dec->total_bits_read += 8 * p_ac3dec->audblk.skipl + 9;
     }
     
         p_ac3dec->total_bits_read += 8 * p_ac3dec->audblk.skipl + 9;
     }
     
-#ifdef TRACE
-    parse_audblk_stats(p_ac3dec);
-#endif
+    if( p_main->b_stats )
+    {
+        parse_audblk_stats(p_ac3dec);
+    }
     
     return 0;
 }
     
     return 0;
 }
@@ -806,7 +806,6 @@ void parse_auxdata (ac3dec_t * p_ac3dec)
     RemoveBits (&p_ac3dec->bit_stream,16);
 }
 
     RemoveBits (&p_ac3dec->bit_stream,16);
 }
 
-#ifdef TRACE
 static void parse_bsi_stats (ac3dec_t * p_ac3dec) /* Some stats */
 {  
     struct mixlev_s
 static void parse_bsi_stats (ac3dec_t * p_ac3dec) /* Some stats */
 {  
     struct mixlev_s
@@ -870,5 +869,4 @@ static void parse_audblk_stats (ac3dec_t * p_ac3dec)
             intf_ErrMsg ("%1d",p_ac3dec->audblk.blksw[i]);
     intf_ErrMsg ("]");
 }
             intf_ErrMsg ("%1d",p_ac3dec->audblk.blksw[i]);
     intf_ErrMsg ("]");
 }
-#endif
 
 
index 34e2d8f329254ff87ccc69ba5b744f7ab434fbf1..32d459c47fe1e47252ff8ac966b59d5215b7c256 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  * ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ac3_spdif.c,v 1.13 2002/02/15 13:32:52 sam Exp $
+ * $Id: ac3_spdif.c,v 1.14 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Juha Yrjola <jyrjola@cc.hut.fi>
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Juha Yrjola <jyrjola@cc.hut.fi>
@@ -109,8 +109,6 @@ static int decoder_Run( decoder_config_t * p_config )
     /* PTS of the current frame */
     mtime_t     i_current_pts = 0;
 
     /* PTS of the current frame */
     mtime_t     i_current_pts = 0;
 
-    intf_DbgMsg( "spdif debug: ac3_spdif thread created, initializing." );
-
     /* Allocate the memory needed to store the thread's structure */
     p_spdif = malloc( sizeof(ac3_spdif_thread_t) );
 
     /* Allocate the memory needed to store the thread's structure */
     p_spdif = malloc( sizeof(ac3_spdif_thread_t) );
 
@@ -136,8 +134,6 @@ static int decoder_Run( decoder_config_t * p_config )
     i_frame_time = 1000000 * AC3_FRAME_SIZE /
                              p_spdif->ac3_info.i_sample_rate;
     
     i_frame_time = 1000000 * AC3_FRAME_SIZE /
                              p_spdif->ac3_info.i_sample_rate;
     
-    intf_DbgMsg( "spdif debug: ac3_spdif thread (%p) initialized", p_spdif );
-
     while( !p_spdif->p_fifo->b_die && !p_spdif->p_fifo->b_error )
     {
         /* Handle the dates */
     while( !p_spdif->p_fifo->b_die && !p_spdif->p_fifo->b_error )
     {
         /* Handle the dates */
@@ -292,8 +288,6 @@ static int InitThread( ac3_spdif_thread_t * p_spdif )
  *****************************************************************************/
 static void EndThread( ac3_spdif_thread_t * p_spdif )
 {
  *****************************************************************************/
 static void EndThread( ac3_spdif_thread_t * p_spdif )
 {
-    intf_DbgMsg( "spdif debug: destroying thread %p", p_spdif );
-
     /* If the audio output fifo was created, we destroy it */
     if( p_spdif->p_aout_fifo != NULL )
     {
     /* If the audio output fifo was created, we destroy it */
     if( p_spdif->p_aout_fifo != NULL )
     {
@@ -309,8 +303,6 @@ static void EndThread( ac3_spdif_thread_t * p_spdif )
     /* Destroy descriptor */
     free( p_spdif->p_ac3 );
     free( p_spdif );
     /* Destroy descriptor */
     free( p_spdif->p_ac3 );
     free( p_spdif );
-    
-    intf_DbgMsg ("spdif debug: thread %p destroyed", p_spdif );
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
index 48ea8ed307ce7d0f9811de706b14db6a84278574..3ec44e0f332049c6acf4a41183e09e232952cc81 100644 (file)
@@ -2,7 +2,7 @@
  * aout_alsa.c : Alsa functions library
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
  * aout_alsa.c : Alsa functions library
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: aout_alsa.c,v 1.26 2002/02/15 13:32:52 sam Exp $
+ * $Id: aout_alsa.c,v 1.27 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org> - Original Author
  *          Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
  *
  * Authors: Henri Fallon <henri@videolan.org> - Original Author
  *          Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
@@ -90,7 +90,6 @@ static int aout_Open( aout_thread_t *p_aout )
         return( -1 );
     }
 
         return( -1 );
     }
 
-    intf_DbgMsg( "aout info: ALSA device successfully opened" );
     return( 0 );
 }
 
     return( 0 );
 }
 
@@ -339,8 +338,6 @@ static void aout_Close( aout_thread_t *p_aout )
     }
 
     free( p_aout->p_sys );
     }
 
     free( p_aout->p_sys );
-
-    intf_DbgMsg( "aout: ALSA device closed" );
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
index fcdfece54ad16d27057bbf3417f3828c175187e9..025eeb532d85ee2bf4848da351b59fff0843fed0 100644 (file)
@@ -2,7 +2,7 @@
  * vout_events.c: Windows DirectX video output events handler
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  * vout_events.c: Windows DirectX video output events handler
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: vout_events.c,v 1.10 2002/01/27 22:14:52 gbazin Exp $
+ * $Id: vout_events.c,v 1.11 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -190,8 +190,6 @@ void DirectXEventThread( vout_thread_t *p_vout )
             case '9': network_ChannelJoin( 9 ); break;
 
             default:
             case '9': network_ChannelJoin( 9 ); break;
 
             default:
-                intf_DbgMsg( "unhandled key '%c' (%i)",
-                             (char)msg.wParam, msg.wParam );
                 break;
             }
 
                 break;
             }
 
index 101495f041a2493c373ef7c63bbbc8973205c8fd..8d2cc98f191ff3f4eb559b741c223a5695528929 100644 (file)
@@ -9,7 +9,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.119 2002/02/15 13:32:53 sam Exp $
+ * $Id: input_dvd.c,v 1.120 2002/02/19 00:50:19 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -445,9 +445,8 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
         p_dvd->i_title_id =
             vts.title_inf.p_title_start[i_vts_title-1].i_title_id;
 
         p_dvd->i_title_id =
             vts.title_inf.p_title_start[i_vts_title-1].i_title_id;
 
-        intf_WarnMsgImm( 3, "dvd: title %d vts_title %d pgc %d",
-                         p_dvd->i_title, i_vts_title, p_dvd->i_title_id );
-
+        intf_WarnMsg( 3, "dvd: title %d vts_title %d pgc %d",
+                      p_dvd->i_title, i_vts_title, p_dvd->i_title_id );
 
         /*
          * Angle management
 
         /*
          * Angle management
index 346705433821642479781596228b17ad7bf2ddc3..15eecf412839b6ade5438bc3c652308d9c6a664e 100644 (file)
@@ -2,7 +2,7 @@
  * ggi.c : GGI plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
  * ggi.c : GGI plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: ggi.c,v 1.13 2002/02/15 13:32:53 sam Exp $
+ * $Id: ggi.c,v 1.14 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -469,11 +469,6 @@ static int OpenDisplay( vout_thread_t *p_vout )
         }
     }
 
         }
     }
 
-    if( p_vout->p_sys->b_must_acquire )
-    {
-        intf_DbgMsg("buffers must be acquired");
-    }
-
     /* Set graphic context colors */
     col_fg.r = col_fg.g = col_fg.b = -1;
     col_bg.r = col_bg.g = col_bg.b = 0;
     /* Set graphic context colors */
     col_fg.r = col_fg.g = col_fg.b = -1;
     col_bg.r = col_bg.g = col_bg.b = 0;
index afa145166f83299685709979dfa8d5964650eab9..4ecaeffe974f077a4c313773073e10a8d666b0b4 100644 (file)
@@ -2,7 +2,7 @@
  * gnome.c : Gnome plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
  * gnome.c : Gnome plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: gnome.c,v 1.9 2002/02/15 13:32:53 sam Exp $
+ * $Id: gnome.c,v 1.10 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *      
@@ -76,7 +76,7 @@ MODULE_INIT_START
     {
         ADD_CAPABILITY( INTF, 100 )
     }
     {
         ADD_CAPABILITY( INTF, 100 )
     }
-    ADD_SHORTCUT( "gtk" )
+    ADD_SHORTCUT( "gnome" )
     ADD_PROGRAM( "gnome-vlc" )
 MODULE_INIT_STOP
 
     ADD_PROGRAM( "gnome-vlc" )
 MODULE_INIT_STOP
 
index b881754f83ede002d0ad9a4848e2654b144d4d20..89b11b428ce0e1a6d95c5faecdf435c2ab2613f9 100644 (file)
@@ -2,7 +2,7 @@
  * lirc.c : lirc plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
  * lirc.c : lirc plugin for vlc
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: lirc.c,v 1.2 2002/02/15 13:32:53 sam Exp $
+ * $Id: lirc.c,v 1.3 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
@@ -95,9 +95,6 @@ static void intf_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int intf_Open( intf_thread_t *p_intf )
 {
  *****************************************************************************/
 static int intf_Open( intf_thread_t *p_intf )
 {
-    /* Non-buffered stdout */
-    setvbuf( stdout, (char *)NULL, _IOLBF, 0 );
-
     /* Allocate instance and initialize some members */
     p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
     if( p_intf->p_sys == NULL )
     /* Allocate instance and initialize some members */
     p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
     if( p_intf->p_sys == NULL )
index 650b5a3a6fe9250d05e4bdc51b20c5187820aff8..7b6f6f1f3eb4ebdf05e46f9bedaff23a721d101f 100644 (file)
@@ -2,7 +2,7 @@
  * lpcm_decoder_thread.c: lpcm decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * lpcm_decoder_thread.c: lpcm decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: lpcm_adec.c,v 1.11 2002/02/15 13:32:53 sam Exp $
+ * $Id: lpcm_adec.c,v 1.12 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Henri Fallon <henri@videolan.org>
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Henri Fallon <henri@videolan.org>
@@ -94,8 +94,6 @@ static int decoder_Run( decoder_config_t * p_config )
 {
     lpcmdec_thread_t *   p_lpcmdec;
 
 {
     lpcmdec_thread_t *   p_lpcmdec;
 
-    intf_DbgMsg("lpcm_adec debug: thread launched, initializing.");
-    
     /* Allocate the memory needed to store the thread's structure */
     if( (p_lpcmdec = (lpcmdec_thread_t *)malloc (sizeof(lpcmdec_thread_t)) )
             == NULL) 
     /* Allocate the memory needed to store the thread's structure */
     if( (p_lpcmdec = (lpcmdec_thread_t *)malloc (sizeof(lpcmdec_thread_t)) )
             == NULL) 
@@ -118,9 +116,6 @@ static int decoder_Run( decoder_config_t * p_config )
         return( -1 );
     }
 
         return( -1 );
     }
 
-    intf_DbgMsg( "LPCM Debug: lpcm decoder thread %p initialized\n", 
-                 p_lpcmdec );
-    
     /* lpcm decoder thread's main loop */
     while ((!p_lpcmdec->p_fifo->b_die) && (!p_lpcmdec->p_fifo->b_error))
     {
     /* lpcm decoder thread's main loop */
     while ((!p_lpcmdec->p_fifo->b_die) && (!p_lpcmdec->p_fifo->b_error))
     {
@@ -208,9 +203,6 @@ void DecodeFrame( lpcmdec_thread_t * p_lpcmdec )
         (p_lpcmdec->p_aout_fifo->l_end_frame + 1) & AOUT_FIFO_SIZE;
     vlc_cond_signal (&p_lpcmdec->p_aout_fifo->data_wait);
     vlc_mutex_unlock (&p_lpcmdec->p_aout_fifo->data_lock);
         (p_lpcmdec->p_aout_fifo->l_end_frame + 1) & AOUT_FIFO_SIZE;
     vlc_cond_signal (&p_lpcmdec->p_aout_fifo->data_wait);
     vlc_mutex_unlock (&p_lpcmdec->p_aout_fifo->data_lock);
-    
-    intf_DbgMsg( "LPCM Debug: %x", *buffer );
-
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
@@ -218,8 +210,6 @@ void DecodeFrame( lpcmdec_thread_t * p_lpcmdec )
  *****************************************************************************/
 static void EndThread( lpcmdec_thread_t * p_lpcmdec )
 {
  *****************************************************************************/
 static void EndThread( lpcmdec_thread_t * p_lpcmdec )
 {
-    intf_DbgMsg( "LPCM Debug: destroying lpcm decoder thread %p", p_lpcmdec );
-
     /* If the audio output fifo was created, we destroy it */
     if( p_lpcmdec->p_aout_fifo != NULL ) 
     {
     /* If the audio output fifo was created, we destroy it */
     if( p_lpcmdec->p_aout_fifo != NULL ) 
     {
@@ -233,6 +223,4 @@ static void EndThread( lpcmdec_thread_t * p_lpcmdec )
 
     /* Destroy descriptor */
     free( p_lpcmdec );
 
     /* Destroy descriptor */
     free( p_lpcmdec );
-
-    intf_DbgMsg( "LPCM Debug: lpcm decoder thread %p destroyed", p_lpcmdec );
 }
 }
index 75a5bca5ed25ebbb067312fc0ab172f2a7c25c48..4cc99176900304566795bf8cf452705a3a093816 100644 (file)
@@ -2,7 +2,7 @@
  * aout_darwin.c : Darwin audio output plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  * aout_darwin.c : Darwin audio output plugin
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_macosx.c,v 1.12 2002/02/15 13:32:53 sam Exp $
+ * $Id: aout_macosx.c,v 1.13 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *
  *
  * Authors: Colin Delacroix <colin@zoy.org>
  *
@@ -228,8 +228,6 @@ static int aout_SetFormat( aout_thread_t *p_aout )
 
         if( err == noErr )
         {
 
         if( err == noErr )
         {
-            intf_DbgMsg( "audio output format is %i", p_aout->i_format );
-            
             /*
              * setting format.mFormatFlags to anything but the default value 
              * doesn't seem to work. Can anybody explain that ??
             /*
              * setting format.mFormatFlags to anything but the default value 
              * doesn't seem to work. Can anybody explain that ??
@@ -243,14 +241,12 @@ static int aout_SetFormat( aout_thread_t *p_aout )
                     return( -1 );
                     
                 case AOUT_FMT_S16_LE:           /* Little endian signed 16 */
                     return( -1 );
                     
                 case AOUT_FMT_S16_LE:           /* Little endian signed 16 */
-                    intf_DbgMsg( "This means Little endian signed 16" );
                     // format.mFormatFlags &= ~kLinearPCMFormatFlagIsBigEndian;
                     intf_ErrMsg( "Audio format (LE Unsigned 16) not supported now,"
                                  "please report stream" );
                     return( -1 );
                     
                 case AOUT_FMT_S16_BE:              /* Big endian signed 16 */
                     // format.mFormatFlags &= ~kLinearPCMFormatFlagIsBigEndian;
                     intf_ErrMsg( "Audio format (LE Unsigned 16) not supported now,"
                                  "please report stream" );
                     return( -1 );
                     
                 case AOUT_FMT_S16_BE:              /* Big endian signed 16 */
-                    intf_DbgMsg( "This means big endian signed 16" );
                     // format.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian;
                     break;
                     
                     // format.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian;
                     break;
                     
@@ -261,7 +257,6 @@ static int aout_SetFormat( aout_thread_t *p_aout )
                     
                 case AOUT_FMT_U16_LE:                 /* Little endian U16 */
                     // format.mFormatFlags &= ~kLinearPCMFormatFlagIsSignedInteger;
                     
                 case AOUT_FMT_U16_LE:                 /* Little endian U16 */
                     // format.mFormatFlags &= ~kLinearPCMFormatFlagIsSignedInteger;
-                    intf_DbgMsg( "This means Little endian U16" );
                     intf_ErrMsg( "Audio format (LE Unsigned 8) not supported now,"
                                  "please report stream" );
                     return( -1 );
                     intf_ErrMsg( "Audio format (LE Unsigned 8) not supported now,"
                                  "please report stream" );
                     return( -1 );
@@ -274,7 +269,6 @@ static int aout_SetFormat( aout_thread_t *p_aout )
                     
                     break;
                 default:
                     
                     break;
                 default:
-                    intf_DbgMsg( "This means Unknown aout format" );
                     return( -1 );
             }
 
                     return( -1 );
             }
 
@@ -363,7 +357,6 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
 {
 #if WRITE_AUDIO_OUTPUT_TO_FILE
     write( p_aout->p_sys->fd, buffer, i_size );
 {
 #if WRITE_AUDIO_OUTPUT_TO_FILE
     write( p_aout->p_sys->fd, buffer, i_size );
-    intf_DbgMsg( "write() -> %d", write( p_aout->p_sys->fd, buffer, i_size ) );
 #else
     Convert16BitIntegerTo32Float( buffer, p_aout->p_sys->p_Data, i_size );
     
 #else
     Convert16BitIntegerTo32Float( buffer, p_aout->p_sys->p_Data, i_size );
     
index 15a0af6b5642cc234cb6c66bf36c5b519a426b26..f0d7dafd31929c02d2a7f655df9c64d29d4e93bd 100644 (file)
@@ -154,7 +154,6 @@ enum mad_flow libmad_input(void *data, struct mad_stream *p_libmad_stream)
  *   mad_adec_thread_t *p_mad_adec = (mad_adec_thread_t *) data;
  *
  *   intf_ErrMsg( "mad_adec: libmad_header samplerate %d", p_libmad_header->samplerate);
  *   mad_adec_thread_t *p_mad_adec = (mad_adec_thread_t *) data;
  *
  *   intf_ErrMsg( "mad_adec: libmad_header samplerate %d", p_libmad_header->samplerate);
- *   intf_DbgMsg( "mad_adec: libmad_header bitrate %d", p_libmad_header->bitrate);     
  *
  *   p_mad_adec->p_aout_fifo->l_rate = p_libmad_header->samplerate;
  *   mad_timer_add(&p_mad_adec->libmad_timer,p_libmad_header->duration);
  *
  *   p_mad_adec->p_aout_fifo->l_rate = p_libmad_header->samplerate;
  *   mad_timer_add(&p_mad_adec->libmad_timer,p_libmad_header->duration);
index ba151102d06dde0b77892d0c020662006c95a5a1..462c0b74adb461004f67d7672b61129943bd8e55 100644 (file)
@@ -2,7 +2,7 @@
  * xmga.c : X11 MGA plugin for vlc
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * xmga.c : X11 MGA plugin for vlc
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: xmga.c,v 1.4 2002/02/15 13:32:53 sam Exp $
+ * $Id: xmga.c,v 1.5 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -558,8 +558,6 @@ static int vout_Manage( vout_thread_t *p_vout )
                         case '9': network_ChannelJoin( 9 ); break;
 
                         default:
                         case '9': network_ChannelJoin( 9 ); break;
 
                         default:
-                            intf_DbgMsg( "vout: unhandled key '%c' (%i)", 
-                                         (char)i_key, i_key );
                             break;
                         }
                     }
                             break;
                         }
                     }
@@ -626,10 +624,6 @@ static int vout_Manage( vout_thread_t *p_vout )
         {
             p_main->p_intf->b_die = 1;
         }
         {
             p_main->p_intf->b_die = 1;
         }
-        else
-        {
-            intf_DbgMsg( "vout: unhandled ClientMessage received" );
-        }
     }
 
     /*
     }
 
     /*
@@ -1175,7 +1169,6 @@ static void EnableXScreenSaver( vout_thread_t *p_vout )
 {
     int dummy;
 
 {
     int dummy;
 
-    intf_DbgMsg( "vout: enabling screen saver" );
     XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
                      p_vout->p_sys->i_ss_interval,
                      p_vout->p_sys->i_ss_blanking,
     XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
                      p_vout->p_sys->i_ss_interval,
                      p_vout->p_sys->i_ss_blanking,
@@ -1207,7 +1200,6 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
                      &p_vout->p_sys->i_ss_exposure );
 
     /* Disable screen saver */
                      &p_vout->p_sys->i_ss_exposure );
 
     /* Disable screen saver */
-    intf_DbgMsg( "vout: disabling screen saver" );
     XSetScreenSaver( p_vout->p_sys->p_display, 0,
                      p_vout->p_sys->i_ss_interval,
                      p_vout->p_sys->i_ss_blanking,
     XSetScreenSaver( p_vout->p_sys->p_display, 0,
                      p_vout->p_sys->i_ss_interval,
                      p_vout->p_sys->i_ss_blanking,
@@ -1220,7 +1212,6 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
         /* Save DPMS current state */
         DPMSInfo( p_vout->p_sys->p_display, &dummy,
                   &p_vout->p_sys->b_ss_dpms );
         /* Save DPMS current state */
         DPMSInfo( p_vout->p_sys->p_display, &dummy,
                   &p_vout->p_sys->b_ss_dpms );
-        intf_DbgMsg( "vout: disabling DPMS" );
         DPMSDisable( p_vout->p_sys->p_display );
    }
 }
         DPMSDisable( p_vout->p_sys->p_display );
    }
 }
index e42a42beb4f155514da5d93bbcdbff04ca7d2072..08a34ba8807c0477d3ec793575c7a4e03e38a15c 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_adec.c: MPEG audio decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * mpeg_adec.c: MPEG audio decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: mpeg_adec.c,v 1.18 2002/02/15 13:32:53 sam Exp $
+ * $Id: mpeg_adec.c,v 1.19 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -95,8 +95,6 @@ static int decoder_Run ( decoder_config_t * p_config )
 {
     adec_thread_t   * p_adec;
     
 {
     adec_thread_t   * p_adec;
     
-    intf_DbgMsg("mpeg_adec debug: thread launched, initializing.");
-    
     /* Allocate the memory needed to store the thread's structure */
     if ( (p_adec = (adec_thread_t *)malloc (sizeof(adec_thread_t))) == NULL ) 
     {
     /* Allocate the memory needed to store the thread's structure */
     if ( (p_adec = (adec_thread_t *)malloc (sizeof(adec_thread_t))) == NULL ) 
     {
@@ -130,8 +128,6 @@ static int decoder_Run ( decoder_config_t * p_config )
        it will be created when the first frame is received */
     p_adec->p_aout_fifo = NULL;
 
        it will be created when the first frame is received */
     p_adec->p_aout_fifo = NULL;
 
-    intf_DbgMsg("mpeg_adec debug: thread initialized, decoding begins.");
-
     p_adec->i_sync = 0;
 
     /* Audio decoder thread's main loop */
     p_adec->i_sync = 0;
 
     /* Audio decoder thread's main loop */
@@ -240,8 +236,6 @@ static void DecodeThread( adec_thread_t * p_adec )
  *****************************************************************************/
 static void EndThread ( adec_thread_t *p_adec )
 {
  *****************************************************************************/
 static void EndThread ( adec_thread_t *p_adec )
 {
-    intf_DbgMsg ( "adec debug: destroying audio decoder thread %p", p_adec );
-
     /* If the audio output fifo was created, we destroy it */
     if ( p_adec->p_aout_fifo != NULL ) 
     {
     /* If the audio output fifo was created, we destroy it */
     if ( p_adec->p_aout_fifo != NULL ) 
     {
@@ -254,7 +248,5 @@ static void EndThread ( adec_thread_t *p_adec )
     }
     /* Destroy descriptor */
     free( p_adec );
     }
     /* Destroy descriptor */
     free( p_adec );
-
-    intf_DbgMsg ("adec debug: audio decoder thread %p destroyed", p_adec);
 }
 
 }
 
index c2309bbff604d5cc3ce738f472e7e5bec8d1d016..ebaf22cc91d36c71751d8280d202f211d0f4844f 100644 (file)
@@ -2,7 +2,7 @@
  * video_decoder.c : video decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * video_decoder.c : video decoder thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_decoder.c,v 1.5 2001/12/30 07:09:56 sam Exp $
+ * $Id: video_decoder.c,v 1.6 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@zoy.org>
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@zoy.org>
@@ -61,8 +61,6 @@ vdec_thread_t * vdec_CreateThread( vdec_pool_t * p_pool )
 {
     vdec_thread_t *     p_vdec;
 
 {
     vdec_thread_t *     p_vdec;
 
-    intf_DbgMsg("vdec debug: creating video decoder thread");
-
     /* Allocate the memory needed to store the thread's structure */
     if ( (p_vdec = (vdec_thread_t *)malloc( sizeof(vdec_thread_t) )) == NULL )
     {
     /* Allocate the memory needed to store the thread's structure */
     if ( (p_vdec = (vdec_thread_t *)malloc( sizeof(vdec_thread_t) )) == NULL )
     {
@@ -89,7 +87,6 @@ vdec_thread_t * vdec_CreateThread( vdec_pool_t * p_pool )
         return( NULL );
     }
 
         return( NULL );
     }
 
-    intf_DbgMsg("vdec debug: video decoder thread (%p) created", p_vdec);
     return( p_vdec );
 }
 
     return( p_vdec );
 }
 
@@ -98,8 +95,6 @@ vdec_thread_t * vdec_CreateThread( vdec_pool_t * p_pool )
  *****************************************************************************/
 void vdec_DestroyThread( vdec_thread_t *p_vdec )
 {
  *****************************************************************************/
 void vdec_DestroyThread( vdec_thread_t *p_vdec )
 {
-    intf_DbgMsg("vdec debug: requesting termination of video decoder thread %p", p_vdec);
-
     /* Ask thread to kill itself */
     p_vdec->b_die = 1;
 
     /* Ask thread to kill itself */
     p_vdec->b_die = 1;
 
@@ -122,8 +117,6 @@ void vdec_DestroyThread( vdec_thread_t *p_vdec )
  *****************************************************************************/
 void vdec_InitThread( vdec_thread_t * p_vdec )
 {
  *****************************************************************************/
 void vdec_InitThread( vdec_thread_t * p_vdec )
 {
-    intf_DbgMsg("vdec debug: initializing video decoder thread %p", p_vdec);
-
 #if !defined(SYS_BEOS)
 #   if VDEC_NICE
     /* Re-nice ourself - otherwise we would steal CPU time from the video
 #if !defined(SYS_BEOS)
 #   if VDEC_NICE
     /* Re-nice ourself - otherwise we would steal CPU time from the video
@@ -146,7 +139,6 @@ void vdec_InitThread( vdec_thread_t * p_vdec )
     p_vdec->p_pool->pf_idct_init( &p_vdec->p_idct_data );
 
     /* Mark thread as running and return */
     p_vdec->p_pool->pf_idct_init( &p_vdec->p_idct_data );
 
     /* Mark thread as running and return */
-    intf_DbgMsg("vdec debug: InitThread(%p) succeeded", p_vdec);
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
@@ -157,8 +149,6 @@ void vdec_InitThread( vdec_thread_t * p_vdec )
  *****************************************************************************/
 void vdec_EndThread( vdec_thread_t * p_vdec )
 {
  *****************************************************************************/
 void vdec_EndThread( vdec_thread_t * p_vdec )
 {
-    intf_DbgMsg("vdec debug: EndThread(%p)", p_vdec);
-
     if( p_vdec->p_idct_data != NULL )
     {
         free( p_vdec->p_idct_data );
     if( p_vdec->p_idct_data != NULL )
     {
         free( p_vdec->p_idct_data );
@@ -388,9 +378,6 @@ DECLARE_DECODEMB( vdec_DecodeMacroblock444, CHROMA_444 );
  *****************************************************************************/
 static void RunThread( vdec_thread_t *p_vdec )
 {
  *****************************************************************************/
 static void RunThread( vdec_thread_t *p_vdec )
 {
-    intf_DbgMsg("vdec debug: running video decoder thread (%p) (pid == %i)",
-                p_vdec, getpid());
-
     vdec_InitThread( p_vdec );
 
     /*
     vdec_InitThread( p_vdec );
 
     /*
index 70093a9d95735f07d8782a0fdb8e158531ef141a..da4e36afdec3a5371a62ba0ce50d6537b41980d4 100644 (file)
@@ -2,7 +2,7 @@
  * video_parser.c : video parser thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * video_parser.c : video parser thread
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_parser.c,v 1.13 2002/02/15 13:32:53 sam Exp $
+ * $Id: video_parser.c,v 1.14 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -107,8 +107,6 @@ static int decoder_Run ( decoder_config_t * p_config )
     vpar_thread_t *     p_vpar;
     boolean_t           b_error;
 
     vpar_thread_t *     p_vpar;
     boolean_t           b_error;
 
-    intf_DbgMsg( "vpar debug: video parser thread created. Initializing..." );
-
     /* Allocate the memory needed to store the thread's structure */
     if ( (p_vpar = (vpar_thread_t *)malloc( sizeof(vpar_thread_t) )) == NULL )
     {
     /* Allocate the memory needed to store the thread's structure */
     if ( (p_vpar = (vpar_thread_t *)malloc( sizeof(vpar_thread_t) )) == NULL )
     {
@@ -265,7 +263,6 @@ static int InitThread( vpar_thread_t *p_vpar )
     vpar_InitPool( p_vpar );
 
     /* Mark thread as running and return */
     vpar_InitPool( p_vpar );
 
     /* Mark thread as running and return */
-    intf_DbgMsg("vpar debug: InitThread(%p) succeeded", p_vpar);
     return( 0 );
 }
 
     return( 0 );
 }
 
@@ -277,8 +274,6 @@ static int InitThread( vpar_thread_t *p_vpar )
  *****************************************************************************/
 static void EndThread( vpar_thread_t *p_vpar )
 {
  *****************************************************************************/
 static void EndThread( vpar_thread_t *p_vpar )
 {
-    intf_DbgMsg("vpar debug: destroying video parser thread %p", p_vpar);
-
     /* Release used video buffers. */
     if( p_vpar->sequence.p_forward != NULL )
     {
     /* Release used video buffers. */
     if( p_vpar->sequence.p_forward != NULL )
     {
@@ -367,8 +362,6 @@ static void EndThread( vpar_thread_t *p_vpar )
     module_Unneed( p_vpar->p_motion_module );
 
     free( p_vpar );
     module_Unneed( p_vpar->p_motion_module );
 
     free( p_vpar );
-
-    intf_DbgMsg("vpar debug: EndThread(%p)", p_vpar);
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
@@ -388,9 +381,6 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
 
         if( p_bit_stream->p_decoder_fifo->p_first->b_discontinuity )
         {
 
         if( p_bit_stream->p_decoder_fifo->p_first->b_discontinuity )
         {
-#ifdef TRACE_VPAR
-            intf_DbgMsg( "Discontinuity in BitstreamCallback" );
-#endif
             /* Escape the current picture and reset the picture predictors. */
             p_vpar->sequence.b_expect_discontinuity = 1;
             p_vpar->picture.b_error = 1;
             /* Escape the current picture and reset the picture predictors. */
             p_vpar->sequence.b_expect_discontinuity = 1;
             p_vpar->picture.b_error = 1;
@@ -399,9 +389,6 @@ static void BitstreamCallback ( bit_stream_t * p_bit_stream,
 
     if( p_bit_stream->p_data->b_discard_payload )
     {
 
     if( p_bit_stream->p_data->b_discard_payload )
     {
-#ifdef TRACE_VPAR
-        intf_DbgMsg( "Discard payload in BitstreamCallback" );
-#endif
         /* 1 packet messed up, trash the slice. */
         p_vpar->picture.b_error = 1;
     }
         /* 1 packet messed up, trash the slice. */
         p_vpar->picture.b_error = 1;
     }
index ef1769b4e131b5d6e6f0e95c6e0d6643313a6b9d..e2649ebcf5b64d28c79792831d0fceea8633b7de 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_headers.c : headers parsing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * vpar_headers.c : headers parsing
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: vpar_headers.c,v 1.13 2002/02/13 22:10:40 sam Exp $
+ * $Id: vpar_headers.c,v 1.14 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Stéphane Borel <stef@via.ecp.fr>
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -804,7 +804,6 @@ static void PictureHeader( vpar_thread_t * p_vpar )
                                  p_vpar->picture.b_repeat_first_field ) )
                  == NULL )
         {
                                  p_vpar->picture.b_repeat_first_field ) )
                  == NULL )
         {
-            intf_DbgMsg("vpar debug: vout_CreatePicture failed, delaying");
             if( p_vpar->p_fifo->b_die || p_vpar->p_fifo->b_error )
             {
                 return;
             if( p_vpar->p_fifo->b_die || p_vpar->p_fifo->b_error )
             {
                 return;
index bad3772992484275edd0e9c59a00fcae7c0db7d2..38e1cda39200fd4ebf2dfde135f1a4810ef9ddea 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_synchro.c : frame dropping routines
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * vpar_synchro.c : frame dropping routines
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: vpar_synchro.c,v 1.5 2001/12/30 07:09:56 sam Exp $
+ * $Id: vpar_synchro.c,v 1.6 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -206,9 +206,6 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
         mtime_t         now, period, tau_yuv;
         mtime_t         pts = 0;
         boolean_t       b_decode = 0;
         mtime_t         now, period, tau_yuv;
         mtime_t         pts = 0;
         boolean_t       b_decode = 0;
-#ifdef TRACE_VPAR
-        char            p_date[MSTRTIME_MAX_SIZE];
-#endif
 
         now = mdate();
         period = 1000000 * 1001 / p_vpar->sequence.i_frame_rate
 
         now = mdate();
         period = 1000000 * 1001 / p_vpar->sequence.i_frame_rate
@@ -297,13 +294,6 @@ boolean_t vpar_SynchroChoose( vpar_thread_t * p_vpar, int i_coding_type,
             }
         }
 
             }
         }
 
-#ifdef TRACE_VPAR
-        intf_DbgMsg("vpar synchro debug: %s picture scheduled for %s, %s (%lld)",
-                    i_coding_type == B_CODING_TYPE ? "B" :
-                    (i_coding_type == P_CODING_TYPE ? "P" : "I"),
-                    mstrtime(p_date, pts), b_decode ? "decoding" : "trashed",
-                    S.p_tau[i_coding_type]);
-#endif
         if( !b_decode )
         {
             S.i_not_chosen_pic++;
         if( !b_decode )
         {
             S.i_not_chosen_pic++;
@@ -359,18 +349,6 @@ void vpar_SynchroEnd( vpar_thread_t * p_vpar, int i_coding_type,
                 p_vpar->synchro.pi_meaningful[i_coding_type]++;
             }
         }
                 p_vpar->synchro.pi_meaningful[i_coding_type]++;
             }
         }
-
-#ifdef TRACE_VPAR
-        intf_DbgMsg("vpar synchro debug: finished decoding %s (%lld)",
-                    i_coding_type == B_CODING_TYPE ? "B" :
-                    (i_coding_type == P_CODING_TYPE ? "P" : "I"), tau);
-#endif
-    }
-    else
-    {
-        intf_DbgMsg("vpar synchro debug: aborting %s",
-                    i_coding_type == B_CODING_TYPE ? "B" :
-                    (i_coding_type == P_CODING_TYPE ? "P" : "I"));
     }
 }
 
     }
 }
 
index 5d524fa9c41003422398983160b8bc4d87543836..e32d8b9dbcc377be7372e1c00e26fbdfdb0ef08a 100644 (file)
@@ -476,12 +476,6 @@ static int vout_Manage( vout_thread_t *p_vout )
                         {
                             network_ChannelJoin( i_key );
                         }
                         {
                             network_ChannelJoin( i_key );
                         }
-                        else if( intf_ProcessKey( p_main->p_intf,
-                                                    (char) i_key ) )
-                        {
-                            intf_DbgMsg( "vout: unhandled key '%c' (%i)",
-                                         (char) i_key, i_key );
-                        }
                         break;
                     }
                 }
                         break;
                     }
                 }
@@ -498,8 +492,6 @@ static int vout_Manage( vout_thread_t *p_vout )
     {
         PhDim_t dim;
 
     {
         PhDim_t dim;
 
-        intf_DbgMsg( "vout: changing full-screen status" );
-
         p_vout->b_fullscreen = !p_vout->b_fullscreen;
         p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
 
         p_vout->b_fullscreen = !p_vout->b_fullscreen;
         p_vout->i_changes &= ~VOUT_FULLSCREEN_CHANGE;
 
@@ -540,7 +532,6 @@ static int vout_Manage( vout_thread_t *p_vout )
      */
     if( p_vout->i_changes & VOUT_SIZE_CHANGE )
     {
      */
     if( p_vout->i_changes & VOUT_SIZE_CHANGE )
     {
-        intf_DbgMsg( "vout: resizing window" );
         p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
 
         if( p_vout->p_sys->i_mode != MODE_VIDEO_OVERLAY )
         p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
 
         if( p_vout->p_sys->i_mode != MODE_VIDEO_OVERLAY )
@@ -566,8 +557,6 @@ static int vout_Manage( vout_thread_t *p_vout )
      */
     if( b_repos && p_vout->p_sys->i_mode == MODE_VIDEO_OVERLAY )
     {
      */
     if( b_repos && p_vout->p_sys->i_mode == MODE_VIDEO_OVERLAY )
     {
-        intf_DbgMsg( "vout: moving video channel" );
-
         vout_End( p_vout );
         if( vout_Init( p_vout ) )
         {
         vout_End( p_vout );
         if( vout_Init( p_vout ) )
         {
@@ -670,7 +659,6 @@ static int QNXInitDisplay( p_vout_thread_t p_vout )
         hwcaps.currently_available_video_ram >= 
         ( ( minfo.width * minfo.height * minfo.bits_per_pixel ) / 8 ) )
     {
         hwcaps.currently_available_video_ram >= 
         ( ( minfo.width * minfo.height * minfo.bits_per_pixel ) / 8 ) )
     {
-        intf_DbgMsg( "vout: using video ram" );
         p_vout->p_sys->i_mode = MODE_VIDEO_MEM;
     }
 
         p_vout->p_sys->i_mode = MODE_VIDEO_MEM;
     }
 
index 50f206b817eb49a85e4bdd9cbbd4f6005de04bb2..a6fa54f576a05df360b9080855a0dba99a67c0d3 100644 (file)
@@ -2,7 +2,7 @@
  * vout_sdl.c: SDL video output display method
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * vout_sdl.c: SDL video output display method
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: vout_sdl.c,v 1.81 2002/02/15 13:32:53 sam Exp $
+ * $Id: vout_sdl.c,v 1.82 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
@@ -473,7 +473,6 @@ static int vout_Manage( vout_thread_t *p_vout )
             case SDLK_F9:  network_ChannelJoin( 9 ); break;
 
             default:
             case SDLK_F9:  network_ChannelJoin( 9 ); break;
 
             default:
-                intf_DbgMsg( "unhandled key %i", event.key.keysym.sym );
                 break;
             }
             break;
                 break;
             }
             break;
index f2847da14d28834984ae2083b92176ce320e4b2d..411d0f5a2c3636c7739099ff7ee74e3b88b1ce4a 100644 (file)
@@ -2,7 +2,7 @@
  * spu_decoder.c : spu decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
  * spu_decoder.c : spu decoder thread
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: spu_decoder.c,v 1.9 2002/02/15 13:32:53 sam Exp $
+ * $Id: spu_decoder.c,v 1.10 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -171,20 +171,15 @@ static int decoder_Run( decoder_config_t * p_config )
  *****************************************************************************/
 static int InitThread( spudec_thread_t *p_spudec )
 {
  *****************************************************************************/
 static int InitThread( spudec_thread_t *p_spudec )
 {
-    int i_retry = 0;
-
-    /* Spawn a video output if there is none */
+    /* Find an available video output */
     vlc_mutex_lock( &p_vout_bank->lock );
 
     while( p_vout_bank->i_count == 0 )
     {
         vlc_mutex_unlock( &p_vout_bank->lock );
 
     vlc_mutex_lock( &p_vout_bank->lock );
 
     while( p_vout_bank->i_count == 0 )
     {
         vlc_mutex_unlock( &p_vout_bank->lock );
 
-        if( i_retry++ > 10 )
+        if( p_spudec->p_fifo->b_die || p_spudec->p_fifo->b_error )
         {
         {
-            intf_WarnMsg( 1, "spudec: waited too long for vout, aborting" );
-            free( p_spudec );
-
             return( -1 );
         }
 
             return( -1 );
         }
 
index e4af72a3c134ac21b0fea8d6befdb903e3288d03..a90b85c303ab985e592ab44c3994041780d32c0d 100644 (file)
@@ -1,2 +1,3 @@
 ncurses_SOURCES = ncurses.c
 rc_SOURCES = rc.c
 ncurses_SOURCES = ncurses.c
 rc_SOURCES = rc.c
+logger_SOURCES = logger.c
diff --git a/plugins/text/logger.c b/plugins/text/logger.c
new file mode 100644 (file)
index 0000000..adcf0d0
--- /dev/null
@@ -0,0 +1,202 @@
+/*****************************************************************************
+ * logger.c : file logging plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2002 VideoLAN
+ * $Id: logger.c,v 1.1 2002/02/19 00:50:19 sam Exp $
+ *
+ * Authors: Samuel Hocevar <sam@zoy.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ *****************************************************************************/
+
+/*****************************************************************************
+ * Preamble
+ *****************************************************************************/
+#include <stdlib.h>                                      /* malloc(), free() */
+#include <string.h>
+
+#include <errno.h>                                                 /* ENOMEM */
+#include <stdio.h>
+
+#include <videolan/vlc.h>
+
+#include "interface.h"
+
+#define LOG_FILE "vlc.log"
+#define LOG_STRING( msg, file ) fwrite( msg, strlen( msg ), 1, file );
+
+/*****************************************************************************
+ * intf_sys_t: description and status of log interface
+ *****************************************************************************/
+typedef struct intf_sys_s
+{
+    FILE *    p_file; /* The log file */
+    intf_subscription_t *p_sub;
+
+} intf_sys_t;
+
+/*****************************************************************************
+ * Local prototypes.
+ *****************************************************************************/
+static void intf_getfunctions ( function_list_t * p_function_list );
+static int  intf_Open         ( intf_thread_t *p_intf );
+static void intf_Close        ( intf_thread_t *p_intf );
+static void intf_Run          ( intf_thread_t *p_intf );
+
+static void FlushQueue        ( intf_subscription_t *, FILE * );
+
+/*****************************************************************************
+ * Build configuration tree.
+ *****************************************************************************/
+MODULE_CONFIG_START
+MODULE_CONFIG_STOP
+
+MODULE_INIT_START
+    SET_DESCRIPTION( "file logging interface module" )
+    ADD_CAPABILITY( INTF, 1 )
+    ADD_SHORTCUT( "logger" )
+MODULE_INIT_STOP
+
+MODULE_ACTIVATE_START
+    intf_getfunctions( &p_module->p_functions->intf );
+MODULE_ACTIVATE_STOP
+
+MODULE_DEACTIVATE_START
+MODULE_DEACTIVATE_STOP
+
+/*****************************************************************************
+ * Functions exported as capabilities. They are declared as static so that
+ * we don't pollute the namespace too much.
+ *****************************************************************************/
+static void intf_getfunctions( function_list_t * p_function_list )
+{
+    p_function_list->functions.intf.pf_open  = intf_Open;
+    p_function_list->functions.intf.pf_close = intf_Close;
+    p_function_list->functions.intf.pf_run   = intf_Run;
+}
+
+/*****************************************************************************
+ * intf_Open: initialize and create stuff
+ *****************************************************************************/
+static int intf_Open( intf_thread_t *p_intf )
+{
+    char *psz_filename;
+
+    /* Allocate instance and initialize some members */
+    p_intf->p_sys = (intf_sys_t *)malloc( sizeof( intf_sys_t ) );
+    if( p_intf->p_sys == NULL )
+    {
+        intf_ErrMsg( "intf error: %s", strerror(ENOMEM) );
+        return -1;
+    }
+
+    psz_filename = main_GetPszVariable( INTF_METHOD_VAR, NULL );
+
+    while( *psz_filename && *psz_filename != ':' )
+    {
+        psz_filename++;
+    }
+
+    if( *psz_filename == ':' )
+    {
+        psz_filename++;
+    }
+    else
+    {
+        intf_ErrMsg( "intf error: no log filename provided, using `%s'",
+                     LOG_FILE );
+        psz_filename = LOG_FILE;
+    }
+
+    /* Open the log file */
+    intf_WarnMsg( 1, "intf: opening logfile `%s'", psz_filename );
+    p_intf->p_sys->p_file = fopen( psz_filename, "w" );
+
+    p_intf->p_sys->p_sub = intf_MsgSub();
+
+    if( p_intf->p_sys->p_file == NULL )
+    {
+        intf_ErrMsg( "intf error: error opening logfile `%s'", psz_filename );
+        free( p_intf->p_sys );
+        intf_MsgUnsub( p_intf->p_sys->p_sub );
+        return -1;
+    }
+
+    LOG_STRING( "-- log plugin started --\n", p_intf->p_sys->p_file );
+
+    return 0;
+}
+
+/*****************************************************************************
+ * intf_Close: destroy interface stuff
+ *****************************************************************************/
+static void intf_Close( intf_thread_t *p_intf )
+{
+    /* Flush the queue and unsubscribe from the message queue */
+    FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file );
+    intf_MsgUnsub( p_intf->p_sys->p_sub );
+
+    LOG_STRING( "-- log plugin stopped --\n", p_intf->p_sys->p_file );
+
+    /* Close the log file */
+    fclose( p_intf->p_sys->p_file );
+
+    /* Destroy structure */
+    free( p_intf->p_sys );
+}
+
+/*****************************************************************************
+ * intf_Run: rc thread
+ *****************************************************************************
+ * This part of the interface is in a separate thread so that we can call
+ * exec() from within it without annoying the rest of the program.
+ *****************************************************************************/
+static void intf_Run( intf_thread_t *p_intf )
+{
+    while( !p_intf->b_die )
+    {
+        p_intf->pf_manage( p_intf );
+
+        FlushQueue( p_intf->p_sys->p_sub, p_intf->p_sys->p_file );
+
+        msleep( INTF_IDLE_SLEEP );
+    }
+}
+
+/*****************************************************************************
+ * FlushQueue: flush the message queue into the log file
+ *****************************************************************************/
+static void FlushQueue( intf_subscription_t *p_sub, FILE *p_file )
+{
+    int i_start, i_stop;
+    char *psz_msg;
+
+    vlc_mutex_lock( p_sub->p_lock );
+    i_stop = *p_sub->pi_stop;
+    vlc_mutex_unlock( p_sub->p_lock );
+
+    /* Append all messages to log file */
+    for( i_start = p_sub->i_start; i_start < i_stop; i_start++ )
+    {
+        psz_msg = p_sub->p_msg[i_start].psz_msg;
+        LOG_STRING( psz_msg, p_file );
+        LOG_STRING( "\n", p_file );
+    }
+
+    vlc_mutex_lock( p_sub->p_lock );
+    p_sub->i_start = i_start;
+    vlc_mutex_unlock( p_sub->p_lock );
+}
+
index 2d7b8b3bf6d75e1ba1244287cd99511dd38c96da..755bbff20771ce032593ab0e902eee2db808f4b8 100644 (file)
@@ -464,8 +464,6 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
                 break; /* go to the next sector */
             }
 
                 break; /* go to the next sector */
             }
 
-            intf_DbgMsg( "packet start code : %X", i_header );
-
             switch( i_header )
             {
                 /* 0x1b9 == SYSTEM_END_CODE, it is only 4 bytes long. */
             switch( i_header )
             {
                 /* 0x1b9 == SYSTEM_END_CODE, it is only 4 bytes long. */
@@ -500,9 +498,6 @@ static int VCDRead( input_thread_t * p_input, data_packet_t ** pp_data )
                     break;
             }
 
                     break;
             }
 
-            intf_DbgMsg( "i_index : %d", i_index );
-            intf_DbgMsg( "i_packet_size : %d", i_packet_size );
-
             if ( i_index + i_packet_size > BUFFER_SIZE )
             {
                 intf_ErrMsg( "vcd error: packet too long (%i)",
             if ( i_index + i_packet_size > BUFFER_SIZE )
             {
                 intf_ErrMsg( "vcd error: packet too long (%i)",
index abafc3a10d21883e86a7e68d58e2e41f4b16de54..89657820e269e93ccd02982a977295910adcf43f 100644 (file)
@@ -116,9 +116,6 @@ int ioctl_ReadSector( int i_fd, int i_sector, byte_t * p_buffer )
     p_msf->minute =   i_dummy / (CD_FRAMES * CD_SECS);
     p_msf->second = ( i_dummy % (CD_FRAMES * CD_SECS) ) / CD_FRAMES;
     p_msf->frame =  ( i_dummy % (CD_FRAMES * CD_SECS) ) % CD_FRAMES;
     p_msf->minute =   i_dummy / (CD_FRAMES * CD_SECS);
     p_msf->second = ( i_dummy % (CD_FRAMES * CD_SECS) ) / CD_FRAMES;
     p_msf->frame =  ( i_dummy % (CD_FRAMES * CD_SECS) ) % CD_FRAMES;
-
-    intf_DbgMsg( "vcd debug: playing frame %d:%d-%d",
-                 p_msf->minute, p_msf->second, p_msf->frame);
 #undef p_msf
 
     if( ioctl(i_fd, CDROMREADRAW, p_block) == -1 )
 #undef p_msf
 
     if( ioctl(i_fd, CDROMREADRAW, p_block) == -1 )
index 2b8906b26a534aa578afff71caa830009dbc9c3b..114e745fdfcf00fe889e972ae03282745865f727 100644 (file)
@@ -2,7 +2,7 @@
  * x11.c : X11 plugin for vlc
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * x11.c : X11 plugin for vlc
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: x11.c,v 1.10 2001/12/30 07:09:56 sam Exp $
+ * $Id: x11.c,v 1.11 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -68,8 +68,6 @@ static void vout_SetPalette( p_vout_thread_t p_vout,
     int i, j;
     XColor p_colors[255];
 
     int i, j;
     XColor p_colors[255];
 
-    intf_DbgMsg( "vout: Palette change called" );
-
     /* allocate palette */
     for( i = 0, j = 255; i < 255; i++, j-- )
     {
     /* allocate palette */
     for( i = 0, j = 255; i < 255; i++, j-- )
     {
index cd2d01dc22341e606dab05995b8513a086e09b15..c52853a03c1fa41794c8a2f972efaff7c1b92fec 100644 (file)
@@ -2,7 +2,7 @@
  * xcommon.c: Functions common to the X11 and XVideo plugins
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * xcommon.c: Functions common to the X11 and XVideo plugins
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: xcommon.c,v 1.16 2002/02/15 13:32:54 sam Exp $
+ * $Id: xcommon.c,v 1.17 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -669,8 +669,6 @@ static int vout_Manage( vout_thread_t *p_vout )
                         case '9': network_ChannelJoin( 9 ); break;
 
                         default:
                         case '9': network_ChannelJoin( 9 ); break;
 
                         default:
-                            intf_DbgMsg( "vout: unhandled key '%c' (%i)", 
-                                         (char)i_key, i_key );
                             break;
                         }
                     }
                             break;
                         }
                     }
@@ -767,10 +765,6 @@ static int vout_Manage( vout_thread_t *p_vout )
         {
             p_main->p_intf->b_die = 1;
         }
         {
             p_main->p_intf->b_die = 1;
         }
-        else
-        {
-            intf_DbgMsg( "vout: unhandled ClientMessage received" );
-        }
     }
 
     /*
     }
 
     /*
@@ -792,7 +786,6 @@ static int vout_Manage( vout_thread_t *p_vout )
     if( b_resized )
     {
         /* If interface window has been resized, change vout size */
     if( b_resized )
     {
         /* If interface window has been resized, change vout size */
-        intf_DbgMsg( "vout: resizing output window" );
         p_vout->i_width =  p_vout->p_sys->i_width;
         p_vout->i_height = p_vout->p_sys->i_height;
         p_vout->i_changes |= VOUT_SIZE_CHANGE;
         p_vout->i_width =  p_vout->p_sys->i_width;
         p_vout->i_height = p_vout->p_sys->i_height;
         p_vout->i_changes |= VOUT_SIZE_CHANGE;
@@ -801,7 +794,6 @@ static int vout_Manage( vout_thread_t *p_vout )
              (p_vout->i_height != p_vout->p_sys->i_height) )
     {
         /* If video output size has changed, change interface window size */
              (p_vout->i_height != p_vout->p_sys->i_height) )
     {
         /* If video output size has changed, change interface window size */
-        intf_DbgMsg( "vout: resizing output window" );
         p_vout->p_sys->i_width =    p_vout->i_width;
         p_vout->p_sys->i_height =   p_vout->i_height;
         XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
         p_vout->p_sys->i_width =    p_vout->i_width;
         p_vout->p_sys->i_height =   p_vout->i_height;
         XResizeWindow( p_vout->p_sys->p_display, p_vout->p_sys->window,
@@ -821,7 +813,6 @@ static int vout_Manage( vout_thread_t *p_vout )
      */
     if( p_vout->i_changes & VOUT_SIZE_CHANGE )
     {
      */
     if( p_vout->i_changes & VOUT_SIZE_CHANGE )
     {
-        intf_DbgMsg( "vout info: resizing window" );
         p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
 
         /* Resize window */
         p_vout->i_changes &= ~VOUT_SIZE_CHANGE;
 
         /* Resize window */
@@ -1660,7 +1651,6 @@ static void EnableXScreenSaver( vout_thread_t *p_vout )
     int dummy;
 #endif
 
     int dummy;
 #endif
 
-    intf_DbgMsg( "vout: enabling screen saver" );
     XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
                      p_vout->p_sys->i_ss_interval,
                      p_vout->p_sys->i_ss_blanking,
     XSetScreenSaver( p_vout->p_sys->p_display, p_vout->p_sys->i_ss_timeout,
                      p_vout->p_sys->i_ss_interval,
                      p_vout->p_sys->i_ss_blanking,
@@ -1696,7 +1686,6 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
                      &p_vout->p_sys->i_ss_exposure );
 
     /* Disable screen saver */
                      &p_vout->p_sys->i_ss_exposure );
 
     /* Disable screen saver */
-    intf_DbgMsg( "vout: disabling screen saver" );
     XSetScreenSaver( p_vout->p_sys->p_display, 0,
                      p_vout->p_sys->i_ss_interval,
                      p_vout->p_sys->i_ss_blanking,
     XSetScreenSaver( p_vout->p_sys->p_display, 0,
                      p_vout->p_sys->i_ss_interval,
                      p_vout->p_sys->i_ss_blanking,
@@ -1710,7 +1699,6 @@ static void DisableXScreenSaver( vout_thread_t *p_vout )
         /* Save DPMS current state */
         DPMSInfo( p_vout->p_sys->p_display, &unused,
                   &p_vout->p_sys->b_ss_dpms );
         /* Save DPMS current state */
         DPMSInfo( p_vout->p_sys->p_display, &unused,
                   &p_vout->p_sys->b_ss_dpms );
-        intf_DbgMsg( "vout: disabling DPMS" );
         DPMSDisable( p_vout->p_sys->p_display );
    }
 #endif
         DPMSDisable( p_vout->p_sys->p_display );
    }
 #endif
index 8383b9eed8e2009df5fcc8ee072bd36fa1e86007..a8860cebc9f8e40225ce546a30bb84e3223a4763 100644 (file)
@@ -2,7 +2,7 @@
  * aout_common.c: generic audio output functions
  *****************************************************************************
  * Copyright (C) 1999-2002 VideoLAN
  * aout_common.c: generic audio output functions
  *****************************************************************************
  * Copyright (C) 1999-2002 VideoLAN
- * $Id: aout_common.c,v 1.2 2002/01/14 19:54:36 asmax Exp $
+ * $Id: aout_common.c,v 1.3 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Cyril Deguet <asmax@via.ecp.fr>
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Cyril Deguet <asmax@via.ecp.fr>
@@ -123,7 +123,7 @@ void aout_FillBuffer( aout_thread_t * p_aout, aout_fifo_t * p_fifo )
 
     default:
 
 
     default:
 
-        intf_DbgMsg("aout debug: unknown fifo type (%i)", p_fifo->i_type);
+        intf_ErrMsg("aout error: unknown fifo type (%i)", p_fifo->i_type);
         break;
     }
 }
         break;
     }
 }
@@ -204,9 +204,6 @@ static int NextFrame( aout_thread_t * p_aout, aout_fifo_t * p_fifo,
         l_rate = p_fifo->l_rate;
     }
 
         l_rate = p_fifo->l_rate;
     }
 
-    intf_DbgMsg( "aout debug: %lli (%li);", aout_date - 
-            p_fifo->date[p_fifo->l_start_frame], l_rate );
-
     InitializeIncrement( &p_fifo->unit_increment, l_rate, p_aout->l_rate );
 
     p_fifo->l_units = (((l_units - (p_fifo->l_unit -
     InitializeIncrement( &p_fifo->unit_increment, l_rate, p_aout->l_rate );
 
     p_fifo->l_units = (((l_units - (p_fifo->l_unit -
index 958003277ca877a025e38a4f57a2abd5beb52006..7063fc67453c09208b8b7fdbf188fabbb5a7199c 100644 (file)
@@ -2,7 +2,7 @@
  * aout_spdif: ac3 passthrough output
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  * aout_spdif: ac3 passthrough output
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_spdif.c,v 1.21 2001/12/30 07:09:56 sam Exp $
+ * $Id: aout_spdif.c,v 1.22 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Stéphane Borel <stef@via.ecp.fr>
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -52,8 +52,6 @@ void aout_SpdifThread( aout_thread_t * p_aout )
   mtime_t     m_old = 0;
 
 
   mtime_t     m_old = 0;
 
 
-  intf_DbgMsg( "aout debug: starting spdif output loop" );
-
   while( !p_aout->b_die )
   {
     for( i_fifo = 0 ; i_fifo < AOUT_MAX_FIFOS ; i_fifo++ )
   while( !p_aout->b_die )
   {
     for( i_fifo = 0 ; i_fifo < AOUT_MAX_FIFOS ; i_fifo++ )
@@ -103,8 +101,6 @@ void aout_SpdifThread( aout_thread_t * p_aout )
             /* check continuity */
             if( (m_play - m_old) != m_frame_time )
             {
             /* check continuity */
             if( (m_play - m_old) != m_frame_time )
             {
-              intf_DbgMsg( "aout debug: malformed frame ? (%lld)",
-                               m_play - m_old );
               mwait( m_play - m_frame_time );
             }
             else
               mwait( m_play - m_frame_time );
             }
             else
@@ -117,10 +113,6 @@ void aout_SpdifThread( aout_thread_t * p_aout )
                              (byte_t *)p_aout->buffer,
                              SPDIF_FRAME_SIZE );
           }
                              (byte_t *)p_aout->buffer,
                              SPDIF_FRAME_SIZE );
           }
-          else
-          {
-            intf_DbgMsg( "aout debug: late spdif frame" );
-          }
         }
         else
         {
         }
         else
         {
@@ -132,7 +124,6 @@ void aout_SpdifThread( aout_thread_t * p_aout )
     }
   }
 
     }
   }
 
-  intf_DbgMsg( "aout debug: exiting spdif loop" );
   vlc_mutex_lock( &p_aout->fifos_lock );
 
   for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )
   vlc_mutex_lock( &p_aout->fifos_lock );
 
   for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )
index d0e3a6ee2ac0e03873f603456546981b7e3dbbd3..8b9c8d71e22bae43a83d95b74fb55bc185e74909 100644 (file)
@@ -4,7 +4,7 @@
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * decoders.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input.c,v 1.174 2002/02/15 13:32:54 sam Exp $
+ * $Id: input.c,v 1.175 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -441,8 +441,6 @@ static void RunThread( input_thread_t *p_input )
     EndThread( p_input );
 
     DestroyThread( p_input );
     EndThread( p_input );
 
     DestroyThread( p_input );
-
-    intf_DbgMsg("input: Thread end");
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
index 5c80238acefb939679086a024614bb7a794dcd29..48e5dabae0e688e45ad386df5eaa7b02fb228c2f 100644 (file)
@@ -2,7 +2,7 @@
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * input_dec.c: Functions for the management of decoders
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dec.c,v 1.26 2002/02/15 13:32:54 sam Exp $
+ * $Id: input_dec.c,v 1.27 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -90,9 +90,6 @@ vlc_thread_t input_RunDecoder( input_thread_t * p_input,
         return( 0 );
     }
 
         return( 0 );
     }
 
-    intf_DbgMsg( "input debug: decoder \"%s\"thread created", 
-                 p_es->p_module->psz_name );
-    
     return thread_id;
 }
 
     return thread_id;
 }
 
index e2f30c0ea5604e15be27a541aa9a503d8783e1d2..9d4c23593e338d98bc232af3fc1906b4805baed4 100644 (file)
@@ -2,7 +2,7 @@
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_programs.c,v 1.70 2001/12/30 07:09:56 sam Exp $
+ * $Id: input_programs.c,v 1.71 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -142,8 +142,6 @@ pgrm_descriptor_t * input_AddProgram( input_thread_t * p_input,
     /* Where to add the pgrm */
     int i_pgrm_index = p_input->stream.i_pgrm_number;
 
     /* Where to add the pgrm */
     int i_pgrm_index = p_input->stream.i_pgrm_number;
 
-    intf_DbgMsg("Adding description for pgrm %d", i_pgrm_id);
-
     /* Add an entry to the list of program associated with the stream */
     p_input->stream.i_pgrm_number++;
     p_input->stream.pp_programs = realloc( p_input->stream.pp_programs,
     /* Add an entry to the list of program associated with the stream */
     p_input->stream.i_pgrm_number++;
     p_input->stream.pp_programs = realloc( p_input->stream.pp_programs,
@@ -208,8 +206,6 @@ void input_DelProgram( input_thread_t * p_input, pgrm_descriptor_t * p_pgrm )
 
     ASSERT( p_pgrm );
 
 
     ASSERT( p_pgrm );
 
-    intf_DbgMsg("Deleting description for pgrm %d", p_pgrm->i_number);
-
     /* Free the structures that describe the es that belongs to that program */
     while( p_pgrm->i_es_number )
     {
     /* Free the structures that describe the es that belongs to that program */
     while( p_pgrm->i_es_number )
     {
@@ -259,8 +255,6 @@ input_area_t * input_AddArea( input_thread_t * p_input )
     /* Where to add the pgrm */
     int i_area_index = p_input->stream.i_area_nb;
 
     /* Where to add the pgrm */
     int i_area_index = p_input->stream.i_area_nb;
 
-    intf_DbgMsg("Adding description for area %d", i_area_index );
-
     /* Add an entry to the list of program associated with the stream */
     p_input->stream.i_area_nb++;
     p_input->stream.pp_areas = realloc( p_input->stream.pp_areas,
     /* Add an entry to the list of program associated with the stream */
     p_input->stream.i_area_nb++;
     p_input->stream.pp_areas = realloc( p_input->stream.pp_areas,
@@ -329,8 +323,6 @@ void input_DelArea( input_thread_t * p_input, input_area_t * p_area )
 
     ASSERT( p_area );
 
 
     ASSERT( p_area );
 
-    intf_DbgMsg("Deleting description for area %d", p_area->i_id );
-
     /* Find the area in the areas table */
     for( i_area_index = 0; i_area_index < p_input->stream.i_area_nb;
          i_area_index++ )
     /* Find the area in the areas table */
     for( i_area_index = 0; i_area_index < p_input->stream.i_area_nb;
          i_area_index++ )
@@ -390,8 +382,6 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
 {
     es_descriptor_t * p_es;
 
 {
     es_descriptor_t * p_es;
 
-    intf_DbgMsg("Adding description for ES 0x%x", i_es_id);
-
     p_es = (es_descriptor_t *)malloc( sizeof(es_descriptor_t) );
     if( p_es == NULL )
     {
     p_es = (es_descriptor_t *)malloc( sizeof(es_descriptor_t) );
     if( p_es == NULL )
     {
@@ -533,13 +523,11 @@ int input_SelectES( input_thread_t * p_input, es_descriptor_t * p_es )
 {
     if( p_es == NULL )
     {
 {
     if( p_es == NULL )
     {
-        intf_ErrMsg( "Nothing to do in input_SelectES" );
+        intf_ErrMsg( "input error: nothing to do in input_SelectES" );
         return -1;
     }
 
         return -1;
     }
 
-#ifdef TRACE_INPUT
-    intf_DbgMsg( "Selecting ES 0x%x", p_es->i_id );
-#endif
+    intf_WarnMsg( 4, "input: selecting ES 0x%x", p_es->i_id );
 
     if( p_es->p_decoder_fifo != NULL )
     {
 
     if( p_es->p_decoder_fifo != NULL )
     {
@@ -607,9 +595,7 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es )
         return -1;
     }
 
         return -1;
     }
 
-#ifdef TRACE_INPUT
-    intf_DbgMsg( "Unselecting ES 0x%x", p_es->i_id );
-#endif
+    intf_WarnMsg( 4, "input: unselecting ES 0x%x", p_es->i_id );
 
     if( p_es->p_decoder_fifo == NULL )
     {
 
     if( p_es->p_decoder_fifo == NULL )
     {
@@ -640,9 +626,7 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es )
 
         if( p_input->stream.pp_selected_es == NULL )
         {
 
         if( p_input->stream.pp_selected_es == NULL )
         {
-#ifdef TRACE_INPUT
-            intf_DbgMsg( "No more selected ES in input_UnselectES" );
-#endif
+            intf_WarnMsg( 4, "input: no more selected ES in input_UnselectES" );
             return( 1 );
         }
     }
             return( 1 );
         }
     }
index 0b18a898b791222ac74466381ed92a7288157a89..5fea7a6f0ab5a27e4a9cbeeb04447675a860b89e 100644 (file)
@@ -2,7 +2,7 @@
  * mpeg_system.c: TS, PS and PES management
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * mpeg_system.c: TS, PS and PES management
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: mpeg_system.c,v 1.78 2002/01/04 14:01:34 sam Exp $
+ * $Id: mpeg_system.c,v 1.79 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Michel Lespinasse <walken@via.ecp.fr>
@@ -119,8 +119,6 @@ void input_ParsePES( input_thread_t * p_input, es_descriptor_t * p_es )
 
 #define p_pes (p_es->p_pes)
 
 
 #define p_pes (p_es->p_pes)
 
-    //intf_DbgMsg("End of PES packet %p", p_pes);
-
     /* Parse the header. The header has a variable length, but in order
      * to improve the algorithm, we will read the 14 bytes we may be
      * interested in */
     /* Parse the header. The header has a variable length, but in order
      * to improve the algorithm, we will read the 14 bytes we may be
      * interested in */
@@ -413,8 +411,6 @@ void input_GatherPES( input_thread_t * p_input, data_packet_t * p_data,
 {
 #define p_pes (p_es->p_pes)
 
 {
 #define p_pes (p_es->p_pes)
 
-    //intf_DbgMsg("PES-demultiplexing %p (%p)", p_ts_packet, p_pes);
-
     /* If we lost data, insert a NULL data packet (philosophy : 0 is quite
      * often an escape sequence in decoders, so that should make them wait
      * for the next start code). */
     /* If we lost data, insert a NULL data packet (philosophy : 0 is quite
      * often an escape sequence in decoders, so that should make them wait
      * for the next start code). */
@@ -541,7 +537,6 @@ static void DecodePSM( input_thread_t * p_input, data_packet_t * p_data )
         return;
     }
 
         return;
     }
 
-    intf_DbgMsg( "input: building PSM" );
     p_demux->b_has_PSM = 1;
     p_demux->i_PSM_version = p_data->p_demux_start[6] & 0x1F;
 
     p_demux->b_has_PSM = 1;
     p_demux->i_PSM_version = p_data->p_demux_start[6] & 0x1F;
 
index f3ce089f652c2d0423aee514ed528d9b0f3af68d..28323add9b40bbda1fa31bd78c1fea1fd459afa8 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as command line.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * interface, such as command line.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: interface.c,v 1.88 2002/02/15 13:32:54 sam Exp $
+ * $Id: interface.c,v 1.89 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -112,9 +112,6 @@ intf_thread_t* intf_Create( void )
  *****************************************************************************/
 static void intf_Manage( intf_thread_t *p_intf )
 {
  *****************************************************************************/
 static void intf_Manage( intf_thread_t *p_intf )
 {
-    /* Flush waiting messages */
-    intf_FlushMsg();
-
     /* Manage module bank */
     module_ManageBank( );
 
     /* Manage module bank */
     module_ManageBank( );
 
index f36f9915a40073a44d03a929fc7765245b06e8ea..9a1514cffd4e3c139447ef74ea193b01c8337f1a 100644 (file)
@@ -4,7 +4,7 @@
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * interface, such as message output. See config.h for output configuration.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: intf_msg.c,v 1.42 2002/01/04 14:01:35 sam Exp $
+ * $Id: intf_msg.c,v 1.43 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
 
 #include "interface.h"
 
 
 #include "interface.h"
 
-/*****************************************************************************
- * intf_msg_item_t
- *****************************************************************************
- * Store a single message. Messages have a maximal size of INTF_MSG_MSGSIZE.
- * If TRACE is defined, messages have a date field and debug messages are
- * printed with a date to allow more precise profiling.
- *****************************************************************************/
-typedef struct
-{
-    int     i_type;                               /* message type, see below */
-    char *  psz_msg;                                   /* the message itself */
-
-#ifdef TRACE
-    /* Debugging informations - in TRACE mode, debug messages have calling
-     * location information printed */
-    mtime_t date;                                     /* date of the message */
-    char *  psz_file;               /* file in which the function was called */
-    char *  psz_function;     /* function from which the function was called */
-    int     i_line;                 /* line at which the function was called */
-#endif
-} intf_msg_item_t;
-
-/* Message types */
-#define INTF_MSG_STD    0                                /* standard message */
-#define INTF_MSG_ERR    1                                   /* error message */
-#define INTF_MSG_DBG    3                                   /* debug message */
-#define INTF_MSG_WARN   4                                 /* warning message */
-#define INTF_MSG_STAT   5                               /* statistic message */
-
 
 /*****************************************************************************
  * intf_msg_t
 
 /*****************************************************************************
  * intf_msg_t
@@ -77,43 +48,29 @@ typedef struct
  * Store all data requiered by messages interfaces. It has a single reference
  * int p_main.
  *****************************************************************************/
  * Store all data requiered by messages interfaces. It has a single reference
  * int p_main.
  *****************************************************************************/
-typedef struct intf_msg_s
+typedef struct msg_bank_s
 {
 {
-#ifdef INTF_MSG_QUEUE
+    /* Message queue lock */
+    vlc_mutex_t             lock;
+
     /* Message queue */
     /* Message queue */
-    vlc_mutex_t             lock;                      /* message queue lock */
-    int                     i_count;            /* number of messages stored */
-    intf_msg_item_t         msg[INTF_MSG_QSIZE];            /* message queue */
-#endif
+    msg_item_t              msg[INTF_MSG_QSIZE];            /* message queue */
+    int i_start;
+    int i_stop;
 
 
-#ifdef TRACE_LOG
-    /* Log file */
-    FILE *                  p_log_file;                          /* log file */
-#endif
+    /* Subscribers */
+    int i_sub;
+    intf_subscription_t **pp_sub;
 
 
-#if !defined(INTF_MSG_QUEUE) && !defined(TRACE_LOG)
-    /* If neither messages queue, neither log file is used, then the structure
-     * is empty. However, empty structures are not allowed in C. Therefore, a
-     * dummy integer is used to fill it. */
-    int                     i_dummy;                        /* unused filler */
-#endif
-} intf_msg_t;
+} msg_bank_t;
+
+msg_bank_t msg_bank;
 
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
 
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
-
-static void QueueMsg        ( intf_msg_t *p_msg, int i_type,
-                              char *psz_format, va_list ap );
-static void PrintMsg        ( intf_msg_item_t *p_msg );
-#ifdef TRACE
-static void QueueDbgMsg     ( intf_msg_t *p_msg, char *psz_file,
-                              char *psz_function, int i_line,
-                              char *psz_format, va_list ap );
-#endif
-#ifdef INTF_MSG_QUEUE
-static void FlushLockedMsg  ( intf_msg_t *p_msg );
-#endif
+static void QueueMsg        ( int, char *, va_list );
+static void FlushLockedMsg  ( void );
 
 #if defined( WIN32 )
 static char *ConvertPrintfFormatString ( char *psz_format );
 
 #if defined( WIN32 )
 static char *ConvertPrintfFormatString ( char *psz_format );
@@ -125,33 +82,15 @@ static char *ConvertPrintfFormatString ( char *psz_format );
  * This functions has to be called before any call to other intf_*Msg functions.
  * It set up the locks and the message queue if it is used.
  *****************************************************************************/
  * This functions has to be called before any call to other intf_*Msg functions.
  * It set up the locks and the message queue if it is used.
  *****************************************************************************/
-p_intf_msg_t intf_MsgCreate( void )
+void intf_MsgCreate( void )
 {
 {
-    p_intf_msg_t p_msg;
-
-    /* Allocate structure */
-    p_msg = malloc( sizeof( intf_msg_t ) );
-    if( p_msg == NULL )
-    {
-        errno = ENOMEM;
-    }
-    else
-    {
-#ifdef INTF_MSG_QUEUE
     /* Message queue initialization */
     /* Message queue initialization */
-    vlc_mutex_init( &p_msg->lock );                        /* intialize lock */
-    p_msg->i_count = 0;                                    /* queue is empty */
-#endif
+    vlc_mutex_init( &msg_bank.lock );
+    msg_bank.i_start = 0;
+    msg_bank.i_stop = 0;
 
 
-    
-#ifdef TRACE_LOG
-        /* Log file initialization - on failure, file pointer will be null,
-         * and no log will be issued, but this is not considered as an
-         * error */
-        p_msg->p_log_file = fopen( TRACE_LOG, "w" );
-#endif
-    }
-    return( p_msg );
+    msg_bank.i_sub = 0;
+    msg_bank.pp_sub = NULL;
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
@@ -163,23 +102,81 @@ p_intf_msg_t intf_MsgCreate( void )
  *****************************************************************************/
 void intf_MsgDestroy( void )
 {
  *****************************************************************************/
 void intf_MsgDestroy( void )
 {
-    intf_FlushMsg();                         /* print all remaining messages */
+    /* Destroy lock */
+    vlc_mutex_destroy( &msg_bank.lock );
 
 
-#ifdef TRACE_LOG
-    /* Close log file if any */
-    if( p_main->p_msg->p_log_file != NULL )
+    if( msg_bank.i_sub )
     {
     {
-        fclose( p_main->p_msg->p_log_file );
+        fprintf( stderr, "intf error: stale interface subscribers\n" );
     }
     }
-#endif
 
 
-#ifdef INTF_MSG_QUEUE
-    /* destroy lock */
-    vlc_mutex_destroy( &p_main->p_msg->lock );
-#endif
-    
-    /* Free structure */
-    free( p_main->p_msg );
+    /* Free remaining messages */
+    FlushLockedMsg( );
+}
+
+/*****************************************************************************
+ * intf_MsgSub: subscribe to the message queue.
+ *****************************************************************************/
+intf_subscription_t *intf_MsgSub( void )
+{
+    intf_subscription_t *p_sub = malloc( sizeof( intf_subscription_t ) );
+
+    vlc_mutex_lock( &msg_bank.lock );
+
+    /* Add subscription to the list */
+    msg_bank.i_sub++;
+    msg_bank.pp_sub = realloc( msg_bank.pp_sub,
+        msg_bank.i_sub * sizeof( intf_subscription_t* ) );
+
+    msg_bank.pp_sub[ msg_bank.i_sub - 1 ] = p_sub;
+
+    p_sub->i_start = msg_bank.i_start;
+    p_sub->pi_stop = &msg_bank.i_stop;
+
+    p_sub->p_msg   = msg_bank.msg;
+    p_sub->p_lock  = &msg_bank.lock;
+
+    vlc_mutex_unlock( &msg_bank.lock );
+
+    return p_sub;
+}
+
+/*****************************************************************************
+ * intf_MsgSub: unsubscribe from the message queue.
+ *****************************************************************************/
+void intf_MsgUnsub( intf_subscription_t *p_sub )
+{
+    int i_index;
+
+    vlc_mutex_lock( &msg_bank.lock );
+
+    /* Look for the appropriate subscription */
+    for( i_index = 0; i_index < msg_bank.i_sub; i_index++ )
+    {
+        if( msg_bank.pp_sub[ i_index ] == p_sub )
+        {
+            break;
+        }
+    }
+
+    if( msg_bank.pp_sub[ i_index ] != p_sub )
+    {
+        intf_ErrMsg( "intf error: subscriber not found" );
+        vlc_mutex_unlock( &msg_bank.lock );
+        return;
+    }
+
+    /* Remove this subscription */
+    for( ; i_index < msg_bank.i_sub; i_index++ )
+    {
+        msg_bank.pp_sub[ i_index ] = msg_bank.pp_sub[ i_index+1 ];
+    }
+
+    msg_bank.i_sub--;
+    msg_bank.pp_sub = realloc( msg_bank.pp_sub,
+        msg_bank.i_sub * sizeof( intf_subscription_t* ) );
+
+    vlc_mutex_unlock( &msg_bank.lock );
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
@@ -193,7 +190,7 @@ void intf_Msg( char *psz_format, ... )
     va_list ap;
 
     va_start( ap, psz_format );
     va_list ap;
 
     va_start( ap, psz_format );
-    QueueMsg( p_main->p_msg, INTF_MSG_STD, psz_format, ap );
+    QueueMsg( INTF_MSG_STD, psz_format, ap );
     va_end( ap );
 }
 
     va_end( ap );
 }
 
@@ -208,7 +205,7 @@ void intf_ErrMsg( char *psz_format, ... )
     va_list ap;
 
     va_start( ap, psz_format );
     va_list ap;
 
     va_start( ap, psz_format );
-    QueueMsg( p_main->p_msg, INTF_MSG_ERR, psz_format, ap );
+    QueueMsg( INTF_MSG_ERR, psz_format, ap );
     va_end( ap );
 }
 
     va_end( ap );
 }
 
@@ -225,7 +222,7 @@ void intf_WarnMsg( int i_level, char *psz_format, ... )
     if( i_level <= p_main->i_warning_level )
     {
         va_start( ap, psz_format );
     if( i_level <= p_main->i_warning_level )
     {
         va_start( ap, psz_format );
-        QueueMsg( p_main->p_msg, INTF_MSG_WARN, psz_format, ap );
+        QueueMsg( INTF_MSG_WARN, psz_format, ap );
         va_end( ap );
     }
 }
         va_end( ap );
     }
 }
@@ -243,105 +240,10 @@ void intf_StatMsg( char *psz_format, ... )
     if( p_main->b_stats )
     {
         va_start( ap, psz_format );
     if( p_main->b_stats )
     {
         va_start( ap, psz_format );
-        QueueMsg( p_main->p_msg, INTF_MSG_STAT, psz_format, ap );
-        va_end( ap );
-    }
-}
-
-/*****************************************************************************
- * _intf_DbgMsg: print a debugging message                               (ok ?)
- *****************************************************************************
- * This function prints a debugging message. Compared to other intf_*Msg
- * functions, it is only defined if TRACE is defined and require a file name,
- * a function name and a line number as additionnal debugging informations. It
- * also prints a debugging header for each received line.
- *****************************************************************************/
-#ifdef TRACE
-void _intf_DbgMsg( char *psz_file, char *psz_function, int i_line,
-                   char *psz_format, ...)
-{
-    va_list ap;
-
-    va_start( ap, psz_format );
-    QueueDbgMsg( p_main->p_msg, psz_file, psz_function, i_line,
-                 psz_format, ap );
-    va_end( ap );
-}
-#endif
-
-/*****************************************************************************
- * intf_MsgImm: print a message                                          (ok ?)
- *****************************************************************************
- * This function prints a message immediately. If the queue is used, all
- * waiting messages are also printed.
- *****************************************************************************/
-void intf_MsgImm( char *psz_format, ... )
-{
-    va_list ap;
-
-    va_start( ap, psz_format );
-    QueueMsg( p_main->p_msg, INTF_MSG_STD, psz_format, ap );
-    va_end( ap );
-    intf_FlushMsg();
-}
-
-/*****************************************************************************
- * intf_ErrMsgImm: print an error message immediately                    (ok ?)
- *****************************************************************************
- * This function is the same as intf_MsgImm, except that it prints its message
- * on stderr.
- *****************************************************************************/
-void intf_ErrMsgImm(char *psz_format, ...)
-{
-    va_list ap;
-
-    va_start( ap, psz_format );
-    QueueMsg( p_main->p_msg, INTF_MSG_ERR, psz_format, ap );
-    va_end( ap );
-    intf_FlushMsg();
-}
-
-/*****************************************************************************
- * intf_WarnMsgImm : print a warning message
- *****************************************************************************
- * This function is the same as intf_MsgImm, except that it concerns warning
- * messages for testing purpose.
- *****************************************************************************/
-void intf_WarnMsgImm( int i_level, char *psz_format, ... )
-{
-    va_list ap;
-
-    if( i_level <= p_main->i_warning_level )
-    {
-        va_start( ap, psz_format );
-        QueueMsg( p_main->p_msg, INTF_MSG_WARN, psz_format, ap );
+        QueueMsg( INTF_MSG_STAT, psz_format, ap );
         va_end( ap );
     }
         va_end( ap );
     }
-    intf_FlushMsg();
-}
-
-
-
-/*****************************************************************************
- * _intf_DbgMsgImm: print a debugging message immediately                (ok ?)
- *****************************************************************************
- * This function is the same as intf_DbgMsgImm, except that it prints its
- * message immediately. It should only be called through the macro
- * intf_DbgMsgImm().
- *****************************************************************************/
-#ifdef TRACE
-void _intf_DbgMsgImm( char *psz_file, char *psz_function, int i_line,
-                      char *psz_format, ...)
-{
-    va_list ap;
-
-    va_start( ap, psz_format );
-    QueueDbgMsg( p_main->p_msg, psz_file, psz_function, i_line,
-                 psz_format, ap );
-    va_end( ap );
-    intf_FlushMsg();
 }
 }
-#endif
 
 /*****************************************************************************
  * intf_WarnHexDump : print a hexadecimal dump of a memory area
 
 /*****************************************************************************
  * intf_WarnHexDump : print a hexadecimal dump of a memory area
@@ -380,23 +282,6 @@ void intf_WarnHexDump( int i_level, void *p_data, int i_size )
     intf_WarnMsg( i_level, "hexdump: %i bytes dumped", i_size );
 }
 
     intf_WarnMsg( i_level, "hexdump: %i bytes dumped", i_size );
 }
 
-/*****************************************************************************
- * intf_FlushMsg                                                        (ok ?)
- *****************************************************************************
- * Print all messages remaining in queue: get lock and call FlushLockedMsg.
- * This function does nothing if the message queue isn't used.
- * This function is only implemented if message queue is used. If not, it is
- * an empty macro.
- *****************************************************************************/
-#ifdef INTF_MSG_QUEUE
-void intf_FlushMsg( void )
-{
-    vlc_mutex_lock( &p_main->p_msg->lock );                      /* get lock */
-    FlushLockedMsg( p_main->p_msg );                       /* flush messages */
-    vlc_mutex_unlock( &p_main->p_msg->lock );              /* give lock back */
-}
-#endif
-
 /* following functions are local */
 
 /*****************************************************************************
 /* following functions are local */
 
 /*****************************************************************************
@@ -407,282 +292,123 @@ void intf_FlushMsg( void )
  * is full. If the message can't be converted to string in memory, it exit the
  * program. If the queue is not used, it prints the message immediately.
  *****************************************************************************/
  * is full. If the message can't be converted to string in memory, it exit the
  * program. If the queue is not used, it prints the message immediately.
  *****************************************************************************/
-static void QueueMsg( intf_msg_t *p_msg, int i_type, char *psz_format, va_list ap )
+static void QueueMsg( int i_type, char *psz_format, va_list ap )
 {
     char *                  psz_str;             /* formatted message string */
 {
     char *                  psz_str;             /* formatted message string */
-    intf_msg_item_t *       p_msg_item;                /* pointer to message */
+    msg_item_t *            p_item;                /* pointer to message */
 #ifdef WIN32
     char *                  psz_temp;
 #endif
 
 #ifdef WIN32
     char *                  psz_temp;
 #endif
 
-#ifndef INTF_MSG_QUEUE /*................................... instant mode ...*/
-    intf_msg_item_t         msg_item;                             /* message */
-    p_msg_item =           &msg_item;
-#endif /*....................................................................*/
-
     /*
      * Convert message to string
      */
     /*
      * Convert message to string
      */
-
 #ifdef HAVE_VASPRINTF
     vasprintf( &psz_str, psz_format, ap );
 #else
     psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE );
 #endif
 #ifdef HAVE_VASPRINTF
     vasprintf( &psz_str, psz_format, ap );
 #else
     psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE );
 #endif
+
     if( psz_str == NULL )
     {
     if( psz_str == NULL )
     {
-        fprintf(stderr, "warning: can't store following message (%s): ",
+        fprintf(stderr, "intf warning: can't store following message (%s): ",
                 strerror(errno) );
         vfprintf(stderr, psz_format, ap );
         fprintf(stderr, "\n" );
         exit( errno );
     }
                 strerror(errno) );
         vfprintf(stderr, psz_format, ap );
         fprintf(stderr, "\n" );
         exit( errno );
     }
+
 #ifndef HAVE_VASPRINTF
 #ifndef HAVE_VASPRINTF
-#ifdef WIN32
+#   ifdef WIN32
     psz_temp = ConvertPrintfFormatString(psz_format);
     vsprintf( psz_str, psz_temp, ap );
     free( psz_temp );
     psz_temp = ConvertPrintfFormatString(psz_format);
     vsprintf( psz_str, psz_temp, ap );
     free( psz_temp );
-#else
+#   else
     vsprintf( psz_str, psz_format, ap );
     vsprintf( psz_str, psz_format, ap );
-#endif /* WIN32 */
-#endif /* HAVE_VASPRINTF */
-
-#ifdef INTF_MSG_QUEUE /*...................................... queue mode ...*/
-    vlc_mutex_lock( &p_msg->lock );                              /* get lock */
-    if( p_msg->i_count == INTF_MSG_QSIZE )          /* flush queue if needed */
-    {
-#ifdef DEBUG               /* in debug mode, queue overflow causes a warning */
-        fprintf(stderr, "warning: message queue overflow\n" );
-#endif
-        FlushLockedMsg( p_msg );
-    }
-    p_msg_item = p_msg->msg + p_msg->i_count++;            /* select message */
-#endif /*.............................................. end of queue mode ...*/
-
-    /*
-     * Fill message information fields
-     */
-    p_msg_item->i_type =     i_type;
-    p_msg_item->psz_msg =    psz_str;
-#ifdef TRACE    
-    p_msg_item->date =       mdate();
+#   endif
 #endif
 
 #endif
 
-#ifdef INTF_MSG_QUEUE /*......................................... queue mode */
-    vlc_mutex_unlock( &p_msg->lock );                      /* give lock back */
-#else /*....................................................... instant mode */
-    PrintMsg( p_msg_item );                                 /* print message */
-    free( psz_str );                                    /* free message data */
-#endif /*....................................................................*/
-}
-
-/*****************************************************************************
- * QueueDbgMsg: add a message to a queue with debugging informations
- *****************************************************************************
- * This function is the same as QueueMsg, except that it is only defined when
- * TRACE is define, and require additionnal debugging informations.
- *****************************************************************************/
-#ifdef TRACE
-static void QueueDbgMsg(intf_msg_t *p_msg, char *psz_file, char *psz_function,
-                        int i_line, char *psz_format, va_list ap)
-{
-    char *                  psz_str;             /* formatted message string */
-    intf_msg_item_t *       p_msg_item;                /* pointer to message */
-#ifdef WIN32
-    char *                  psz_temp;
-#endif
+    /* Put message in queue */
+    vlc_mutex_lock( &msg_bank.lock );
 
 
-#ifndef INTF_MSG_QUEUE /*................................... instant mode ...*/
-    intf_msg_item_t         msg_item;                             /* message */
-    p_msg_item =           &msg_item;
-#endif /*....................................................................*/
+    /* Send the message to stderr */
+    fprintf( stderr, "%s\n", psz_str );
 
 
-    /*
-     * Convert message to string
-     */
-#ifdef HAVE_VASPRINTF
-    vasprintf( &psz_str, psz_format, ap );
-#else
-    psz_str = (char*) malloc( INTF_MAX_MSG_SIZE );
-#endif
-    if( psz_str == NULL )
+    if( ((msg_bank.i_stop - msg_bank.i_start + 1) % INTF_MSG_QSIZE) == 0 )
     {
     {
-        fprintf(stderr, "warning: can't store following message (%s): ",
-                strerror(errno) );
-        fprintf(stderr, INTF_MSG_DBG_FORMAT, psz_file, psz_function, i_line );
-        vfprintf(stderr, psz_format, ap );
-        fprintf(stderr, "\n" );
-        exit( errno );
-    }
-#ifndef HAVE_VASPRINTF
-#ifdef WIN32
-    psz_temp = ConvertPrintfFormatString(psz_format);
-    vsprintf( psz_str, psz_temp, ap );
-    free( psz_temp );
-#else
-    vsprintf( psz_str, psz_format, ap );
-#endif /* WIN32 */
-#endif /* HAVE_VASPRINTF */
+        FlushLockedMsg( );
 
 
-#ifdef INTF_MSG_QUEUE /*...................................... queue mode ...*/
-    vlc_mutex_lock( &p_msg->lock );                              /* get lock */
-    if( p_msg->i_count == INTF_MSG_QSIZE )          /* flush queue if needed */
-    {
-        fprintf(stderr, "warning: message queue overflow\n" );
-        FlushLockedMsg( p_msg );
+        if( ((msg_bank.i_stop - msg_bank.i_start + 1) % INTF_MSG_QSIZE) == 0 )
+        {
+            fprintf( stderr, "intf warning: message queue overflow\n" );
+            vlc_mutex_unlock( &msg_bank.lock );
+            return;
+        }
     }
     }
-    p_msg_item = p_msg->msg + p_msg->i_count++;            /* select message */
-#endif /*.............................................. end of queue mode ...*/
 
 
-    /*
-     * Fill message information fields
-     */
-    p_msg_item->i_type =       INTF_MSG_DBG;
-    p_msg_item->psz_msg =      psz_str;
-    p_msg_item->psz_file =     psz_file;
-    p_msg_item->psz_function = psz_function;
-    p_msg_item->i_line =       i_line;
-    p_msg_item->date =         mdate();
-
-#ifdef INTF_MSG_QUEUE /*......................................... queue mode */
-    vlc_mutex_unlock( &p_msg->lock );                      /* give lock back */
-#else /*....................................................... instant mode */
-    PrintMsg( p_msg_item );                                 /* print message */
-    free( psz_str );                                    /* free message data */
-#endif /*....................................................................*/
-}
-#endif
+    p_item = msg_bank.msg + msg_bank.i_stop;
+    msg_bank.i_stop = (msg_bank.i_stop + 1) % INTF_MSG_QSIZE;
 
 
-/*****************************************************************************
- * FlushLockedMsg                                                       (ok ?)
- *****************************************************************************
- * Print all messages remaining in queue. MESSAGE QUEUE MUST BE LOCKED, since
- * this function does not check the lock. This function is only defined if
- * INTF_MSG_QUEUE is defined.
- *****************************************************************************/
-#ifdef INTF_MSG_QUEUE
-static void FlushLockedMsg ( intf_msg_t *p_msg )
-{
-    int i_index;
+    /* Fill message information fields */
+    p_item->i_type =     i_type;
+    p_item->psz_msg =    psz_str;
 
 
-    for( i_index = 0; i_index < p_msg->i_count; i_index++ )
-    {
-        /* Print message and free message data */
-        PrintMsg( &p_msg->msg[i_index] );
-        free( p_msg->msg[i_index].psz_msg );
-    }
-
-    p_msg->i_count = 0;
+    vlc_mutex_unlock( &msg_bank.lock );
 }
 }
-#endif
 
 /*****************************************************************************
 
 /*****************************************************************************
- * PrintMsg: print a message                                             (ok ?)
+ * FlushLockedMsg                                                       (ok ?)
  *****************************************************************************
  *****************************************************************************
- * Print a single message. The message data is not freed. This function exists
- * in two version. The TRACE version prints a date with each message, and is
- * able to log messages (if TRACE_LOG is defined).
- * The normal one just prints messages to the screen.
+ * Print all messages remaining in queue. MESSAGE QUEUE MUST BE LOCKED, since
+ * this function does not check the lock.
  *****************************************************************************/
  *****************************************************************************/
-#ifdef TRACE
-
-static void PrintMsg( intf_msg_item_t *p_msg )
+static void FlushLockedMsg ( void )
 {
 {
-    char    psz_date[MSTRTIME_MAX_SIZE];            /* formatted time buffer */
-    int     i_msg_len = MSTRTIME_MAX_SIZE + strlen(p_msg->psz_msg) + 200;
-    char   *psz_msg;                                       /* message buffer */
+    int i_index, i_start, i_stop;
 
 
-    psz_msg = malloc( sizeof( char ) * i_msg_len );
+    /* Get the maximum message index that can be freed */
+    i_stop = msg_bank.i_stop;
 
 
-    /* Check if allocation succeeded */
-    if( psz_msg == NULL )
+    /* Check until which value we can free messages */
+    for( i_index = 0; i_index < msg_bank.i_sub; i_index++ )
     {
     {
-        fprintf( stderr, "error: not enough memory for message %s\n",
-                 p_msg->psz_msg );
-        return;
+        i_start = msg_bank.pp_sub[ i_index ]->i_start;
+
+        /* If this subscriber is late, we don't free messages before
+         * his i_start value, otherwise he'll miss messages */
+        if(   ( i_start < i_stop
+               && (msg_bank.i_stop <= i_start || i_stop <= msg_bank.i_stop) )
+           || ( i_stop < i_start
+               && (i_stop <= msg_bank.i_stop && msg_bank.i_stop <= i_start) ) )
+        {
+            i_stop = i_start;
+        }
     }
 
     }
 
-    /* Format message - the message is formatted here because in case the log
-     * file is used, it avoids another format string parsing */
-    switch( p_msg->i_type )
+    /* Free message data */
+    if( msg_bank.i_start <= i_stop )
     {
     {
-    case INTF_MSG_STD:                                   /* regular messages */
-    case INTF_MSG_STAT:
-    case INTF_MSG_ERR:
-        snprintf( psz_msg, i_msg_len, "%s", p_msg->psz_msg );
-        break;
-
-    case INTF_MSG_WARN:                                   /* Warning message */
-        mstrtime( psz_date, p_msg->date );
-        snprintf( psz_msg, i_msg_len, "(%s) %s",
-                  psz_date, p_msg->psz_msg );
-
-        break;
-        
-    case INTF_MSG_DBG:                                     /* debug messages */
-        mstrtime( psz_date, p_msg->date );
-        snprintf( psz_msg, i_msg_len, "(%s) " INTF_MSG_DBG_FORMAT "%s",
-                  psz_date, p_msg->psz_file, p_msg->psz_function, p_msg->i_line,
-                  p_msg->psz_msg );
-        break;
+        i_index = msg_bank.i_start;
     }
     }
-
-    /*
-     * Print messages
-     */
-    switch( p_msg->i_type )
+    else
     {
     {
-    case INTF_MSG_STD:                                  /* standard messages */
-    case INTF_MSG_STAT:
-        fprintf( stdout, "%s\n", psz_msg );
-        break;
-    case INTF_MSG_ERR:                                     /* error messages */
-    case INTF_MSG_WARN:
-#ifndef TRACE_LOG_ONLY
-    case INTF_MSG_DBG:                                 /* debugging messages */
-#endif
-        fprintf( stderr, "%s\n", psz_msg );
-        break;
-    }
+        for( i_index = msg_bank.i_start; i_index < INTF_MSG_QSIZE; i_index++ )
+        {
+            free( msg_bank.msg[i_index].psz_msg );
+        }
 
 
-#ifdef TRACE_LOG
-    /* Append all messages to log file */
-    if( p_main->p_msg->p_log_file != NULL )
-    {
-        fwrite( psz_msg, strlen( psz_msg ), 1, p_main->p_msg->p_log_file );
-        fwrite( "\n", 1, 1, p_main->p_msg->p_log_file );
+        i_index = 0;
     }
     }
-#endif
 
 
-    /* Free the message */
-    free( psz_msg );
-}
-
-#else
-
-static void PrintMsg( intf_msg_item_t *p_msg )
-{
-    /*
-     * Print messages on screen
-     */
-    switch( p_msg->i_type )
+    for( ; i_index < i_stop; i_index++ )
     {
     {
-    case INTF_MSG_STD:                                  /* standard messages */
-    case INTF_MSG_STAT:
-    case INTF_MSG_DBG:                                     /* debug messages */
-        fprintf( stdout, "%s\n", p_msg->psz_msg );
-        break;
-    case INTF_MSG_ERR:                                     /* error messages */
-    case INTF_MSG_WARN:
-        fprintf( stderr, "%s\n", p_msg->psz_msg );        /* warning message */
-        break;
+        free( msg_bank.msg[i_index].psz_msg );
     }
     }
-}
-
-#endif
 
 
+    /* Update the new start value */
+    msg_bank.i_start = i_index;
+}
 
 
-#if defined( WIN32 )
 /*****************************************************************************
  * ConvertPrintfFormatString: replace all occurrences of %ll with %I64 in the
  *                            printf format string.
 /*****************************************************************************
  * ConvertPrintfFormatString: replace all occurrences of %ll with %I64 in the
  *                            printf format string.
@@ -694,6 +420,7 @@ static void PrintMsg( intf_msg_item_t *p_msg )
  * a "long long" type!!!
  * By the way, if we don't do this we can sometimes end up with segfaults.
  *****************************************************************************/
  * a "long long" type!!!
  * By the way, if we don't do this we can sometimes end up with segfaults.
  *****************************************************************************/
+#if defined( WIN32 )
 static char *ConvertPrintfFormatString( char *psz_format )
 {
   int i, i_counter=0, i_pos=0;
 static char *ConvertPrintfFormatString( char *psz_format )
 {
   int i, i_counter=0, i_pos=0;
@@ -715,7 +442,7 @@ static char *ConvertPrintfFormatString( char *psz_format )
   psz_dest = malloc( strlen(psz_format) + i_counter + 1 );
   if( psz_dest == NULL )
   {
   psz_dest = malloc( strlen(psz_format) + i_counter + 1 );
   if( psz_dest == NULL )
   {
-      fprintf(stderr, "warning: malloc failed in ConvertPrintfFormatString\n");
+      fprintf( stderr, "intf warning: ConvertPrintfFormatString failed\n");
       exit (errno);
   }
 
       exit (errno);
   }
 
index 4953e511aa2771a950bab9ad625fc350c1f33c75..8a87ece5d5d920cb0c72e00c2330f8a2e3a45c1e 100644 (file)
@@ -4,7 +4,7 @@
  * and spawn threads.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
  * and spawn threads.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: main.c,v 1.151 2002/02/15 13:32:54 sam Exp $
+ * $Id: main.c,v 1.152 2002/02/19 00:50:19 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 #define OPT_SYNCHRO             190
 #define OPT_WARNING             191
 #define OPT_VERSION             192
 #define OPT_SYNCHRO             190
 #define OPT_WARNING             191
 #define OPT_VERSION             192
-#define OPT_STDOUT              193
-#define OPT_STATS               194
+#define OPT_STATS               193
 
 #define OPT_MPEG_ADEC           200
 #define OPT_AC3_ADEC            201
 
 #define OPT_MPEG_ADEC           200
 #define OPT_AC3_ADEC            201
@@ -158,7 +157,6 @@ static const struct option longopts[] =
     /* Interface options */
     {   "intf",             1,          0,      'I' },
     {   "warning",          1,          0,      OPT_WARNING },
     /* Interface options */
     {   "intf",             1,          0,      'I' },
     {   "warning",          1,          0,      OPT_WARNING },
-    {   "stdout",           1,          0,      OPT_STDOUT },
     {   "stats",            0,          0,      OPT_STATS },
 
     /* Audio options */
     {   "stats",            0,          0,      OPT_STATS },
 
     /* Audio options */
@@ -250,7 +248,6 @@ static void FatalSignalHandler      ( int i_signal );
 static void IllegalSignalHandler    ( int i_signal );
 static u32  CPUCapabilities         ( void );
 
 static void IllegalSignalHandler    ( int i_signal );
 static u32  CPUCapabilities         ( void );
 
-static int  RedirectSTDOUT          ( void );
 static void ShowConsole             ( void );
 
 static jmp_buf env;
 static void ShowConsole             ( void );
 
 static jmp_buf env;
@@ -327,15 +324,9 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
     /*
      * Initialize messages interface
      */
     /*
      * Initialize messages interface
      */
-    p_main->p_msg = intf_MsgCreate();
-    if( !p_main->p_msg )                         /* start messages interface */
-    {
-        fprintf( stderr, "error: can't initialize messages interface (%s)\n",
-                 strerror(errno) );
-        return( errno );
-    }
+    intf_MsgCreate();
 
 
-    intf_MsgImm( COPYRIGHT_MESSAGE "\n" );
+    intf_Msg( COPYRIGHT_MESSAGE "\n" );
 
     /*
      * Read configuration
 
     /*
      * Read configuration
@@ -350,8 +341,6 @@ int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
      * Redirect the standard output if required by the user, and on Win32 we
      * also open a console to display the debug messages.
      */
      * Redirect the standard output if required by the user, and on Win32 we
      * also open a console to display the debug messages.
      */
-    RedirectSTDOUT();
-
     if( p_main->b_stats )
     {
         char          p_capabilities[200];
     if( p_main->b_stats )
     {
         char          p_capabilities[200];
@@ -670,46 +659,28 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
         /* General/common options */
         case 'h':                                              /* -h, --help */
             ShowConsole();
         /* General/common options */
         case 'h':                                              /* -h, --help */
             ShowConsole();
-            RedirectSTDOUT();
             Usage( SHORT_HELP );
 #ifdef WIN32        /* Pause the console because it's destroyed when we exit */
             Usage( SHORT_HELP );
 #ifdef WIN32        /* Pause the console because it's destroyed when we exit */
-            if( strcmp( "", main_GetPszVariable( INTF_STDOUT_VAR,
-                                                 INTF_STDOUT_DEFAULT ) ) == 0 )
-            {
-                /* No stdout redirection has been asked for */
-                intf_MsgImm( "\nPress the RETURN key to continue..." );
-                getchar();
-            }
+            intf_Msg( "\nPress the RETURN key to continue..." );
+            getchar();
 #endif
             return( -1 );
             break;
         case 'H':                                          /* -H, --longhelp */
             ShowConsole();
 #endif
             return( -1 );
             break;
         case 'H':                                          /* -H, --longhelp */
             ShowConsole();
-            RedirectSTDOUT();
             Usage( LONG_HELP );
 #ifdef WIN32        /* Pause the console because it's destroyed when we exit */
             Usage( LONG_HELP );
 #ifdef WIN32        /* Pause the console because it's destroyed when we exit */
-            if( strcmp( "", main_GetPszVariable( INTF_STDOUT_VAR,
-                                                 INTF_STDOUT_DEFAULT ) ) == 0 )
-            {
-                /* No stdout redirection has been asked for */
-                intf_MsgImm( "\nPress the RETURN key to continue..." );
-                getchar();
-            }
+            intf_Msg( "\nPress the RETURN key to continue..." );
+            getchar();
 #endif
             return( -1 );
             break;
         case OPT_VERSION:                                       /* --version */
             ShowConsole();
 #endif
             return( -1 );
             break;
         case OPT_VERSION:                                       /* --version */
             ShowConsole();
-            RedirectSTDOUT();
             Version();
 #ifdef WIN32        /* Pause the console because it's destroyed when we exit */
             Version();
 #ifdef WIN32        /* Pause the console because it's destroyed when we exit */
-            if( strcmp( "", main_GetPszVariable( INTF_STDOUT_VAR,
-                                                 INTF_STDOUT_DEFAULT ) ) == 0 )
-            {
-                /* No stdout redirection has been asked for */
-                intf_MsgImm( "\nPress the RETURN key to continue..." );
-                getchar();
-            }
+            intf_Msg( "\nPress the RETURN key to continue..." );
+            getchar();
 #endif
             return( -1 );
             break;
 #endif
             return( -1 );
             break;
@@ -726,10 +697,6 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
             p_main->i_warning_level = atoi(optarg);
             break;
 
             p_main->i_warning_level = atoi(optarg);
             break;
 
-        case OPT_STDOUT:                                         /* --stdout */
-            main_PutPszVariable( INTF_STDOUT_VAR, optarg );
-            break;
-
         case OPT_STATS:
             p_main->b_stats = 1;
             break;
         case OPT_STATS:
             p_main->b_stats = 1;
             break;
@@ -899,18 +866,12 @@ static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
         case '?':
         default:
             ShowConsole();
         case '?':
         default:
             ShowConsole();
-            RedirectSTDOUT();
             intf_ErrMsg( "intf error: unknown option `%s'",
                          ppsz_argv[optind] );
             Usage( USAGE );
 #ifdef WIN32        /* Pause the console because it's destroyed when we exit */
             intf_ErrMsg( "intf error: unknown option `%s'",
                          ppsz_argv[optind] );
             Usage( USAGE );
 #ifdef WIN32        /* Pause the console because it's destroyed when we exit */
-            if( strcmp( "", main_GetPszVariable( INTF_STDOUT_VAR,
-                                                 INTF_STDOUT_DEFAULT ) ) == 0 )
-            {
-                /* No stdout redirection has been asked for */
-                intf_MsgImm( "\nPress the RETURN key to continue..." );
-                getchar();
-            }
+            intf_Msg( "\nPress the RETURN key to continue..." );
+            getchar();
 #endif
             return( EINVAL );
             break;
 #endif
             return( EINVAL );
             break;
@@ -952,21 +913,20 @@ static int GetFilenames( int i_argc, char *ppsz_argv[] )
 static void Usage( int i_fashion )
 {
     /* Usage */
 static void Usage( int i_fashion )
 {
     /* Usage */
-    intf_MsgImm( "Usage: %s [options] [parameters] [file]...",
+    intf_Msg( "Usage: %s [options] [parameters] [file]...",
                  p_main->psz_arg0 );
 
     if( i_fashion == USAGE )
     {
                  p_main->psz_arg0 );
 
     if( i_fashion == USAGE )
     {
-        intf_MsgImm( "Try `%s --help' for more information.",
+        intf_Msg( "Try `%s --help' for more information.",
                      p_main->psz_arg0 );
         return;
     }
 
     /* Options */
                      p_main->psz_arg0 );
         return;
     }
 
     /* Options */
-    intf_MsgImm( "\nOptions:"
+    intf_Msg( "\nOptions:"
           "\n  -I, --intf <module>            \tinterface method"
           "\n  -v, --verbose                  \tverbose mode (cumulative)"
           "\n  -I, --intf <module>            \tinterface method"
           "\n  -v, --verbose                  \tverbose mode (cumulative)"
-          "\n      --stdout <filename>        \tredirect console stdout"
           "\n      --memcpy <module>          \tmemcpy method"
           "\n"
           "\n      --noaudio                  \tdisable audio"
           "\n      --memcpy <module>          \tmemcpy method"
           "\n"
           "\n      --noaudio                  \tdisable audio"
@@ -1034,15 +994,14 @@ static void Usage( int i_fashion )
         return;
 
     /* Interface parameters */
         return;
 
     /* Interface parameters */
-    intf_MsgImm( "\nInterface parameters:"
+    intf_Msg( "\nInterface parameters:"
         "\n  " INTF_METHOD_VAR "=<method name>        \tinterface method"
         "\n  " INTF_INIT_SCRIPT_VAR "=<filename>              \tinitialization script"
         "\n  " INTF_CHANNELS_VAR "=<filename>         \tchannels list"
         "\n  " INTF_METHOD_VAR "=<method name>        \tinterface method"
         "\n  " INTF_INIT_SCRIPT_VAR "=<filename>              \tinitialization script"
         "\n  " INTF_CHANNELS_VAR "=<filename>         \tchannels list"
-        "\n  " INTF_STDOUT_VAR "=<filename>           \tredirect console stdout"
         "\n  " MEMCPY_METHOD_VAR "=<method name>      \tmemcpy method" );
 
     /* Audio parameters */
         "\n  " MEMCPY_METHOD_VAR "=<method name>      \tmemcpy method" );
 
     /* Audio parameters */
-    intf_MsgImm( "\nAudio parameters:"
+    intf_Msg( "\nAudio parameters:"
         "\n  " AOUT_METHOD_VAR "=<method name>        \taudio method"
         "\n  " AOUT_DSP_VAR "=<filename>              \tdsp device path"
         "\n  " AOUT_STEREO_VAR "={1|0}                \tstereo or mono output"
         "\n  " AOUT_METHOD_VAR "=<method name>        \taudio method"
         "\n  " AOUT_DSP_VAR "=<filename>              \tdsp device path"
         "\n  " AOUT_STEREO_VAR "={1|0}                \tstereo or mono output"
@@ -1053,7 +1012,7 @@ static void Usage( int i_fashion )
         "\n  " AOUT_RATE_VAR "=<rate>                 \toutput rate" );
 
     /* Video parameters */
         "\n  " AOUT_RATE_VAR "=<rate>                 \toutput rate" );
 
     /* Video parameters */
-    intf_MsgImm( "\nVideo parameters:"
+    intf_Msg( "\nVideo parameters:"
         "\n  " VOUT_METHOD_VAR "=<method name>        \tdisplay method"
         "\n  " VOUT_DISPLAY_VAR "=<display name>      \tdisplay used"
         "\n  " VOUT_WIDTH_VAR "=<width>               \tdisplay width"
         "\n  " VOUT_METHOD_VAR "=<method name>        \tdisplay method"
         "\n  " VOUT_DISPLAY_VAR "=<display name>      \tdisplay used"
         "\n  " VOUT_WIDTH_VAR "=<width>               \tdisplay width"
@@ -1072,7 +1031,7 @@ static void Usage( int i_fashion )
         "\n  " VOUT_SPUMARGIN_VAR "=<margin>          \tforce SPU margin" );
 
     /* DVD parameters */
         "\n  " VOUT_SPUMARGIN_VAR "=<margin>          \tforce SPU margin" );
 
     /* DVD parameters */
-    intf_MsgImm( "\nDVD parameters:"
+    intf_Msg( "\nDVD parameters:"
         "\n  " INPUT_DVD_DEVICE_VAR "=<device>        \tDVD device"
         "\n  " INPUT_TITLE_VAR "=<title>              \ttitle number"
         "\n  " INPUT_CHAPTER_VAR "=<chapter>          \tchapter number"
         "\n  " INPUT_DVD_DEVICE_VAR "=<device>        \tDVD device"
         "\n  " INPUT_TITLE_VAR "=<title>              \ttitle number"
         "\n  " INPUT_CHAPTER_VAR "=<chapter>          \tchapter number"
@@ -1082,13 +1041,13 @@ static void Usage( int i_fashion )
         "\n  " INPUT_SUBTITLE_VAR "=[0-31]            \tsubtitle channel" );
 
     /* Input parameters */
         "\n  " INPUT_SUBTITLE_VAR "=[0-31]            \tsubtitle channel" );
 
     /* Input parameters */
-    intf_MsgImm( "\nInput parameters:"
+    intf_Msg( "\nInput parameters:"
         "\n  " INPUT_IFACE_VAR "=<interface>          \tnetwork interface"
         "\n  " INPUT_CHANNEL_SERVER_VAR "=<hostname>  \tchannel server"
         "\n  " INPUT_CHANNEL_PORT_VAR "=<port>        \tchannel server port" );
 
     /* Decoder parameters */
         "\n  " INPUT_IFACE_VAR "=<interface>          \tnetwork interface"
         "\n  " INPUT_CHANNEL_SERVER_VAR "=<hostname>  \tchannel server"
         "\n  " INPUT_CHANNEL_PORT_VAR "=<port>        \tchannel server port" );
 
     /* Decoder parameters */
-    intf_MsgImm( "\nDecoder parameters:"
+    intf_Msg( "\nDecoder parameters:"
         "\n  " ADEC_MPEG_VAR "=<builtin|mad>          \tMPEG audio decoder"
         "\n  " ADEC_AC3_VAR "=<builtin|a52>           \tAC3 audio decoder" );
 }
         "\n  " ADEC_MPEG_VAR "=<builtin|mad>          \tMPEG audio decoder"
         "\n  " ADEC_AC3_VAR "=<builtin|a52>           \tAC3 audio decoder" );
 }
@@ -1100,7 +1059,7 @@ static void Usage( int i_fashion )
  *****************************************************************************/
 static void Version( void )
 {
  *****************************************************************************/
 static void Version( void )
 {
-    intf_MsgImm( VERSION_MESSAGE
+    intf_Msg( VERSION_MESSAGE
         "This program comes with NO WARRANTY, to the extent permitted by law.\n"
         "You may redistribute it under the terms of the GNU General Public License;\n"
         "see the file named COPYING for details.\n"
         "This program comes with NO WARRANTY, to the extent permitted by law.\n"
         "You may redistribute it under the terms of the GNU General Public License;\n"
         "see the file named COPYING for details.\n"
@@ -1157,7 +1116,7 @@ static void FatalSignalHandler( int i_signal )
 #endif
 
     /* Acknowledge the signal received */
 #endif
 
     /* Acknowledge the signal received */
-    intf_ErrMsgImm( "intf error: signal %d received, exiting", i_signal );
+    intf_ErrMsg( "intf error: signal %d received, exiting", i_signal );
 
     /* Try to terminate everything - this is done by requesting the end of the
      * interface thread */
 
     /* Try to terminate everything - this is done by requesting the end of the
      * interface thread */
@@ -1409,49 +1368,6 @@ static u32 CPUCapabilities( void )
 #endif
 }
 
 #endif
 }
 
-/*****************************************************************************
- * RedirectSTDOUT: redirect stdout and stderr to a file
- *****************************************************************************
- * This function will redirect stdout and stderr to a file if the user has
- * specified so.
- *****************************************************************************/
-static int RedirectSTDOUT( void )
-{
-    int  i_fd;
-    char *psz_filename;
-
-    psz_filename = main_GetPszVariable( INTF_STDOUT_VAR, INTF_STDOUT_DEFAULT );
-
-    if( *psz_filename )
-    {
-        ShowConsole();
-        i_fd = open( psz_filename, O_CREAT | O_TRUNC | O_RDWR,
-                                   S_IREAD | S_IWRITE );
-        if( dup2( i_fd, fileno(stdout) ) == -1 )
-        {
-            intf_ErrMsg( "warning: unable to redirect stdout" );
-        }
-
-        if( dup2( i_fd, fileno(stderr) ) == -1 )
-        {
-            intf_ErrMsg( "warning: unable to redirect stderr" );
-        }
-
-        close( i_fd );
-    }
-    else
-    {
-        /* No stdout redirection has been asked so open a console */
-        if( p_main->i_warning_level )
-        {
-            ShowConsole();
-        }
-
-    }
-
-    return 0;
-}
-
 /*****************************************************************************
  * ShowConsole: On Win32, create an output console for debug messages
  *****************************************************************************
 /*****************************************************************************
  * ShowConsole: On Win32, create an output console for debug messages
  *****************************************************************************
index 12fb201c598d624582042f3a5d297dbe40270305..ef32e0cff69e64d609919b9cb509debb63e0fffc 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.52 2002/02/15 13:32:54 sam Exp $
+ * $Id: modules.c,v 1.53 2002/02/19 00:50:20 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -403,7 +403,8 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data )
                 break;
 
             default:
                 break;
 
             default:
-                intf_ErrMsg( "module error: if you can read this, sam fucked up something very bad... fuck him with a chainsaw on vlc-devel" );
+                intf_ErrMsg( "module error: unknown module type %i",
+                             i_capability );
                 i_ret = -1;
                 break;
         }
                 i_ret = -1;
                 break;
         }
@@ -449,7 +450,7 @@ module_t * module_Need( int i_capability, char *psz_name, void *p_data )
     }
     else if( psz_name != NULL && *psz_name )
     {
     }
     else if( psz_name != NULL && *psz_name )
     {
-        intf_ErrMsg( "module error: requested %s module `%s' not found",
+        intf_ErrMsg( "module error: requested %s module `%s' unavailable",
                      GetCapabilityName( i_capability ), psz_name );
     }
 
                      GetCapabilityName( i_capability ), psz_name );
     }
 
@@ -535,7 +536,7 @@ static void AllocateAllPlugins( void )
             psz_fullpath = *ppsz_path;
         }
 
             psz_fullpath = *ppsz_path;
         }
 
-        intf_WarnMsgImm( 1, "module: browsing `%s'", psz_fullpath );
+        intf_WarnMsg( 1, "module: browsing `%s'", psz_fullpath );
 
         if( (dir = opendir( psz_fullpath )) )
         {
 
         if( (dir = opendir( psz_fullpath )) )
         {
@@ -594,7 +595,7 @@ static int AllocatePluginModule( char * psz_filename )
     if( module_load( psz_filename, &handle ) )
     {
         /* The plugin module couldn't be opened */
     if( module_load( psz_filename, &handle ) )
     {
         /* The plugin module couldn't be opened */
-        intf_WarnMsgImm( 1, "module warning: cannot open %s (%s)",
+        intf_WarnMsg( 1, "module warning: cannot open %s (%s)",
                          psz_filename, module_error() );
         return( -1 );
     }
                          psz_filename, module_error() );
         return( -1 );
     }
@@ -698,7 +699,7 @@ static int AllocatePluginModule( char * psz_filename )
     p_module_bank->i_count++;
 
     /* Immediate message so that a slow module doesn't make the user wait */
     p_module_bank->i_count++;
 
     /* Immediate message so that a slow module doesn't make the user wait */
-    intf_WarnMsgImm( 2, "module: new plugin module `%s', %s",
+    intf_WarnMsg( 2, "module: new plugin module `%s', %s",
                      p_module->psz_name, p_module->psz_longname );
 
     return( 0 );
                      p_module->psz_name, p_module->psz_longname );
 
     return( 0 );
@@ -788,7 +789,7 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
     p_module_bank->i_count++;
 
     /* Immediate message so that a slow module doesn't make the user wait */
     p_module_bank->i_count++;
 
     /* Immediate message so that a slow module doesn't make the user wait */
-    intf_WarnMsgImm( 2, "module: new builtin module `%s', %s",
+    intf_WarnMsg( 2, "module: new builtin module `%s', %s",
                      p_module->psz_name, p_module->psz_longname );
 
     return( 0 );
                      p_module->psz_name, p_module->psz_longname );
 
     return( 0 );
index 97b3bd08c388c480c257929dbcca9eab9460e007..e8dc08a2d904bfa0e8c19af95f5ec0b53e91e05e 100644 (file)
@@ -2,7 +2,7 @@
  * modules_plugin.h : Plugin management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
  * modules_plugin.h : Plugin management functions used by the core application.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_plugin.h,v 1.8 2002/01/29 20:11:18 gbazin Exp $
+ * $Id: modules_plugin.h,v 1.9 2002/02/19 00:50:20 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -144,16 +144,7 @@ module_error( void )
 /*****************************************************************************
  * STORE_SYMBOLS: store known symbols into p_symbols for plugin access.
  *****************************************************************************/
 /*****************************************************************************
  * STORE_SYMBOLS: store known symbols into p_symbols for plugin access.
  *****************************************************************************/
-#ifdef TRACE
-#   define STORE_TRACE_SYMBOLS( p_symbols ) \
-        (p_symbols)->intf_DbgMsg = _intf_DbgMsg; \
-        (p_symbols)->intf_DbgMsgImm = _intf_DbgMsgImm;
-#else
-#   define STORE_TRACE_SYMBOLS( p_symbols )
-#endif
-
 #define STORE_SYMBOLS( p_symbols ) \
 #define STORE_SYMBOLS( p_symbols ) \
-    STORE_TRACE_SYMBOLS( p_symbols ) \
     (p_symbols)->p_main = p_main; \
     (p_symbols)->p_input_bank = p_input_bank; \
     (p_symbols)->p_aout_bank = p_aout_bank; \
     (p_symbols)->p_main = p_main; \
     (p_symbols)->p_input_bank = p_input_bank; \
     (p_symbols)->p_aout_bank = p_aout_bank; \
@@ -162,11 +153,12 @@ module_error( void )
     (p_symbols)->main_GetPszVariable = main_GetPszVariable; \
     (p_symbols)->main_PutIntVariable = main_PutIntVariable; \
     (p_symbols)->main_PutPszVariable = main_PutPszVariable; \
     (p_symbols)->main_GetPszVariable = main_GetPszVariable; \
     (p_symbols)->main_PutIntVariable = main_PutIntVariable; \
     (p_symbols)->main_PutPszVariable = main_PutPszVariable; \
+    (p_symbols)->intf_MsgSub = intf_MsgSub; \
+    (p_symbols)->intf_MsgUnsub = intf_MsgUnsub; \
     (p_symbols)->intf_Msg = intf_Msg; \
     (p_symbols)->intf_ErrMsg = intf_ErrMsg; \
     (p_symbols)->intf_StatMsg = intf_StatMsg;\
     (p_symbols)->intf_WarnMsg = intf_WarnMsg; \
     (p_symbols)->intf_Msg = intf_Msg; \
     (p_symbols)->intf_ErrMsg = intf_ErrMsg; \
     (p_symbols)->intf_StatMsg = intf_StatMsg;\
     (p_symbols)->intf_WarnMsg = intf_WarnMsg; \
-    (p_symbols)->intf_WarnMsgImm = intf_WarnMsgImm; \
     (p_symbols)->intf_PlaylistAdd = intf_PlaylistAdd; \
     (p_symbols)->intf_PlaylistDelete = intf_PlaylistDelete; \
     (p_symbols)->intf_PlaylistNext = intf_PlaylistNext; \
     (p_symbols)->intf_PlaylistAdd = intf_PlaylistAdd; \
     (p_symbols)->intf_PlaylistDelete = intf_PlaylistDelete; \
     (p_symbols)->intf_PlaylistNext = intf_PlaylistNext; \
index ef2107a8820d4557e2362a83836a8854e39491c2..2897e2c6d0ddf4086ced94be3315a59aa7646f45 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: video_output.c,v 1.159 2002/02/18 19:02:41 stef Exp $
+ * $Id: video_output.c,v 1.160 2002/02/19 00:50:20 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -377,7 +377,6 @@ static int InitThread( vout_thread_t *p_vout )
     p_vout->b_active = 1;
     *p_vout->pi_status = THREAD_READY;
 
     p_vout->b_active = 1;
     *p_vout->pi_status = THREAD_READY;
 
-    intf_DbgMsg("thread ready");
     return( 0 );
 }
 
     return( 0 );
 }
 
@@ -536,10 +535,6 @@ static void RunThread( vout_thread_t *p_vout)
          * to display. */
         vlc_mutex_lock( &p_vout->change_lock );
 
          * to display. */
         vlc_mutex_lock( &p_vout->change_lock );
 
-#ifdef TRACE_VOUT
-        intf_DbgMsg( "picture %p, subpicture %p", p_picture, p_subpic );
-#endif
-
         /*
          * Display the previously rendered picture
          */
         /*
          * Display the previously rendered picture
          */
@@ -590,7 +585,6 @@ static void RunThread( vout_thread_t *p_vout)
 
     /* Destroy thread structures allocated by CreateThread */
     DestroyThread( p_vout, THREAD_OVER );
 
     /* Destroy thread structures allocated by CreateThread */
     DestroyThread( p_vout, THREAD_OVER );
-    intf_DbgMsg( "thread end" );
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
index c0dbd82a2fa59ab6346e4e0e375d853f62df1284..ee34bd7615759bf347f69a6b73925be2b5c46953 100644 (file)
@@ -2,7 +2,7 @@
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
  * video_text.c : text manipulation functions
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: video_text.c,v 1.33 2001/12/30 07:09:56 sam Exp $
+ * $Id: video_text.c,v 1.34 2002/02/19 00:50:20 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -262,7 +262,7 @@ vout_font_t *vout_LoadFont( const char *psz_name )
 
     if( i_file == -1 )
     {
 
     if( i_file == -1 )
     {
-        intf_DbgMsg( "vout error: can't open file '%s' (%s)",
+        intf_ErrMsg( "vout error: can't open file '%s' (%s)",
                      psz_name, strerror(errno) );
         return( NULL );
     }
                      psz_name, strerror(errno) );
         return( NULL );
     }
@@ -360,9 +360,9 @@ vout_font_t *vout_LoadFont( const char *psz_name )
         break;
     }
 
         break;
     }
 
-
-    intf_DbgMsg( "loaded %s: type %d, %d-%dx%d", psz_name, p_font->i_type,
+    intf_ErrMsg( "loaded %s: type %d, %d-%dx%d", psz_name, p_font->i_type,
                  p_font->i_width, p_font->i_interspacing, p_font->i_height );
                  p_font->i_width, p_font->i_interspacing, p_font->i_height );
+
     return( p_font );
 }
 
     return( p_font );
 }
 
@@ -379,7 +379,6 @@ void vout_UnloadFont( vout_font_t *p_font )
         return;
     }
 
         return;
     }
 
-    intf_DbgMsg( "vout: unloading font %p", p_font );
     free( p_font->p_data );
     free( p_font );
 }
     free( p_font->p_data );
     free( p_font );
 }
index 1aa97fa8f83a79690807dad4be39c65c75dff42a..fde53fd6c79afbb84a5194c86fcac3fbc3b376bf 100644 (file)
@@ -2,7 +2,7 @@
  * vout_pictures.c : picture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
  * vout_pictures.c : picture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vout_pictures.c,v 1.15 2002/02/15 13:32:54 sam Exp $
+ * $Id: vout_pictures.c,v 1.16 2002/02/19 00:50:20 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -53,17 +53,12 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
     case RESERVED_DATED_PICTURE:
         p_pic->i_status = READY_PICTURE;
         break;
     case RESERVED_DATED_PICTURE:
         p_pic->i_status = READY_PICTURE;
         break;
-#ifdef DEBUG
     default:
         intf_ErrMsg( "error: picture %p has invalid status %d",
                      p_pic, p_pic->i_status );
         break;
     default:
         intf_ErrMsg( "error: picture %p has invalid status %d",
                      p_pic, p_pic->i_status );
         break;
-#endif
     }
 
     }
 
-#ifdef TRACE_VOUT
-    intf_DbgMsg("picture %p", p_pic);
-#endif
     vlc_mutex_unlock( &p_vout->picture_lock );
 }
 
     vlc_mutex_unlock( &p_vout->picture_lock );
 }
 
@@ -77,10 +72,6 @@ void vout_DisplayPicture( vout_thread_t *p_vout, picture_t *p_pic )
 void vout_DatePicture( vout_thread_t *p_vout,
                        picture_t *p_pic, mtime_t date )
 {
 void vout_DatePicture( vout_thread_t *p_vout,
                        picture_t *p_pic, mtime_t date )
 {
-#ifdef TRACE_VOUT
-    char        psz_date[ MSTRTIME_MAX_SIZE ];                       /* date */
-#endif
-
     vlc_mutex_lock( &p_vout->picture_lock );
     p_pic->date = date;
     switch( p_pic->i_status )
     vlc_mutex_lock( &p_vout->picture_lock );
     p_pic->date = date;
     switch( p_pic->i_status )
@@ -91,18 +82,12 @@ void vout_DatePicture( vout_thread_t *p_vout,
     case RESERVED_DISP_PICTURE:
         p_pic->i_status = READY_PICTURE;
         break;
     case RESERVED_DISP_PICTURE:
         p_pic->i_status = READY_PICTURE;
         break;
-#ifdef DEBUG
     default:
         intf_ErrMsg( "error: picture %p has invalid status %d",
                      p_pic, p_pic->i_status );
         break;
     default:
         intf_ErrMsg( "error: picture %p has invalid status %d",
                      p_pic, p_pic->i_status );
         break;
-#endif
     }
 
     }
 
-#ifdef TRACE_VOUT
-    intf_DbgMsg( "picture %p, display date: %s",
-                 p_pic, mstrtime( psz_date, p_pic->date) );
-#endif
     vlc_mutex_unlock( &p_vout->picture_lock );
 }
 
     vlc_mutex_unlock( &p_vout->picture_lock );
 }
 
@@ -261,11 +246,6 @@ void vout_LinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
 {
     vlc_mutex_lock( &p_vout->picture_lock );
     p_pic->i_refcount++;
 {
     vlc_mutex_lock( &p_vout->picture_lock );
     p_pic->i_refcount++;
-
-#ifdef TRACE_VOUT
-    intf_DbgMsg( "picture %p refcount=%d", p_pic, p_pic->i_refcount );
-#endif
-
     vlc_mutex_unlock( &p_vout->picture_lock );
 }
 
     vlc_mutex_unlock( &p_vout->picture_lock );
 }
 
@@ -279,13 +259,11 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
     vlc_mutex_lock( &p_vout->picture_lock );
     p_pic->i_refcount--;
 
     vlc_mutex_lock( &p_vout->picture_lock );
     p_pic->i_refcount--;
 
-#ifdef TRACE_VOUT
     if( p_pic->i_refcount < 0 )
     {
     if( p_pic->i_refcount < 0 )
     {
-        intf_DbgMsg( "error: refcount < 0" );
+        intf_ErrMsg( "vout error: picture refcount is %i", p_pic->i_refcount );
         p_pic->i_refcount = 0;
     }
         p_pic->i_refcount = 0;
     }
-#endif
 
     if( ( p_pic->i_refcount == 0 ) &&
         ( p_pic->i_status == DISPLAYED_PICTURE ) )
 
     if( ( p_pic->i_refcount == 0 ) &&
         ( p_pic->i_status == DISPLAYED_PICTURE ) )
@@ -294,10 +272,6 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
         p_vout->i_heap_size--;
     }
 
         p_vout->i_heap_size--;
     }
 
-#ifdef TRACE_VOUT
-    intf_DbgMsg( "picture %p refcount=%d", p_pic, p_pic->i_refcount );
-#endif
-
     vlc_mutex_unlock( &p_vout->picture_lock );
 }
 
     vlc_mutex_unlock( &p_vout->picture_lock );
 }
 
index 739795a4af81d8dd8458fd497135555405a812f5..d72df7791f5af804fde393be47f2043213d78041 100644 (file)
@@ -2,7 +2,7 @@
  * vout_subpictures.c : subpicture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
  * vout_subpictures.c : subpicture management functions
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: vout_subpictures.c,v 1.7 2002/02/13 22:10:40 sam Exp $
+ * $Id: vout_subpictures.c,v 1.8 2002/02/19 00:50:20 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
 static void vout_RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic,
                             const subpicture_t *p_spu );
 
 static void vout_RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic,
                             const subpicture_t *p_spu );
 
-/* FIXME: fake palette - the real one has to be sought in the .IFO */
-static int p_palette[4] = { 0x0000, 0x0000, 0xffff, 0x8888 };
-
 /*****************************************************************************
  * vout_DisplaySubPicture: display a subpicture unit
  *****************************************************************************
 /*****************************************************************************
  * vout_DisplaySubPicture: display a subpicture unit
  *****************************************************************************
- * Remove the reservation flag of a subpicture, which will cause it to be ready
- * for display. The picture does not need to be locked, since it is ignored by
- * the output thread if is reserved.
+ * Remove the reservation flag of a subpicture, which will cause it to be
+ * ready for display.
  *****************************************************************************/
 void  vout_DisplaySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
 {
  *****************************************************************************/
 void  vout_DisplaySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
 {
-#ifdef TRACE_VOUT
-    char        psz_start[ MSTRTIME_MAX_SIZE ];    /* buffer for date string */
-    char        psz_stop[ MSTRTIME_MAX_SIZE ];     /* buffer for date string */
-#endif
     int         i_margin;
 
     int         i_margin;
 
-#ifdef DEBUG
     /* Check if status is valid */
     if( p_subpic->i_status != RESERVED_SUBPICTURE )
     {
     /* Check if status is valid */
     if( p_subpic->i_status != RESERVED_SUBPICTURE )
     {
-        intf_ErrMsg( "error: subpicture %p has invalid status #%d",
+        intf_ErrMsg( "vout error: subpicture %p has invalid status #%d",
                      p_subpic, p_subpic->i_status );
     }
                      p_subpic, p_subpic->i_status );
     }
-#endif
 
     /* If the user requested an SPU margin, we force the position after
      * having checked that it was a valid value. */
 
     /* If the user requested an SPU margin, we force the position after
      * having checked that it was a valid value. */
@@ -84,14 +74,6 @@ void  vout_DisplaySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
 
     /* Remove reservation flag */
     p_subpic->i_status = READY_SUBPICTURE;
 
     /* Remove reservation flag */
     p_subpic->i_status = READY_SUBPICTURE;
-
-#ifdef TRACE_VOUT
-    /* Send subpicture information */
-    intf_DbgMsg("subpicture %p: type=%d, begin date=%s, end date=%s",
-                p_subpic, p_subpic->i_type,
-                mstrtime( psz_start, p_subpic->i_start ),
-                mstrtime( psz_stop, p_subpic->i_stop ) );
-#endif
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
@@ -128,10 +110,6 @@ subpicture_t *vout_CreateSubPicture( vout_thread_t *p_vout, int i_type,
                  * the best possible case, since no memory allocation needs
                  * to be done */
                 p_vout->p_subpicture[i_subpic].i_status = RESERVED_SUBPICTURE;
                  * the best possible case, since no memory allocation needs
                  * to be done */
                 p_vout->p_subpicture[i_subpic].i_status = RESERVED_SUBPICTURE;
-#ifdef TRACE_VOUT
-                intf_DbgMsg("subpicture %p (in destroyed subpicture slot)",
-                            &p_vout->p_subpicture[i_subpic] );
-#endif
                 vlc_mutex_unlock( &p_vout->subpicture_lock );
                 return( &p_vout->p_subpicture[i_subpic] );
             }
                 vlc_mutex_unlock( &p_vout->subpicture_lock );
                 return( &p_vout->p_subpicture[i_subpic] );
             }
@@ -159,62 +137,53 @@ subpicture_t *vout_CreateSubPicture( vout_thread_t *p_vout, int i_type,
         p_free_subpic = p_destroyed_subpic;
     }
 
         p_free_subpic = p_destroyed_subpic;
     }
 
-    /*
-     * Prepare subpicture
-     */
-    if( p_free_subpic != NULL )
+    /* If no free or destroyed subpicture could be found */
+    if( p_free_subpic == NULL )
     {
     {
-        /* Allocate memory */
-        switch( i_type )
-        {
-        case TEXT_SUBPICTURE:                             /* text subpicture */
-            p_free_subpic->p_data = memalign( 16, i_size + 1 );
-            break;
-        case DVD_SUBPICTURE:                          /* DVD subpicture unit */
-            p_free_subpic->p_data = memalign( 16, i_size );
-            break;
-#ifdef DEBUG
-        default:
-            intf_ErrMsg("error: unknown subpicture type %d", i_type );
-            p_free_subpic->p_data   =  NULL;
-            break;
-#endif
-        }
+        intf_ErrMsg( "vout error: subpicture heap is full" );
+        vlc_mutex_unlock( &p_vout->subpicture_lock );
+        return( NULL );
+    }
 
 
-        if( p_free_subpic->p_data != NULL )
-        {
-            /* Copy subpicture information, set some default values */
-            p_free_subpic->i_type                      = i_type;
-            p_free_subpic->i_status                    = RESERVED_SUBPICTURE;
-            p_free_subpic->i_size                      = i_size;
-            p_free_subpic->i_x                         = 0;
-            p_free_subpic->i_y                         = 0;
-            p_free_subpic->i_width                     = 0;
-            p_free_subpic->i_height                    = 0;
-            p_free_subpic->i_horizontal_align          = CENTER_RALIGN;
-            p_free_subpic->i_vertical_align            = CENTER_RALIGN;
-        }
-        else
-        {
-            /* Memory allocation failed : set subpicture as empty */
-            p_free_subpic->i_type   =  EMPTY_SUBPICTURE;
-            p_free_subpic->i_status =  FREE_SUBPICTURE;
-            p_free_subpic =            NULL;
-            intf_ErrMsg( "vout error: spu allocation returned %s",
-                         strerror( ENOMEM ) );
-        }
+    /* Prepare subpicture */
+    switch( i_type )
+    {
+    case TEXT_SUBPICTURE:                             /* text subpicture */
+        p_free_subpic->p_data = memalign( 16, i_size + 1 );
+        break;
+    case DVD_SUBPICTURE:                          /* DVD subpicture unit */
+        p_free_subpic->p_data = memalign( 16, i_size );
+        break;
+    default:
+        intf_ErrMsg( "vout error: unknown subpicture type %d", i_type );
+        p_free_subpic->p_data   =  NULL;
+        break;
+    }
 
 
-#ifdef TRACE_VOUT
-        intf_DbgMsg("subpicture %p (in free subpicture slot)", p_free_subpic );
-#endif
-        vlc_mutex_unlock( &p_vout->subpicture_lock );
-        return( p_free_subpic );
+    if( p_free_subpic->p_data != NULL )
+    {
+        /* Copy subpicture information, set some default values */
+        p_free_subpic->i_type   = i_type;
+        p_free_subpic->i_status = RESERVED_SUBPICTURE;
+        p_free_subpic->i_size   = i_size;
+        p_free_subpic->i_x      = 0;
+        p_free_subpic->i_y      = 0;
+        p_free_subpic->i_width  = 0;
+        p_free_subpic->i_height = 0;
+    }
+    else
+    {
+        /* Memory allocation failed : set subpicture as empty */
+        p_free_subpic->i_type   = EMPTY_SUBPICTURE;
+        p_free_subpic->i_status = FREE_SUBPICTURE;
+        p_free_subpic           = NULL;
+        intf_ErrMsg( "vout error: spu allocation returned %s",
+                     strerror( ENOMEM ) );
     }
 
     }
 
-    /* No free or destroyed subpicture could be found */
-    intf_DbgMsg( "warning: subpicture heap is full" );
     vlc_mutex_unlock( &p_vout->subpicture_lock );
     vlc_mutex_unlock( &p_vout->subpicture_lock );
-    return( NULL );
+
+    return( p_free_subpic );
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
@@ -227,21 +196,15 @@ subpicture_t *vout_CreateSubPicture( vout_thread_t *p_vout, int i_type,
  *****************************************************************************/
 void vout_DestroySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
 {
  *****************************************************************************/
 void vout_DestroySubPicture( vout_thread_t *p_vout, subpicture_t *p_subpic )
 {
-#ifdef DEBUG
    /* Check if status is valid */
    if( ( p_subpic->i_status != RESERVED_SUBPICTURE )
           && ( p_subpic->i_status != READY_SUBPICTURE ) )
    {
    /* Check if status is valid */
    if( ( p_subpic->i_status != RESERVED_SUBPICTURE )
           && ( p_subpic->i_status != READY_SUBPICTURE ) )
    {
-       intf_ErrMsg("error: subpicture %p has invalid status %d",
+       intf_ErrMsg( "vout error: subpicture %p has invalid status %d",
                    p_subpic, p_subpic->i_status );
    }
                    p_subpic, p_subpic->i_status );
    }
-#endif
 
     p_subpic->i_status = DESTROYED_SUBPICTURE;
 
     p_subpic->i_status = DESTROYED_SUBPICTURE;
-
-#ifdef TRACE_VOUT
-    intf_DbgMsg("subpicture %p", p_subpic);
-#endif
 }
 
 /*****************************************************************************
 }
 
 /*****************************************************************************
@@ -297,10 +260,8 @@ void vout_RenderSubPictures( vout_thread_t *p_vout, picture_t *p_pic,
 #endif
 
         default:
 #endif
 
         default:
-#ifdef DEBUG
-            intf_ErrMsg( "error: unknown subpicture %p type %d",
+            intf_ErrMsg( "vout error: unknown subpicture %p type %d",
                          p_subpic, p_subpic->i_type );
                          p_subpic, p_subpic->i_type );
-#endif
             break;
         }
 
             break;
         }
 
@@ -418,40 +379,101 @@ subpicture_t *vout_SortSubPictures( vout_thread_t *p_vout,
     return p_subpic;
 }
 
     return p_subpic;
 }
 
-#if 0  /* code removed because we should use the FOURCC value instead */
 /*****************************************************************************
 /*****************************************************************************
- * vout_RenderRGBSPU: draw an SPU on a picture
+ * vout_RenderSPU: draw an SPU on a picture
  *****************************************************************************
  * This is a fast implementation of the subpicture drawing code. The data
  * has been preprocessed once in spu_decoder.c, so we don't need to parse the
  * RLE buffer again and again. Most sanity checks are done in spu_decoder.c
  * so that this routine can be as fast as possible.
  *****************************************************************************/
  *****************************************************************************
  * This is a fast implementation of the subpicture drawing code. The data
  * has been preprocessed once in spu_decoder.c, so we don't need to parse the
  * RLE buffer again and again. Most sanity checks are done in spu_decoder.c
  * so that this routine can be as fast as possible.
  *****************************************************************************/
-static void vout_RenderRGBSPU( const vout_thread_t *p_vout, picture_t *p_pic,
-                               const subpicture_t *p_spu )
+static void vout_RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic,
+                            const subpicture_t *p_spu )
 {
 {
-    int  i_len, i_color;
+    /* Common variables */
+    u8   p_clut8[4], p_trsp[4];
+    u16  p_clut16[4];
+    u8  *p_dest;
     u16 *p_source = (u16 *)p_spu->p_data;
 
     u16 *p_source = (u16 *)p_spu->p_data;
 
-    int i_xscale = ( p_buffer->i_pic_width << 6 ) / p_pic->i_width;
-    int i_yscale = ( p_buffer->i_pic_height << 6 ) / p_pic->i_height;
+    int i_x, i_y;
+    int i_len, i_color;
+
+    /* RGB-specific */
+    int i_xscale, i_yscale, i_width, i_height, i_ytmp, i_yreal, i_ynext;
+
+    /* FIXME: get this from the DVD */
+    p_trsp[0] = 0x00; p_trsp[1] = 0xff; p_trsp[2] = 0xff; p_trsp[3] = 0xff;
 
 
-    int i_width  = p_spu->i_width  * i_xscale;
-    int i_height = p_spu->i_height * i_yscale;
+    switch( p_vout->output.i_chroma )
+    {
+    /* I420 target, no scaling */
+    case FOURCC_I420:
+    case FOURCC_IYUV:
+    case FOURCC_YV12:
 
 
-    int i_x, i_y, i_ytmp, i_yreal, i_ynext;
+    /* FIXME: get this from the DVD */
+    p_clut8[0] = 0xaa; p_clut8[1] = 0x44;
+    p_clut8[2] = 0xff; p_clut8[3] = 0x88;
 
 
-    u8 *p_dest = p_buffer->p_data + ( i_width >> 6 ) * i_bytes_per_pixel
-                  /* Add the picture coordinates and the SPU coordinates */
-                  + ( p_buffer->i_pic_x + ((p_spu->i_x * i_xscale) >> 6))
-                       * i_bytes_per_pixel
-                  + ( p_buffer->i_pic_y + ((p_spu->i_y * i_yscale) >> 6))
-                       * i_bytes_per_line;
+    p_dest = p_pic->p->p_pixels + p_spu->i_x + p_spu->i_width
+              + p_vout->output.i_width * ( p_spu->i_y + p_spu->i_height );
 
     /* Draw until we reach the bottom of the subtitle */
 
     /* Draw until we reach the bottom of the subtitle */
-    i_y = 0;
+    for( i_y = p_spu->i_height * p_vout->output.i_width ;
+         i_y ;
+         i_y -= p_vout->output.i_width )
+    {
+        /* Draw until we reach the end of the line */
+        for( i_x = p_spu->i_width ; i_x ; )
+        {
+            /* Get the RLE part, then draw the line */
+            i_color = *p_source & 0x3;
+
+            switch( p_trsp[ i_color ] )
+            {
+                case 0x00:
+                    i_x -= *p_source++ >> 2;
+                    break;
 
 
-    while( i_y < i_height )
+                case 0xff:
+                    i_len = *p_source++ >> 2;
+                    memset( p_dest - i_x - i_y, p_clut8[ i_color ], i_len );
+                    i_x -= i_len;
+                    break;
+
+                default:
+                    /* FIXME: we should do transparency */
+                    i_len = *p_source++ >> 2;
+                    memset( p_dest - i_x - i_y, p_clut8[ i_color ], i_len );
+                    i_x -= i_len;
+                    break;
+            }
+        }
+    }
+
+    break;
+
+    /* RV16 target, scaling */
+    case FOURCC_RV16:
+
+    /* FIXME: get this from the DVD */
+    p_clut16[0] = 0xaaaa; p_clut16[1] = 0x4444;
+    p_clut16[2] = 0xffff; p_clut16[3] = 0x8888;
+
+    i_xscale = ( p_vout->output.i_width << 6 ) / p_vout->render.i_width;
+    i_yscale = ( p_vout->output.i_height << 6 ) / p_vout->render.i_height;
+
+    i_width  = p_spu->i_width  * i_xscale;
+    i_height = p_spu->i_height * i_yscale;
+
+    p_dest = p_pic->p->p_pixels + ( i_width >> 6 ) * 2
+              /* Add the picture coordinates and the SPU coordinates */
+              + ( (p_spu->i_x * i_xscale) >> 6 ) * 2
+              + ( (p_spu->i_y * i_yscale) >> 6 ) * p_vout->output.i_width * 2;
+
+    /* Draw until we reach the bottom of the subtitle */
+    for( i_y = 0 ; i_y < i_height ; )
     {
         i_ytmp = i_y >> 6;
         i_y += i_yscale;
     {
         i_ytmp = i_y >> 6;
         i_y += i_yscale;
@@ -460,116 +482,91 @@ static void vout_RenderRGBSPU( const vout_thread_t *p_vout, picture_t *p_pic,
         if( i_ytmp + 1 >= ( i_y >> 6 ) )
         {
             /* Just one line : we precalculate i_y >> 6 */
         if( i_ytmp + 1 >= ( i_y >> 6 ) )
         {
             /* Just one line : we precalculate i_y >> 6 */
-            i_yreal = i_bytes_per_line * i_ytmp;
+            i_yreal = p_vout->output.i_width * 2 * i_ytmp;
 
             /* Draw until we reach the end of the line */
 
             /* Draw until we reach the end of the line */
-            i_x = i_width;
-
-            while( i_x )
+            for( i_x = i_width ; i_x ; )
             {
             {
-                /* Get the RLE part */
+                /* Get the RLE part, then draw the line */
                 i_color = *p_source & 0x3;
 
                 i_color = *p_source & 0x3;
 
-                /* Draw the line */
-                if( i_color )
+                switch( p_trsp[ i_color ] )
                 {
                 {
-                    i_len = i_xscale * ( *p_source++ >> 2 );
+                case 0x00:
+                    i_x -= i_xscale * ( *p_source++ >> 2 );
+                    break;
 
 
-                    memset( p_dest - i_bytes_per_pixel * ( i_x >> 6 )
-                                   + i_yreal,
-                            p_palette[ i_color ],
-                            i_bytes_per_pixel * ( ( i_len >> 6 ) + 1 ) );
+                case 0xff:
+                    i_len = i_xscale * ( *p_source++ >> 2 );
+                    memset( p_dest - 2 * ( i_x >> 6 ) + i_yreal,
+                            p_clut16[ i_color ],
+                            2 * ( ( i_len >> 6 ) + 1 ) );
+                    i_x -= i_len;
+                    break;
 
 
+                default:
+                    /* FIXME: we should do transparency */
+                    i_len = i_xscale * ( *p_source++ >> 2 );
+                    memset( p_dest - 2 * ( i_x >> 6 ) + i_yreal,
+                            p_clut16[ i_color ],
+                            2 * ( ( i_len >> 6 ) + 1 ) );
                     i_x -= i_len;
                     i_x -= i_len;
-                    continue;
+                    break;
                 }
 
                 }
 
-                i_x -= i_xscale * ( *p_source++ >> 2 );
             }
         }
         else
         {
             }
         }
         else
         {
-            i_yreal = i_bytes_per_line * i_ytmp;
-            i_ynext = i_bytes_per_line * i_y >> 6;
+            i_yreal = p_vout->output.i_width * 2 * i_ytmp;
+            i_ynext = p_vout->output.i_width * 2 * i_y >> 6;
 
             /* Draw until we reach the end of the line */
 
             /* Draw until we reach the end of the line */
-            i_x = i_width;
-
-            while( i_x )
+            for( i_x = i_width ; i_x ; )
             {
             {
-                /* Get the RLE part */
+                /* Get the RLE part, then draw as many lines as needed */
                 i_color = *p_source & 0x3;
 
                 i_color = *p_source & 0x3;
 
-                /* Draw as many lines as needed */
-                if( i_color )
+                switch( p_trsp[ i_color ] )
                 {
                 {
-                    i_len = i_xscale * ( *p_source++ >> 2 );
+                case 0x00:
+                    i_x -= i_xscale * ( *p_source++ >> 2 );
+                    break;
 
 
-                    for( i_ytmp = i_yreal ;
-                         i_ytmp < i_ynext ;
-                         i_ytmp += i_bytes_per_line )
+                case 0xff:
+                    i_len = i_xscale * ( *p_source++ >> 2 );
+                    for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
+                         i_ytmp += p_vout->output.i_width * 2 )
                     {
                     {
-                        memset( p_dest - i_bytes_per_pixel * ( i_x >> 6 )
-                                       + i_ytmp,
-                                p_palette[ i_color ],
-                                i_bytes_per_pixel * ( ( i_len >> 6 ) + 1 ) );
+                        memset( p_dest - 2 * ( i_x >> 6 ) + i_ytmp,
+                                p_clut16[ i_color ],
+                                2 * ( ( i_len >> 6 ) + 1 ) );
                     }
                     }
+                    i_x -= i_len;
+                    break;
 
 
+                default:
+                    /* FIXME: we should do transparency */
+                    i_len = i_xscale * ( *p_source++ >> 2 );
+                    for( i_ytmp = i_yreal ; i_ytmp < i_ynext ;
+                         i_ytmp += p_vout->output.i_width * 2 )
+                    {
+                        memset( p_dest - 2 * ( i_x >> 6 ) + i_ytmp,
+                                p_clut16[ i_color ],
+                                2 * ( ( i_len >> 6 ) + 1 ) );
+                    }
                     i_x -= i_len;
                     i_x -= i_len;
-                    continue;
+                    break;
                 }
                 }
-
-                i_x -= i_xscale * ( *p_source++ >> 2 );
             }
         }
     }
             }
         }
     }
-}
-#endif
-
-/*****************************************************************************
- * vout_RenderSPU: draw an SPU on an YUV overlay
- *****************************************************************************
- * This is a fast implementation of the subpicture drawing code. The data
- * has been preprocessed once in spu_decoder.c, so we don't need to parse the
- * RLE buffer again and again. Most sanity checks are done in spu_decoder.c
- * so that this routine can be as fast as possible.
- *****************************************************************************/
-static void vout_RenderSPU( const vout_thread_t *p_vout, picture_t *p_pic,
-                            const subpicture_t *p_spu )
-{
-    int  i_len, i_color;
-    u16 *p_source = (u16 *)p_spu->p_data;
-
-    int i_x, i_y;
 
 
-    u8 *p_dest = p_pic->p->p_pixels + p_spu->i_x + p_spu->i_width
-                   + p_vout->output.i_width * ( p_spu->i_y + p_spu->i_height );
-
-    /* Draw until we reach the bottom of the subtitle */
-    i_y = p_spu->i_height * p_vout->output.i_width;
-
-    while( i_y )
-    {
-        /* Draw until we reach the end of the line */
-        i_x = p_spu->i_width;
-
-        while( i_x )
-        {
-            /* Draw the line if needed */
-            i_color = *p_source & 0x3;
-
-            if( i_color )
-            {
-                i_len = *p_source++ >> 2;
-                memset( p_dest - i_x - i_y, p_palette[ i_color ], i_len );
-                i_x -= i_len;
-                continue;
-            }
-
-            i_x -= *p_source++ >> 2;
-        }
+    break;
 
 
-        i_y -= p_vout->output.i_width;
+    default:
+        intf_ErrMsg( "vout error: unknown chroma, can't render SPU" );
+        break;
     }
 }
 
     }
 }