Commit 6b14a375 authored by Stéphane Borel's avatar Stéphane Borel

-Some functions to prepare ifo commands utilisation to move in the

structures of DVDs
-Change in configure to avoid compiling css functions on BSD.
parent 71f866bf
......@@ -3307,27 +3307,21 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in sys/dvdio.h
for ac_hdr in linux/cdrom.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3321: checking for $ac_hdr" >&5
echo "configure:3315: 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 3326 "configure"
#line 3320 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3325: \"$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*
......@@ -3353,48 +3347,8 @@ else
fi
done
for ac_hdr in linux/cdrom.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:3361: 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 3366 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3371: \"$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*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
cat > conftest.$ac_ext <<EOF
#line 3398 "configure"
#line 3352 "configure"
#include "confdefs.h"
#include <linux/cdrom.h>
EOF
......@@ -3408,6 +3362,11 @@ EOF
fi
rm -f conftest*
else
echo "$ac_t""no" 1>&6
fi
done
PLUGINS=${PLUGINS}"ps ts dvd yuv idct idctclassic motion ";
......@@ -3544,17 +3503,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:3548: checking for sys/asoundlib.h" >&5
echo "configure:3507: 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 3553 "configure"
#line 3512 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3517: \"$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*
......@@ -3571,7 +3530,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:3575: checking for main in -lasound" >&5
echo "configure:3534: 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
......@@ -3579,14 +3538,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3583 "configure"
#line 3542 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:3590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3549: \"$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
......
......@@ -101,10 +101,9 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for DVD ioctls
AC_CHECK_HEADERS(sys/ioctl.h)
AC_CHECK_HEADERS(sys/dvdio.h)
AC_CHECK_HEADERS(linux/cdrom.h)
AC_EGREP_HEADER(dvd,linux/cdrom.h,AC_DEFINE(LINUX_DVD,1,DVD support for linux))
AC_CHECK_HEADERS(sys/ioctl.h,
[AC_CHECK_HEADERS(linux/cdrom.h)
AC_EGREP_HEADER(dvd,linux/cdrom.h,AC_DEFINE(LINUX_DVD,1,DVD support for linux))])
dnl default plugins
PLUGINS=${PLUGINS}"ps ts dvd yuv idct idctclassic motion ";
......
......@@ -97,9 +97,6 @@
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <sys/dvdio.h> header file. */
#undef HAVE_SYS_DVDIO_H
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
......
......@@ -2,7 +2,7 @@
* dvd_css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_css.c,v 1.3 2001/02/08 17:44:12 massiot Exp $
* $Id: dvd_css.c,v 1.4 2001/02/09 03:51:42 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -33,7 +33,9 @@
#include <string.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <sys/ioctl.h>
#ifdef HAVE_IOCTL_H
# include <sys/ioctl.h>
#endif
#ifdef HAVE_SYS_DVDIO_H
# include <sys/dvdio.h>
#endif
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* dvd_ifo.h: Structures for ifo parsing
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_ifo.h,v 1.2 2001/02/08 17:44:12 massiot Exp $
* $Id: dvd_ifo.h,v 1.3 2001/02/09 03:51:42 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -38,9 +38,11 @@ typedef struct ifo_command_s
u8 i_dir_cmp :1;
u8 i_cmp :3;
u8 i_sub_cmd :4;
u16 i_v0 :16;
u16 i_v2 :16;
u16 i_v4 :16;
union
{
u8 pi_8[6];
u16 pi_16[3];
} data;
} ifo_command_t;
/* Program Chain Command Table
......
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.5 2001/02/08 17:44:12 massiot Exp $
* $Id: input_dvd.c,v 1.6 2001/02/09 03:51:42 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -176,10 +176,10 @@ static void DVDInit( input_thread_t * p_input )
IfoRead( &(p_method->ifo) );
intf_Msg( "Ifo: Initialized" );
#if defined( HAVE_SYS_DVDIO_H ) || defined( LINUX_DVD )
/* CSS authentication and keys */
if( ( p_method->b_encrypted = DVDCheckCSS( p_input ) ) )
{
#if defined( HAVE_SYS_DVDIO_H ) || defined( LINUX_DVD )
int i;
p_method->css = CSSInit( p_input->i_handle );
......@@ -199,8 +199,10 @@ static void DVDInit( input_thread_t * p_input )
}
CSSGetKeys( &(p_method->css) );
intf_Msg( "CSS: Initialized" );
}
#else
intf_ErrMsg( "Unscrambling not supported" );
#endif
}
/* FIXME: Kludge beginning of vts_01_1.vob */
i_start = p_method->ifo.p_vts[0].i_pos +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment