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 ...@@ -329,7 +329,7 @@ endif
# Main application target # Main application target
# #
vlc: Makefile.opts Makefile.dep Makefile $(H_OBJ) $(C_OBJ) $(CPP_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ) 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) ifeq ($(SYS),beos)
xres -o $@ ./share/vlc_beos.rsrc xres -o $@ ./share/vlc_beos.rsrc
mimeset -f $@ mimeset -f $@
......
...@@ -66,6 +66,7 @@ LIB_ALSA = @LIB_ALSA@ ...@@ -66,6 +66,7 @@ LIB_ALSA = @LIB_ALSA@
LIB_BEOS = @LIB_BEOS@ LIB_BEOS = @LIB_BEOS@
LIB_DARWIN = @LIB_DARWIN@ LIB_DARWIN = @LIB_DARWIN@
LIB_DVD = @LIB_DVD@ LIB_DVD = @LIB_DVD@
LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
LIB_ESD = @LIB_ESD@ LIB_ESD = @LIB_ESD@
LIB_GGI = @LIB_GGI@ LIB_GGI = @LIB_GGI@
LIB_GLIDE = @LIB_GLIDE@ LIB_GLIDE = @LIB_GLIDE@
...@@ -166,12 +167,6 @@ endif ...@@ -166,12 +167,6 @@ endif
# #
# Libraries # Libraries
# #
ifeq (1,$(LOCAL_LIBDVDCSS))
ifneq (,$(findstring dvd,$(BUILTINS)))
LIB += lib/libdvdcss.a
endif
endif
ifneq (,$(findstring mingw32,$(SYS))) ifneq (,$(findstring mingw32,$(SYS)))
LIB += -lws2_32 -lnetapi32 LIB += -lws2_32 -lnetapi32
endif endif
......
This diff is collapsed.
This diff is collapsed.
...@@ -22,7 +22,7 @@ $(LIBDVDCSS_O): %.o: %.c ...@@ -22,7 +22,7 @@ $(LIBDVDCSS_O): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $< $(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
../../lib/libdvdcss.so.$(LIBDVDCSS_VERSION): $(LIBDVDCSS_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 && 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) rm -f ../../lib/libdvdcss.so.$(LIBDVDCSS_MAJOR) && ln -s libdvdcss.so.$(LIBDVDCSS_VERSION) ../../lib/libdvdcss.so.$(LIBDVDCSS_MAJOR)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* css.c: Functions for DVD authentification and unscrambling * css.c: Functions for DVD authentification and unscrambling
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * 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> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -285,7 +285,7 @@ int CSSInit( dvdcss_handle dvdcss ) ...@@ -285,7 +285,7 @@ int CSSInit( dvdcss_handle dvdcss )
} }
#else /* HAVE_CSS */ #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 */ #endif /* HAVE_CSS */
return -1; return -1;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libdvdcss.c: DVD reading library. * libdvdcss.c: DVD reading library.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * 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> * Authors: Stphane Borel <stef@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -150,9 +150,9 @@ extern int dvdcss_seek ( dvdcss_handle dvdcss, int i_blocks ) ...@@ -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_title_t *p_title;
dvd_key_t p_key; dvd_key_t p_key;
......
...@@ -20,11 +20,11 @@ include ../../Makefile.modules ...@@ -20,11 +20,11 @@ include ../../Makefile.modules
$(PLUGIN_DVD): %.o: .dep/%.d $(PLUGIN_DVD): %.o: .dep/%.d
$(PLUGIN_DVD): %.o: %.c $(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: .dep/%.d
$(BUILTIN_DVD): BUILTIN_%.o: %.c $(BUILTIN_DVD): BUILTIN_%.o: %.c
$(CC) $(CFLAGS) $(CFLAGS_DVD) -DBUILTIN -c -o $@ $< $(CC) $(CFLAGS_DVD) $(CFLAGS) -DBUILTIN -c -o $@ $<
# #
# Real targets # Real targets
...@@ -32,14 +32,14 @@ $(BUILTIN_DVD): BUILTIN_%.o: %.c ...@@ -32,14 +32,14 @@ $(BUILTIN_DVD): BUILTIN_%.o: %.c
ifeq (1,$(LOCAL_LIBDVDCSS)) ifeq (1,$(LOCAL_LIBDVDCSS))
../../plugins/dvd.so: libdvdcss $(PLUGIN_DVD) ../../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) ../../plugins/dvd.a: libdvdcss $(BUILTIN_DVD)
ar r $@ $(BUILTIN_DVD) ar r $@ $(BUILTIN_DVD)
$(RANLIB) $@ $(RANLIB) $@
else else
../../plugins/dvd.so: $(PLUGIN_DVD) ../../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) ../../plugins/dvd.a: $(BUILTIN_DVD)
ar r $@ $(BUILTIN_DVD) ar r $@ $(BUILTIN_DVD)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvd.c : DVD input module for vlc * dvd.c : DVD input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2000 VideoLAN * 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> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -21,18 +21,14 @@ ...@@ -21,18 +21,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#define MODULE_NAME dvd
#include "modules_inner.h"
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include "defs.h" #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 <stdlib.h> /* malloc(), free() */
#include <string.h> /* strdup() */ #include <string.h> /* strdup() */
...@@ -60,11 +56,7 @@ MODULE_CONFIG_STOP ...@@ -60,11 +56,7 @@ MODULE_CONFIG_STOP
MODULE_INIT_START MODULE_INIT_START
p_module->i_capabilities = MODULE_CAPABILITY_NULL p_module->i_capabilities = MODULE_CAPABILITY_NULL
| MODULE_CAPABILITY_INPUT; | MODULE_CAPABILITY_INPUT;
#ifdef HAVE_CSS p_module->psz_longname = "DVD input module, uses libdvdcss";
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 */
MODULE_INIT_STOP MODULE_INIT_STOP
MODULE_ACTIVATE_START MODULE_ACTIVATE_START
...@@ -74,23 +66,3 @@ MODULE_ACTIVATE_STOP ...@@ -74,23 +66,3 @@ MODULE_ACTIVATE_STOP
MODULE_DEACTIVATE_START MODULE_DEACTIVATE_START
MODULE_DEACTIVATE_STOP 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 @@ ...@@ -3,7 +3,7 @@
* found in .ifo. * found in .ifo.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * 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> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -22,18 +22,14 @@ ...@@ -22,18 +22,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#define MODULE_NAME dvd
#include "modules_inner.h"
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include "defs.h" #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 <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* contains the basic udf handling functions * contains the basic udf handling functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * 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> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -28,19 +28,14 @@ ...@@ -28,19 +28,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
/* #define MODULE_NAME dvd
#include "modules_inner.h"
/*****************************************************************************
* Preamble * Preamble
*/ *****************************************************************************/
#include "defs.h" #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 <stdio.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* -dvd_udf to find files * -dvd_udf to find files
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * 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> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -29,19 +29,14 @@ ...@@ -29,19 +29,14 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#define MODULE_NAME dvd
#include "modules_inner.h"
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#include "defs.h" #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 <stdio.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -160,21 +155,13 @@ static int DVDProbe( probedata_t *p_data ) ...@@ -160,21 +155,13 @@ static int DVDProbe( probedata_t *p_data )
if( TestMethod( INPUT_METHOD_VAR, "dvd" ) ) if( TestMethod( INPUT_METHOD_VAR, "dvd" ) )
{ {
#ifdef HAVE_CSS
return( 999 ); return( 999 );
#else /* HAVE_CSS */
return( 998 );
#endif /* HAVE_CSS */
} }
if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "dvd:", 4 ) ) if( ( strlen(psz_name) > 4 ) && !strncasecmp( psz_name, "dvd:", 4 ) )
{ {
/* If the user specified "dvd:" then it's probably a DVD */ /* If the user specified "dvd:" then it's probably a DVD */
#ifdef HAVE_CSS
i_score = 100; i_score = 100;
#else /* HAVE_CSS */
i_score = 90;
#endif /* HAVE_CSS */
psz_name += 4; psz_name += 4;
} }
...@@ -435,9 +422,9 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -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 ); 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 ); 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