Commit 76fcb7fc authored by Sam Hocevar's avatar Sam Hocevar

  * Changed libdvdcss API to force binary incompatibility. Yeah, this is
    evil, but if we don't do it now we'll have to do it when more people
    are using it.
  * Fixed minor libdvdcss stuff such as the soname and compilation flags.
  * New --with-dvdcss flag.
    Explanation:
     o default: build libdvdcss, statically link vlc against it.
     o --with-dvdcss=no: build libdvdcss, dynamically link vlc against it.
     o --with-dvdcss=yes: don't build libdvdcss, use already installed one.
     o --with-dvdcss=/foo: don't build libdvdcss, use libdvdcss from /foo/*.
    (this looks a bit strange to me, I'll find better flag settings)
parent 9fadff59
......@@ -329,7 +329,7 @@ endif
# Main application target
#
vlc: Makefile.opts Makefile.dep Makefile $(H_OBJ) $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ)
$(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ) $(LCFLAGS) $(LIB)
$(CC) $(CFLAGS) -o $@ $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ) $(LCFLAGS)
ifeq ($(SYS),beos)
xres -o $@ ./share/vlc_beos.rsrc
mimeset -f $@
......
......@@ -66,6 +66,7 @@ LIB_ALSA = @LIB_ALSA@
LIB_BEOS = @LIB_BEOS@
LIB_DARWIN = @LIB_DARWIN@
LIB_DVD = @LIB_DVD@
LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
LIB_ESD = @LIB_ESD@
LIB_GGI = @LIB_GGI@
LIB_GLIDE = @LIB_GLIDE@
......@@ -166,12 +167,6 @@ endif
#
# Libraries
#
ifeq (1,$(LOCAL_LIBDVDCSS))
ifneq (,$(findstring dvd,$(BUILTINS)))
LIB += lib/libdvdcss.a
endif
endif
ifneq (,$(findstring mingw32,$(SYS)))
LIB += -lws2_32 -lnetapi32
endif
......
This diff is collapsed.
......@@ -54,12 +54,13 @@ AC_CHECK_FUNCS(swab)
AC_CHECK_FUNCS(sigrelse)
dnl Check for getopt
GETOPT=0
AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
[ # FreeBSD has a gnugetopt library for this:
AC_CHECK_LIB([gnugetopt],[getopt_long],
[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB="${LIB} -lgnugetopt"],
[GETOPT=1])])
AC_SUBST(GETOPT)
AC_FUNC_MMAP
AC_TYPE_SIGNAL
......@@ -181,12 +182,12 @@ dnl
dnl for windoze
AC_CHECK_HEADERS(winioctl.h,[
LIBDVDCSS=1
CAN_BUILD_LIBDVDCSS=1
])
dnl for Un*x
AC_CHECK_HEADERS(sys/ioctl.h,[
LIBDVDCSS=1
CAN_BUILD_LIBDVDCSS=1
AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h)
BSD_DVD_STRUCT=0
dnl
......@@ -253,7 +254,7 @@ dnl AltiVec acceleration
dnl
AC_ARG_ENABLE(altivec,
[ --enable-altivec Enable altivec optimizations (default disabled since it is broken)],
[ if test x$enableval = xyes; then ARCH="${ARCH} altivec";
[ if test x$enableval = xyes; then ARCH="${ARCH} altivec"
BUILTINS="${BUILTINS} idctaltivec"
LIB_IDCTALTIVEC="-framework vecLib"
fi ])
......@@ -262,6 +263,7 @@ AC_ARG_ENABLE(altivec,
dnl
dnl Debugging mode
dnl
DEBUG=0
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug mode (default disabled)],
[ if test x$enableval = xyes; then DEBUG=1; fi ])
......@@ -269,6 +271,7 @@ AC_ARG_ENABLE(debug,
dnl
dnl Enable/disable statistics
dnl
STATS=0
AC_ARG_ENABLE(stats,
[ --enable-stats Enable printing of statistics (default disabled)],
[ if test x$enableval = xyes; then STATS=1; fi ])
......@@ -276,6 +279,7 @@ AC_ARG_ENABLE(stats,
dnl
dnl Trace mode
dnl
TRACE=0
AC_ARG_ENABLE(trace,
[ --enable-trace Enable trace mode (default disabled)],
[ if test x$enableval = xyes; then TRACE=1; fi ])
......@@ -283,6 +287,7 @@ AC_ARG_ENABLE(trace,
dnl
dnl Trace mode
dnl
PROFILING=0
AC_ARG_ENABLE(profiling,
[ --enable-profiling Enable gprof profiling (default disabled)],
[ if test x$enableval = xyes; then PROFILING=1; fi ])
......@@ -312,54 +317,98 @@ AC_ARG_ENABLE(pth,
LIB="${LIB} ${THREAD_LIB}"
dnl
dnl CSS DVD decryption
dnl DVD module: check for installed libdvdcss or local libdvdcss
dnl
AC_ARG_ENABLE(css,
[ --disable-css Disable DVD CSS decryption (default enabled)],
[ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
if test x${CSS} = x1; then AC_DEFINE(HAVE_CSS, 1, Define if you want DVD CSS decryption.) fi
LOCAL_LIBDVDCSS=0
STATIC_LIBDVDCSS=0
AC_ARG_WITH(dvdcss,
[ --with-dvdcss[=name] use another libdvdcss (default is local one)],
[ if test "x$withval" == "xno"
then
# local libdvdcss
if test x${CAN_BUILD_LIBDVDCSS} = x1
then
LOCAL_LIBDVDCSS=1
BUILTINS="${BUILTINS} dvd"
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
fi
else
# existing libdvdcss
BUILTINS="${BUILTINS} dvd"
if test "x$withval" != "xyes"
then
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
fi
LIB_DVD="${LIB_DVD} -ldvdcss"
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
fi ],
# user didn't decide, we choose to use local libdvdcss and link statically
[ if test x${CAN_BUILD_LIBDVDCSS} = x1
then
LOCAL_LIBDVDCSS=1
STATIC_LIBDVDCSS=1
BUILTINS="${BUILTINS} dvd"
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
fi ])
dnl
dnl DVD module: check for installed libdvdcss or local libdvdcss
dnl TODO: use user-provided --with-dvdcss flag
dnl CSS DVD decryption (for libdvdcss)
dnl
AC_CHECK_HEADERS(videolan/dvdcss.h,[
# installed libdvdcss
BUILTINS="${BUILTINS} dvd"
LIB_DVD="${LIB_DVD} -ldvdcss"],
[if test x${LIBDVDCSS} = x1; then
# local libdvdcss
LOCAL_LIBDVDCSS=1
BUILTINS="${BUILTINS} dvd"
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
fi])
CSS=0
AC_ARG_ENABLE(css,
[ --disable-css Disable DVD CSS decryption (default enabled)],
[ if test x$enableval = xyes
then
CSS=1
fi ],
[ CSS=1; ])
if test x${CSS} = x1
then
AC_DEFINE(HAVE_CSS, 1, Define if you want DVD CSS decryption.)
fi
dnl
dnl dummy plugin
dnl
AC_ARG_ENABLE(dummy,
[ --disable-dummy dummy module (default enabled)])
if test x$enable_dummy != xno; then
BUILTINS="${BUILTINS} dummy"; fi
if test x$enable_dummy != xno
then
BUILTINS="${BUILTINS} dummy"
fi
dnl
dnl null plugin
dnl
AC_ARG_ENABLE(null,
[ --disable-null Null module (default enabled)])
if test x$enable_null != xno; then
BUILTINS="${BUILTINS} null"; fi
if test x$enable_null != xno
then
BUILTINS="${BUILTINS} null"
fi
dnl
dnl rc plugin
dnl
AC_ARG_ENABLE(rc,
[ --disable-rc rc module (default enabled)])
if test x$enable_rc != xno; then
BUILTINS="${BUILTINS} rc"; fi
if test x$enable_rc != xno
then
BUILTINS="${BUILTINS} rc"
fi
dnl special case for BeOS
if test x$SYS = xbeos; then
if test x$SYS = xbeos
then
BUILTINS="${BUILTINS} beos"
LIB_BEOS="-lbe -lgame -lroot -ltracker"
PLCFLAGS="${PLCFLAGS} -nostart"
......@@ -372,8 +421,11 @@ dnl OSS /dev/dsp module
dnl
AC_ARG_ENABLE(dsp,
[ --disable-dsp Linux /dev/dsp support (default enabled)])
if test x$enable_dsp != xno; then
if test -c /dev/dsp; then
if test x$enable_dsp != xno
then
if test -c /dev/dsp
then
PLUGINS="${PLUGINS} dsp"
fi
fi
......@@ -383,9 +435,11 @@ dnl Esound module
dnl
AC_ARG_ENABLE(esd,
[ --enable-esd Esound library support (default disabled)],
[if test x$enable_esd = xyes; then
[if test x$enable_esd = xyes
then
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
if test x${ESD_CONFIG} != xno; then
if test x${ESD_CONFIG} != xno
then
PLUGINS="${PLUGINS} esd"
LIB_ESD="`${ESD_CONFIG} --libs`"
fi
......@@ -406,7 +460,8 @@ dnl MacOS X module
dnl
AC_ARG_ENABLE(macosx,
[ --enable-macosx Mac OS X interface support (default enabled in Mac OS X)],
[if test x$enable_macosx = xyes; then
[if test x$enable_macosx = xyes
then
BUILTINS="${BUILTINS} macosx"
LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
......@@ -423,8 +478,9 @@ dnl
dnl QNX RTOS module
dnl
AC_ARG_ENABLE(qnx,
[ --disable-qnx QNX RTOS support (default enabled)])
if test x$enable_qnx != xno; then
[ --disable-qnx QNX RTOS support (default enabled in QNX RTOS)])
if test x$enable_qnx != xno
then
AC_CHECK_HEADERS(Ph.h, [
PLUGINS="${PLUGINS} qnx"
LIB_QNX="-lasound -lph"
......@@ -443,10 +499,10 @@ dnl GGI module
dnl
AC_ARG_WITH(ggi,
[ --with-ggi[=name] GGI support (default disabled)],
[ if test "x$withval" != "xno";
[ if test "x$withval" != "xno"
then
PLUGINS="${PLUGINS} ggi";
if test "x$withval" != "xyes";
PLUGINS="${PLUGINS} ggi"
if test "x$withval" != "xyes"
then
LIB_GGI="-l"$withval
else
......@@ -459,7 +515,7 @@ dnl SDL module
dnl
AC_ARG_ENABLE(sdl,
[ --disable-sdl SDL support (default enabled)])
if test "x$withval" != "xno";
if test "x$withval" != "xno"
then
AC_DEFINE(HAVE_SDL_SDL_H, 0, Define if you have SDL/SDL.h)
AC_DEFINE(HAVE_SDL11_SDL_H, 0, Define if you have SDL/SDL11.h)
......@@ -479,14 +535,16 @@ then
[ echo "The development package for SDL is not installed. Please install it"
echo "and try again."
exit ])
if expr 1.1.5 \> $($SDL_CONFIG --version); then
if expr 1.1.5 \> $($SDL_CONFIG --version) >/dev/null
then
echo "You need SDL version 1.1.5 or later."
exit
fi
PLUGINS="${PLUGINS} sdl"
CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
elif test "x$withval" = "xyes"; then
elif test "x$withval" = "xyes"
then
echo "I couldn't find the SDL package. You can download libSDL from"
echo "http://www.libsdl.org/."
exit
......@@ -498,10 +556,10 @@ dnl Windows DirectX module
dnl
AC_ARG_WITH(directx,
[ --with-directx[=name] Windows DirectX support (default enabled)],
[ if test "x$withval" != "xno";
[ if test "x$withval" != "xno"
then
PLUGINS="${PLUGINS} directx";
if test "x$withval" != "xyes";
PLUGINS="${PLUGINS} directx"
if test "x$withval" != "xyes"
then
LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
INCLUDE="${INCLUDE} -I"$withval"/include"
......@@ -510,7 +568,7 @@ AC_ARG_WITH(directx,
LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
fi
fi ])
if test "x$withval" = "x";
if test "x$withval" = "x"
then
AC_CHECK_HEADERS(directx.h,
[PLUGINS="${PLUGINS} directx"
......@@ -522,10 +580,10 @@ dnl Glide module
dnl
AC_ARG_WITH(glide,
[ --with-glide[=name] Glide (3dfx) support (default disabled)],
[ if test "x$withval" != "xno";
[ if test "x$withval" != "xno"
then
PLUGINS="${PLUGINS} glide";
if test "x$withval" != "xyes";
PLUGINS="${PLUGINS} glide"
if test "x$withval" != "xyes"
then
LIB_GLIDE="-l"$withval" -lm"
else
......@@ -552,7 +610,7 @@ AC_ARG_ENABLE(qt,
PLUGINS="${PLUGINS} qt"
ALIASES="${ALIASES} qvlc"
LIB_QT="-lqt -L${QTDIR}/lib"
if test -x ${QTDIR}/bin/moc ;
if test -x ${QTDIR}/bin/moc
then
MOC=${QTDIR}/bin/moc
else
......@@ -566,8 +624,8 @@ dnl
AC_ARG_ENABLE(kde,
[ --enable-kde KDE interface support (default disabled)],
[if test x$enable_kde = xyes; then
PLUGINS="${PLUGINS} kde";
ALIASES="${ALIASES} kvlc";
PLUGINS="${PLUGINS} kde"
ALIASES="${ALIASES} kvlc"
LIB_KDE="-lkfile"
fi])
......@@ -670,6 +728,7 @@ AC_SUBST(ASM)
AC_SUBST(TRACE)
AC_SUBST(PROFILING)
AC_SUBST(OPTIMS)
AC_SUBST(GETOPT)
AC_SUBST(CSS)
AC_SUBST(MOC)
AC_SUBST(WINDRES)
......@@ -682,6 +741,7 @@ AC_SUBST(LIB_ALSA)
AC_SUBST(LIB_BEOS)
AC_SUBST(LIB_DARWIN)
AC_SUBST(LIB_DVD)
AC_SUBST(LIB_DVD_PLUGIN)
AC_SUBST(LIB_ESD)
AC_SUBST(LIB_GGI)
AC_SUBST(LIB_GLIDE)
......@@ -716,7 +776,6 @@ global configuration
system : ${SYS}
architecture : ${ARCH}
optimizations : ${OPTIMS}
inline assembly : ${ASM}
vlc configuration
-----------------
......@@ -732,8 +791,15 @@ vlc aliases :${ALIASES}
libdvdcss configuration
-----------------------
CSS decryption : ${CSS}
need to be built : ${LOCAL_LIBDVDCSS}"
if test x${LOCAL_LIBDVDCSS} = x1
then
echo "link statically : ${STATIC_LIBDVDCSS}
CSS decryption : ${CSS}"
fi
echo "
You may now tune Makefile.opts at your convenience. To build vlc, type
\`make vlc'. To build libdvdcss only, type \`make libdvdcss'."
......@@ -22,7 +22,7 @@ $(LIBDVDCSS_O): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
../../lib/libdvdcss.so.$(LIBDVDCSS_VERSION): $(LIBDVDCSS_O)
$(CC) $(PCFLAGS) -o $@ $^ $(PLCFLAGS)
$(CC) $(PCFLAGS) -Wl,-soname -Wl,libdvdcss.so.$(LIBDVDCSS_MAJOR) -o $@ $^ $(PLCFLAGS)
rm -f ../../lib/libdvdcss.so && ln -s libdvdcss.so.$(LIBDVDCSS_VERSION) ../../lib/libdvdcss.so
rm -f ../../lib/libdvdcss.so.$(LIBDVDCSS_MAJOR) && ln -s libdvdcss.so.$(LIBDVDCSS_VERSION) ../../lib/libdvdcss.so.$(LIBDVDCSS_MAJOR)
......
......@@ -2,7 +2,7 @@
* css.c: Functions for DVD authentification and unscrambling
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: css.c,v 1.6 2001/07/26 03:13:30 sam Exp $
* $Id: css.c,v 1.7 2001/07/27 01:05:17 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -285,7 +285,7 @@ int CSSInit( dvdcss_handle dvdcss )
}
#else /* HAVE_CSS */
_dvdcss_error( dvdcss, "CSS decryption is disabled in this module" );
_dvdcss_error( dvdcss, "CSS decryption is disabled in this library" );
#endif /* HAVE_CSS */
return -1;
......
......@@ -2,7 +2,7 @@
* libdvdcss.c: DVD reading library.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: libdvdcss.c,v 1.9 2001/07/25 08:41:21 gbazin Exp $
* $Id: libdvdcss.c,v 1.10 2001/07/27 01:05:17 sam Exp $
*
* Authors: Stphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -150,9 +150,9 @@ extern int dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks )
}
/*****************************************************************************
* dvdcss_crack: crack the current title key
* dvdcss_title: crack the current title key if needed
*****************************************************************************/
extern int dvdcss_crack ( dvdcss_handle dvdcss, int i_block )
extern int dvdcss_title ( dvdcss_handle dvdcss, int i_block )
{
dvd_title_t *p_title;
dvd_key_t p_key;
......
......@@ -20,11 +20,11 @@ include ../../Makefile.modules
$(PLUGIN_DVD): %.o: .dep/%.d
$(PLUGIN_DVD): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) $(CFLAGS_DVD) -DPLUGIN -c -o $@ $<
$(CC) $(CFLAGS_DVD) $(CFLAGS) $(PCFLAGS) -DPLUGIN -c -o $@ $<
$(BUILTIN_DVD): BUILTIN_%.o: .dep/%.d
$(BUILTIN_DVD): BUILTIN_%.o: %.c
$(CC) $(CFLAGS) $(CFLAGS_DVD) -DBUILTIN -c -o $@ $<
$(CC) $(CFLAGS_DVD) $(CFLAGS) -DBUILTIN -c -o $@ $<
#
# Real targets
......@@ -32,14 +32,14 @@ $(BUILTIN_DVD): BUILTIN_%.o: %.c
ifeq (1,$(LOCAL_LIBDVDCSS))
../../plugins/dvd.so: libdvdcss $(PLUGIN_DVD)
$(CC) $(PCFLAGS) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) ../../lib/libdvdcss.a $(LIB_DVD)
$(CC) $(PCFLAGS) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) $(LIB_DVD_PLUGIN)
../../plugins/dvd.a: libdvdcss $(BUILTIN_DVD)
ar r $@ $(BUILTIN_DVD)
$(RANLIB) $@
else
../../plugins/dvd.so: $(PLUGIN_DVD)
$(CC) $(PCFLAGS) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) $(LIB_DVD)
$(CC) $(PCFLAGS) -o $@ $(PLUGIN_DVD) $(PLCFLAGS) $(LIB_DVD_PLUGIN)
../../plugins/dvd.a: $(BUILTIN_DVD)
ar r $@ $(BUILTIN_DVD)
......
......@@ -2,7 +2,7 @@
* dvd.c : DVD input module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: dvd.c,v 1.10 2001/05/31 03:57:54 sam Exp $
* $Id: dvd.c,v 1.11 2001/07/27 01:05:17 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -21,18 +21,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME dvd
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#ifdef HAVE_CSS
#define MODULE_NAME dvd
#else /* HAVE_CSS */
#define MODULE_NAME dvdnocss
#endif /* HAVE_CSS */
#include "modules_inner.h"
#include <stdlib.h> /* malloc(), free() */
#include <string.h> /* strdup() */
......@@ -60,11 +56,7 @@ MODULE_CONFIG_STOP
MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_INPUT;
#ifdef HAVE_CSS
p_module->psz_longname = "full DVD input module with CSS decryption";
#else /* HAVE_CSS */
p_module->psz_longname = "DVD input module, CSS decryption disabled";
#endif /* HAVE_CSS */
p_module->psz_longname = "DVD input module, uses libdvdcss";
MODULE_INIT_STOP
MODULE_ACTIVATE_START
......@@ -74,23 +66,3 @@ MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP
#ifdef HAVE_CSS
#else /* HAVE_CSS */
#ifdef BUILTIN
int module_dvd_InitModule( module_t *p_module )
{
return module_dvdnocss_InitModule( p_module );
}
int module_dvd_ActivateModule( module_t *p_module )
{
return module_dvdnocss_ActivateModule( p_module );
}
int module_dvd_DeactivateModule( module_t *p_module )
{
return module_dvdnocss_DeactivateModule( p_module );
}
#endif /* BUILTIN */
#endif /* HAVE_CSS */
......@@ -3,7 +3,7 @@
* found in .ifo.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_summary.c,v 1.6 2001/06/12 22:14:44 sam Exp $
* $Id: dvd_summary.c,v 1.7 2001/07/27 01:05:17 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -22,18 +22,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME dvd
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#ifdef HAVE_CSS
#define MODULE_NAME dvd
#else /* HAVE_CSS */
#define MODULE_NAME dvdnocss
#endif /* HAVE_CSS */
#include "modules_inner.h"
#include <stdio.h>
#include <stdlib.h>
......
......@@ -5,7 +5,7 @@
* contains the basic udf handling functions
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: dvd_udf.c,v 1.11 2001/06/12 22:14:44 sam Exp $
* $Id: dvd_udf.c,v 1.12 2001/07/27 01:05:17 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -28,19 +28,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*
#define MODULE_NAME dvd
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*/
*****************************************************************************/
#include "defs.h"
#ifdef HAVE_CSS
# define MODULE_NAME dvd
#else /* HAVE_CSS */
# define MODULE_NAME dvdnocss
#endif /* HAVE_CSS */
#include "modules_inner.h"
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
......
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.80 2001/07/17 09:48:07 massiot Exp $
* $Id: input_dvd.c,v 1.81 2001/07/27 01:05:17 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -29,19 +29,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#define MODULE_NAME dvd
#include "modules_inner.h"
/*****************************************************************************
* Preamble
*****************************************************************************/
#include "defs.h"
#ifdef HAVE_CSS
# define MODULE_NAME dvd
#else /* HAVE_CSS */
# define MODULE_NAME dvdnocss
#endif /* HAVE_CSS */
#include "modules_inner.h"
#include <stdio.h>
#include <stdlib.h>
......@@ -160,21 +155,13 @@ static int DVDProbe( probedata_t *p_data )
if( TestMethod( INPUT_METHOD_VAR, "dvd" ) )
{
#ifdef HAVE_CSS
return( 999 );
#else /* HAVE_CSS */
return( 998 );
#endif /* HAVE_CSS */
}
if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "dvd:", 4 ) )
{
/* If the user specified "dvd:" then it's probably a DVD */
#ifdef HAVE_CSS
i_score = 100;
#else /* HAVE_CSS */
i_score = 90;
#endif /* HAVE_CSS */
psz_name += 4;
}
......@@ -435,9 +422,9 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_dvd->i_title, i_vts_title, p_dvd->i_title_id );
/*
* CSS cracking has to be done again
* Tell libdvdcss we changed title
*/
dvdcss_crack( p_dvd->dvdhandle,
dvdcss_title( p_dvd->dvdhandle,
vts.i_pos + vts.manager_inf.i_title_vob_start_sector );
/*
......
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