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:
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
#
VLC_VERSION=0.2.70
-VLC_CODENAME=Urumov
+VLC_CODENAME=Ourumov
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
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;
#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
/*
* 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)
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);
*/
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)
}
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
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>
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
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
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
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
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
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
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
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
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
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
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
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
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
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*
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*
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*
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*
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*
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*
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*
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*
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*
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); }
; 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
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
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; }
; 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
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; }
; 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
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;
; 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
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>
#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*
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
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
:
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')
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
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
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>
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
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*
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*
done
cat > conftest.$ac_ext <<EOF
-#line 3175 "configure"
+#line 3172 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
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*
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*
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*
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*
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*
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
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
VLC_VERSION=0.2.70
AC_SUBST(VLC_VERSION)
-VLC_CODENAME=Urumov
+VLC_CODENAME=Ourumov
AC_SUBST(VLC_CODENAME)
dnl Check for tools
* 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
* 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>
*
* 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,
* 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;
{
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 )
{
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 */
}
/* 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;
}
/* 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;
}
/* 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;
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;
}
/* 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;
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;
*****************************************************************************
* 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
/*
//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 )
* 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;
}
* 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>
*
typedef struct css_s
{
- int i_fd;
int i_agid;
disc_t disc;
u8 pi_disc_key[2048];
* 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
/*****************************************************************************
*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;
/*****************************************************************************
* 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;
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 )
{
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 )
{
/*****************************************************************************
* 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;
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 */
/*****************************************************************************
* 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;
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 );
/*****************************************************************************
* 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;
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;
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;
/*****************************************************************************
* 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;
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 );
/*****************************************************************************
* 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;
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 */
/*****************************************************************************
* 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 */
/*****************************************************************************
* 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 */
* 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;
p_rdc->timeout = 1000000;
}
-
#endif
* 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
* -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>
*
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" );
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 );
* 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>
*
* 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 * );
/*****************************************************************************
int IfoTitleSet ( struct ifo_s * );
void IfoEnd ( struct ifo_s * );
-
* 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>
/* 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 );
}