]> git.sesse.net Git - vlc/commitdiff
* Fixed the whitespace/tab issues in the Makefile.
authorSam Hocevar <sam@videolan.org>
Wed, 11 Apr 2001 04:31:59 +0000 (04:31 +0000)
committerSam Hocevar <sam@videolan.org>
Wed, 11 Apr 2001 04:31:59 +0000 (04:31 +0000)
  * Corrected an awful typo in the version name, I hope Lieutenant Commander
    Arkady Grigorovich Ourumov will never set up us the bomb for that.
  * Removed deprecated stuff from config.h.
  * Disabled message queue by default.
  * A few other changes in the CSS code, the BeOS issues should be fixed.
  * Fixed a memory leak in gtk_callbacks.c (thanks to Dae).

Makefile.in
configure
configure.in
include/config.h.in
plugins/dvd/dvd_css.c
plugins/dvd/dvd_css.h
plugins/dvd/dvd_ioctl.c
plugins/dvd/dvd_ioctl.h
plugins/dvd/input_dvd.c
plugins/dvd/input_dvd.h
plugins/gtk/gtk_callbacks.c

index 132c444230e7d9502c1a99faf8e9250e2f0e74ad..41189d300ea04815b07cef20e4a6628d7f3fec8d 100644 (file)
@@ -507,14 +507,14 @@ install:
 ifneq (,$(findstring darwin,$(SYS)))
 # XXX this should only be for MacOS X
 #should the following be "$(DESTDIR)$(bindir)vlc.app/" or "$(DESTDIR)vlc.app/" ?
