Commit b316e6e8 authored by Sam Hocevar's avatar Sam Hocevar

* ./configure.ac.in: we explicitely link the dvdplay plugin with libdvdcss

    if it was found.
  * ./modules/access/dvdplay/tools.c: we don't try to stat the device if it
    looks like a Win32 drive.
  * ./src/misc/messages.c: we only flush stderr under Win32.
parent 11e02196
...@@ -763,7 +763,8 @@ then ...@@ -763,7 +763,8 @@ then
then then
AC_CHECK_HEADERS(dvdcss/dvdcss.h, AC_CHECK_HEADERS(dvdcss/dvdcss.h,
[ PLUGINS="${PLUGINS} dvd" [ PLUGINS="${PLUGINS} dvd"
LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss" ], LDFLAGS_dvd="${LDFLAGS_dvd} -ldvdcss"
LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -ldvdcss" ],
[ AC_MSG_WARN([libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.]) [ AC_MSG_WARN([libdvdcss is no longer provided with vlc; please get libdvdcss from http://www.videolan.org/libdvdcss/ and build it. Then either use --with-dvdcss=<path/where/libdvdcss/was/installed> for dynamic linking (recommended under Unix) or --with-dvdcss-tree=<path/where/libdvdcss/was/built> for static linking (recommended under BeOS, Windows, MacOS X). Alternatively you can use --disable-dvd to disable the DVD plugin.])
AC_MSG_ERROR([cannot find libdvdcss headers]) ]) AC_MSG_ERROR([cannot find libdvdcss headers]) ])
else else
...@@ -781,6 +782,7 @@ then ...@@ -781,6 +782,7 @@ then
AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a) AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
BUILTINS="${BUILTINS} dvd" BUILTINS="${BUILTINS} dvd"
LDFLAGS_dvd="${LDFLAGS_dvd} ${real_dvdcss_tree}/src/.libs/libdvdcss.a" LDFLAGS_dvd="${LDFLAGS_dvd} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
LDFLAGS_dvdcss="${LDFLAGS_dvdcss} ${real_dvdcss_tree}/src/.libs/libdvdcss.a"
CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src" CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${real_dvdcss_tree}/src"
else else
dnl The given libdvdcss wasn't built dnl The given libdvdcss wasn't built
...@@ -803,6 +805,7 @@ then ...@@ -803,6 +805,7 @@ then
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
PLUGINS="${PLUGINS} dvd" PLUGINS="${PLUGINS} dvd"
LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss" LDFLAGS_dvd="${LDFLAGS_dvd} -L${with_dvdcss}/lib -ldvdcss"
LDFLAGS_dvdcss="${LDFLAGS_dvdcss} -L${with_dvdcss}/lib -ldvdcss"
CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include" CPPFLAGS_dvd="${CPPFLAGS_dvd} -I${with_dvdcss}/include"
else else
dnl No libdvdcss could be found, sorry dnl No libdvdcss could be found, sorry
...@@ -835,7 +838,7 @@ then ...@@ -835,7 +838,7 @@ then
AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>], AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
[int foo() { return DVD_VIDEO_LB_LEN; }],[ [int foo() { return DVD_VIDEO_LB_LEN; }],[
PLUGINS="${PLUGINS} dvdread" PLUGINS="${PLUGINS} dvdread"
LDFLAGS_dvdread="${LDFLAGS_dvdread} ${LDFLAGS_test} -ldvdread" LDFLAGS_dvdread="${LDFLAGS_dvdread} ${LDFLAGS_test} -ldvdread ${LDFLAGS_dvdcss}"
CPPFLAGS_dvdread="${CPPFLAGS_dvdread} ${CPPFLAGS_test}" CPPFLAGS_dvdread="${CPPFLAGS_dvdread} ${CPPFLAGS_test}"
],[ ],[
if test "x${enable_dvdread}" != "x" if test "x${enable_dvdread}" != "x"
...@@ -877,7 +880,7 @@ then ...@@ -877,7 +880,7 @@ then
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}" CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
AC_CHECK_HEADERS(dvdplay/dvdplay.h, [ AC_CHECK_HEADERS(dvdplay/dvdplay.h, [
PLUGINS="${PLUGINS} dvdplay" PLUGINS="${PLUGINS} dvdplay"
LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_test} -ldvdplay -ldvdread" LDFLAGS_dvdplay="${LDFLAGS_dvdplay} ${LDFLAGS_test} -ldvdplay -ldvdread ${LDFLAGS_dvdcss}"
CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_test}" CPPFLAGS_dvdplay="${CPPFLAGS_dvdplay} ${CPPFLAGS_test}"
],[ ],[
if test "x${enable_dvdplay}" != x if test "x${enable_dvdplay}" != x
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* tools.c: tools for dvd plugin. * tools.c: tools for dvd plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: tools.c,v 1.2 2002/10/23 21:54:33 gbazin Exp $ * $Id: tools.c,v 1.3 2002/10/28 16:26:44 sam Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -100,22 +100,31 @@ char * dvdplay_ParseCL( input_thread_t * p_input, ...@@ -100,22 +100,31 @@ char * dvdplay_ParseCL( input_thread_t * p_input,
if( !psz_source ) return NULL; if( !psz_source ) return NULL;
} }
#ifdef WIN32
if( psz_source[0] && psz_source[1] == ':' && psz_source[2] == '\0' )
{
/* Don't try to stat the file */
}
else
#endif
{
if( stat( psz_source, &stat_info ) == -1 ) if( stat( psz_source, &stat_info ) == -1 )
{ {
msg_Err( p_input, "cannot stat() source `%s' (%s)", msg_Warn( p_input, "cannot stat() source `%s' (%s)",
psz_source, strerror(errno)); psz_source, strerror(errno) );
free( psz_source ); free( psz_source );
return NULL; return NULL;
} }
if( !S_ISBLK(stat_info.st_mode) && if( !S_ISBLK(stat_info.st_mode) &&
!S_ISCHR(stat_info.st_mode) && !S_ISCHR(stat_info.st_mode) &&
!S_ISDIR(stat_info.st_mode) ) !S_ISDIR(stat_info.st_mode) )
{ {
msg_Dbg( p_input, "plugin discarded" msg_Dbg( p_input, "plugin discarded (not a valid source)" );
" (not a valid source)" );
free( psz_source ); free( psz_source );
return NULL; return NULL;
} }
}
msg_Dbg( p_input, "dvdroot=%s title=%d chapter=%d angle=%d", msg_Dbg( p_input, "dvdroot=%s title=%d chapter=%d angle=%d",
psz_source, *i_title, *i_chapter, *i_angle ); psz_source, *i_title, *i_chapter, *i_angle );
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* modules, especially intf modules. See config.h for output configuration. * modules, especially intf modules. See config.h for output configuration.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: messages.c,v 1.16 2002/10/22 21:10:28 sam Exp $ * $Id: messages.c,v 1.17 2002/10/28 16:26:44 sam Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -481,7 +481,9 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item ) ...@@ -481,7 +481,9 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
p_item->psz_msg ); p_item->psz_msg );
} }
#ifdef WIN32
fflush( stderr ); fflush( stderr );
#endif
} }
/***************************************************************************** /*****************************************************************************
......
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