]> git.sesse.net Git - vlc/commitdiff
* libdvdcss enhancements by Billy Biggs <vektor@dumbterm.net>. This breaks
authorSam Hocevar <sam@videolan.org>
Wed, 11 Jul 2001 02:01:05 +0000 (02:01 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 11 Jul 2001 02:01:05 +0000 (02:01 +0000)
    vlc's DVD input (looks like decoders are expecting data too early and
    DVD input can't cope with it due to decryption). Needs to be investigated.
  * Plugins are now compiled in plugins/* and libraries in lib/*.
  * The KDE UI compiles again but does not work yet.
  * ALSA plugin message corrections.
  * Calculation modules can now be calledwith a shorter name
    (eg. '--downmix mmx' instead of '--downmix downmixmmx').
  * Fixed insane verbosity of the SDL plugin.

62 files changed:
AUTHORS
Makefile
Makefile.opts.in
configure
configure.in
extras/libdvdcss/css.c
extras/libdvdcss/css.h
extras/libdvdcss/csstables.h
extras/libdvdcss/libdvdcss.c
extras/libdvdcss/libdvdcss.h
extras/libdvdcss/videolan/dvdcss.h
lib/.cvsignore
plugins/.cvsignore [new file with mode: 0644]
plugins/alsa/Makefile
plugins/alsa/aout_alsa.c
plugins/beos/Makefile
plugins/darwin/Makefile
plugins/directx/Makefile
plugins/downmix/Makefile
plugins/downmix/downmix.c
plugins/downmix/downmix3dn.c
plugins/downmix/downmixsse.c
plugins/dsp/Makefile
plugins/dummy/Makefile
plugins/dvd/Makefile
plugins/dvd/input_dvd.c
plugins/esd/Makefile
plugins/fb/Makefile
plugins/ggi/Makefile
plugins/glide/Makefile
plugins/gtk/Makefile
plugins/idct/Makefile
plugins/idct/idct.c
plugins/idct/idctaltivec.c
plugins/idct/idctclassic.c
plugins/idct/idctmmx.c
plugins/idct/idctmmxext.c
plugins/imdct/Makefile
plugins/imdct/imdct.c
plugins/imdct/imdct3dn.c
plugins/imdct/imdctsse.c
plugins/kde/Makefile
plugins/kde/intf_plugin.h
plugins/kde/kde.cpp
plugins/macosx/Makefile
plugins/mga/Makefile
plugins/motion/Makefile
plugins/motion/motion.c
plugins/motion/motionmmx.c
plugins/motion/motionmmxext.c
plugins/mpeg/Makefile
plugins/qt/Makefile
plugins/sdl/Makefile
plugins/sdl/vout_sdl.c
plugins/text/Makefile
plugins/x11/Makefile
plugins/yuv/Makefile
plugins/yuv/video_yuv.c
plugins/yuv/video_yuvmmx.c
src/misc/modules.c
src/video_output/video_output.c
src/video_parser/vpar_synchro.c

diff --git a/AUTHORS b/AUTHORS
index 037bcd0384b0b0c82cdf186a6963d08c074789c5..e42bfc46125bc431fa69ba387ec5f4e9f5d22116 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -21,9 +21,14 @@ D: directory browsing code in modules.c
 
 N: Gildas Bazin
 E: gbazin@netcourrier.com
+C: gbazin
 D: mingw32 port, various win32 fixes
 D: DirectX audio and video output
 
+N: Billy Biggs 
+E: vektor@dumbterm.net
+D: libdvdcss enhancements
+
 N: Stéphane Borel
 E: stef@via.ecp.fr
 C: stef
index caa4b0e993f601195eff3873331278bd9b376231..9ff7b72e9443e77facac3ddc42e005554c11092a 100644 (file)
--- a/Makefile
+++ b/Makefile
 # 
 # All possible plugin directories, needed for make clean
 #
-PLUGINS_DIR := alsa beos darwin directx dsp dummy dvd esd fb ggi glide gtk downmix idct imdct macosx mga motion mpeg qt sdl text x11 yuv
+PLUGINS_DIR := alsa beos darwin directx dsp dummy dvd esd fb ggi glide gtk downmix idct imdct kde macosx mga motion mpeg qt sdl text x11 yuv
 
 #
 # All possible plugin objects
 #
-PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin directx/directx dsp/dsp dummy/dummy dummy/null dvd/dvd esd/esd fb/fb ggi/ggi glide/glide gtk/gnome gtk/gtk downmix/downmix downmix/downmixsse downmix/downmix3dn idct/idct idct/idctclassic idct/idctmmx idct/idctmmxext imdct/imdct imdct/imdct3dn imdct/imdctsse macosx/macosx mga/mga motion/motion motion/motionmmx motion/motionmmxext mpeg/es mpeg/ps mpeg/ts qt/qt sdl/sdl text/ncurses text/rc x11/x11 x11/xvideo yuv/yuv yuv/yuvmmx
+PLUGINS_TARGETS := alsa/alsa beos/beos darwin/darwin directx/directx dsp/dsp dummy/dummy dummy/null dvd/dvd esd/esd fb/fb ggi/ggi glide/glide gtk/gnome gtk/gtk downmix/downmix downmix/downmixsse downmix/downmix3dn idct/idct idct/idctclassic idct/idctmmx idct/idctmmxext imdct/imdct imdct/imdct3dn imdct/imdctsse kde/kde macosx/macosx mga/mga motion/motion motion/motionmmx motion/motionmmxext mpeg/es mpeg/ps mpeg/ts qt/qt sdl/sdl text/ncurses text/rc x11/x11 x11/xvideo yuv/yuv yuv/yuvmmx
 
 #
 # C Objects
@@ -83,10 +83,10 @@ CPP_DEP := $(CPP_OBJ:%.o=.dep/%.dpp)
 # Translate plugin names
 #
 ifneq (,$(PLUGINS))
-PLUGIN_OBJ := $(shell for i in $(PLUGINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.*/\('$$i'\) .*@lib/\1.so@' -e 's@^ .*@@' ; done)
+PLUGIN_OBJ := $(shell for i in $(PLUGINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.*/\('$$i'\) .*@plugins/\1.so@' -e 's@^ .*@@' ; done)
 endif
 ifneq (,$(BUILTINS))
-BUILTIN_OBJ := $(shell for i in $(BUILTINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.*/\('$$i'\) .*@lib/\1.a@' -e 's@^ .*@@' ; done)
+BUILTIN_OBJ := $(shell for i in $(BUILTINS) ; do echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.*/\('$$i'\) .*@plugins/\1.a@' -e 's@^ .*@@' ; done)
 endif
 
 # All symbols must be exported
@@ -104,6 +104,7 @@ all: vlc ${ALIASES} plugins vlc.app
 clean: libdvdcss-clean plugins-clean vlc-clean
        rm -f src/*/*.o extras/*/*.o
        rm -f lib/*.so lib/*.so.* lib/*.a
+       rm -f plugins/*.so plugins/*.so.* plugins/*.a
 
 libdvdcss-clean:
        cd extras/libdvdcss && $(MAKE) clean
@@ -144,7 +145,7 @@ endif
 plugins-install:
        mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
 ifneq (,$(PLUGINS))
-       $(INSTALL) -m 644 $(PLUGINS:%=lib/%.so) $(DESTDIR)$(libdir)/videolan/vlc
+       $(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/videolan/vlc
 endif
 
 libdvdcss-install:
@@ -270,7 +271,7 @@ ifneq (,$(findstring darwin,$(SYS)))
        $(INSTALL) vlc vlc.app/Contents/MacOS/
        $(INSTALL) share/vlc.icns vlc.app/Contents/Resources/
 ifneq (,$(PLUGINS))
-       $(INSTALL) $(PLUGINS:%=lib/%.so) vlc.app/Contents/MacOS/lib
+       $(INSTALL) $(PLUGINS:%=plugins/%.so) vlc.app/Contents/MacOS/plugins
 endif
        $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
 endif
@@ -343,14 +344,14 @@ endif
 #
 plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
 $(PLUGIN_OBJ): FORCE
-       cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:lib/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%)
+       cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%)
 
 #
 # Built-in modules target
 #
 builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
 $(BUILTIN_OBJ): FORCE
-       cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:lib/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%)
+       cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:%=../../%)
 
 #
 # libdvdcss target
index e027a9947de6ed5a8e86eb8c82d21dd800630ea2..d823003ac205109e4340604b7ac8f7920eef10b6 100644 (file)
@@ -72,6 +72,7 @@ LIB_GLIDE = @LIB_GLIDE@
 LIB_GNOME = @LIB_GNOME@
 LIB_GTK = @LIB_GTK@
 LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
+LIB_KDE = @LIB_KDE@
 LIB_MACOSX = @LIB_MACOSX@
 LIB_NCURSES = @LIB_NCURSES@
 LIB_QT = @LIB_QT@
index fbec586b2d01be4b207ae45ca5c5e26b89b8276c..e22d479fc59b0c62870bc56ff7f98f178fe7a87f 100755 (executable)
--- a/configure
+++ b/configure
@@ -4208,7 +4208,11 @@ fi
 # Check whether --enable-kde or --disable-kde was given.
 if test "${enable_kde+set}" = set; then
   enableval="$enable_kde"
-  if test x$enable_kde = xyes; then PLUGINS="${PLUGINS} kde"; ALIASES="${ALIASES} kvlc"; fi
+  if test x$enable_kde = xyes; then
+     PLUGINS="${PLUGINS} kde";
+     ALIASES="${ALIASES} kvlc";
+     LIB_KDE="-lkfile"
+   fi
 fi
 
 
@@ -4233,7 +4237,7 @@ if test x$enable_gtk != xno; then
   # 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:4237: checking for $ac_word" >&5
+echo "configure:4241: 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
@@ -4293,17 +4297,17 @@ if test x$enable_x11 != xno; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4297: checking for $ac_hdr" >&5
+echo "configure:4301: 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
-#line 4302 "configure"
+#line 4306 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4311: \"$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*
@@ -4355,17 +4359,17 @@ if test x$enable_xvideo != xno; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4359: checking for $ac_hdr" >&5
+echo "configure:4363: 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
-#line 4364 "configure"
+#line 4368 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4373: \"$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*
@@ -4403,17 +4407,17 @@ if test "${enable_alsa+set}" = set; then
   enableval="$enable_alsa"
   if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
-echo "configure:4407: checking for sys/asoundlib.h" >&5
+echo "configure:4411: checking for sys/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
-#line 4412 "configure"
+#line 4416 "configure"
 #include "confdefs.h"
 #include <sys/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4421: \"$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*
@@ -4430,7 +4434,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
-echo "configure:4434: checking for main in -lasound" >&5
+echo "configure:4438: 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
@@ -4438,14 +4442,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4442 "configure"
+#line 4446 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:4449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4453: \"$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
@@ -4526,6 +4530,7 @@ fi
 
 
 
+
 
 
 trap '' 1 2 15
@@ -4708,6 +4713,7 @@ s%@LIB_GLIDE@%$LIB_GLIDE%g
 s%@LIB_GNOME@%$LIB_GNOME%g
 s%@LIB_GTK@%$LIB_GTK%g
 s%@LIB_IDCTALTIVEC@%$LIB_IDCTALTIVEC%g
+s%@LIB_KDE@%$LIB_KDE%g
 s%@LIB_MACOSX@%$LIB_MACOSX%g
 s%@LIB_NCURSES@%$LIB_NCURSES%g
 s%@LIB_QT@%$LIB_QT%g
index 28a74fce5d964cc497b0279a142a1d8ff7bd625c..ba42419479df23eff40484df677bfd7ac2513a80 100644 (file)
@@ -531,7 +531,11 @@ dnl  KDE module
 dnl
 AC_ARG_ENABLE(kde,
   [  --enable-kde            KDE interface support (default disabled)],
-  [if test x$enable_kde = xyes; then PLUGINS="${PLUGINS} kde"; ALIASES="${ALIASES} kvlc"; fi])
+  [if test x$enable_kde = xyes; then
+     PLUGINS="${PLUGINS} kde";
+     ALIASES="${ALIASES} kvlc";
+     LIB_KDE="-lkfile"
+   fi])
 
 dnl
 dnl  Gnome module
@@ -650,6 +654,7 @@ AC_SUBST(LIB_GLIDE)
 AC_SUBST(LIB_GNOME)
 AC_SUBST(LIB_GTK)
 AC_SUBST(LIB_IDCTALTIVEC)
+AC_SUBST(LIB_KDE)
 AC_SUBST(LIB_MACOSX)
 AC_SUBST(LIB_NCURSES)
 AC_SUBST(LIB_QT)
index da779219f6c11310e7fdd159b0fa4234b5774a7a..71338921649d0067601fefde6e2e1e39e360fd9d 100644 (file)
@@ -2,7 +2,7 @@
  * css.c: Functions for DVD authentification and unscrambling
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: css.c,v 1.4 2001/07/07 21:10:58 gbazin Exp $
+ * $Id: css.c,v 1.5 2001/07/11 02:01:03 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -56,7 +56,7 @@
 #ifdef HAVE_CSS
 static int  CSSGetASF    ( dvdcss_handle dvdcss );
 static void CSSCryptKey  ( int i_key_type, int i_varient,
-                           u8 const * pi_challenge, u8* pi_key );
+                           u8 const * p_challenge, u8* p_key );
 static int  CSSCracker   ( int i_start, unsigned char * p_crypted,
                            unsigned char * p_decrypted,
                            dvd_key_t * p_sector_key, dvd_key_t * p_key );
@@ -94,7 +94,7 @@ int CSSInit( dvdcss_handle dvdcss )
 {
 #ifdef HAVE_CSS
     /* structures defined in cdrom.h or dvdio.h */
-    char p_buffer[2048 + 4 + 1];
+    unsigned char p_buffer[2048 + 4 + 1];
     char psz_warning[32];
     int  i_agid = 0;
     int  i_ret = -1;
@@ -143,13 +143,13 @@ int CSSInit( dvdcss_handle dvdcss )
 
     for( i = 0 ; i < 10; ++i )
     {
-        dvdcss->css.disc.pi_challenge[i] = i;
+        dvdcss->css.disc.p_challenge[i] = i;
     }
 
     /* Get challenge from host */
     for( i = 0 ; i < 10 ; ++i )
     {
-        p_buffer[9-i] = dvdcss->css.disc.pi_challenge[i];
+        p_buffer[9-i] = dvdcss->css.disc.p_challenge[i];
     }
 
     /* Send challenge to LU */
@@ -169,16 +169,16 @@ int CSSInit( dvdcss_handle dvdcss )
     /* Send key1 to host */
     for( i = 0 ; i < KEY_SIZE ; i++ )
     {
-        dvdcss->css.disc.pi_key1[i] = p_buffer[4-i];
+        dvdcss->css.disc.p_key1[i] = p_buffer[4-i];
     }
 
     for( i = 0 ; i < 32 ; ++i )
     {
-        CSSCryptKey( 0, i, dvdcss->css.disc.pi_challenge,
-                           dvdcss->css.disc.pi_key_check );
+        CSSCryptKey( 0, i, dvdcss->css.disc.p_challenge,
+                           dvdcss->css.disc.p_key_check );
 
-        if( memcmp( dvdcss->css.disc.pi_key_check,
-                    dvdcss->css.disc.pi_key1, KEY_SIZE ) == 0 )
+        if( memcmp( dvdcss->css.disc.p_key_check,
+                    dvdcss->css.disc.p_key1, KEY_SIZE ) == 0 )
         {
             sprintf( psz_warning, "drive authentic, using variant %d", i );
             _dvdcss_debug( dvdcss, psz_warning );
@@ -203,17 +203,17 @@ int CSSInit( dvdcss_handle dvdcss )
     /* Send challenge to host */
     for( i = 0 ; i < 10 ; ++i )
     {
-        dvdcss->css.disc.pi_challenge[i] = p_buffer[9-i];
+        dvdcss->css.disc.p_challenge[i] = p_buffer[9-i];
     }
 
     CSSCryptKey( 1, dvdcss->css.disc.i_varient,
-                    dvdcss->css.disc.pi_challenge,
-                    dvdcss->css.disc.pi_key2 );
+                    dvdcss->css.disc.p_challenge,
+                    dvdcss->css.disc.p_key2 );
 
     /* Get key2 from host */
     for( i = 0 ; i < KEY_SIZE ; ++i )
     {
-        p_buffer[4-i] = dvdcss->css.disc.pi_key2[i];
+        p_buffer[4-i] = dvdcss->css.disc.p_key2[i];
     }
 
     /* Send key2 to LU */
@@ -225,14 +225,14 @@ int CSSInit( dvdcss_handle dvdcss )
 
     _dvdcss_debug( dvdcss, "authentication established" );
 
-    memcpy( dvdcss->css.disc.pi_challenge,
-            dvdcss->css.disc.pi_key1, KEY_SIZE );
-    memcpy( dvdcss->css.disc.pi_challenge+KEY_SIZE,
-            dvdcss->css.disc.pi_key2, KEY_SIZE );
+    memcpy( dvdcss->css.disc.p_challenge,
+            dvdcss->css.disc.p_key1, KEY_SIZE );
+    memcpy( dvdcss->css.disc.p_challenge+KEY_SIZE,
+            dvdcss->css.disc.p_key2, KEY_SIZE );
 
     CSSCryptKey( 2, dvdcss->css.disc.i_varient,
-                    dvdcss->css.disc.pi_challenge,
-                    dvdcss->css.disc.pi_key_check );
+                    dvdcss->css.disc.p_challenge,
+                    dvdcss->css.disc.p_key_check );
 
     _dvdcss_debug( dvdcss, "received session key" );
 
@@ -267,15 +267,9 @@ fprintf( stderr, "DISK KEY: %02x %02x %02x %02x %02x\n", p_buffer[0], p_buffer[1
     /* Unencrypt disc key using bus key */
     for( i = 0 ; i < 2048 ; i++ )
     {
-        p_buffer[ i ] ^= dvdcss->css.disc.pi_key_check[ 4 - (i % KEY_SIZE) ];
-    }
-    memcpy( dvdcss->css.disc.pi_key_check, p_buffer, 2048 );
-
-    /* initialize title key to know it empty */
-    for( i = 0 ; i < KEY_SIZE ; i++ )
-    {
-        dvdcss->css.pi_title_key[i] = 0;
+        p_buffer[ i ] ^= dvdcss->css.disc.p_key_check[ 4 - (i % KEY_SIZE) ];
     }
+    memcpy( dvdcss->css.disc.p_key_check, p_buffer, 2048 );
 
     /* Test authentication success */
     switch( CSSGetASF( dvdcss ) )
@@ -305,7 +299,7 @@ fprintf( stderr, "DISK KEY: %02x %02x %02x %02x %02x\n", p_buffer[0], p_buffer[1
  *****************************************************************************
  * The DVD should have been opened and authenticated before.
  *****************************************************************************/
-int CSSGetKey( dvdcss_handle dvdcss )
+int CSSGetKey( dvdcss_handle dvdcss, int i_pos, dvd_key_t p_titlekey )
 {
 #ifdef HAVE_CSS
     /*
@@ -313,9 +307,8 @@ int CSSGetKey( dvdcss_handle dvdcss )
      * with Frank A. Stevenson algorithm.
      * Does not use any player key table and ioctls.
      */
-    u8          pi_buf[0x800];
-    dvd_key_t   pi_key;
-    int         i_pos;
+    u8          p_buf[0x800];
+    dvd_key_t   p_key;
     boolean_t   b_encrypted;
     boolean_t   b_stop_scanning;
     int         i_blocks_read;
@@ -325,63 +318,62 @@ int CSSGetKey( dvdcss_handle dvdcss )
 
     for( i = 0 ; i < KEY_SIZE ; i++ )
     {
-        pi_key[i] = 0;
+        p_key[i] = 0;
     }
 
     b_encrypted = 0;
     b_stop_scanning = 0;
 
-    /* Position of the title on the disc */
-    i_pos = dvdcss->css.i_title_pos;
-
-    do {
-    i_pos = dvdcss_seek( dvdcss, i_pos );
-    i_blocks_read = dvdcss_read( dvdcss, pi_buf, 1, DVDCSS_NOFLAGS );
-
-    /* PES_scrambling_control */
-    if( pi_buf[0x14] & 0x30 )
+    do
     {
-        b_encrypted = 1;
-        i_best_plen = 0;
-        i_best_p = 0;
+        i_pos = dvdcss_seek( dvdcss, i_pos );
+        i_blocks_read = dvdcss_read( dvdcss, p_buf, 1, DVDCSS_NOFLAGS );
 
-        for( i = 2 ; i < 0x30 ; i++ )
+        /* PES_scrambling_control */
+        if( p_buf[0x14] & 0x30 )
         {
-            for( j = i+1 ; ( j < 0x80 ) &&
-                   ( pi_buf[0x7F - (j%i)] == pi_buf[0x7F-j] ) ; j++ );
+            b_encrypted = 1;
+            i_best_plen = 0;
+            i_best_p = 0;
+
+            for( i = 2 ; i < 0x30 ; i++ )
             {
-                if( j > i_best_plen )
+                for( j = i+1 ;
+                     j < 0x80 && ( p_buf[0x7F - (j%i)] == p_buf[0x7F-j] );
+                     j++ );
                 {
-                    i_best_plen = j;
-                    i_best_p = i;
+                    if( j > i_best_plen )
+                    {
+                        i_best_plen = j;
+                        i_best_p = i;
+                    }
                 }
             }
-        }
 
-        if( ( i_best_plen > 20 ) && ( i_best_plen / i_best_p >= 2) )
-        {
-            i = CSSCracker( 0,  &pi_buf[0x80],
-                    &pi_buf[0x80 - ( i_best_plen / i_best_p) *i_best_p],
-                    (dvd_key_t*)&pi_buf[0x54],
-                    &pi_key );
-            b_stop_scanning = ( i >= 0 );
+            if( ( i_best_plen > 20 ) && ( i_best_plen / i_best_p >= 2) )
+            {
+                i = CSSCracker( 0,  &p_buf[0x80],
+                        &p_buf[0x80 - ( i_best_plen / i_best_p) *i_best_p],
+                        (dvd_key_t*)&p_buf[0x54],
+                        &p_key );
+                b_stop_scanning = ( i >= 0 );
+            }
         }
-    }
 
-    i_pos += i_blocks_read;
-    } while( i_blocks_read == 0x1 && !b_stop_scanning);
+        i_pos += i_blocks_read;
+
+    } while( i_blocks_read == 0x1 && !b_stop_scanning );
 
-    if( b_stop_scanning)
+    if( b_stop_scanning )
     {
-            memcpy( dvdcss->css.pi_title_key,
-                    &pi_key, sizeof(dvd_key_t) );
+        memcpy( p_titlekey, &p_key, sizeof(dvd_key_t) );
         _dvdcss_debug( dvdcss, "vts key initialized" );
         return 0;
     }
 
     if( !b_encrypted )
     {
-        _dvdcss_debug( dvdcss, "this file was _NOT_ encrypted!" );
+        _dvdcss_debug( dvdcss, "file was unscrambled" );
         return 0;
     }
 
@@ -400,38 +392,38 @@ int CSSGetKey( dvdcss_handle dvdcss )
  * sec : sector to descramble
  * key : title key for this sector
  *****************************************************************************/
-int CSSDescrambleSector( dvd_key_t pi_key, u8* pi_sec )
+int CSSDescrambleSector( dvd_key_t p_key, u8* p_sec )
 {
 #ifdef HAVE_CSS
     unsigned int    i_t1, i_t2, i_t3, i_t4, i_t5, i_t6;
-    u8*             pi_end = pi_sec + 0x800;
+    u8*             p_end = p_sec + 0x800;
 
     /* PES_scrambling_control */
-    if( pi_sec[0x14] & 0x30)
+    if( p_sec[0x14] & 0x30)
     {
-        i_t1 = ((pi_key)[0] ^ pi_sec[0x54]) | 0x100;
-        i_t2 = (pi_key)[1] ^ pi_sec[0x55];
-        i_t3 = (((pi_key)[2]) | ((pi_key)[3] << 8) |
-               ((pi_key)[4] << 16)) ^ ((pi_sec[0x56]) |
-               (pi_sec[0x57] << 8) | (pi_sec[0x58] << 16));
+        i_t1 = ((p_key)[0] ^ p_sec[0x54]) | 0x100;
+        i_t2 = (p_key)[1] ^ p_sec[0x55];
+        i_t3 = (((p_key)[2]) | ((p_key)[3] << 8) |
+               ((p_key)[4] << 16)) ^ ((p_sec[0x56]) |
+               (p_sec[0x57] << 8) | (p_sec[0x58] << 16));
         i_t4 = i_t3 & 7;
         i_t3 = i_t3 * 2 + 8 - i_t4;
-        pi_sec += 0x80;
+        p_sec += 0x80;
         i_t5 = 0;
 
-        while( pi_sec != pi_end )
+        while( p_sec != p_end )
         {
-            i_t4 = pi_css_tab2[i_t2] ^ pi_css_tab3[i_t1];
+            i_t4 = p_css_tab2[i_t2] ^ p_css_tab3[i_t1];
             i_t2 = i_t1>>1;
             i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4;
-            i_t4 = pi_css_tab5[i_t4];
+            i_t4 = p_css_tab5[i_t4];
             i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^
                                          i_t3 ) >> 8 ) ^ i_t3 ) >> 5) & 0xff;
             i_t3 = (i_t3 << 8 ) | i_t6;
-            i_t6 = pi_css_tab4[i_t6];
+            i_t6 = p_css_tab4[i_t6];
             i_t5 += i_t6 + i_t4;
-            *pi_sec = pi_css_tab1[*pi_sec] ^( i_t5 & 0xff );
-            pi_sec++;
+            *p_sec = p_css_tab1[*p_sec] ^( i_t5 & 0xff );
+            p_sec++;
             i_t5 >>= 8;
         }
     }
@@ -491,16 +483,16 @@ static int CSSGetASF( dvdcss_handle dvdcss )
  * i_varient : between 0 and 31.
  *****************************************************************************/
 static void CSSCryptKey( int i_key_type, int i_varient,
-                         u8 const * pi_challenge, u8* pi_key )
+                         u8 const * p_challenge, u8* p_key )
 {
     /* Permutation table for challenge */
-    u8      ppi_perm_challenge[3][10] =
+    u8      pp_perm_challenge[3][10] =
             { { 1, 3, 0, 7, 5, 2, 9, 6, 4, 8 },
               { 6, 1, 9, 3, 8, 5, 7, 4, 0, 2 },
               { 4, 0, 3, 5, 7, 2, 8, 6, 1, 9 } };
 
     /* Permutation table for varient table for key2 and buskey */
-    u8      ppi_perm_varient[2][32] =
+    u8      pp_perm_varient[2][32] =
             { { 0x0a, 0x08, 0x0e, 0x0c, 0x0b, 0x09, 0x0f, 0x0d,
                 0x1a, 0x18, 0x1e, 0x1c, 0x1b, 0x19, 0x1f, 0x1d,
                 0x02, 0x00, 0x06, 0x04, 0x03, 0x01, 0x07, 0x05,
@@ -510,19 +502,19 @@ static void CSSCryptKey( int i_key_type, int i_varient,
                 0x13, 0x1b, 0x17, 0x1f, 0x03, 0x0b, 0x07, 0x0f,
                 0x11, 0x19, 0x15, 0x1d, 0x01, 0x09, 0x05, 0x0d } };
 
-    u8      pi_varients[32] =
+    u8      p_varients[32] =
             {   0xB7, 0x74, 0x85, 0xD0, 0xCC, 0xDB, 0xCA, 0x73,
                 0x03, 0xFE, 0x31, 0x03, 0x52, 0xE0, 0xB7, 0x42,
                 0x63, 0x16, 0xF2, 0x2A, 0x79, 0x52, 0xFF, 0x1B,
                 0x7A, 0x11, 0xCA, 0x1A, 0x9B, 0x40, 0xAD, 0x01 };
 
     /* The "secret" key */
-    u8      pi_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 };
+    u8      p_secret[5] = { 0x55, 0xD6, 0xC4, 0xC5, 0x28 };
 
-    u8      pi_bits[30];
-    u8      pi_scratch[10];
-    u8      pi_tmp1[5];
-    u8      pi_tmp2[5];
+    u8      p_bits[30];
+    u8      p_scratch[10];
+    u8      p_tmp1[5];
+    u8      p_tmp2[5];
     u8      i_lfsr0_o;  /* 1 bit used */
     u8      i_lfsr1_o;  /* 1 bit used */
     u32     i_lfsr0;
@@ -538,10 +530,10 @@ static void CSSCryptKey( int i_key_type, int i_varient,
     int     i;
 
     for (i = 9; i >= 0; --i)
-        pi_scratch[i] = pi_challenge[ppi_perm_challenge[i_key_type][i]];
+        p_scratch[i] = p_challenge[pp_perm_challenge[i_key_type][i]];
 
     i_css_varient = ( i_key_type == 0 ) ? i_varient :
-                    ppi_perm_varient[i_key_type-1][i_varient];
+                    pp_perm_varient[i_key_type-1][i_varient];
 
     /*
      * This encryption engine implements one of 32 variations
@@ -562,7 +554,7 @@ static void CSSCryptKey( int i_key_type, int i_varient,
      */
     for( i = 5 ; --i >= 0 ; )
     {
-        pi_tmp1[i] = pi_scratch[5 + i] ^ pi_secret[i] ^ pi_crypt_tab2[i];
+        p_tmp1[i] = p_scratch[5 + i] ^ p_secret[i] ^ p_crypt_tab2[i];
     }
 
     /*
@@ -592,11 +584,11 @@ static void CSSCryptKey( int i_key_type, int i_varient,
      * initial values are non-zero.  Thus when we initialise them from
      * the seed,  we ensure that a bit is set.
      */
-    i_lfsr0 = ( pi_tmp1[0] << 17 ) | ( pi_tmp1[1] << 9 ) |
-              (( pi_tmp1[2] & ~7 ) << 1 ) | 8 | ( pi_tmp1[2] & 7 );
-    i_lfsr1 = ( pi_tmp1[3] << 9 ) | 0x100 | pi_tmp1[4];
+    i_lfsr0 = ( p_tmp1[0] << 17 ) | ( p_tmp1[1] << 9 ) |
+              (( p_tmp1[2] & ~7 ) << 1 ) | 8 | ( p_tmp1[2] & 7 );
+    i_lfsr1 = ( p_tmp1[3] << 9 ) | 0x100 | p_tmp1[4];
 
-    i_index = sizeof(pi_bits);
+    i_index = sizeof(p_bits);
     i_carry = 0;
 
     do
@@ -617,74 +609,74 @@ static void CSSCryptKey( int i_key_type, int i_varient,
             i_val |= ( i_combined & 1 ) << i_bit;
         }
     
-        pi_bits[--i_index] = i_val;
+        p_bits[--i_index] = i_val;
     } while( i_index > 0 );
 
     /* This term is used throughout the following to
      * select one of 32 different variations on the
      * algorithm.
      */
-    i_cse = pi_varients[i_css_varient] ^ pi_crypt_tab2[i_css_varient];
+    i_cse = p_varients[i_css_varient] ^ p_crypt_tab2[i_css_varient];
 
     /* Now the actual blocks doing the encryption.  Each
      * of these works on 40 bits at a time and are quite
      * similar.
      */
     i_index = 0;
-    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_scratch[i] )
+    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_scratch[i] )
     {
-        i_index = pi_bits[25 + i] ^ pi_scratch[i];
-        i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
+        i_index = p_bits[25 + i] ^ p_scratch[i];
+        i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse;
 
-        pi_tmp1[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
+        p_tmp1[i] = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term;
     }
-    pi_tmp1[4] ^= pi_tmp1[0];
+    p_tmp1[4] ^= p_tmp1[0];
 
-    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
+    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp1[i] )
     {
-        i_index = pi_bits[20 + i] ^ pi_tmp1[i];
-        i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
+        i_index = p_bits[20 + i] ^ p_tmp1[i];
+        i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse;
 
-        pi_tmp2[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
+        p_tmp2[i] = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term;
     }
-    pi_tmp2[4] ^= pi_tmp2[0];
+    p_tmp2[4] ^= p_tmp2[0];
 
-    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp2[i] )
+    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp2[i] )
     {
-        i_index = pi_bits[15 + i] ^ pi_tmp2[i];
-        i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
-        i_index = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
+        i_index = p_bits[15 + i] ^ p_tmp2[i];
+        i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse;
+        i_index = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term;
 
-        pi_tmp1[i] = pi_crypt_tab0[i_index] ^ pi_crypt_tab2[i_index];
+        p_tmp1[i] = p_crypt_tab0[i_index] ^ p_crypt_tab2[i_index];
     }
-    pi_tmp1[4] ^= pi_tmp1[0];
+    p_tmp1[4] ^= p_tmp1[0];
 
-    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
+    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp1[i] )
     {
-        i_index = pi_bits[10 + i] ^ pi_tmp1[i];
-        i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
+        i_index = p_bits[10 + i] ^ p_tmp1[i];
+        i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse;
 
-        i_index = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
+        i_index = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term;
 
-        pi_tmp2[i] = pi_crypt_tab0[i_index] ^ pi_crypt_tab2[i_index];
+        p_tmp2[i] = p_crypt_tab0[i_index] ^ p_crypt_tab2[i_index];
     }
-    pi_tmp2[4] ^= pi_tmp2[0];
+    p_tmp2[4] ^= p_tmp2[0];
 
-    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp2[i] )
+    for( i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp2[i] )
     {
-        i_index = pi_bits[5 + i] ^ pi_tmp2[i];
-        i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
+        i_index = p_bits[5 + i] ^ p_tmp2[i];
+        i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse;
 
-        pi_tmp1[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
+        p_tmp1[i] = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term;
     }
-    pi_tmp1[4] ^= pi_tmp1[0];
+    p_tmp1[4] ^= p_tmp1[0];
 
-    for(i = 5, i_term = 0 ; --i >= 0 ; i_term = pi_tmp1[i] )
+    for(i = 5, i_term = 0 ; --i >= 0 ; i_term = p_tmp1[i] )
     {
-        i_index = pi_bits[i] ^ pi_tmp1[i];
-        i_index = pi_crypt_tab1[i_index] ^ ~pi_crypt_tab2[i_index] ^ i_cse;
+        i_index = p_bits[i] ^ p_tmp1[i];
+        i_index = p_crypt_tab1[i_index] ^ ~p_crypt_tab2[i_index] ^ i_cse;
 
-        pi_key[i] = pi_crypt_tab2[i_index] ^ pi_crypt_tab3[i_index] ^ i_term;
+        p_key[i] = p_crypt_tab2[i_index] ^ p_crypt_tab3[i_index] ^ i_term;
     }
 
     return;
@@ -701,7 +693,7 @@ static int CSSCracker( int i_start,
                        dvd_key_t * p_sector_key,
                        dvd_key_t * p_key )
 {
-    unsigned char pi_buffer[10];
+    unsigned char p_buffer[10];
     unsigned int i_t1, i_t2, i_t3, i_t4, i_t5, i_t6;
     unsigned int i_try;
     unsigned int i_candidate;
@@ -711,7 +703,7 @@ static int CSSCracker( int i_start,
 
     for( i = 0 ; i < 10 ; i++ )
     {
-        pi_buffer[i] = pi_css_tab1[p_crypted[i]] ^ p_decrypted[i];
+        p_buffer[i] = p_css_tab1[p_crypted[i]] ^ p_decrypted[i];
     }
 
     for( i_try = i_start ; i_try < 0x10000 ; i_try++ )
@@ -725,12 +717,12 @@ static int CSSCracker( int i_start,
         for( i = 0 ; i < 4 ; i++ )
         {
             /* advance LFSR1 normaly */
-            i_t4 = pi_css_tab2[i_t2] ^ pi_css_tab3[i_t1];
+            i_t4 = p_css_tab2[i_t2] ^ p_css_tab3[i_t1];
             i_t2 = i_t1 >> 1;
             i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4;
-            i_t4 = pi_css_tab5[i_t4];
+            i_t4 = p_css_tab5[i_t4];
             /* deduce i_t6 & i_t5 */
-            i_t6 = pi_buffer[i];
+            i_t6 = p_buffer[i];
             if( i_t5 )
             {
                 i_t6 = ( i_t6 + 0xff ) & 0x0ff;
@@ -741,7 +733,7 @@ static int CSSCracker( int i_start,
             }
             i_t6 -= i_t4;
             i_t5 += i_t6 + i_t4;
-            i_t6 = pi_css_tab4[ i_t6 ];
+            i_t6 = p_css_tab4[ i_t6 ];
             /* feed / advance i_t3 / i_t5 */
             i_t3 = ( i_t3 << 8 ) | i_t6;
             i_t5 >>= 8;
@@ -752,16 +744,16 @@ static int CSSCracker( int i_start,
         /* iterate 6 more times to validate candidate key */
         for( ; i < 10 ; i++ )
         {
-            i_t4 = pi_css_tab2[i_t2] ^ pi_css_tab3[i_t1];
+            i_t4 = p_css_tab2[i_t2] ^ p_css_tab3[i_t1];
             i_t2 = i_t1 >> 1;
             i_t1 = ( ( i_t1 & 1 ) << 8 ) ^ i_t4;
-            i_t4 = pi_css_tab5[i_t4];
+            i_t4 = p_css_tab5[i_t4];
             i_t6 = ((((((( i_t3 >> 3 ) ^ i_t3 ) >> 1 ) ^
                                          i_t3 ) >> 8 ) ^ i_t3 ) >> 5 ) & 0xff;
             i_t3 = ( i_t3 << 8 ) | i_t6;
-            i_t6 = pi_css_tab4[i_t6];
+            i_t6 = p_css_tab4[i_t6];
             i_t5 += i_t6 + i_t4;
-            if( ( i_t5 & 0xff ) != pi_buffer[i] )
+            if( ( i_t5 & 0xff ) != p_buffer[i] )
             {
                 break;
             }
index cc08e16fb3d41e713e99ad70e092fd4caf42570e..d1c53045d2e7b3ad0e4b7d0a0b0504a3e8dc35b7 100644 (file)
@@ -2,7 +2,7 @@
  * css.h: Structures for DVD authentification and unscrambling
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: css.h,v 1.3 2001/07/07 21:10:58 gbazin Exp $
+ * $Id: css.h,v 1.4 2001/07/11 02:01:03 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -32,27 +32,25 @@ typedef u8 dvd_key_t[KEY_SIZE];
 
 typedef struct disc_s
 {
-    u8              pi_challenge[2*KEY_SIZE];
-    dvd_key_t       pi_key1;
-    dvd_key_t       pi_key2;
-    dvd_key_t       pi_key_check;
+    u8              p_challenge[2*KEY_SIZE];
+    dvd_key_t       p_key1;
+    dvd_key_t       p_key2;
+    dvd_key_t       p_key_check;
     u8              i_varient;
 } disc_t;
 
 typedef struct title_key_s
 {
-    int             i_occ;
-    dvd_key_t       pi_key;
+    int                 i_startlb;
+    dvd_key_t           p_key;
+    struct title_key_s *p_next;
 } title_key_t;
 
 typedef struct css_s
 {
     int             i_agid;
     disc_t          disc;
-    u8              pi_disc_key[2048];
-    int             i_title;
-    int             i_title_pos;
-    dvd_key_t       pi_title_key;
+    u8              p_disc_key[2048];
 } css_t;
 
 /*****************************************************************************
@@ -62,6 +60,6 @@ struct css_s;
 
 int   CSSTest             ( dvdcss_handle );
 int   CSSInit             ( dvdcss_handle );
-int   CSSGetKey           ( dvdcss_handle );
+int   CSSGetKey           ( dvdcss_handle, int, dvd_key_t );
 int   CSSDescrambleSector ( u8 * , u8 * );
 
index c223e2d521578a0d8993bf036c7c4c90343e0c44..d8b5fcd7620899ba73d1e15c908d42c515fb565a 100644 (file)
@@ -2,7 +2,7 @@
  * csstables.h: CSS Tables for DVD unscrambling
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: csstables.h,v 1.1 2001/06/12 22:14:44 sam Exp $
+ * $Id: csstables.h,v 1.2 2001/07/11 02:01:03 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -29,7 +29,7 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  *****************************************************************************/
 
-static u8 pi_css_tab1[ 256 ] =
+static u8 p_css_tab1[ 256 ] =
 {
     0x33, 0x73, 0x3b, 0x26, 0x63, 0x23, 0x6b, 0x76,
     0x3e, 0x7e, 0x36, 0x2b, 0x6e, 0x2e, 0x66, 0x7b,
@@ -65,7 +65,7 @@ static u8 pi_css_tab1[ 256 ] =
     0xba, 0xfa, 0xb2, 0xaf, 0xea, 0xaa, 0xe2, 0xff
 };
 
-static u8 pi_css_tab2[ 256 ] =
+static u8 p_css_tab2[ 256 ] =
 {
     0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
     0x09, 0x08, 0x0b, 0x0a, 0x0d, 0x0c, 0x0f, 0x0e,
@@ -101,7 +101,7 @@ static u8 pi_css_tab2[ 256 ] =
     0xe4, 0xe5, 0xe6, 0xe7, 0xe0, 0xe1, 0xe2, 0xe3
 };
 
-static u8 pi_css_tab3[ 512 ] =
+static u8 p_css_tab3[ 512 ] =
 {
     0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
     0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff,
@@ -169,7 +169,7 @@ static u8 pi_css_tab3[ 512 ] =
     0x00, 0x24, 0x49, 0x6d, 0x92, 0xb6, 0xdb, 0xff
 };
 
-static u8 pi_css_tab4[ 256 ] =
+static u8 p_css_tab4[ 256 ] =
 {
     0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
     0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
@@ -205,7 +205,7 @@ static u8 pi_css_tab4[ 256 ] =
     0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
 };
 
-static u8 pi_css_tab5[ 256 ] =
+static u8 p_css_tab5[ 256 ] =
 {
     0xff, 0x7f, 0xbf, 0x3f, 0xdf, 0x5f, 0x9f, 0x1f,
     0xef, 0x6f, 0xaf, 0x2f, 0xcf, 0x4f, 0x8f, 0x0f,
@@ -241,7 +241,7 @@ static u8 pi_css_tab5[ 256 ] =
     0xe0, 0x60, 0xa0, 0x20, 0xc0, 0x40, 0x80, 0x00
 };
 
-static u8 pi_crypt_tab0[ 256 ] =
+static u8 p_crypt_tab0[ 256 ] =
 {
     0xB7, 0xF4, 0x82, 0x57, 0xDA, 0x4D, 0xDB, 0xE2,
     0x2F, 0x52, 0x1A, 0xA8, 0x68, 0x5A, 0x8A, 0xFF,
@@ -277,7 +277,7 @@ static u8 pi_crypt_tab0[ 256 ] =
     0xAD, 0x94, 0x77, 0x04, 0x9A, 0x39, 0xCF, 0x7C
 };
 
-static u8 pi_crypt_tab1[ 256 ] =
+static u8 p_crypt_tab1[ 256 ] =
 {
     0x8C, 0x47, 0xB0, 0xE1, 0xEB, 0xFC, 0xEB, 0x56,
     0x10, 0xE5, 0x2C, 0x1A, 0x5D, 0xEF, 0xBE, 0x4F,
@@ -313,7 +313,7 @@ static u8 pi_crypt_tab1[ 256 ] =
     0xAA, 0x1B, 0x79, 0x8E, 0x97, 0xB4, 0xC3, 0xF4
 };
 
-static u8 pi_crypt_tab2[ 256 ] =
+static u8 p_crypt_tab2[ 256 ] =
 {
     0xB7, 0x75, 0x81, 0xD5, 0xDC, 0xCA, 0xDE, 0x66,
     0x23, 0xDF, 0x15, 0x26, 0x62, 0xD1, 0x83, 0x77,
@@ -349,7 +349,7 @@ static u8 pi_crypt_tab2[ 256 ] =
     0x29, 0x91, 0xF0, 0x02, 0x18, 0x3A, 0x4E, 0x7C 
 };
 
-static u8 pi_crypt_tab3[ 288 ] =
+static u8 p_crypt_tab3[ 288 ] =
 {
     0x73, 0x51, 0x95, 0xE1, 0x12, 0xE4, 0xC0, 0x58,
     0xEE, 0xF2, 0x08, 0x1B, 0xA9, 0xFA, 0x98, 0x4C,
index f935d25029160f5ec06130e02f1db5de0460f4a2..7284a98725647df1ade33654b0e1f140ba4c1d7a 100644 (file)
@@ -2,7 +2,7 @@
  * libdvdcss.c: DVD reading library.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: libdvdcss.c,v 1.4 2001/07/07 21:10:58 gbazin Exp $
+ * $Id: libdvdcss.c,v 1.5 2001/07/11 02:01:03 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -94,6 +94,7 @@ extern dvdcss_handle dvdcss_open ( char *psz_target, int i_flags )
     }
 
     /* Initialize structure */
+    dvdcss->p_keys = NULL;
     dvdcss->b_debug = i_flags & DVDCSS_INIT_DEBUG;
     dvdcss->b_errors = !(i_flags & DVDCSS_INIT_QUIET);
     dvdcss->psz_error = "no error";
@@ -151,8 +152,12 @@ extern int dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks )
 /*****************************************************************************
  * dvdcss_crack: crack the current title key
  *****************************************************************************/
-extern int dvdcss_crack ( dvdcss_handle dvdcss, int i_title, int i_block )
+extern int dvdcss_crack ( dvdcss_handle dvdcss, int i_block )
 {
+    title_key_t **pp_writekey;
+    title_key_t **pp_currentkey;
+    title_key_t *p_titlekey;
+    dvd_key_t p_key;
     int i_ret;
 
     if( ! dvdcss->b_encrypted )
@@ -160,11 +165,23 @@ extern int dvdcss_crack ( dvdcss_handle dvdcss, int i_title, int i_block )
         return 0;
     }
 
-    /* Crack CSS title key for current VTS */
-    dvdcss->css.i_title = i_title;
-    dvdcss->css.i_title_pos = i_block;
+    /* Check if we've already cracked this key */
+    p_titlekey = dvdcss->p_keys;
+    while( p_titlekey != NULL
+            && p_titlekey->p_next != NULL
+            && p_titlekey->p_next->i_startlb < i_block )
+    {
+        p_titlekey = p_titlekey->p_next;
+    }
 
-    i_ret = CSSGetKey( dvdcss );
+    if( p_titlekey != NULL && p_titlekey->i_startlb == i_block )
+    {
+        /* We've already cracked this key, nothing to do */
+        return 0;
+    }
+
+    /* Crack CSS title key for current VTS */
+    i_ret = CSSGetKey( dvdcss, i_block, p_key );
 
     if( i_ret < 0 )
     {
@@ -177,6 +194,27 @@ extern int dvdcss_crack ( dvdcss_handle dvdcss, int i_title, int i_block )
         return -1;
     }
 
+    /* Add key to keytable if it isn't empty */
+    if( p_key[0] || p_key[1] || p_key[2] || p_key[3] || p_key[4] )
+    {
+        /* Find our spot in the list */
+        pp_writekey = &(dvdcss->p_keys);
+        pp_currentkey = pp_writekey;
+        while( *pp_currentkey != NULL
+                && (*pp_currentkey)->i_startlb < i_block )
+        {
+            pp_writekey = pp_currentkey;
+            pp_currentkey = &((*pp_currentkey)->p_next);
+        }
+
+        /* Write in the new key */
+        p_titlekey = *pp_writekey;
+        *pp_writekey = malloc( sizeof( title_key_t ) );
+        (*pp_writekey)->i_startlb = i_block;
+        memcpy( (*pp_writekey)->p_key, p_key, KEY_SIZE );
+        (*pp_writekey)->p_next = p_titlekey;
+    }
+
     return 0;
 }
 
@@ -187,26 +225,42 @@ extern int dvdcss_read ( dvdcss_handle dvdcss, void *p_buffer,
                                                int i_blocks,
                                                int i_flags )
 {
-    int i_ret;
+    title_key_t *p_current;
+    int i_ret, i_index;
 
     i_ret = _dvdcss_read( dvdcss, p_buffer, i_blocks );
 
-    if( i_ret != i_blocks
+    if( i_ret <= 0
          || !dvdcss->b_encrypted
          || !(i_flags & DVDCSS_READ_DECRYPT) )
     {
         return i_ret;
     }
 
-    while( i_ret )
+    /* find our key */
+    p_current = dvdcss->p_keys;
+    while( p_current != NULL
+            && p_current->p_next
+            && p_current->p_next->i_startlb < dvdcss->i_seekpos )
+    {
+        p_current = p_current->p_next;
+    }
+
+    if( p_current == NULL )
+    {
+        /* no css key found to use, so no decryption to do */
+        return 0;
+    }
+
+    /* Decrypt the blocks we managed to read */
+    for( i_index = i_ret; i_index; i_index-- )
     {
-        CSSDescrambleSector( dvdcss->css.pi_title_key, p_buffer );
+        CSSDescrambleSector( p_current->p_key, p_buffer );
         ((u8*)p_buffer)[0x14] &= 0x8f;
         (u8*)p_buffer += DVDCSS_BLOCK_SIZE;
-        i_ret--;
     }
 
-    return i_blocks;
+    return i_ret;
 }
 
 /*****************************************************************************
@@ -217,24 +271,42 @@ extern int dvdcss_readv ( dvdcss_handle dvdcss, void *p_iovec,
                                                 int i_flags )
 {
 #define P_IOVEC ((struct iovec*)p_iovec)
-    int i_ret;
+    title_key_t *p_current;
+    int i_ret, i_index;
     void *iov_base;
     size_t iov_len;
 
     i_ret = _dvdcss_readv( dvdcss, P_IOVEC, i_blocks );
 
-    if( i_ret != i_blocks
+    if( i_ret <= 0
          || !dvdcss->b_encrypted
          || !(i_flags & DVDCSS_READ_DECRYPT) )
     {
         return i_ret;
     }
 
+    /* Find our key */
+    p_current = dvdcss->p_keys;
+    while( p_current != NULL
+            && p_current->p_next
+            && p_current->p_next->i_startlb < dvdcss->i_seekpos )
+    {
+        p_current = p_current->p_next;
+    }
+
+    if( p_current == NULL )
+    {
+        /* no css key found to use, so no decryption to do */
+        return 0;
+    }
+
+
     /* Initialize loop for decryption */
     iov_base = P_IOVEC->iov_base;
     iov_len = P_IOVEC->iov_len;
 
-    while( i_ret )
+    /* Decrypt the blocks we managed to read */
+    for( i_index = i_ret; i_index; i_index-- )
     {
         /* Check that iov_len is a multiple of 2048 */
         if( iov_len & 0x7ff )
@@ -249,16 +321,14 @@ extern int dvdcss_readv ( dvdcss_handle dvdcss, void *p_iovec,
             iov_len = P_IOVEC->iov_len;
         }
 
-        CSSDescrambleSector( dvdcss->css.pi_title_key, iov_base );
+        CSSDescrambleSector( p_current->p_key, iov_base );
         ((u8*)iov_base)[0x14] &= 0x8f;
 
         (u8*)iov_base += DVDCSS_BLOCK_SIZE;
         (u8*)iov_len -= DVDCSS_BLOCK_SIZE;
-
-        i_ret--;
     }
 
-    return i_blocks;
+    return i_ret;
 #undef P_IOVEC
 }
 
@@ -267,8 +337,18 @@ extern int dvdcss_readv ( dvdcss_handle dvdcss, void *p_iovec,
  *****************************************************************************/
 extern int dvdcss_close ( dvdcss_handle dvdcss )
 {
+    title_key_t *p_currentkey;
     int i_ret;
 
+    /* Free our list of keys */
+    p_currentkey = dvdcss->p_keys;
+    while( p_currentkey )
+    {
+        title_key_t *p_tmpkey = p_currentkey->p_next;
+        free( p_currentkey );
+        p_currentkey = p_tmpkey;
+    }
+
     i_ret = _dvdcss_close( dvdcss );
 
     if( i_ret < 0 )
@@ -344,7 +424,6 @@ static int _dvdcss_close ( dvdcss_handle dvdcss )
 
 static int _dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks )
 {
-
 #if defined( WIN32 )
     if( WIN2K )
     {
@@ -375,6 +454,8 @@ static int _dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks )
 #else
     off_t i_read;
 
+    dvdcss->i_seekpos = i_blocks;
+
     i_read = lseek( dvdcss->i_fd,
                     (off_t)i_blocks * (off_t)DVDCSS_BLOCK_SIZE, SEEK_SET );
 
@@ -385,28 +466,29 @@ static int _dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks )
 
 static int _dvdcss_read ( dvdcss_handle dvdcss, void *p_buffer, int i_blocks )
 {
-    int i_read;
-
 #if defined( WIN32 ) 
     if( WIN2K )
     {
+        int i_bytes;
+
         if( !ReadFile( (HANDLE) dvdcss->i_fd, p_buffer,
                   i_blocks * DVDCSS_BLOCK_SIZE,
-                  (LPDWORD)&i_read, NULL ) )
+                  (LPDWORD)&i_bytes, NULL ) )
         {
-            i_read = -DVDCSS_BLOCK_SIZE;
+            return -1;
         }
-        return i_read / DVDCSS_BLOCK_SIZE;
+        return i_bytes / DVDCSS_BLOCK_SIZE;
     }
     else
     {
-        i_read = _win32_dvdcss_aread( dvdcss->i_fd, p_buffer, i_blocks );
-        return i_read;
+        return _win32_dvdcss_aread( dvdcss->i_fd, p_buffer, i_blocks );
     }
 
-#else   
-    i_read = read( dvdcss->i_fd, p_buffer, (size_t)i_blocks * DVDCSS_BLOCK_SIZE );
-    return i_read / DVDCSS_BLOCK_SIZE;
+#else
+    int i_bytes;
+
+    i_bytes = read( dvdcss->i_fd, p_buffer, (size_t)i_blocks * DVDCSS_BLOCK_SIZE );
+    return i_bytes / DVDCSS_BLOCK_SIZE;
 #endif
 
 }
@@ -670,13 +752,15 @@ static int _win32_dvdcss_aread( int i_fd, void *p_data, int i_blocks )
 
     ResetEvent( hEvent );
     if( fd->lpSendCommand( (void*) &ssc ) == SS_PENDING )
+    {
         WaitForSingleObject( hEvent, INFINITE );
+    }
 
     CloseHandle( hEvent );
 
-    if(ssc.SRB_Status != SS_COMP)
+    if( ssc.SRB_Status != SS_COMP )
     {
-                return -1;
+        return -1;
     }
         
     fd->i_blocks += i_blocks;
@@ -685,3 +769,4 @@ static int _win32_dvdcss_aread( int i_fd, void *p_data, int i_blocks )
 }
 
 #endif
+
index 77b26647225450769d1188f586ce5b85e8f697d5..b50e10a70dbe6d51bd3edc7f16db45733bcfa3bf 100644 (file)
@@ -2,7 +2,7 @@
  * private.h: private DVD reading library data
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: libdvdcss.h,v 1.3 2001/06/14 02:47:44 sam Exp $
+ * $Id: libdvdcss.h,v 1.4 2001/07/11 02:01:03 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -34,10 +34,12 @@ struct dvdcss_s
 {
     /* File descriptor */
     int i_fd;
+    int i_seekpos;
 
     /* Decryption stuff */
-    css_t     css;
-    boolean_t b_encrypted;
+    css_t        css;
+    boolean_t    b_encrypted;
+    title_key_t *p_keys;
 
     /* Error management */
     char     *psz_error;
index f714a0e69f2db75810a1f1005c828dfb04059f49..acdc53ebd199e17b1a381e0a95bf3983973bdf88 100644 (file)
@@ -2,7 +2,7 @@
  * libdvdcss.h: DVD reading library, exported functions.
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: dvdcss.h,v 1.3 2001/06/20 07:43:48 sam Exp $
+ * $Id: dvdcss.h,v 1.4 2001/07/11 02:01:03 sam Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -46,7 +46,6 @@ extern dvdcss_handle dvdcss_open  ( char *psz_target,
                                     int i_flags );
 extern int           dvdcss_close ( dvdcss_handle );
 extern int           dvdcss_crack ( dvdcss_handle,
-                                    int i_title,
                                     int i_block );
 extern int           dvdcss_seek  ( dvdcss_handle,
                                     int i_blocks );
index 952bbd3b582ec54d22ece639ef796800f7880665..54d99fe3a83579dec1deb2a0ef65c2904acabb90 100644 (file)
@@ -1,2 +1,3 @@
+*.a
 *.so
 *.so.*
diff --git a/plugins/.cvsignore b/plugins/.cvsignore
new file mode 100644 (file)
index 0000000..54d99fe
--- /dev/null
@@ -0,0 +1,3 @@
+*.a
+*.so
+*.so.*
index 34bf64c22f292b996ab139a06a43578390af1cab..fc9124e04ea99b00e9b0f36a26ab5e8114bbe18d 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/alsa.so: $(PLUGIN_C)
+../../plugins/alsa.so: $(PLUGIN_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_ALSA)
 
-../../lib/alsa.a: $(BUILTIN_C)
+../../plugins/alsa.a: $(BUILTIN_C)
        ar r $@ $^
        $(RANLIB) $@
 
index bb370cf1f93e40034006dbb74161471c0e6f2a25..700432f9790e09e0b10ff7dafedaab6f92969312 100644 (file)
@@ -2,16 +2,16 @@
  * aout_alsa.c : Alsa functions library
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: aout_alsa.c,v 1.16 2001/05/30 17:03:11 sam Exp $
+ * $Id: aout_alsa.c,v 1.17 2001/07/11 02:01:03 sam Exp $
  *
  * Authors: Henri Fallon <henri@videolan.org> - Original Author
  *          Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
- * 
+ *
  * 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
@@ -88,38 +88,35 @@ static int aout_Probe( probedata_t *p_data )
 {
     int i_open_return, i_close_return;
     aout_sys_t local_sys;
-    
+
     /* Open device */
-    i_open_return = snd_pcm_open( &(local_sys.p_alsa_handle), "plug:0,0", 
+    i_open_return = snd_pcm_open( &(local_sys.p_alsa_handle), "plug:0,0",
                                   SND_PCM_STREAM_PLAYBACK, 0 );
     if( i_open_return )
     {
-        intf_ErrMsg( "Aout_alsa: error opening alsa device in aout_probe(%d)"
-                     " : %s", i_open_return, snd_strerror( i_open_return ) );
-        intf_WarnMsg( 1, "Aout_alsa : module scored 0" );
+        intf_WarnMsg( 2, "aout info: could not probe ALSA device (%s)",
+                      snd_strerror( i_open_return ) );
         return ( 0 );
     }
 
     /* Close it */
     i_close_return = snd_pcm_close( local_sys.p_alsa_handle );
-    
+
     if( i_close_return )
     {
-        intf_ErrMsg( "Aout_alsa: error closing alsa device in aout_probe(%d)"
-                     " : %s", i_close_return, snd_strerror( i_close_return ) );
-        intf_WarnMsg( 1, "Aout_alsa : module scored 0" );
+        intf_ErrMsg( "aout error: could not close ALSA device (%s)",
+                     snd_strerror( i_close_return ) );
         return( 0 );
     }
-    
+
     if( TestMethod( AOUT_METHOD_VAR, "alsa" ) )
     {
-        intf_WarnMsg( 1, "Aout_alsa : module scored 999" );
         return( 999 );
     }
 
     /* And return score */
     return( 100 );
-}    
+}
 
 /*****************************************************************************
  * aout_Open : creates a handle and opens an alsa device
@@ -130,12 +127,12 @@ static int aout_Open( aout_thread_t *p_aout )
 {
 
     int i_open_returns;
-    
+
     /* Allocate structures */
     p_aout->p_sys = malloc( sizeof( aout_sys_t ) );
     if( p_aout->p_sys == NULL )
     {
-        intf_ErrMsg( "Aout_alsa : Could not allocate memory : %s", 
+        intf_ErrMsg( "aout error: failed allocating memory for ALSA (%s)",
                      strerror(ENOMEM) );
         return( 1 );
     }
@@ -147,17 +144,16 @@ static int aout_Open( aout_thread_t *p_aout )
                                               AOUT_RATE_DEFAULT );
 
     /* Open device */
-    if( ( i_open_returns = snd_pcm_open(&(p_aout->p_sys->p_alsa_handle), 
-                                        "plug:0,0", 
+    if( ( i_open_returns = snd_pcm_open(&(p_aout->p_sys->p_alsa_handle),
+                                        "plug:0,0",
                                         SND_PCM_STREAM_PLAYBACK, 0) ) )
     {
-        intf_ErrMsg( "Could not open alsa device; exit = %i",
-                      i_open_returns );
-        intf_ErrMsg( "This means : %s", snd_strerror(i_open_returns) );
+        intf_ErrMsg( "aout error: could not open ALSA device (%s)",
+                     snd_strerror(i_open_returns) );
         return( -1 );
     }
 
-    intf_DbgMsg( "Aout_alsa : Alsa device successfully opened" );
+    intf_DbgMsg( "aout info: ALSA device successfully opened" );
     return( 0 );
 }
 
@@ -170,22 +166,23 @@ static int aout_Open( aout_thread_t *p_aout )
  *****************************************************************************/
 static int aout_SetFormat( aout_thread_t *p_aout )
 {
-    
+
     int i_rv;
     int i_format;
-    
+
     snd_pcm_hw_params_t *p_hw;
     snd_pcm_sw_params_t *p_sw;
-    
+
     snd_pcm_hw_params_alloca(&p_hw);
     snd_pcm_sw_params_alloca(&p_sw);
 
-    switch (p_aout->i_format) {
+    switch (p_aout->i_format)
+    {
         case AOUT_FMT_S16_LE:
             i_format = SND_PCM_FORMAT_S16_LE;
             p_aout->p_sys->bytes_per_sample = 2;
             break;
-        
+
         default:
             i_format = SND_PCM_FORMAT_S16_BE;
             p_aout->p_sys->bytes_per_sample = 2;
@@ -193,109 +190,105 @@ static int aout_SetFormat( aout_thread_t *p_aout )
     }
 
     p_aout->p_sys->samples_per_frame = p_aout->i_channels;
-    p_aout->p_sys->bytes_per_frame = p_aout->p_sys->samples_per_frame * 
+    p_aout->p_sys->bytes_per_frame = p_aout->p_sys->samples_per_frame *
                                      p_aout->p_sys->bytes_per_sample;
 
     i_rv = snd_pcm_hw_params_any( p_aout->p_sys->p_alsa_handle, p_hw );
     if( i_rv < 0 )
     {
-        intf_ErrMsg( "Aout_alsa: Unable to retrieve initial parameters." );
+        intf_ErrMsg( "aout error: unable to retrieve initial parameters" );
         return( -1 );
     }
-    
-    i_rv = snd_pcm_hw_params_set_access( p_aout->p_sys->p_alsa_handle, p_hw, 
+
+    i_rv = snd_pcm_hw_params_set_access( p_aout->p_sys->p_alsa_handle, p_hw,
                                          SND_PCM_ACCESS_RW_INTERLEAVED );
     if( i_rv < 0 )
     {
-        intf_ErrMsg( "Aout_alsa: Unable to set interleaved stream format." );
+        intf_ErrMsg( "aout error: unable to set interleaved stream format" );
         return( -1 );
     }
-    
-    i_rv = snd_pcm_hw_params_set_format( p_aout->p_sys->p_alsa_handle, 
+
+    i_rv = snd_pcm_hw_params_set_format( p_aout->p_sys->p_alsa_handle,
                                          p_hw, i_format );
     if( i_rv < 0 )
     {
-        intf_ErrMsg( "Aout_alsa: Unable to set stream sample size and word" 
-                     " order." );
+        intf_ErrMsg( "aout error: unable to set stream sample size and word"
+                     " order" );
         return( -1 );
     }
 
-    i_rv = snd_pcm_hw_params_set_channels( p_aout->p_sys->p_alsa_handle, p_hw, 
+    i_rv = snd_pcm_hw_params_set_channels( p_aout->p_sys->p_alsa_handle, p_hw,
                                            p_aout->i_channels );
     if( i_rv < 0 )
     {
-        intf_ErrMsg( "Aout_alsa: Unable to set number of output channels." );
+        intf_ErrMsg( "aout error: unable to set number of output channels" );
         return( -1 );
     }
-    
-    i_rv = snd_pcm_hw_params_set_rate_near( p_aout->p_sys->p_alsa_handle, p_hw, 
+
+    i_rv = snd_pcm_hw_params_set_rate_near( p_aout->p_sys->p_alsa_handle, p_hw,
                                             p_aout->l_rate, 0 );
     if( i_rv < 0 )
     {
-        intf_ErrMsg( "Aout_alsa: Unable to set sample rate." );
+        intf_ErrMsg( "aout error: unable to set sample rate" );
         return( -1 );
     }
-    else 
-        p_aout->p_sys->rate = i_rv;    
-        
+    p_aout->p_sys->rate = i_rv;
+
     i_rv = snd_pcm_hw_params_set_buffer_time_near( p_aout->p_sys->p_alsa_handle,
-                                                   p_hw, AOUT_BUFFER_DURATION, 
+                                                   p_hw, AOUT_BUFFER_DURATION,
                                                    0 );
     if( i_rv < 0 )
     {
-        intf_ErrMsg( "Aout_alsa: Unable to set buffer time." );
+        intf_ErrMsg( "aout error: unable to set buffer time" );
         return( -1 );
     }
-    else
-        p_aout->p_sys->buffer_time = i_rv;
-    
+    p_aout->p_sys->buffer_time = i_rv;
+
     i_rv = snd_pcm_hw_params_set_period_time_near( p_aout->p_sys->p_alsa_handle,
          p_hw, p_aout->p_sys->buffer_time / p_aout->p_sys->bytes_per_frame, 0 );
     if( i_rv < 0 )
     {
-        intf_ErrMsg( "Aout_alsa: Unable to set period time." );
+        intf_ErrMsg( "aout error: unable to set period time" );
         return( -1 );
     }
-    else
-        p_aout->p_sys->period_time = i_rv;
-    
+    p_aout->p_sys->period_time = i_rv;
+
     i_rv = snd_pcm_hw_params(p_aout->p_sys->p_alsa_handle, p_hw);
     if (i_rv < 0)
     {
-        intf_ErrMsg( "Aout_alsa: Unable to set hardware configuration." );
+        intf_ErrMsg( "aout error: unable to set hardware configuration" );
         return( -1 );
     }
-    
+
     p_aout->p_sys->chunk_size = snd_pcm_hw_params_get_period_size( p_hw, 0 );
-       p_aout->p_sys->buffer_size = snd_pcm_hw_params_get_buffer_size( p_hw );
+    p_aout->p_sys->buffer_size = snd_pcm_hw_params_get_buffer_size( p_hw );
 
-       snd_pcm_sw_params_current( p_aout->p_sys->p_alsa_handle, p_sw );
-       i_rv = snd_pcm_sw_params_set_sleep_min( p_aout->p_sys->p_alsa_handle, p_sw, 
+    snd_pcm_sw_params_current( p_aout->p_sys->p_alsa_handle, p_sw );
+    i_rv = snd_pcm_sw_params_set_sleep_min( p_aout->p_sys->p_alsa_handle, p_sw,
                                             0 );
 
-       i_rv = snd_pcm_sw_params_set_avail_min( p_aout->p_sys->p_alsa_handle, p_sw,
+    i_rv = snd_pcm_sw_params_set_avail_min( p_aout->p_sys->p_alsa_handle, p_sw,
                                             p_aout->p_sys->chunk_size );
 
     /* Worked with the CVS version but not with 0.9beta3
-       i_rv = snd_pcm_sw_params_set_start_threshold( p_aout->p_sys->p_alsa_handle,
+    i_rv = snd_pcm_sw_params_set_start_threshold( p_aout->p_sys->p_alsa_handle,
                                             p_sw, p_aout->p_sys->buffer_size );
-       
-    i_rv = snd_pcm_sw_params_set_stop_threshold( p_aout->p_sys->p_alsa_handle, 
+
+    i_rv = snd_pcm_sw_params_set_stop_threshold( p_aout->p_sys->p_alsa_handle,
                                              p_sw, p_aout->p_sys->buffer_size);
     */
-       i_rv = snd_pcm_sw_params( p_aout->p_sys->p_alsa_handle, p_sw );
+    i_rv = snd_pcm_sw_params( p_aout->p_sys->p_alsa_handle, p_sw );
     if( i_rv < 0 )
     {
-               intf_ErrMsg( "Aout_alsa: Unable to set software configuration." );
+        intf_ErrMsg( "aout error: unable to set software configuration" );
         return( -1 );
-       }
-
+    }
 
     return( 0 );
 }
 
 /*****************************************************************************
- * static void aout_HandleXrun : reprepare the output
+ * aout_HandleXrun : reprepare the output
  *****************************************************************************
  * When buffer gets empty, the driver goes in "Xrun" state, where it needs
  * to be reprepared before playing again
@@ -304,13 +297,15 @@ static void aout_HandleXrun(aout_thread_t *p_aout)
 {
     int i_rv;
 
-    intf_ErrMsg( "Aout_alsa: resetting output after buffer underrun." );
-    
+    intf_ErrMsg( "aout error: resetting output after buffer underrun" );
+
     i_rv = snd_pcm_reset( p_aout->p_sys->p_alsa_handle );
     i_rv = snd_pcm_prepare( p_aout->p_sys->p_alsa_handle );
     if( i_rv < 0 )
-        intf_ErrMsg( "Aout_alsa: Unable to recover from buffer underrun: %s", 
+    {
+        intf_ErrMsg( "aout error: unable to recover from buffer underrun (%s)",
                      snd_strerror( i_rv ) );
+    }
 }
 
 
@@ -326,16 +321,15 @@ static long aout_GetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
 {
     snd_pcm_status_t *p_status;
     int i_alsa_get_status_returns;
-    
+
     snd_pcm_status_alloca( &p_status );
 
-    i_alsa_get_status_returns = snd_pcm_status( p_aout->p_sys->p_alsa_handle, 
+    i_alsa_get_status_returns = snd_pcm_status( p_aout->p_sys->p_alsa_handle,
                                                 p_status );
 
     if( i_alsa_get_status_returns )
     {
-        intf_ErrMsg ( "Aout_alsa: Error getting alsa buffer info (%d) : %s",
-                      i_alsa_get_status_returns,
+        intf_ErrMsg ( "aout error: failed getting alsa buffer info (%s)",
                       snd_strerror ( i_alsa_get_status_returns ) );
         return ( -1 );
     }
@@ -350,14 +344,14 @@ static long aout_GetBufInfo( aout_thread_t *p_aout, long l_buffer_limit )
         case SND_PCM_STATE_PREPARED:
         case SND_PCM_STATE_RUNNING:
             break;
-            
+
         default:
-            intf_ErrMsg( "Aout_alsa: Encountered unhandled condition %i!", 
+            intf_ErrMsg( "aout error: unhandled condition %i",
                          snd_pcm_status_get_state( p_status ) );
             break;
-    } 
+    }
 
-    return( snd_pcm_status_get_avail(p_status) * 
+    return( snd_pcm_status_get_avail(p_status) *
             p_aout->p_sys->bytes_per_frame );
 }
 
@@ -371,19 +365,19 @@ static void aout_Play( aout_thread_t *p_aout, byte_t *buffer, int i_size )
     snd_pcm_uframes_t tot_frames;
     snd_pcm_uframes_t frames_left;
     snd_pcm_uframes_t rv;
-    
+
     tot_frames = i_size / p_aout->p_sys->bytes_per_frame;
     frames_left = tot_frames;
 
     while( frames_left > 0 )
-    {        
-        rv = snd_pcm_writei( p_aout->p_sys->p_alsa_handle, buffer + 
-                             (tot_frames - frames_left) * 
+    {
+        rv = snd_pcm_writei( p_aout->p_sys->p_alsa_handle, buffer +
+                             (tot_frames - frames_left) *
                              p_aout->p_sys->bytes_per_frame, frames_left );
 
         if( (signed int) rv < 0 )
         {
-            intf_ErrMsg( "Aout_alsa: error writing to output: %s", 
+            intf_ErrMsg( "aout error: failed writing to output (%s)",
                          snd_strerror( rv ) );
             return;
         }
@@ -403,13 +397,13 @@ static void aout_Close( aout_thread_t *p_aout )
 
     if( i_close_returns )
     {
-        intf_ErrMsg( "Aout_alsa: error closing alsa device (%d): %s",
+        intf_ErrMsg( "aout error: failed closing ALSA device (%s)",
                      i_close_returns, snd_strerror( i_close_returns ) );
     }
 
     free( p_aout->p_sys );
-    
-    intf_DbgMsg( "Aout_alsa : Alsa device closed" );
+
+    intf_DbgMsg( "aout: ALSA device closed" );
 }
 
 /*****************************************************************************
@@ -425,3 +419,4 @@ void _M( aout_getfunctions )( function_list_t * p_function_list )
     p_function_list->functions.aout.pf_play = aout_Play;
     p_function_list->functions.aout.pf_close = aout_Close;
 }
+
index 2daaf43bbf271541603e7c90c0d44846e2a325c2..ee9db5703b03cd9aed57d1dfd351f1c74ea2293c 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/beos.so: $(PLUGIN_CPP)
+../../plugins/beos.so: $(PLUGIN_CPP)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_BEOS)
 
-../../lib/beos.a: $(BUILTIN_CPP)
+../../plugins/beos.a: $(BUILTIN_CPP)
        ar r $@ $^
        $(RANLIB) $@
 
index 0766e1fea58f9a204c4a8dbaf08a47f91e519f8d..66bd65e5fc2ddb16d0a4ec55548f4a669c5d780a 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/darwin.so: $(PLUGIN_C)
+../../plugins/darwin.so: $(PLUGIN_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_DARWIN)
 
-../../lib/darwin.a: $(BUILTIN_C)
+../../plugins/darwin.a: $(BUILTIN_C)
        ar r $@ $^
        $(RANLIB) $@
 
index 0d246e87b4d5f4904d8269dd56e453bdb5986989..6e9d52b1ecb78c3c39c630c80baa800f588c0d46 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/directx.so: $(PLUGIN_C)
+../../plugins/directx.so: $(PLUGIN_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_DIRECTX)
 
-../../lib/directx.a: $(BUILTIN_C)
+../../plugins/directx.a: $(BUILTIN_C)
        ar r $@ $^
        $(RANLIB) $@
 
index deb95734a8f15f9e259fa1f32d17d08fdd349f7a..869485f1b03fd8481530149f3b7e40b41a72187d 100644 (file)
@@ -40,24 +40,24 @@ $(BUILTIN_DOWNMIX3DN): BUILTIN_DOWNMIX3DN_%.o: %.c
 # Real targets
 #
 
-../../lib/downmix.so: $(PLUGIN_DOWNMIX)
+../../plugins/downmix.so: $(PLUGIN_DOWNMIX)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/downmix.a: $(BUILTIN_DOWNMIX)
+../../plugins/downmix.a: $(BUILTIN_DOWNMIX)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/downmixsse.so: $(PLUGIN_DOWNMIXSSE)
+../../plugins/downmixsse.so: $(PLUGIN_DOWNMIXSSE)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/downmixsse.a: $(BUILTIN_DOWNMIXSSE)
+../../plugins/downmixsse.a: $(BUILTIN_DOWNMIXSSE)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/downmix3dn.so: $(PLUGIN_DOWNMIX3DN)
+../../plugins/downmix3dn.so: $(PLUGIN_DOWNMIX3DN)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/downmix3dn.a: $(BUILTIN_DOWNMIX3DN)
+../../plugins/downmix3dn.a: $(BUILTIN_DOWNMIX3DN)
        ar r $@ $^
        $(RANLIB) $@
 
index a26b6c01ea0910f2512971424acd090181373144..8eac8e0152246254567500c5cd26080e4d455d23 100644 (file)
@@ -2,7 +2,7 @@
  * downmix.c : AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: downmix.c,v 1.2 2001/05/30 17:03:12 sam Exp $
+ * $Id: downmix.c,v 1.3 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -95,7 +95,8 @@ static void downmix_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int downmix_Probe( probedata_t *p_data )
 {
-    if( TestMethod( DOWNMIX_METHOD_VAR, "downmix" ) )
+    if( TestMethod( DOWNMIX_METHOD_VAR, "downmix" )
+         || TestMethod( DOWNMIX_METHOD_VAR, "c" ) )
     {
         return( 999 );
     }
index 7fa875595e8f122b7890f07647e88e5354fdb583..2006455539e87dff88062a43a7eed9780cba1a7b 100644 (file)
@@ -2,7 +2,7 @@
  * downmix3dn.c : accelerated 3D Now! AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: downmix3dn.c,v 1.3 2001/06/03 12:47:21 sam Exp $
+ * $Id: downmix3dn.c,v 1.4 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -100,7 +100,8 @@ static int downmix_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( DOWNMIX_METHOD_VAR, "downmix3dn" ) )
+    if( TestMethod( DOWNMIX_METHOD_VAR, "downmix3dn" )
+         || TestMethod( DOWNMIX_METHOD_VAR, "3dn" ) )
     {
         return( 999 );
     }
index b188f7504bda638e97fae2d3b51a32e008990955..d2239c4f6f01c04633d4ef30db2e83bb66643a6a 100644 (file)
@@ -2,7 +2,7 @@
  * downmixsse.c : accelerated SSE AC3 downmix module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: downmixsse.c,v 1.3 2001/06/03 12:47:21 sam Exp $
+ * $Id: downmixsse.c,v 1.4 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -100,7 +100,8 @@ static int downmix_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( DOWNMIX_METHOD_VAR, "downmixsse" ) )
+    if( TestMethod( DOWNMIX_METHOD_VAR, "downmixsse" )
+         || TestMethod( DOWNMIX_METHOD_VAR, "sse" ) )
     {
         return( 999 );
     }
index de25fe21da24a82d10f4cc6ee68d3761daff78b4..497b65c5a089b58b77048f0ebdfc46f57b124f87 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/dsp.so: $(PLUGIN_C)
+../../plugins/dsp.so: $(PLUGIN_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/dsp.a: $(BUILTIN_C)
+../../plugins/dsp.a: $(BUILTIN_C)
        ar r $@ $^
        $(RANLIB) $@
 
index a7c8c38c1d5d029369b257b2a5236c2922a8821c..69adfc32dbe64bb0d1b50c1a69ce90f9beb308ca 100644 (file)
@@ -26,17 +26,17 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/null.so: $(PLUGIN_NULL)
+../../plugins/null.so: $(PLUGIN_NULL)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/null.a: $(BUILTIN_NULL)
+../../plugins/null.a: $(BUILTIN_NULL)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/dummy.so: $(PLUGIN_DUMMY)
+../../plugins/dummy.so: $(PLUGIN_DUMMY)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/dummy.a: $(BUILTIN_DUMMY)
+../../plugins/dummy.a: $(BUILTIN_DUMMY)
        ar r $@ $^
        $(RANLIB) $@
 
index fb9e9fda8b4e540ef7d8ed2110e768119c1f38e2..28f4dc88c29dbb3a6dd2c80657e248496fb93710 100644 (file)
@@ -31,17 +31,17 @@ $(BUILTIN_DVD): BUILTIN_%.o: %.c
 #
 
 ifeq (1,$(LOCAL_LIBDVDCSS))
-../../lib/dvd.so: libdvdcss $(PLUGIN_DVD)
+../../plugins/dvd.so: libdvdcss $(PLUGIN_DVD)
        $(CC) $(PCFLAGS) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) ../../lib/libdvdcss.a $(LIB_DVD)
 
-../../lib/dvd.a: libdvdcss $(BUILTIN_DVD)
+../../plugins/dvd.a: libdvdcss $(BUILTIN_DVD)
        ar r $@ $(BUILTIN_DVD)
        $(RANLIB) $@
 else
-../../lib/dvd.so: $(PLUGIN_DVD)
+../../plugins/dvd.so: $(PLUGIN_DVD)
        $(CC) $(PCFLAGS) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) $(LIB_DVD)
 
-../../lib/dvd.a: $(BUILTIN_DVD)
+../../plugins/dvd.a: $(BUILTIN_DVD)
        ar r $@ $(BUILTIN_DVD)
        $(RANLIB) $@
 endif
index c9962c85cd9b37bc5780bfe8b2dd9d3feddb4785..c2d81e5ccfe2cc63d7dd2085df97cde72cf9a9a9 100644 (file)
@@ -10,7 +10,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.78 2001/06/29 11:34:28 stef Exp $
+ * $Id: input_dvd.c,v 1.79 2001/07/11 02:01:04 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -334,13 +334,11 @@ static void DVDOpen( struct input_thread_s *p_input )
     if( strlen( p_input->p_source ) > 4
          && !strncasecmp( p_input->p_source, "dvd:", 4 ) )
     {
-        dvdhandle = dvdcss_open( p_input->p_source + 4,
-                                        DVDCSS_INIT_QUIET );
+        dvdhandle = dvdcss_open( p_input->p_source + 4, DVDCSS_INIT_QUIET );
     }
     else
     {
-        dvdhandle = dvdcss_open( p_input->p_source,
-                                        DVDCSS_INIT_QUIET );
+        dvdhandle = dvdcss_open( p_input->p_source, DVDCSS_INIT_QUIET );
     }
 
     if( dvdhandle == NULL )
@@ -442,7 +440,6 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
          * CSS cracking has to be done again
          */
         dvdcss_crack( p_dvd->dvdhandle,
-                      vmg.title_inf.p_attr[p_dvd->i_title-1].i_title_set_num,
                       vts.i_pos + vts.manager_inf.i_title_vob_start_sector );
 
         /*
@@ -927,10 +924,9 @@ intf_WarnMsg( 2, "Sector: 0x%x Read: %d Chapter: %d", p_dvd->i_sector, i_block_o
                   < p_input->stream.p_selected_area->i_size );
     b_eof = b_eot && ( ( p_dvd->i_title + 1 ) >= p_input->stream.i_area_nb );
 
-    vlc_mutex_unlock( &p_input->stream.stream_lock );
-
     if( b_eof )
     {
+        vlc_mutex_unlock( &p_input->stream.stream_lock );
         return 1;
     }
 
@@ -938,12 +934,13 @@ intf_WarnMsg( 2, "Sector: 0x%x Read: %d Chapter: %d", p_dvd->i_sector, i_block_o
     {
         intf_WarnMsg( 4, "dvd info: new title" );
         p_dvd->i_title++;
-        vlc_mutex_lock( &p_input->stream.stream_lock );
         DVDSetArea( p_input, p_input->stream.pp_areas[p_dvd->i_title] );
         vlc_mutex_unlock( &p_input->stream.stream_lock );
         return 0;
     }
 
+    vlc_mutex_unlock( &p_input->stream.stream_lock );
+
     if( i_read_blocks == i_block_once )
     {
         return 0;
index e3e5a4cd0c1ae60bc7f616be22790c6a5dd8b0bc..35c9b00c6621146ae98a21bce4c7716ffc94e272 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/esd.so: $(PLUGIN_C)
+../../plugins/esd.so: $(PLUGIN_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_ESD)
 
-../../lib/esd.a: $(BUILTIN_C)
+../../plugins/esd.a: $(BUILTIN_C)
        ar r $@ $^
        $(RANLIB) $@
 
index bc1ecfb4e6931abf12369dc17d88a3275f588b45..c639199b0f51094e107e2125ff0969c0a31d588c 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/fb.so: $(PLUGIN_C)
+../../plugins/fb.so: $(PLUGIN_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/fb.a: $(BUILTIN_C)
+../../plugins/fb.a: $(BUILTIN_C)
        ar r $@ $^
        $(RANLIB) $@
 
index ccd4df6f89bec4750ec5494357031cf1a2de9639..b5b8b23af4bb00d04d5083166c4ee91f180e551f 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/ggi.so: $(PLUGIN_C)
+../../plugins/ggi.so: $(PLUGIN_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GGI)
 
-../../lib/ggi.a: $(BUILTIN_C)
+../../plugins/ggi.a: $(BUILTIN_C)
        ar r $@ $^
        $(RANLIB) $@
 
index c8ebf7e1cf388c33d0c1f4873622897aa1034d75..68c1d6593f969e35994e48ab41e158845e76b855 100644 (file)
@@ -30,10 +30,10 @@ $(BUILTIN_GLIDE): BUILTIN_%.o: %.c
 # Real targets
 #
 
-../../lib/glide.so: $(PLUGIN_GLIDE)
+../../plugins/glide.so: $(PLUGIN_GLIDE)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GLIDE)
 
-../../lib/glide.a: $(BUILTIN_GLIDE)
+../../plugins/glide.a: $(BUILTIN_GLIDE)
        ar r $@ $^
        $(RANLIB) $@
 
index 03b4a6517295fa52ed5684f4e86f3fdc2753427b..13f48fc37dfd5a23d73f784269300de09952bde9 100644 (file)
@@ -50,18 +50,18 @@ $(BUILTIN_GNOME): BUILTIN_GNOME_%.o: %.c
 # Real targets
 #
 
-../../lib/gtk.so: $(PLUGIN_GTK) $(PLUGIN_GTKCOMMON)
+../../plugins/gtk.so: $(PLUGIN_GTK) $(PLUGIN_GTKCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GTK)
 
-../../lib/gtk.a: $(BUILTIN_GTK)
+../../plugins/gtk.a: $(BUILTIN_GTK)
        ar r $@ $^
        $(RANLIB) $@
 
 
-../../lib/gnome.so: $(PLUGIN_GNOME) $(PLUGIN_GTKCOMMON)
+../../plugins/gnome.so: $(PLUGIN_GNOME) $(PLUGIN_GTKCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_GNOME)
 
-../../lib/gnome.a: $(BUILTIN_GNOME)
+../../plugins/gnome.a: $(BUILTIN_GNOME)
        ar r $@ $^
        $(RANLIB) $@
 
index 0d098d6b97e523bb087e90a73d404dd31b406f34..9de0d741911dd820f6cc10abccdd15f5fd11dbe1 100644 (file)
@@ -69,38 +69,38 @@ $(BUILTIN_IDCTALTIVEC): BUILTIN_IDCTALTIVEC_%.o: %.c
 # Real targets
 #
 
-../../lib/idct.so: $(PLUGIN_IDCT) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_C)
+../../plugins/idct.so: $(PLUGIN_IDCT) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/idct.a: $(BUILTIN_IDCT)
+../../plugins/idct.a: $(BUILTIN_IDCT)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/idctclassic.so: $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_C)
+../../plugins/idctclassic.so: $(PLUGIN_IDCTCLASSIC) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/idctclassic.a: $(BUILTIN_IDCTCLASSIC)
+../../plugins/idctclassic.a: $(BUILTIN_IDCTCLASSIC)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_MMX)
+../../plugins/idctmmx.so: $(PLUGIN_IDCTMMX) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_MMX)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/idctmmx.a: $(BUILTIN_IDCTMMX)
+../../plugins/idctmmx.a: $(BUILTIN_IDCTMMX)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/idctmmxext.so: $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_MMX)
+../../plugins/idctmmxext.so: $(PLUGIN_IDCTMMXEXT) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_MMX)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/idctmmxext.a: $(BUILTIN_IDCTMMXEXT)
+../../plugins/idctmmxext.a: $(BUILTIN_IDCTMMXEXT)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/idctaltivec.so: $(PLUGIN_IDCTALTIVEC) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_C)
+../../plugins/idctaltivec.so: $(PLUGIN_IDCTALTIVEC) $(PLUGIN_IDCTCOMMON) $(PLUGIN_VDECBLOCK_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_IDCTALTIVEC)
 
-../../lib/idctaltivec.a: $(BUILTIN_IDCTALTIVEC)
+../../plugins/idctaltivec.a: $(BUILTIN_IDCTALTIVEC)
        ar r $@ $^
        $(RANLIB) $@
 
index ab1f57c93ed4f07cfac3cfa2339b79f28d84486c..b500072ec9eac07035324a07576ad5aafb03e27e 100644 (file)
@@ -2,7 +2,7 @@
  * idct.c : IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idct.c,v 1.11 2001/06/03 12:47:21 sam Exp $
+ * $Id: idct.c,v 1.12 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -101,7 +101,8 @@ static void idct_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
-    if( TestMethod( IDCT_METHOD_VAR, "idct" ) )
+    if( TestMethod( IDCT_METHOD_VAR, "idct" )
+         || TestMethod( IDCT_METHOD_VAR, "c" ))
     {
         return( 999 );
     }
index 0226af569eebf5b9b420979489aace5b050f35e4..377fb52968be87523786debd0ae60e111ff5892a 100644 (file)
@@ -2,7 +2,7 @@
  * idctaltivec.c : Altivec IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctaltivec.c,v 1.8 2001/06/03 12:47:21 sam Exp $
+ * $Id: idctaltivec.c,v 1.9 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -108,7 +108,8 @@ static int idct_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( IDCT_METHOD_VAR, "idctaltivec" ) )
+    if( TestMethod( IDCT_METHOD_VAR, "idctaltivec" )
+         || TestMethod( IDCT_METHOD_VAR, "altivec" ) )
     {
         return( 999 );
     }
index 9b74a3144d852329492446952ca7252cf57cb57a..e648ab7153376d1cdc802abe997def31085379ba 100644 (file)
@@ -2,7 +2,7 @@
  * idctclassic.c : Classic IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctclassic.c,v 1.11 2001/06/03 12:47:21 sam Exp $
+ * $Id: idctclassic.c,v 1.12 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -103,7 +103,8 @@ static void idct_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int idct_Probe( probedata_t *p_data )
 {
-    if( TestMethod( IDCT_METHOD_VAR, "idctclassic" ) )
+    if( TestMethod( IDCT_METHOD_VAR, "idctclassic" )
+         || TestMethod( IDCT_METHOD_VAR, "classic" ) )
     {
         return( 999 );
     }
index fd805064528d62db6c6b5ee1636ccf920f000ec6..85149f71dfdbecff1e0dd00e17ab3e1fc5e478bd 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmx.c : MMX IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctmmx.c,v 1.13 2001/06/03 12:47:21 sam Exp $
+ * $Id: idctmmx.c,v 1.14 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -113,7 +113,8 @@ static int idct_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( IDCT_METHOD_VAR, "idctmmx" ) )
+    if( TestMethod( IDCT_METHOD_VAR, "idctmmx" )
+         || TestMethod( IDCT_METHOD_VAR, "mmx" ) )
     {
         return( 999 );
     }
index b52840299156db89d5ce54301c48c69983d4a78c..7e5638bc01baddd08fda659058c4737006572197 100644 (file)
@@ -2,7 +2,7 @@
  * idctmmxext.c : MMX EXT IDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: idctmmxext.c,v 1.10 2001/06/03 12:47:21 sam Exp $
+ * $Id: idctmmxext.c,v 1.11 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
  *          Michel Lespinasse <walken@zoy.org>
@@ -113,7 +113,8 @@ static int idct_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( IDCT_METHOD_VAR, "idctmmxext" ) )
+    if( TestMethod( IDCT_METHOD_VAR, "idctmmxext" )
+         || TestMethod( IDCT_METHOD_VAR, "mmxext" ) )
     {
         return( 999 );
     }
index b4dad20ac95d723bcfb2569f82549a8bf84ba036..3aeaa4ff06ae283575aeff5ee64d4bb60bf329dc 100644 (file)
@@ -44,24 +44,24 @@ $(BUILTIN_IMDCT3DN): BUILTIN_IMDCT3DN_%.o: %.c
 # Real targets
 #
 
-../../lib/imdct.so: $(PLUGIN_IMDCT) $(PLUGIN_IMDCTCOMMON)
+../../plugins/imdct.so: $(PLUGIN_IMDCT) $(PLUGIN_IMDCTCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/imdct.a: $(BUILTIN_IMDCT)
+../../plugins/imdct.a: $(BUILTIN_IMDCT)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/imdctsse.so: $(PLUGIN_IMDCTSSE) $(PLUGIN_IMDCTCOMMON)
+../../plugins/imdctsse.so: $(PLUGIN_IMDCTSSE) $(PLUGIN_IMDCTCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/imdctsse.a: $(BUILTIN_IMDCTSSE)
+../../plugins/imdctsse.a: $(BUILTIN_IMDCTSSE)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/imdct3dn.so: $(PLUGIN_IMDCT3DN) $(PLUGIN_IMDCTCOMMON)
+../../plugins/imdct3dn.so: $(PLUGIN_IMDCT3DN) $(PLUGIN_IMDCTCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/imdct3dn.a: $(BUILTIN_IMDCT3DN)
+../../plugins/imdct3dn.a: $(BUILTIN_IMDCT3DN)
        ar r $@ $^
        $(RANLIB) $@
 
index 5652679c4500136ac196f52213b47dab886c57e5..ef9571ae955b6f026a5750917ec1f18db553e911 100644 (file)
@@ -2,7 +2,7 @@
  * imdct.c : IMDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: imdct.c,v 1.3 2001/06/03 12:47:21 sam Exp $
+ * $Id: imdct.c,v 1.4 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -93,7 +93,8 @@ static void imdct_getfunctions( function_list_t * p_function_list )
  *****************************************************************************/
 static int imdct_Probe( probedata_t *p_data )
 {
-    if( TestMethod( IMDCT_METHOD_VAR, "imdct" ) )
+    if( TestMethod( IMDCT_METHOD_VAR, "imdct" )
+         || TestMethod( IMDCT_METHOD_VAR, "c" ) )
     {
         return( 999 );
     }
index 92c76cb0e432016d9db37441e325bbd942c933ee..1a80a84e1dcffe3b2af58d3b4a70528283725cdf 100644 (file)
@@ -2,7 +2,7 @@
  * imdct3dn.c : accelerated 3D Now! IMDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: imdct3dn.c,v 1.5 2001/06/12 00:30:41 reno Exp $
+ * $Id: imdct3dn.c,v 1.6 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -98,7 +98,8 @@ static int imdct_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( IMDCT_METHOD_VAR, "imdct3dn" ) )
+    if( TestMethod( IMDCT_METHOD_VAR, "imdct3dn" )
+         || TestMethod( IMDCT_METHOD_VAR, "3dn" ) )
     {
         return( 999 );
     }
index d5a244863c65011135c8cc0925a2116f9d2d4421..0ad87c8956f5a61c084809ec2f384b368e438bd6 100644 (file)
@@ -2,7 +2,7 @@
  * imdctsse.c : accelerated SSE IMDCT module
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: imdctsse.c,v 1.5 2001/06/12 00:30:41 reno Exp $
+ * $Id: imdctsse.c,v 1.6 2001/07/11 02:01:04 sam Exp $
  *
  * Authors: Gaël Hendryckx <jimmy@via.ecp.fr>
  *
@@ -98,7 +98,8 @@ static int imdct_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( IMDCT_METHOD_VAR, "imdctsse" ) )
+    if( TestMethod( IMDCT_METHOD_VAR, "imdctsse" )
+         || TestMethod( IMDCT_METHOD_VAR, "sse" ) )
     {
         return( 999 );
     }
index c7bdfbe1ddd10960415d4ca881e42326b115e1c6..fcd46c325645451de5c0089892fb2cf14c3bb5fb 100644 (file)
@@ -7,6 +7,12 @@
 # Objects
 #
  
+MOCFILES =     kinterfacemain.moc.cpp \
+               kvlcslider.moc.cpp \
+               kdiskdialog.moc.cpp \
+               knetdialog.moc.cpp \
+               ktitlemenu.moc.cpp
+
 PLUGIN_KDE =   kde.o \
                kdeinterface.o \
                kinterfacemain.o \
@@ -15,14 +21,10 @@ PLUGIN_KDE =        kde.o \
                knetdialog.o \
                ktitlemenu.o
 
-PLUGIN_KDE_MOC =       kinterfacemain.moc.o \
-                       kvlcslider.moc.o \
-                       kdiskdialog.moc.o \
-                       knetdialog.moc.o \
-                       ktitlemenu.moc.o
+PLUGIN_KDE_MOC = $(MOCFILES:%.cpp=%.o)
 
-#BUILTIN_KDE = $(PLUGIN_KDE:%.o=BUILTIN_%.o)
-#BUILTIN_KDE_MOC = $(PLUGIN_KDE_MOC:%.o=BUILTIN_%.o)
+BUILTIN_KDE = $(PLUGIN_KDE:%.o=BUILTIN_%.o)
+BUILTIN_KDE_MOC = $(MOCFILES:%.cpp=BUILTIN_%.o)
 
 ALL_OBJ = $(PLUGIN_KDE) $(PLUGIN_KDE_MOC) $(BUILTIN_KDE) $(BUILTIN_KDE_MOC)
 
@@ -32,34 +34,33 @@ ALL_OBJ = $(PLUGIN_KDE) $(PLUGIN_KDE_MOC) $(BUILTIN_KDE) $(BUILTIN_KDE_MOC)
 
 include ../../Makefile.modules
 
+$(MOCFILES): %.moc.cpp: %.h
+       $(MOC) $< -o $@
+
 $(PLUGIN_KDE): %.o: .dep/%.dpp
 $(PLUGIN_KDE): %.o: %.cpp
-       $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -c -o $@ $<
+       $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -DPLUGIN -DMODULE_NAME=kde -c -o $@ $<
 
 $(PLUGIN_KDE_MOC): %.o: .dep/%.dpp
 $(PLUGIN_KDE_MOC): %.o: %.cpp
-       $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -c -o $@ $<
-$(PLUGIN_KDE_MOC:%.moc.o=%.moc.cpp): %.moc.cpp: %.h
-       moc $< -o $@
+       $(CC) $(CFLAGS) $(PCFLAGS) -I/usr/include/kde -I/usr/include/qt -DPLUGIN -DMODULE_NAME=kde -c -o $@ $<
 
-#$(BUILTIN_KDE): BUILTIN_%.o: .dep/%.dpp
-#$(BUILTIN_KDE): BUILTIN_%.o: %.cpp
-#      $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/kde -I/usr/include/qt -c -o $@ $<
+$(BUILTIN_KDE): BUILTIN_%.o: .dep/%.dpp
+$(BUILTIN_KDE): BUILTIN_%.o: %.cpp
+       $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/kde -I/usr/include/qt -DBUILTIN -DMODULE_NAME=kde -c -o $@ $<
 
-#$(BUILTIN_KDE_MOC): BUILTIN_%.o: dep/%.dpp
-#$(BUILTIN_KDE_MOC): BUILTIN_%.o: %.cpp
-#      $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/kde -I/usr/include/qt -c -o $@ $<
-#$(BUILTIN_KDE_MOC: %.moc.o=%.cpp): %.moc.cpp: %.h
-#      $(MOC) $< -o $@
+$(BUILTIN_KDE_MOC): BUILTIN_%.o: .dep/%.dpp
+$(BUILTIN_KDE_MOC): BUILTIN_%.o: %.cpp
+       $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/kde -I/usr/include/qt -DBUILTIN -DMODULE_NAME=kde -c -o $@ $<
 
 #
 # Real targets
 #
 
-../../lib/kde.so: $(PLUGIN_KDE) $(PLUGIN_KDE_MOC)
-       $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_KDE) -lkfile
+../../plugins/kde.so: $(PLUGIN_KDE) $(PLUGIN_KDE_MOC)
+       $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_KDE)
 
-#../../lib/kde.a: $(BUILTIN_KDE)
-#      ar r $@ $^
-#      $(RANLIB) $@
+../../plugins/kde.a: $(BUILTIN_KDE) $(BUILTIN_KDE_MOC)
+       ar r $@ $^
+       $(RANLIB) $@
 
index 0448d1766c40b355dd113491c9729a79e34722cf..e263a0301b449f2fdaa0a59bc65f6934dcfc4498 100644 (file)
@@ -24,7 +24,6 @@ extern "C"
 #include "threads.h"
 #include "mtime.h"
 #include "tests.h"
-#include "modules.h"
 
 #include "stream_control.h"
 #include "input_ext-intf.h"
@@ -34,6 +33,9 @@ extern "C"
 #include "interface.h"
 
 #include "main.h"
+
+#include "modules.h"
+#include "modules_export.h"
 }
 
-#endif /* _INTF_PLUGIN_H_ */
\ No newline at end of file
+#endif /* _INTF_PLUGIN_H_ */
index e1576f2d6e63076faacc7366cd318499046b4e40..99dfdb78873e08ec6840a8241acf9299f1bda54a 100644 (file)
@@ -1,11 +1,26 @@
-/***************************************************************************
-                          kde.cpp  -  description
-                             -------------------
-    begin                : Sun Mar 25 2001
-    copyright            : (C) 2001 by andres
-    email                : dae@chez.com
- ***************************************************************************/
-#define MODULE_NAME kde
+/*****************************************************************************
+ * kde.cpp : KDE plugin for vlc
+ *****************************************************************************
+ * Copyright (C) 2001 VideoLAN
+ * $Id: kde.cpp,v 1.3 2001/07/11 02:01:04 sam Exp $
+ *
+ * Authors: Andres <dae@chez.com> Sun Mar 25 2001
+ *
+ * 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.
+ *****************************************************************************/
+#define MODULE_NAME kde 
 #include "intf_plugin.h"
 
 extern "C"
@@ -38,3 +53,4 @@ MODULE_DEACTIVATE_START
 MODULE_DEACTIVATE_STOP
 
 } /* extern "C" */
+
index 12af4d04027b9d20206d9ff092fb74f4e740cbad..0bfb840ad72704c95aa66cfdd2314a1ee77cda06 100644 (file)
@@ -30,10 +30,10 @@ $(BUILTIN_MACOSX): BUILTIN_%.o: %.c
 # Real targets
 #
 
-../../lib/macosx.so: $(PLUGIN_MACOSX)
+../../plugins/macosx.so: $(PLUGIN_MACOSX)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_MACOSX)
 
-../../lib/macosx.a: $(BUILTIN_MACOSX)
+../../plugins/macosx.a: $(BUILTIN_MACOSX)
        ar r $@ $^
        $(RANLIB) $@
 
index bd4c7379d295fd559dc011539f18ac0c23e21d85..ff810f79863c647e2461475bdb7c230d02105c7c 100644 (file)
@@ -22,10 +22,10 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/mga.so: $(PLUGIN_C)
+../../plugins/mga.so: $(PLUGIN_C)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/mga.a: $(BUILTIN_C)
+../../plugins/mga.a: $(BUILTIN_C)
        ar r $@ $^
        $(RANLIB) $@
 
index fb5f26d569c23b0f17cacacf35e3b4358ef1f419..bb19897f48e705986e8c0c5cba7197b374c8522c 100644 (file)
@@ -44,31 +44,31 @@ $(BUILTIN_MOTIONMMXEXT): BUILTIN_MOTIONMMXEXT_%.o: %.c
 # Real targets
 #
 
-../../lib/motion.so: $(PLUGIN_MOTION) $(PLUGIN_MOTIONCOMMON)
+../../plugins/motion.so: $(PLUGIN_MOTION) $(PLUGIN_MOTIONCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/motion.a: $(BUILTIN_MOTION)
+../../plugins/motion.a: $(BUILTIN_MOTION)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/motionclassic.so: $(PLUGIN_MOTIONCLASSIC) $(PLUGIN_MOTIONCOMMON)
+../../plugins/motionclassic.so: $(PLUGIN_MOTIONCLASSIC) $(PLUGIN_MOTIONCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/motionclassic.a: $(BUILTIN_MOTIONCLASSIC)
+../../plugins/motionclassic.a: $(BUILTIN_MOTIONCLASSIC)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/motionmmx.so: $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONCOMMON)
+../../plugins/motionmmx.so: $(PLUGIN_MOTIONMMX) $(PLUGIN_MOTIONCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/motionmmx.a: $(BUILTIN_MOTIONMMX)
+../../plugins/motionmmx.a: $(BUILTIN_MOTIONMMX)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTIONCOMMON)
+../../plugins/motionmmxext.so: $(PLUGIN_MOTIONMMXEXT) $(PLUGIN_MOTIONCOMMON)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/motionmmxext.a: $(BUILTIN_MOTIONMMXEXT)
+../../plugins/motionmmxext.a: $(BUILTIN_MOTIONMMXEXT)
        ar r $@ $^
        $(RANLIB) $@
 
index a51f7636dd390f565be302e8fc6d7c74722ea298..ffc6522f4d8578571739f8ba0df00be20c0070aa 100644 (file)
@@ -2,7 +2,7 @@
  * motion.c : C motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: motion.c,v 1.7 2001/06/07 15:27:44 sam Exp $
+ * $Id: motion.c,v 1.8 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -73,7 +73,8 @@ MODULE_DEACTIVATE_STOP
  *****************************************************************************/
 int _M( motion_Probe )( probedata_t *p_data )
 {
-    if( TestMethod( MOTION_METHOD_VAR, "motion" ) )
+    if( TestMethod( MOTION_METHOD_VAR, "motion" )
+         || TestMethod( MOTION_METHOD_VAR, "c" ) )
     {
         return( 999 );
     }
index 74d11511e504c8fb7251b3004f6d944c550fd996..f8218778445a1571d821b78a51120212db7a505f 100644 (file)
@@ -2,7 +2,7 @@
  * motionmmx.c : MMX motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: motionmmx.c,v 1.8 2001/06/07 15:27:44 sam Exp $
+ * $Id: motionmmx.c,v 1.9 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -78,7 +78,8 @@ int _M( motion_Probe )( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( MOTION_METHOD_VAR, "motionmmx" ) )
+    if( TestMethod( MOTION_METHOD_VAR, "motionmmx" )
+         || TestMethod( MOTION_METHOD_VAR, "mmx" ) )
     {
         return( 999 );
     }
index 0404ac05526db44c812c3b64e18b79cbb8d3584c..4163fa785c88308490ed4c5a095ac53c1887bc40 100644 (file)
@@ -2,7 +2,7 @@
  * motionmmxext.c : MMX EXT motion compensation module for vlc
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: motionmmxext.c,v 1.8 2001/06/07 15:27:44 sam Exp $
+ * $Id: motionmmxext.c,v 1.9 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -78,7 +78,8 @@ int _M( motion_Probe )( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( MOTION_METHOD_VAR, "motionmmxext" ) )
+    if( TestMethod( MOTION_METHOD_VAR, "motionmmxext" )
+         || TestMethod( MOTION_METHOD_VAR, "mmxext" ) )
     {
         return( 999 );
     }
index 2e6a21a20e2b98bd46d9c3b8b8d0c7505c9f7941..e5eab273f56115a2c5b19647437723f9db59fd6b 100644 (file)
@@ -28,24 +28,24 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/es.so: $(PLUGIN_ES)
+../../plugins/es.so: $(PLUGIN_ES)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/es.a: $(BUILTIN_ES)
+../../plugins/es.a: $(BUILTIN_ES)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/ps.so: $(PLUGIN_PS)
+../../plugins/ps.so: $(PLUGIN_PS)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/ps.a: $(BUILTIN_PS)
+../../plugins/ps.a: $(BUILTIN_PS)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/ts.so: $(PLUGIN_TS)
+../../plugins/ts.so: $(PLUGIN_TS)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_TS)
 
-../../lib/ts.a: $(BUILTIN_TS)
+../../plugins/ts.a: $(BUILTIN_TS)
        ar r $@ $^
        $(RANLIB) $@
 
index 0dd8aef356025fd1d7acede8931c7e53651caf64..18ccaf7405ff2be42dd8761543584d6c1badbaab 100644 (file)
@@ -20,13 +20,13 @@ include ../../Makefile.modules
 
 $(PLUGIN_QT): %.o: .dep/%.dpp
 $(PLUGIN_QT): %.o: %.moc
-       $(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:%.moc=%.cpp)
+       $(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -I/usr/include/qt -I${QTDIR}/include -DPLUGIN -DMODULE_NAME=qt -c -o $@ $(<:%.moc=%.cpp)
 $(PLUGIN_QT:%.o=%.moc): %.moc: %.cpp
        grep -q Q_OBJECT $< && $(MOC) -i $< -o $@ || true
 
 $(BUILTIN_QT): BUILTIN_%.o: .dep/%.dpp
 $(BUILTIN_QT): %.o: %.moc
-       $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/qt -I${QTDIR}/include -c -o $@ $(<:BUILTIN_%.moc=%.cpp)
+       $(CC) $(CFLAGS) -DBUILTIN -I/usr/include/qt -I${QTDIR}/include -DBUILTIN -DMODULE_NAME=qt -c -o $@ $(<:BUILTIN_%.moc=%.cpp)
 $(BUILTIN_QT:%.o=%.moc): BUILTIN_%.moc: %.cpp
        grep -q Q_OBJECT $< && $(MOC) -i $< -o $@ || true
 
@@ -34,10 +34,10 @@ $(BUILTIN_QT:%.o=%.moc): BUILTIN_%.moc: %.cpp
 # Real targets
 #
 
-../../lib/qt.so: $(PLUGIN_QT)
+../../plugins/qt.so: $(PLUGIN_QT)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_QT)
 
-../../lib/qt.a: $(BUILTIN_QT)
+../../plugins/qt.a: $(BUILTIN_QT)
        ar r $@ $^
        $(RANLIB) $@
 
index 2be833331c9b8b84682d0a117a85f6f37cdabcb6..c15da53ae771544167e5a1e0aa042dadd8608f7d 100644 (file)
@@ -30,10 +30,10 @@ $(BUILTIN_SDL): BUILTIN_%.o: %.c
 # Real targets
 #
 
-../../lib/sdl.so: $(PLUGIN_SDL)
+../../plugins/sdl.so: $(PLUGIN_SDL)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_SDL)
 
-../../lib/sdl.a: $(BUILTIN_SDL)
+../../plugins/sdl.a: $(BUILTIN_SDL)
        ar r $@ $^
        $(RANLIB) $@
 
index f0de0fb8f0933d83c24c6bf1bfec5cf1cd451fe8..1863f53267d8ad3f715f7bc77ec3dffeadfd0687 100644 (file)
@@ -2,7 +2,7 @@
  * vout_sdl.c: SDL video output display method
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vout_sdl.c,v 1.56 2001/07/06 08:43:31 sam Exp $
+ * $Id: vout_sdl.c,v 1.57 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Pierre Baillet <oct@zoy.org>
@@ -559,8 +559,14 @@ static void vout_Display( vout_thread_t *p_vout )
                                              p_vout->p_rendered_pic->i_width, 
                                              p_vout->p_rendered_pic->i_height,
                                              SDL_YV12_OVERLAY, 
-                                             p_vout->p_sys->p_display
-                                           );
+                                             p_vout->p_sys->p_display );
+
+                if( p_vout->p_sys->p_overlay != NULL )
+                {
+                    intf_WarnMsg( 2, "vout: YUV acceleration %s",
+                                  p_vout->p_sys->p_overlay->hw_overlay
+                                   ? "activated" : "unavailable !" ); 
+                }
             }
 
             if( p_vout->p_sys->p_overlay == NULL )
@@ -571,28 +577,23 @@ static void vout_Display( vout_thread_t *p_vout )
             }
             else
             {
-
-                intf_WarnMsg( 2, "vout: YUV acceleration %s",
-                              p_vout->p_sys->p_overlay->hw_overlay
-                               ? "activated" : "unavailable !" ); 
-    
-                SDL_LockYUVOverlay(p_vout->p_sys->p_overlay);
+                SDL_LockYUVOverlay( p_vout->p_sys->p_overlay );
                 /* copy the data into video buffers */
                 /* Y first */
-                memcpy(p_vout->p_sys->p_overlay->pixels[0],
-                       p_vout->p_rendered_pic->p_y,
-                       p_vout->p_sys->p_overlay->h *
-                       p_vout->p_sys->p_overlay->pitches[0]);
+                memcpy( p_vout->p_sys->p_overlay->pixels[0],
+                        p_vout->p_rendered_pic->p_y,
+                        p_vout->p_sys->p_overlay->h *
+                        p_vout->p_sys->p_overlay->pitches[0] );
                 /* then V */
-                memcpy(p_vout->p_sys->p_overlay->pixels[1],
-                       p_vout->p_rendered_pic->p_v,
-                       p_vout->p_sys->p_overlay->h *
-                       p_vout->p_sys->p_overlay->pitches[1] / 2);
+                memcpy( p_vout->p_sys->p_overlay->pixels[1],
+                        p_vout->p_rendered_pic->p_v,
+                        p_vout->p_sys->p_overlay->h *
+                        p_vout->p_sys->p_overlay->pitches[1] / 2 );
                 /* and U */
-                memcpy(p_vout->p_sys->p_overlay->pixels[2],
-                       p_vout->p_rendered_pic->p_u,
-                       p_vout->p_sys->p_overlay->h *
-                       p_vout->p_sys->p_overlay->pitches[2] / 2);
+                memcpy( p_vout->p_sys->p_overlay->pixels[2],
+                        p_vout->p_rendered_pic->p_u,
+                        p_vout->p_sys->p_overlay->h *
+                        p_vout->p_sys->p_overlay->pitches[2] / 2 );
     
 #define BUFFER (&p_vout->p_buffer[p_vout->i_buffer_index])
                 disp.w = BUFFER->i_pic_width;
index 2265660a10ce50b055cda96a758b2148fb41a918..c5329f5784b979d1ac4c1126b6f73e2d1618d390 100644 (file)
@@ -26,17 +26,17 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/ncurses.so: $(PLUGIN_NCURSES)
+../../plugins/ncurses.so: $(PLUGIN_NCURSES)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_NCURSES)
 
-../../lib/ncurses.a: $(BUILTIN_NCURSES)
+../../plugins/ncurses.a: $(BUILTIN_NCURSES)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/rc.so: $(PLUGIN_RC)
+../../plugins/rc.so: $(PLUGIN_RC)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
 
-../../lib/rc.a: $(BUILTIN_RC)
+../../plugins/rc.a: $(BUILTIN_RC)
        ar r $@ $^
        $(RANLIB) $@
 
index 0c792f1d909a3080278242eac4412842b5578174..dfca5ced0fa557df644f46c046f41f7051df23d9 100644 (file)
@@ -33,25 +33,25 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/x11.so: $(PLUGIN_X11)
+../../plugins/x11.so: $(PLUGIN_X11)
 ifeq ($(SYS),nto-qnx)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_X11) -lsocket
 else
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_X11)
 endif
 
-../../lib/x11.a: $(BUILTIN_X11)
+../../plugins/x11.a: $(BUILTIN_X11)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/xvideo.so: $(PLUGIN_XVIDEO)
+../../plugins/xvideo.so: $(PLUGIN_XVIDEO)
 ifeq ($(SYS),nto-qnx)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_XVIDEO) -lsocket
 else
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_XVIDEO)
 endif
 
-../../lib/xvideo.a: $(BUILTIN_XVIDEO)
+../../plugins/xvideo.a: $(BUILTIN_XVIDEO)
        ar r $@ $^
        $(RANLIB) $@
 
index 229b7deaca230b71f90115a941ed279fa58c70b4..2fab2d2b876a9095ed66b7a6196fd56e31b66dcf 100644 (file)
@@ -27,17 +27,17 @@ include ../../Makefile.modules
 # Real targets
 #
 
-../../lib/yuv.so: $(PLUGIN_YUV)
+../../plugins/yuv.so: $(PLUGIN_YUV)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) $(LIB_YUV)
 