-    mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS
-    mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
-    mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
-    $(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist $(DESTDIR)$(bindir)vlc.app/Contents/
-    $(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo $(DESTDIR)$(bindir)vlc.app/Contents/
-    $(INSTALL) vlc $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/
-    $(INSTALL) $(PLUGINS:%=lib/%.so) $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
-    $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
+       mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS
+       mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
+       mkdir -p $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
+       $(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist $(DESTDIR)$(bindir)vlc.app/Contents/
+       $(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo $(DESTDIR)$(bindir)vlc.app/Contents/
+       $(INSTALL) vlc $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/
+       $(INSTALL) $(PLUGINS:%=lib/%.so) $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/lib
+       $(INSTALL) -m 644 share/*.psf $(DESTDIR)$(bindir)vlc.app/Contents/MacOS/share
 endif
 
 show:
@@ -683,14 +683,14 @@ endif
 
 vlc.app: all
 ifneq (,$(findstring darwin,$(SYS)))
-    mkdir -p vlc.app/Contents/MacOS
-    mkdir -p vlc.app/Contents/MacOS/lib
-    mkdir -p vlc.app/Contents/MacOS/share
-    $(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist vlc.app/Contents/
-    $(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo vlc.app/Contents/
-    $(INSTALL) vlc vlc.app/Contents/MacOS/
-    $(INSTALL) $(PLUGINS:%=lib/%.so) vlc.app/Contents/MacOS/lib
-    $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
+       mkdir -p vlc.app/Contents/MacOS
+       mkdir -p vlc.app/Contents/MacOS/lib
+       mkdir -p vlc.app/Contents/MacOS/share
+       $(INSTALL) -m 644 extras/MacOSX_app/Contents/Info.plist vlc.app/Contents/
+       $(INSTALL) -m 644 extras/MacOSX_app/Contents/PkgInfo vlc.app/Contents/
+       $(INSTALL) vlc vlc.app/Contents/MacOS/
+       $(INSTALL) $(PLUGINS:%=lib/%.so) vlc.app/Contents/MacOS/lib
+       $(INSTALL) -m 644 share/*.psf vlc.app/Contents/MacOS/share
 endif
 
 #
index 574f3d5aea5a3f298a8b6a08418282ad892858c5..2d6f1778dfe3744946c0a8967310d6f926a9a40c 100755 (executable)
--- a/configure
+++ b/configure
@@ -622,7 +622,7 @@ echo "$ac_t""$host" 1>&6
 
 VLC_VERSION=0.2.70
 
-VLC_CODENAME=Urumov
+VLC_CODENAME=Ourumov
 
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
@@ -1036,7 +1036,7 @@ else
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -2032,15 +2032,12 @@ else
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/mman.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
 
 /* This mess was copied from the GNU getpagesize.h.  */
 #ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
 
 /* Assume that all systems that can run configure have sys/param.h.  */
 # ifndef HAVE_SYS_PARAM_H
@@ -2095,7 +2092,7 @@ main()
        /*
         * First, make a file with some known garbage in it.
         */
-       data = (char*)malloc(pagesize);
+       data = malloc(pagesize);
        if (!data)
                exit(1);
        for (i = 0; i < pagesize; ++i)
@@ -2116,7 +2113,7 @@ main()
        fd = open("conftestmmap", O_RDWR);
        if (fd < 0)
                exit(1);
-       data2 = (char*)malloc(2 * pagesize);
+       data2 = malloc(2 * pagesize);
        if (!data2)
                exit(1);
        data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -2134,7 +2131,7 @@ main()
         */
        for (i = 0; i < pagesize; ++i)
                *(data2 + i) = *(data2 + i) + 1;
-       data3 = (char*)malloc(pagesize);
+       data3 = malloc(pagesize);
        if (!data3)
                exit(1);
        if (read(fd, data3, pagesize) != pagesize)
@@ -2148,7 +2145,7 @@ main()
 }
 
 EOF
-if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   ac_cv_func_mmap_fixed_mapped=yes
 else
@@ -2171,12 +2168,12 @@ EOF
 fi
 
 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:2175: checking return type of signal handlers" >&5
+echo "configure:2172: checking return type of signal handlers" >&5
 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2180 "configure"
+#line 2177 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <signal.h>
@@ -2193,7 +2190,7 @@ int main() {
 int i;
 ; return 0; }
 EOF
-if { (eval echo configure:2197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_type_signal=void
 else
@@ -2212,7 +2209,7 @@ EOF
 
 
 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:2216: checking for dlopen in -ldl" >&5
+echo "configure:2213: checking for dlopen in -ldl" >&5
 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2220,7 +2217,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2224 "configure"
+#line 2221 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2231,7 +2228,7 @@ int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:2235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2232: \"$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
@@ -2252,7 +2249,7 @@ else
 fi
 
 echo $ac_n "checking for powl in -lm""... $ac_c" 1>&6
-echo "configure:2256: checking for powl in -lm" >&5
+echo "configure:2253: checking for powl in -lm" >&5
 ac_lib_var=`echo m'_'powl | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2260,7 +2257,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2264 "configure"
+#line 2261 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2271,7 +2268,7 @@ int main() {
 powl()
 ; return 0; }
 EOF
-if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2272: \"$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
@@ -2292,7 +2289,7 @@ else
 fi
 
 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:2296: checking for pthread_create in -lpthread" >&5
+echo "configure:2293: checking for pthread_create in -lpthread" >&5
 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2300,7 +2297,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lpthread  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2304 "configure"
+#line 2301 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2311,7 +2308,7 @@ int main() {
 pthread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2312: \"$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
@@ -2332,7 +2329,7 @@ else
 fi
 
 echo $ac_n "checking for thread_create in -lthreads""... $ac_c" 1>&6
-echo "configure:2336: checking for thread_create in -lthreads" >&5
+echo "configure:2333: checking for thread_create in -lthreads" >&5
 ac_lib_var=`echo threads'_'thread_create | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2340,7 +2337,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lthreads  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2344 "configure"
+#line 2341 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2351,7 +2348,7 @@ int main() {
 thread_create()
 ; return 0; }
 EOF
-if { (eval echo configure:2355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2352: \"$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
@@ -2377,17 +2374,17 @@ for ac_hdr in stddef.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2381: checking for $ac_hdr" >&5
+echo "configure:2378: 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 2386 "configure"
+#line 2383 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2388: \"$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*
@@ -2417,17 +2414,17 @@ for ac_hdr in getopt.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2421: checking for $ac_hdr" >&5
+echo "configure:2418: 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 2426 "configure"
+#line 2423 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2428: \"$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*
@@ -2457,17 +2454,17 @@ for ac_hdr in sys/sockio.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2461: checking for $ac_hdr" >&5
+echo "configure:2458: 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 2466 "configure"
+#line 2463 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2468: \"$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*
@@ -2497,17 +2494,17 @@ for ac_hdr in fcntl.h sys/time.h unistd.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2501: checking for $ac_hdr" >&5
+echo "configure:2498: 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 2506 "configure"
+#line 2503 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2508: \"$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*
@@ -2537,17 +2534,17 @@ for ac_hdr in sys/soundcard.h machine/soundcard.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2541: checking for $ac_hdr" >&5
+echo "configure:2538: 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 2546 "configure"
+#line 2543 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2548: \"$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*
@@ -2577,17 +2574,17 @@ for ac_hdr in dlfcn.h image.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2581: checking for $ac_hdr" >&5
+echo "configure:2578: 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 2586 "configure"
+#line 2583 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2588: \"$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*
@@ -2617,17 +2614,17 @@ for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2621: checking for $ac_hdr" >&5
+echo "configure:2618: 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 2626 "configure"
+#line 2623 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2628: \"$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*
@@ -2657,17 +2654,17 @@ for ac_hdr in machine/param.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2661: checking for $ac_hdr" >&5
+echo "configure:2658: 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 2666 "configure"
+#line 2663 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2668: \"$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*
@@ -2698,17 +2695,17 @@ for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2702: checking for $ac_hdr" >&5
+echo "configure:2699: 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 2707 "configure"
+#line 2704 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2709: \"$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*
@@ -2739,9 +2736,9 @@ save_CFLAGS=$CFLAGS
 
 CFLAGS="${CFLAGS} -Wall -Werror"
 echo $ac_n "checking for ntohl in sys/param.h""... $ac_c" 1>&6
-echo "configure:2743: checking for ntohl in sys/param.h" >&5
+echo "configure:2740: checking for ntohl in sys/param.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2745 "configure"
+#line 2742 "configure"
 #include "confdefs.h"
 #include <sys/param.h>
 void foo() { int meuh; ntohl(meuh); }
@@ -2749,7 +2746,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define NTOHL_IN_SYS_PARAM_H 1
@@ -2766,16 +2763,16 @@ rm -f conftest*
 
 CFLAGS="${CFLAGS} -rdynamic -Wall -Werror"
 echo $ac_n "checking if \$CC accepts -rdynamic""... $ac_c" 1>&6
-echo "configure:2770: checking if \$CC accepts -rdynamic" >&5
+echo "configure:2767: checking if \$CC accepts -rdynamic" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2772 "configure"
+#line 2769 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   LCFLAGS=${LCFLAGS}" -rdynamic"
  echo "$ac_t""yes" 1>&6
@@ -2790,9 +2787,9 @@ rm -f conftest*
 CFLAGS=$save_CFLAGS
 
 echo $ac_n "checking for boolean_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:2794: checking for boolean_t in sys/types.h" >&5
+echo "configure:2791: checking for boolean_t in sys/types.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2796 "configure"
+#line 2793 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 void quux() { boolean_t foo; }
@@ -2800,7 +2797,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define BOOLEAN_T_IN_SYS_TYPES_H 1
@@ -2815,9 +2812,9 @@ else
 fi
 rm -f conftest*
 echo $ac_n "checking for boolean_t in pthread.h""... $ac_c" 1>&6
-echo "configure:2819: checking for boolean_t in pthread.h" >&5
+echo "configure:2816: checking for boolean_t in pthread.h" >&5
 cat > conftest.$ac_ext <<EOF
-#line 2821 "configure"
+#line 2818 "configure"
 #include "confdefs.h"
 #include <pthread.h>
 void quux() { boolean_t foo; }
@@ -2825,7 +2822,7 @@ int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   cat >> confdefs.h <<\EOF
 #define BOOLEAN_T_IN_PTHREAD_H 1
@@ -2841,18 +2838,18 @@ fi
 rm -f conftest*
 
 echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2845: checking for working const" >&5
+echo "configure:2842: checking for working const" >&5
 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2850 "configure"
+#line 2847 "configure"
 #include "confdefs.h"
 
 int main() {
 
 /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x = {0,0};
+typedef int charset[2]; const charset x;
 /* SunOS 4.1.1 cc rejects this.  */
 char const *const *ccp;
 char **p;
@@ -2895,7 +2892,7 @@ ccp = (char const *const *) p;
 
 ; return 0; }
 EOF
-if { (eval echo configure:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_c_const=yes
 else
@@ -2916,12 +2913,12 @@ EOF
 fi
 
 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2920: checking for ANSI C header files" >&5
+echo "configure:2917: checking for ANSI C header files" >&5
 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2925 "configure"
+#line 2922 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 #include <stdarg.h>
@@ -2929,7 +2926,7 @@ else
 #include <float.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2930: \"$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*
@@ -2946,7 +2943,7 @@ rm -f conftest*
 if test $ac_cv_header_stdc = yes; then
   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2950 "configure"
+#line 2947 "configure"
 #include "confdefs.h"
 #include <string.h>
 EOF
@@ -2964,7 +2961,7 @@ fi
 if test $ac_cv_header_stdc = yes; then
   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
 cat > conftest.$ac_ext <<EOF
-#line 2968 "configure"
+#line 2965 "configure"
 #include "confdefs.h"
 #include <stdlib.h>
 EOF
@@ -2985,7 +2982,7 @@ if test "$cross_compiling" = yes; then
   :
 else
   cat > conftest.$ac_ext <<EOF
-#line 2989 "configure"
+#line 2986 "configure"
 #include "confdefs.h"
 #include <ctype.h>
 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2996,7 +2993,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
 exit (0); }
 
 EOF
-if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
 then
   :
 else
@@ -3020,12 +3017,12 @@ EOF
 fi
 
 echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3024: checking for size_t" >&5
+echo "configure:3021: checking for size_t" >&5
 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3029 "configure"
+#line 3026 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #if STDC_HEADERS
@@ -3053,12 +3050,12 @@ EOF
 fi
 
 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:3057: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:3054: checking whether time.h and sys/time.h may both be included" >&5
 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 3062 "configure"
+#line 3059 "configure"
 #include "confdefs.h"
 #include <sys/types.h>
 #include <sys/time.h>
@@ -3067,7 +3064,7 @@ int main() {
 struct tm *tp;
 ; return 0; }
 EOF
-if { (eval echo configure:3071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   ac_cv_header_time=yes
 else
@@ -3099,17 +3096,17 @@ for ac_hdr in sys/ioctl.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3103: checking for $ac_hdr" >&5
+echo "configure:3100: 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 3108 "configure"
+#line 3105 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3110: \"$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*
@@ -3134,17 +3131,17 @@ EOF
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3138: checking for $ac_hdr" >&5
+echo "configure:3135: 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 3143 "configure"
+#line 3140 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3145: \"$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*
@@ -3171,7 +3168,7 @@ fi
 done
 
    cat > conftest.$ac_ext <<EOF
-#line 3175 "configure"
+#line 3172 "configure"
 #include "confdefs.h"
 #include <linux/cdrom.h>
 EOF
@@ -3304,17 +3301,17 @@ else
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3308: checking for $ac_hdr" >&5
+echo "configure:3305: 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 3313 "configure"
+#line 3310 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3315: \"$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*
@@ -3378,17 +3375,17 @@ if test "${with_sdl+set}" = set; then
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3382: checking for $ac_hdr" >&5
+echo "configure:3379: 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 3387 "configure"
+#line 3384 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3389: \"$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*
@@ -3426,17 +3423,17 @@ fi
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3430: checking for $ac_hdr" >&5
+echo "configure:3427: 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 3435 "configure"
+#line 3432 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3437: \"$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*
@@ -3526,17 +3523,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:3530: checking for $ac_hdr" >&5
+echo "configure:3527: 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 3535 "configure"
+#line 3532 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3537: \"$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*
@@ -3575,17 +3572,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:3579: checking for sys/asoundlib.h" >&5
+echo "configure:3576: 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 3584 "configure"
+#line 3581 "configure"
 #include "confdefs.h"
 #include <sys/asoundlib.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3586: \"$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*
@@ -3602,7 +3599,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:3606: checking for main in -lasound" >&5
+echo "configure:3603: 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
@@ -3610,14 +3607,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lasound  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3614 "configure"
+#line 3611 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:3621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3618: \"$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
index 1ce7326d807077f54d4a0d5fe6a10fe1ddabfe65..61dd05fd0a60c4868991b2258a1d515065864776 100644 (file)
@@ -6,7 +6,7 @@ AC_CANONICAL_HOST
 
 VLC_VERSION=0.2.70
 AC_SUBST(VLC_VERSION)
-VLC_CODENAME=Urumov
+VLC_CODENAME=Ourumov
 AC_SUBST(VLC_CODENAME)
 
 dnl Check for tools
index 6f6177a35ed862ea60fdad0bd19b6efa60746fe2..a4dbad5deb87d65a36bd0c1712211b76fcc1028c 100644 (file)
  * and might cause problems with some very weird streams. */
 //#define MPEG2_COMPLIANT
 
-/* Define for profiling and statistics support - such informations, like FPS
- * or pictures count won't be available if it not set */
-/* #define STATS --moved in Makefile */
-
-/* Define for unthreaded version of the program FIXME: not yet implemented ??*/
-//#define NO_THREAD
-
 /*****************************************************************************
  * Debugging options - define or undefine symbols
  *****************************************************************************/
-#if DEBUG == 1
+#ifdef DEBUG
 /* General debugging support, which depends of the DEBUG define, is determined
  * in the Makefile */
 
  * when debugging, since it allows messages which would not be printed
  * due to a crash to be printed anyway */
 #ifndef DEBUG
-#define INTF_MSG_QUEUE
+//#define INTF_MSG_QUEUE
 #endif
 
 /* Format of the header for debug messages. The arguments following this header
index 4b335ed33a0d534b340ce5388898cba65de6e822..383bda17d13bc146dba7cdf029650a6b2cf384db 100644 (file)
@@ -2,7 +2,7 @@
  * dvd_css.c: Functions for DVD authentification and unscrambling
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_css.c,v 1.23 2001/04/10 17:47:05 stef Exp $
+ * $Id: dvd_css.c,v 1.24 2001/04/11 04:31:59 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -56,7 +56,7 @@
  * Local prototypes
  *****************************************************************************/
 #ifdef HAVE_CSS
-static int  CSSGetASF    ( css_t *p_css );
+static int  CSSGetASF    ( int i_fd );
 static void CSSCryptKey  ( int i_key_type, int i_varient,
                            u8 const * pi_challenge, u8* pi_key );
 static int  CSSCracker   ( int i_start, unsigned char * p_crypted,
@@ -92,18 +92,17 @@ int CSSTest( int i_fd )
  * Since we don't need the disc key to find the title key, we just run the
  * basic unavoidable commands to authenticate device and disc.
  *****************************************************************************/
-int CSSInit( css_t * p_css )
+int CSSInit( int i_fd, css_t * p_css )
 {
 #ifdef HAVE_CSS
     /* structures defined in cdrom.h or dvdio.h */
     char p_buffer[2048 + 4 + 1];
+    int  i_agid = 0;
     int  i_ret = -1;
     int  i;
 
-    p_css->i_agid = 0;
-
     /* Test authentication success */
-    switch( CSSGetASF( p_css ) )
+    switch( CSSGetASF( i_fd ) )
     {
         case -1:
             return -1;
@@ -121,7 +120,7 @@ int CSSInit( css_t * p_css )
     {
         intf_WarnMsg( 3, "css info: requesting AGID %d", i );
 
-        i_ret = ioctl_LUSendAgid( p_css );
+        i_ret = ioctl_LUSendAgid( i_fd, &i_agid );
 
         if( i_ret != -1 )
         {
@@ -131,8 +130,8 @@ int CSSInit( css_t * p_css )
 
         intf_ErrMsg( "css error: ioctl_LUSendAgid failed, invalidating" );
 
-        p_css->i_agid = 0;
-        ioctl_InvalidateAgid( p_css );
+        i_agid = 0;
+        ioctl_InvalidateAgid( i_fd, &i_agid );
     }
 
     /* Unable to authenticate without AGID */
@@ -154,14 +153,14 @@ int CSSInit( css_t * p_css )
     }
 
     /* Send challenge to LU */
-    if( ioctl_HostSendChallenge( p_css, p_buffer ) < 0 )
+    if( ioctl_HostSendChallenge( i_fd, &i_agid, p_buffer ) < 0 )
     {
         intf_ErrMsg( "css error: ioctl_HostSendChallenge failed" );
         return -1;
     }
 
     /* Get key1 from LU */
-    if( ioctl_LUSendKey1( p_css, p_buffer ) < 0)
+    if( ioctl_LUSendKey1( i_fd, &i_agid, p_buffer ) < 0)
     {
         intf_ErrMsg( "css error: ioctl_LUSendKey1 failed" );
         return -1;
@@ -194,7 +193,7 @@ int CSSInit( css_t * p_css )
     }
 
     /* Get challenge from LU */
-    if( ioctl_LUSendChallenge( p_css, p_buffer ) < 0 )
+    if( ioctl_LUSendChallenge( i_fd, &i_agid, p_buffer ) < 0 )
     {
         intf_ErrMsg( "css error: ioctl_LUSendKeyChallenge failed" );
         return -1;
@@ -216,7 +215,7 @@ int CSSInit( css_t * p_css )
     }
 
     /* Send key2 to LU */
-    if( ioctl_HostSendKey2( p_css, p_buffer ) < 0 )
+    if( ioctl_HostSendKey2( i_fd, &i_agid, p_buffer ) < 0 )
     {
         intf_ErrMsg( "css error: ioctl_HostSendKey2 failed" );
         return -1;
@@ -226,18 +225,19 @@ int CSSInit( css_t * p_css )
 
     memcpy( p_css->disc.pi_challenge, p_css->disc.pi_key1, KEY_SIZE );
     memcpy( p_css->disc.pi_challenge+KEY_SIZE, p_css->disc.pi_key2, KEY_SIZE );
+
     CSSCryptKey( 2, p_css->disc.i_varient, p_css->disc.pi_challenge,
-                                               p_css->disc.pi_key_check );
+                                           p_css->disc.pi_key_check );
 
-    intf_WarnMsg( 1, "css info: received Session Key" );
+    intf_WarnMsg( 1, "css info: received session key" );
 
-    if( p_css->i_agid < 0 )
+    if( i_agid < 0 )
     {
         return -1;
     }
 
     /* Test authentication success */
-    switch( CSSGetASF( p_css ) )
+    switch( CSSGetASF( i_fd ) )
     {
         case -1:
             return -1;
@@ -251,7 +251,7 @@ int CSSInit( css_t * p_css )
     }
 
     /* Get encrypted disc key */
-    if( ioctl_ReadKey( p_css, p_buffer ) < 0 )
+    if( ioctl_ReadKey( i_fd, &i_agid, p_buffer ) < 0 )
     {
         intf_ErrMsg( "css error: ioctl_ReadKey failed" );
         return -1;
@@ -265,7 +265,7 @@ int CSSInit( css_t * p_css )
     memcpy( p_css->disc.pi_key_check, p_buffer, 2048 );
 
     /* Test authentication success */
-    switch( CSSGetASF( p_css ) )
+    switch( CSSGetASF( i_fd ) )
     {
         case -1:
             return -1;
@@ -292,7 +292,7 @@ int CSSInit( css_t * p_css )
  *****************************************************************************
  * The DVD should have been opened and authenticated before.
  *****************************************************************************/
-int CSSGetKey( css_t * p_css )
+int CSSGetKey( int i_fd, css_t * p_css )
 {
 #ifdef HAVE_CSS
     /*
@@ -330,8 +330,8 @@ int CSSGetKey( css_t * p_css )
 //fprintf( stderr, "CSS %d start pos: %lld\n", i_title, i_pos );
 
     do {
-    i_pos = lseek( p_css->i_fd, i_pos, SEEK_SET );
-    i_bytes_read = read( p_css->i_fd, pi_buf, 0x800 );
+    i_pos = lseek( i_fd, i_pos, SEEK_SET );
+    i_bytes_read = read( i_fd, pi_buf, 0x800 );
 
     /* PES_scrambling_control */
     if( pi_buf[0x14] & 0x30 )
@@ -542,25 +542,24 @@ int CSSDescrambleSector( dvd_key_t pi_key, u8* pi_sec )
  *  0 if the device needs to be authenticated,
  *  1 either.
  *****************************************************************************/
-static int CSSGetASF( css_t *p_css )
+static int CSSGetASF( int i_fd )
 {
-    int i_oldagid = p_css->i_agid, i_asf = 0;
+    int i_agid;
+    int i_asf = 0;
 
-    for( p_css->i_agid = 0 ; p_css->i_agid < 4 ; p_css->i_agid++ )
+    for( i_agid = 0 ; i_agid < 4 ; i_agid++ )
     {
-        if( ioctl_LUSendASF( p_css, &i_asf ) == 0 )
+        if( ioctl_LUSendASF( i_fd, &i_agid, &i_asf ) == 0 )
         {
-            intf_WarnMsg( 3, "css info: %sauthenticated", i_asf ? "":"not " );
+            intf_WarnMsg( 3, "css info: GetASF %sauthenticated",
+                          i_asf ? "":"not " );
 
-            p_css->i_agid = i_oldagid;
             return i_asf;
         }
     }
 
     /* The ioctl process has failed */
     intf_ErrMsg( "css error: GetASF fatal error" );
-
-    p_css->i_agid = i_oldagid;
     return -1;
 }
 
index 2f2e1901c88114d3778efc71e0c7415946b7930c..357f6f65fb18d0e35df7036f1591b2cc50098567 100644 (file)
@@ -2,7 +2,7 @@
  * dvd_css.h: Structures for DVD authentification and unscrambling
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_css.h,v 1.6 2001/04/02 23:30:41 sam Exp $
+ * $Id: dvd_css.h,v 1.7 2001/04/11 04:31:59 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -47,7 +47,6 @@ typedef struct title_key_s
 
 typedef struct css_s
 {
-    int             i_fd;
     int             i_agid;
     disc_t          disc;
     u8              pi_disc_key[2048];
index ba99236274862e1bb36b0e2ecae786563d438255..158b92ba9e1aa0c2c8a9cbbb7ef32a5f72913f0d 100644 (file)
@@ -2,7 +2,7 @@
  * dvd_ioctl.c: DVD ioctl replacement function
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ioctl.c,v 1.8 2001/04/08 09:04:33 stef Exp $
+ * $Id: dvd_ioctl.c,v 1.9 2001/04/11 04:31:59 sam Exp $
  *
  * Authors: Markus Kuespert <ltlBeBoy@beosmail.com>
  *          Samuel Hocevar <sam@zoy.org>
  *****************************************************************************/
 #if defined( SYS_BEOS )
 static void BeInitRDC ( raw_device_command *, void *, int );
+#define INIT_RDC( TYPE, SIZE ) \
+    raw_device_command rdc; \
+    u8 p_buffer[ (SIZE) ]; \
+    BeInitRDC( &rdc, p_buffer, (SIZE), (TYPE) );
 #endif
 
 /*****************************************************************************
@@ -84,13 +88,8 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )
     *pi_copyright = dvd.copyright.cpst;
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 8 ];
-
-    BeInitRDC( &rdc, p_buffer, 8 );
+    INIT_RDC( GPCMD_READ_DVD_STRUCTURE, 8 );
 
-    rdc.flags        = B_RAW_DEVICE_DATA_IN;
-    rdc.command[ 0 ] = GPCMD_READ_DVD_STRUCTURE;
     rdc.command[ 6 ] = i_layer;
     rdc.command[ 7 ] = DVD_STRUCT_COPYRIGHT;
 
@@ -117,7 +116,7 @@ int ioctl_ReadCopyright( int i_fd, int i_layer, int *pi_copyright )
 /*****************************************************************************
  * ioctl_ReadKey: get the disc key
  *****************************************************************************/
-int ioctl_ReadKey( css_t *p_css, u8 *p_key )
+int ioctl_ReadKey( int i_fd, int *pi_agid, u8 *p_key )
 {
     int i_ret;
 
@@ -125,11 +124,11 @@ int ioctl_ReadKey( css_t *p_css, u8 *p_key )
     dvd_struct dvd;
 
     dvd.type = DVD_STRUCT_DISCKEY;
-    dvd.disckey.agid = p_css->i_agid;
+    dvd.disckey.agid = *pi_agid;
 
     memset( dvd.disckey.value, 0, 2048 );
 
-    i_ret = ioctl( p_css->i_fd, DVD_READ_STRUCT, &dvd );
+    i_ret = ioctl( i_fd, DVD_READ_STRUCT, &dvd );
 
     if( i_ret < 0 )
     {
@@ -139,17 +138,12 @@ int ioctl_ReadKey( css_t *p_css, u8 *p_key )
     memcpy( p_key, dvd.disckey.value, 2048 );
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 2048 + 4 ];
+    INIT_RDC( GPCMD_READ_DVD_STRUCTURE, 2048 + 4 );
 
-    BeInitRDC( &rdc, p_buffer, 2048 + 4 );
-
-    rdc.flags         = B_RAW_DEVICE_DATA_IN;
-    rdc.command[ 0 ]  = GPCMD_READ_DVD_STRUCTURE;
     rdc.command[ 7 ]  = DVD_STRUCT_DISCKEY;
-    rdc.command[ 10 ] = p_css->i_agid << 6;
+    rdc.command[ 10 ] = *pi_agid << 6;
     
-    i_ret = ioctl( p_css->i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
+    i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
 
     if( i_ret < 0 )
     {
@@ -169,7 +163,7 @@ int ioctl_ReadKey( css_t *p_css, u8 *p_key )
 /*****************************************************************************
  * ioctl_LUSendAgid: get AGID from the drive
  *****************************************************************************/
-int ioctl_LUSendAgid( css_t *p_css )
+int ioctl_LUSendAgid( int i_fd, int *pi_agid )
 {
     int i_ret;
 
@@ -177,25 +171,20 @@ int ioctl_LUSendAgid( css_t *p_css )
     dvd_authinfo auth_info;
 
     auth_info.type = DVD_LU_SEND_AGID;
-    auth_info.lsa.agid = p_css->i_agid;
+    auth_info.lsa.agid = *pi_agid;
 
-    i_ret = ioctl( p_css->i_fd, DVD_AUTH, &auth_info );
+    i_ret = ioctl( i_fd, DVD_AUTH, &auth_info );
 
-    p_css->i_agid = auth_info.lsa.agid;
+    *pi_agid = auth_info.lsa.agid;
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 8 ];
+    INIT_RDC( GPCMD_REPORT_KEY, 8 );
 
-    BeInitRDC( &rdc, p_buffer, 8 );
+    rdc.command[ 10 ] = 0x00 | (*pi_agid << 6);
 
-    rdc.flags         = B_RAW_DEVICE_DATA_IN;
-    rdc.command[ 0 ]  = GPCMD_REPORT_KEY;
-    rdc.command[ 10 ] = 0x00 | (p_css->i_agid << 6);
-
-    i_ret = ioctl( p_css->i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
+    i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
 
-    p_css->i_agid = p_buffer[ 7 ] >> 6;
+    *pi_agid = p_buffer[ 7 ] >> 6;
 
 #else
     /* DVD ioctls unavailable - do as if the ioctl failed */
@@ -208,7 +197,7 @@ int ioctl_LUSendAgid( css_t *p_css )
 /*****************************************************************************
  * ioctl_LUSendChallenge: get challenge from the drive
  *****************************************************************************/
-int ioctl_LUSendChallenge( css_t *p_css, u8 *p_challenge )
+int ioctl_LUSendChallenge( int i_fd, int *pi_agid, u8 *p_challenge )
 {
     int i_ret;
 
@@ -216,23 +205,18 @@ int ioctl_LUSendChallenge( css_t *p_css, u8 *p_challenge )
     dvd_authinfo auth_info;
 
     auth_info.type = DVD_LU_SEND_CHALLENGE;
-    auth_info.lsa.agid = p_css->i_agid;
+    auth_info.lsc.agid = *pi_agid;
 
-    i_ret = ioctl( p_css->i_fd, DVD_AUTH, &auth_info );
+    i_ret = ioctl( i_fd, DVD_AUTH, &auth_info );
 
     memcpy( p_challenge, auth_info.lsc.chal, sizeof(dvd_challenge) );
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 16 ];
-
-    BeInitRDC( &rdc, p_buffer, 16 );
+    INIT_RDC( GPCMD_REPORT_KEY, 16 );
 
-    rdc.flags         = B_RAW_DEVICE_DATA_IN;
-    rdc.command[ 0 ]  = GPCMD_REPORT_KEY;
-    rdc.command[ 10 ] = 0x01 | (p_css->i_agid << 6);
+    rdc.command[ 10 ] = 0x01 | (*pi_agid << 6);
 
-    i_ret = ioctl( p_css->i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
+    i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
 
     memcpy( p_challenge, p_buffer + 4, 12 );
 
@@ -247,7 +231,7 @@ int ioctl_LUSendChallenge( css_t *p_css, u8 *p_challenge )
 /*****************************************************************************
  * ioctl_LUSendASF: get ASF from the drive
  *****************************************************************************/
-int ioctl_LUSendASF( css_t *p_css, int *pi_asf )
+int ioctl_LUSendASF( int i_fd, int *pi_agid, int *pi_asf )
 {
     int i_ret;
 
@@ -255,24 +239,19 @@ int ioctl_LUSendASF( css_t *p_css, int *pi_asf )
     dvd_authinfo auth_info;
 
     auth_info.type = DVD_LU_SEND_ASF;
-    auth_info.lsasf.agid = p_css->i_agid;
+    auth_info.lsasf.agid = *pi_agid;
     auth_info.lsasf.asf = *pi_asf;
 
-    i_ret = ioctl( p_css->i_fd, DVD_AUTH, &auth_info );
+    i_ret = ioctl( i_fd, DVD_AUTH, &auth_info );
 
     *pi_asf = auth_info.lsasf.asf;
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 8 ];
-
-    BeInitRDC( &rdc, p_buffer, 8 );
+    INIT_RDC( GPCMD_REPORT_KEY, 8 );
 
-    rdc.flags         = B_RAW_DEVICE_DATA_IN;
-    rdc.command[ 0 ]  = GPCMD_REPORT_KEY;
-    rdc.command[ 10 ] = 0x05 | (p_css->i_agid << 6);
+    rdc.command[ 10 ] = 0x05 | (*pi_agid << 6);
 
-    i_ret = ioctl( p_css->i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
+    i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
 
     *pi_asf = p_buffer[ 7 ] & 1;
 
@@ -282,11 +261,11 @@ int ioctl_LUSendASF( css_t *p_css, int *pi_asf )
 
     data.p_buffer = p_buffer;
     data.i_lba = 0;
-    data.i_agid = p_css->i_agid;
+    data.i_agid = *pi_agid;
     data.i_keyclass = kCSS_CSS2_CPRM;
     data.i_keyformat = kASF;
 
-    i_ret = ioctl( p_css->i_fd, IODVD_REPORT_KEY, &data );
+    i_ret = ioctl( i_fd, IODVD_REPORT_KEY, &data );
 
     *pi_asf = p_buffer[ 7 ] & 1;
 
@@ -301,7 +280,7 @@ int ioctl_LUSendASF( css_t *p_css, int *pi_asf )
 /*****************************************************************************
  * ioctl_LUSendKey1: get the first key from the drive
  *****************************************************************************/
-int ioctl_LUSendKey1( css_t *p_css, u8 *p_key )
+int ioctl_LUSendKey1( int i_fd, int *pi_agid, u8 *p_key )
 {
     int i_ret;
 
@@ -309,23 +288,18 @@ int ioctl_LUSendKey1( css_t *p_css, u8 *p_key )
     dvd_authinfo auth_info;
 
     auth_info.type = DVD_LU_SEND_KEY1;
-    auth_info.lsk.agid = p_css->i_agid;
+    auth_info.lsk.agid = *pi_agid;
 
-    i_ret = ioctl( p_css->i_fd, DVD_AUTH, &auth_info );
+    i_ret = ioctl( i_fd, DVD_AUTH, &auth_info );
 
     memcpy( p_key, auth_info.lsk.key, sizeof(dvd_key) );
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 12 ];
-
-    BeInitRDC( &rdc, p_buffer, 12 );
+    INIT_RDC( GPCMD_REPORT_KEY, 12 );
 
-    rdc.flags         = B_RAW_DEVICE_DATA_IN;
-    rdc.command[ 0 ]  = GPCMD_REPORT_KEY;
-    rdc.command[ 10 ] = 0x02 | (p_css->i_agid << 6);
+    rdc.command[ 10 ] = 0x02 | (*pi_agid << 6);
 
-    i_ret = ioctl( p_css->i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
+    i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
 
     memcpy( p_key, p_buffer + 4, 8 );
 
@@ -340,7 +314,7 @@ int ioctl_LUSendKey1( css_t *p_css, u8 *p_key )
 /*****************************************************************************
  * ioctl_InvalidateAgid: invalidate the current AGID
  *****************************************************************************/
-int ioctl_InvalidateAgid( css_t *p_css )
+int ioctl_InvalidateAgid( int i_fd, int *pi_agid )
 {
     int i_ret;
 
@@ -348,23 +322,18 @@ int ioctl_InvalidateAgid( css_t *p_css )
     dvd_authinfo auth_info;
 
     auth_info.type = DVD_INVALIDATE_AGID;
-    auth_info.lsa.agid = p_css->i_agid;
+    auth_info.lsa.agid = *pi_agid;
 
-    i_ret = ioctl( p_css->i_fd, DVD_AUTH, &auth_info );
+    i_ret = ioctl( i_fd, DVD_AUTH, &auth_info );
 
-    p_css->i_agid = auth_info.lsa.agid;
+    *pi_agid = auth_info.lsa.agid;
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 0 ];
+    INIT_RDC( GPCMD_REPORT_KEY, 0 );
 
-    BeInitRDC( &rdc, p_buffer, 0 );
+    rdc.command[ 10 ] = 0x3f | (*pi_agid << 6);
 
-    rdc.flags         = B_RAW_DEVICE_DATA_IN;
-    rdc.command[ 0 ]  = GPCMD_REPORT_KEY;
-    rdc.command[ 10 ] = 0x3f | (p_css->i_agid << 6);
-
-    i_ret = ioctl( p_css->i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
+    i_ret = ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
 
 #else
     /* DVD ioctls unavailable - do as if the ioctl failed */
@@ -377,31 +346,27 @@ int ioctl_InvalidateAgid( css_t *p_css )
 /*****************************************************************************
  * ioctl_HostSendChallenge: send challenge to the drive
  *****************************************************************************/
-int ioctl_HostSendChallenge( css_t *p_css, u8 *p_challenge )
+int ioctl_HostSendChallenge( int i_fd, int *pi_agid, u8 *p_challenge )
 {
 #if defined( HAVE_SYS_DVDIO_H ) || defined( LINUX_DVD )
     dvd_authinfo auth_info;
 
     auth_info.type = DVD_HOST_SEND_CHALLENGE;
-    auth_info.lsa.agid = p_css->i_agid;
+    auth_info.hsc.agid = *pi_agid;
 
     memcpy( auth_info.hsc.chal, p_challenge, sizeof(dvd_challenge) );
 
-    return ioctl( p_css->i_fd, DVD_AUTH, &auth_info );
+    return ioctl( i_fd, DVD_AUTH, &auth_info );
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 16 ];
-
-    BeInitRDC( &rdc, p_buffer, 16 );
+    INIT_RDC( GPCMD_SEND_KEY, 16 );
 
-    rdc.command[ 0 ]  = GPCMD_SEND_KEY;
-    rdc.command[ 10 ] = 0x01 | (p_css->i_agid << 6);
+    rdc.command[ 10 ] = 0x01 | (*pi_agid << 6);
 
     p_buffer[ 1 ] = 0xe;
     memcpy( p_buffer + 4, p_challenge, 12 );
 
-    return ioctl( p_css->i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
+    return ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
 
 #else
     /* DVD ioctls unavailable - do as if the ioctl failed */
@@ -413,31 +378,27 @@ int ioctl_HostSendChallenge( css_t *p_css, u8 *p_challenge )
 /*****************************************************************************
  * ioctl_HostSendKey2: send the second key to the drive
  *****************************************************************************/
-int ioctl_HostSendKey2( css_t *p_css, u8 *p_key )
+int ioctl_HostSendKey2( int i_fd, int *pi_agid, u8 *p_key )
 {
 #if defined( HAVE_SYS_DVDIO_H ) || defined( LINUX_DVD )
     dvd_authinfo auth_info;
 
     auth_info.type = DVD_HOST_SEND_KEY2;
-    auth_info.hsk.agid = p_css->i_agid;
+    auth_info.hsk.agid = *pi_agid;
 
     memcpy( auth_info.hsk.key, p_key, sizeof(dvd_key) );
 
-    return ioctl( p_css->i_fd, DVD_AUTH, &auth_info );
+    return ioctl( i_fd, DVD_AUTH, &auth_info );
 
 #elif defined( SYS_BEOS )
-    raw_device_command rdc;
-    u8 p_buffer[ 12 ];
+    INIT_RDC( GPCMD_SEND_KEY, 12 );
 
-    BeInitRDC( &rdc, p_buffer, 12 );
-
-    rdc.command[ 0 ]  = GPCMD_REPORT_KEY;
-    rdc.command[ 10 ] = 0x3 | (p_css->i_agid << 6);
+    rdc.command[ 10 ] = 0x3 | (*pi_agid << 6);
 
     p_buffer[ 1 ] = 0xa;
     memcpy( p_buffer + 4, p_key, 8 );
 
-    return ioctl( p_css->i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
+    return ioctl( i_fd, B_RAW_DEVICE_COMMAND, &rdc, sizeof(rdc) );
 
 #else
     /* DVD ioctls unavailable - do as if the ioctl failed */
@@ -455,11 +416,26 @@ int ioctl_HostSendKey2( css_t *p_css, u8 *p_key )
  * This function initializes a BeOS raw device command structure for future
  * use, either a read command or a write command.
  *****************************************************************************/
-static void BeInitRDC( raw_device_command *p_rdc, void *p_buffer, int i_len )
+static void BeInitRDC( raw_device_command *p_rdc,
+                       void *p_buffer, int i_len, int i_type )
 {
     memset( p_rdc, 0, sizeof( raw_device_command ) );
     memset( p_buffer, 0, i_len );
 
+    switch( i_type )
+    {
+        case GPCMD_SEND_KEY:
+            /* leave the flags to 0 */
+            break;
+
+        case GPCMD_READ_DVD_STRUCTURE:
+        case GPCMD_REPORT_KEY:
+            p_rdc.flags         = B_RAW_DEVICE_DATA_IN;
+            break;
+    }
+
+    p_rdc->command[ 0 ]      = i_type;
+
     p_rdc->command[ 8 ]      = (i_len >> 8) & 0xff;
     p_rdc->command[ 9 ]      =  i_len       & 0xff;
     p_rdc->command_length    = 12;
@@ -472,6 +448,5 @@ static void BeInitRDC( raw_device_command *p_rdc, void *p_buffer, int i_len )
 
     p_rdc->timeout           = 1000000;
 }
-
 #endif
 
index 77ce9ec203641c6f96014019d16e49d38500e1e5..3449ea1f83b2968aaa293d9b62fd38b1182e6433 100644 (file)
@@ -2,7 +2,7 @@
  * dvd_ioctl.h: DVD ioctl replacement function
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: dvd_ioctl.h,v 1.5 2001/04/04 02:49:18 sam Exp $
+ * $Id: dvd_ioctl.h,v 1.6 2001/04/11 04:31:59 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
  *****************************************************************************/
 
 int ioctl_ReadCopyright     ( int, int, int * );
-int ioctl_ReadKey           ( css_t *, u8 * );
+int ioctl_ReadKey           ( int, int *, u8 * );
 
-int ioctl_LUSendAgid        ( css_t * );
-int ioctl_LUSendChallenge   ( css_t *, u8 * );
-int ioctl_LUSendKey1        ( css_t *, u8 * );
-int ioctl_LUSendASF         ( css_t *, int * );
-int ioctl_InvalidateAgid    ( css_t * );
-int ioctl_HostSendChallenge ( css_t *, u8 * );
-int ioctl_HostSendKey2      ( css_t *, u8 * );
+int ioctl_LUSendAgid        ( int, int * );
+int ioctl_LUSendChallenge   ( int, int *, u8 * );
+int ioctl_LUSendKey1        ( int, int *, u8 * );
+int ioctl_LUSendASF         ( int, int *, int * );
+int ioctl_InvalidateAgid    ( int, int * );
+int ioctl_HostSendChallenge ( int, int *, u8 * );
+int ioctl_HostSendKey2      ( int, int *, u8 * );
 
 #ifdef SYS_BEOS
 
index 3a9a78996dae42090a1b98d5359f8912708f55fc..2a767a8fbf0f3091d71a8b32ad28f2d82e562ce2 100644 (file)
@@ -10,7 +10,7 @@
  *  -dvd_udf to find files
  *****************************************************************************
  * Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.41 2001/04/10 17:47:05 stef Exp $
+ * $Id: input_dvd.c,v 1.42 2001/04/11 04:31:59 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -528,7 +528,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
                     vts.i_pos +
                     vts.manager_inf.i_title_vob_start_sector * DVD_LB_SIZE;
 
-            j = CSSGetKey( p_dvd->p_css );
+            j = CSSGetKey( p_input->i_handle, p_dvd->p_css );
             if( j < 0 )
             {
                 intf_ErrMsg( "dvd error: fatal error in vts css key" );
@@ -865,10 +865,7 @@ static void DVDInit( input_thread_t * p_input )
             return;
         }
 
-        p_dvd->p_css->i_fd = p_input->i_handle;
-        p_dvd->p_css->i_agid = 0;
-
-        if( CSSInit( p_dvd->p_css ) < 0 )
+        if( CSSInit( p_input->i_handle, p_dvd->p_css ) < 0 )
         {
             intf_ErrMsg( "dvd error: fatal failure in CSS" );
             free( p_dvd->p_css );
index ff211610bcf49842af648fdc6cdbf465b00f8b01..514372e29042514e32e8411208817c9309685133 100644 (file)
@@ -2,7 +2,7 @@
  * input_dvd.h: thread structure of the DVD plugin
  *****************************************************************************
  * Copyright (C) 1999-2001 VideoLAN
- * $Id: input_dvd.h,v 1.17 2001/04/10 17:47:05 stef Exp $
+ * $Id: input_dvd.h,v 1.18 2001/04/11 04:31:59 sam Exp $
  *
  * Author: Stéphane Borel <stef@via.ecp.fr>
  *
@@ -68,8 +68,8 @@ typedef struct thread_dvd_data_s
  * Prototypes in dvd_css.c
  *****************************************************************************/
 int   CSSTest             ( int );
-int   CSSInit             ( struct css_s * );
-int   CSSGetKey           ( struct css_s * );
+int   CSSInit             ( int, struct css_s * );
+int   CSSGetKey           ( int, struct css_s * );
 int   CSSDescrambleSector ( u8 * , u8 * );
 
 /*****************************************************************************
@@ -80,4 +80,3 @@ int   IfoInit     ( struct ifo_s * );
 int   IfoTitleSet ( struct ifo_s * );
 void  IfoEnd      ( struct ifo_s * );
 
-
index 9e94b11b4954f46ede0f1ef564e9ff6d0f7e5708..4acfd9f9c42714102c413102c59d44c856f122e2 100644 (file)
@@ -2,7 +2,7 @@
  * gtk_callbacks.c : Callbacks for the Gtk+ plugin.
  *****************************************************************************
  * Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_callbacks.c,v 1.13 2001/04/08 13:09:32 octplane Exp $
+ * $Id: gtk_callbacks.c,v 1.14 2001/04/11 04:31:59 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -545,6 +545,7 @@ on_disc_ok_clicked                     (GtkButton       *button,
     /* Build source name and add it to playlist */
     sprintf( psz_source, "%s:%s", psz_method, psz_device );
     intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, psz_source );
+    free( psz_source );
 
     gtk_widget_hide( p_intf->p_sys->p_disc );
 }