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
then
AC_CHECK_HEADERS(dvdcss/dvdcss.h,
[ 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_ERROR([cannot find libdvdcss headers]) ])
else
......@@ -781,6 +782,7 @@ then
AC_MSG_RESULT(${real_dvdcss_tree}/src/.libs/libdvdcss.a)
BUILTINS="${BUILTINS} dvd"
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"
else
dnl The given libdvdcss wasn't built
......@@ -803,6 +805,7 @@ then
AC_MSG_RESULT(yes)
PLUGINS="${PLUGINS} dvd"
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"
else
dnl No libdvdcss could be found, sorry
......@@ -835,7 +838,7 @@ then
AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
[int foo() { return DVD_VIDEO_LB_LEN; }],[
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}"
],[
if test "x${enable_dvdread}" != "x"
......@@ -877,7 +880,7 @@ then
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
AC_CHECK_HEADERS(dvdplay/dvdplay.h, [
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}"
],[
if test "x${enable_dvdplay}" != x
......
......@@ -2,7 +2,7 @@
* tools.c: tools for dvd plugin.
*****************************************************************************
* 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>
*
......@@ -100,21 +100,30 @@ char * dvdplay_ParseCL( input_thread_t * p_input,
if( !psz_source ) return NULL;
}
if( stat( psz_source, &stat_info ) == -1 )
#ifdef WIN32
if( psz_source[0] && psz_source[1] == ':' && psz_source[2] == '\0' )
{
msg_Err( p_input, "cannot stat() source `%s' (%s)",
psz_source, strerror(errno));
free( psz_source );
return NULL;
/* Don't try to stat the file */
}
if( !S_ISBLK(stat_info.st_mode) &&
!S_ISCHR(stat_info.st_mode) &&
!S_ISDIR(stat_info.st_mode) )
else
#endif
{
msg_Dbg( p_input, "plugin discarded"
" (not a valid source)" );
free( psz_source );
return NULL;
if( stat( psz_source, &stat_info ) == -1 )
{
msg_Warn( p_input, "cannot stat() source `%s' (%s)",
psz_source, strerror(errno) );
free( psz_source );
return NULL;
}
if( !S_ISBLK(stat_info.st_mode) &&
!S_ISCHR(stat_info.st_mode) &&
!S_ISDIR(stat_info.st_mode) )
{
msg_Dbg( p_input, "plugin discarded (not a valid source)" );
free( psz_source );
return NULL;
}
}
msg_Dbg( p_input, "dvdroot=%s title=%d chapter=%d angle=%d",
......
......@@ -4,7 +4,7 @@
* modules, especially intf modules. See config.h for output configuration.
*****************************************************************************
* 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>
* Samuel Hocevar <sam@zoy.org>
......@@ -481,7 +481,9 @@ static void PrintMsg ( vlc_object_t * p_this, msg_item_t * p_item )
p_item->psz_msg );
}
#ifdef WIN32
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