-../../lib/yuv.a: $(BUILTIN_YUV)
+../../plugins/yuv.a: $(BUILTIN_YUV)
        ar r $@ $^
        $(RANLIB) $@
 
-../../lib/yuvmmx.so: $(PLUGIN_YUVMMX)
+../../plugins/yuvmmx.so: $(PLUGIN_YUVMMX)
        $(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS) 
 
-../../lib/yuvmmx.a: $(BUILTIN_YUVMMX)
+../../plugins/yuvmmx.a: $(BUILTIN_YUVMMX)
        ar r $@ $^
        $(RANLIB) $@
 
index 7e5ed8335c0e27bae0b3edd9b63aad07f638bde0..97ea9b1cb04009578e96e5443130d8620a3e537f 100644 (file)
@@ -5,7 +5,7 @@
  * case by optimized functions.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_yuv.c,v 1.14 2001/06/03 12:47:21 sam Exp $
+ * $Id: video_yuv.c,v 1.15 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -82,7 +82,8 @@ void _M( yuv_getfunctions )( function_list_t * p_function_list )
  *****************************************************************************/
 static int yuv_Probe( probedata_t *p_data )
 {
-    if( TestMethod( YUV_METHOD_VAR, "yuv" ) )
+    if( TestMethod( YUV_METHOD_VAR, "yuv" )
+         || TestMethod( YUV_METHOD_VAR, "c" ) )
     {
         return( 999 );
     }
index cbaf45947304e2fc93284335ef93d9d80aed3be2..391e656e78daec528e8cd47df68995a5cbda7b19 100644 (file)
@@ -3,7 +3,7 @@
  * Provides functions to perform the YUV conversion.
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: video_yuvmmx.c,v 1.10 2001/06/03 12:47:21 sam Exp $
+ * $Id: video_yuvmmx.c,v 1.11 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -85,7 +85,8 @@ static int yuv_Probe( probedata_t *p_data )
         return( 0 );
     }
 
-    if( TestMethod( YUV_METHOD_VAR, "yuvmmx" ) )
+    if( TestMethod( YUV_METHOD_VAR, "yuvmmx" )
+         || TestMethod( YUV_METHOD_VAR, "mmx" ) )
     {
         return( 999 );
     }
index 0c9b888075b9704b064257bf0fc09c2c7f0ffc36..4fa2dead6faaf6e232960a150998d9a6b44ac994 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Built-in and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.37 2001/06/25 11:34:08 sam Exp $
+ * $Id: modules.c,v 1.38 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -120,7 +120,7 @@ static module_symbols_t symbols;
 void module_InitBank( void )
 {
 #ifdef HAVE_DYNAMIC_PLUGINS
-    static char * path[] = { ".", "lib", PLUGIN_PATH, NULL, NULL };
+    static char * path[] = { ".", "plugins", PLUGIN_PATH, NULL, NULL };
 
     char **         ppsz_path = path;
     char *          psz_fullpath;
@@ -302,7 +302,7 @@ void module_ManageBank( void )
             }
             else
             {
-                intf_WarnMsg( 1, "module: hiding unused plugin module `%s'",
+                intf_WarnMsg( 3, "module: hiding unused plugin module `%s'",
                               p_module->psz_name );
                 HideModule( p_module );
 
@@ -557,7 +557,7 @@ static int AllocatePluginModule( char * psz_filename )
     p_module_bank->first = p_module;
 
     /* Immediate message so that a slow module doesn't make the user wait */
-    intf_WarnMsgImm( 2, "module: plugin module `%s', %s",
+    intf_WarnMsgImm( 2, "module: new plugin module `%s', %s",
                      p_module->psz_name, p_module->psz_longname );
 
     return( 0 );
@@ -673,7 +673,7 @@ static int AllocateBuiltinModule( int ( *pf_init ) ( module_t * ),
     p_module_bank->first = p_module;
 
     /* Immediate message so that a slow module doesn't make the user wait */
-    intf_WarnMsgImm( 2, "module: builtin module `%s', %s",
+    intf_WarnMsgImm( 2, "module: new builtin module `%s', %s",
                      p_module->psz_name, p_module->psz_longname );
 
     return( 0 );
index 60715eee107891792a6729b15d5623493565fc0f..f78ae4c0444a9653f16056d0feb78dad52a4c476 100644 (file)
@@ -5,7 +5,7 @@
  * thread, and destroy a previously oppened video output thread.
  *****************************************************************************
  * Copyright (C) 2000 VideoLAN
- * $Id: video_output.c,v 1.133 2001/07/10 06:07:53 gbazin Exp $
+ * $Id: video_output.c,v 1.134 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *
@@ -196,7 +196,7 @@ vout_thread_t * vout_CreateThread   ( int *pi_status )
     p_vout->b_fullscreen          = main_GetIntVariable( VOUT_FULLSCREEN_VAR,
                                                      VOUT_FULLSCREEN_DEFAULT );
 
-    intf_WarnMsg( 3, "wished configuration: %dx%d, %d/%d bpp (%d Bpl)",
+    intf_WarnMsg( 3, "vout info: asking for %dx%d, %d/%d bpp (%d Bpl)",
                   p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth,
                   p_vout->i_bytes_per_pixel * 8, p_vout->i_bytes_per_line );
 
@@ -889,7 +889,7 @@ static int InitThread( vout_thread_t *p_vout )
               p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth,
               p_vout->i_bytes_per_pixel * 8 );
 
-    intf_WarnMsg( 3, "actual configuration: %dx%d, %d/%d bpp (%d Bpl), "
+    intf_WarnMsg( 3, "vout info: got %dx%d, %d/%d bpp (%d Bpl), "
                   "masks: 0x%x/0x%x/0x%x",
                   p_vout->i_width, p_vout->i_height, p_vout->i_screen_depth,
                   p_vout->i_bytes_per_pixel * 8, p_vout->i_bytes_per_line,
@@ -1041,7 +1041,7 @@ static void RunThread( vout_thread_t *p_vout)
                     p_vout->i_pictures--;
                 }
                 intf_WarnMsg( 1,
-                        "warning: late picture skipped (%p)", p_pic );
+                        "vout warning: late picture skipped (%p)", p_pic );
                 vlc_mutex_unlock( &p_vout->picture_lock );
 
                 continue;
index c2e0ac19e722e424e90f68ed24718e378ddfdc5b..4633896c154cdbae96af1846da780befd3f0cb39 100644 (file)
@@ -2,7 +2,7 @@
  * vpar_synchro.c : frame dropping routines
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: vpar_synchro.c,v 1.90 2001/05/07 03:14:10 stef Exp $
+ * $Id: vpar_synchro.c,v 1.91 2001/07/11 02:01:05 sam Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *          Samuel Hocevar <sam@via.ecp.fr>
@@ -458,9 +458,10 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
     {
     case I_CODING_TYPE:
         if( p_vpar->synchro.i_eta_p
-                && p_vpar->synchro.i_eta_p != p_vpar->synchro.i_n_p )
+             && p_vpar->synchro.i_eta_p != p_vpar->synchro.i_n_p )
         {
-            intf_WarnMsg( 3, "Stream periodicity changed from P[%d] to P[%d]",
+            intf_WarnMsg( 3, "vpar info: stream periodicity changed "
+                          "from P[%d] to P[%d]",
                           p_vpar->synchro.i_n_p, p_vpar->synchro.i_eta_p );
             p_vpar->synchro.i_n_p = p_vpar->synchro.i_eta_p;
         }
@@ -487,9 +488,10 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
     case P_CODING_TYPE:
         p_vpar->synchro.i_eta_p++;
         if( p_vpar->synchro.i_eta_b
-                && p_vpar->synchro.i_eta_b != p_vpar->synchro.i_n_b )
+             && p_vpar->synchro.i_eta_b != p_vpar->synchro.i_n_b )
         {
-            intf_WarnMsg( 3, "Stream periodicity changed from B[%d] to B[%d]",
+            intf_WarnMsg( 3, "vpar info: stream periodicity changed "
+                          "from B[%d] to B[%d]",
                           p_vpar->synchro.i_n_b, p_vpar->synchro.i_eta_b );
             p_vpar->synchro.i_n_b = p_vpar->synchro.i_eta_b;
         }