Commit 9400b572 authored by Jon Lech Johansen's avatar Jon Lech Johansen

* MacOS X VCD support.

parent ff619dd6
...@@ -96,6 +96,7 @@ LIB_QNX = @LIB_QNX@ ...@@ -96,6 +96,7 @@ LIB_QNX = @LIB_QNX@
LIB_QT = @LIB_QT@ LIB_QT = @LIB_QT@
LIB_RC = @LIB_RC@ LIB_RC = @LIB_RC@
LIB_SDL = @LIB_SDL@ LIB_SDL = @LIB_SDL@
LIB_VCD = @LIB_VCD@
LIB_WAVEOUT = @LIB_WAVEOUT@ LIB_WAVEOUT = @LIB_WAVEOUT@
LIB_WIN32 = @LIB_WIN32@ LIB_WIN32 = @LIB_WIN32@
LIB_X11 = @LIB_X11@ LIB_X11 = @LIB_X11@
......
...@@ -6494,6 +6494,12 @@ then ...@@ -6494,6 +6494,12 @@ then
BUILTINS="${BUILTINS} vcd" BUILTINS="${BUILTINS} vcd"
fi fi
if test x$enable_vcd != xno -a "${SYS}" = "darwin"
then
BUILTINS="${BUILTINS} vcd"
LIB_VCD="${LIB_VCD} -framework IOKit"
fi
# Check whether --enable-dummy or --disable-dummy was given. # Check whether --enable-dummy or --disable-dummy was given.
if test "${enable_dummy+set}" = set; then if test "${enable_dummy+set}" = set; then
enableval="$enable_dummy" enableval="$enable_dummy"
...@@ -8331,6 +8337,7 @@ s%@LIB_QNX@%$LIB_QNX%g ...@@ -8331,6 +8337,7 @@ s%@LIB_QNX@%$LIB_QNX%g
s%@LIB_QT@%$LIB_QT%g s%@LIB_QT@%$LIB_QT%g
s%@LIB_RC@%$LIB_RC%g s%@LIB_RC@%$LIB_RC%g
s%@LIB_SDL@%$LIB_SDL%g s%@LIB_SDL@%$LIB_SDL%g
s%@LIB_VCD@%$LIB_VCD%g
s%@LIB_WAVEOUT@%$LIB_WAVEOUT%g s%@LIB_WAVEOUT@%$LIB_WAVEOUT%g
s%@LIB_WIN32@%$LIB_WIN32%g s%@LIB_WIN32@%$LIB_WIN32%g
s%@LIB_X11@%$LIB_X11%g s%@LIB_X11@%$LIB_X11%g
......
...@@ -903,6 +903,12 @@ then ...@@ -903,6 +903,12 @@ then
BUILTINS="${BUILTINS} vcd" BUILTINS="${BUILTINS} vcd"
fi fi
if test x$enable_vcd != xno -a "${SYS}" = "darwin"
then
BUILTINS="${BUILTINS} vcd"
LIB_VCD="${LIB_VCD} -framework IOKit"
fi
dnl dnl
dnl dummy plugin dnl dummy plugin
dnl dnl
...@@ -1541,6 +1547,7 @@ AC_SUBST(LIB_QNX) ...@@ -1541,6 +1547,7 @@ AC_SUBST(LIB_QNX)
AC_SUBST(LIB_QT) AC_SUBST(LIB_QT)
AC_SUBST(LIB_RC) AC_SUBST(LIB_RC)
AC_SUBST(LIB_SDL) AC_SUBST(LIB_SDL)
AC_SUBST(LIB_VCD)
AC_SUBST(LIB_WAVEOUT) AC_SUBST(LIB_WAVEOUT)
AC_SUBST(LIB_WIN32) AC_SUBST(LIB_WIN32)
AC_SUBST(LIB_X11) AC_SUBST(LIB_X11)
......
vcd_SOURCES = vcd.c input_vcd.c linux_cdrom_tools.c vcd_SOURCES = vcd.c input_vcd.c cdrom_tools.c
/**************************************************************************** /****************************************************************************
* linux_cdrom_tools.h: linux cdrom tools header * cdrom_tools.h: cdrom tools header
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: cdrom_tools.h,v 1.1 2002/02/20 05:50:00 jlj Exp $
* *
* Author: Johan Bilien <jobi@via.ecp.fr> * Author: Johan Bilien <jobi@via.ecp.fr>
* *
...@@ -20,12 +21,6 @@ ...@@ -20,12 +21,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/ *****************************************************************************/
#if defined(HAVE_BSD_DVD_STRUCT) || defined(DVD_STRUCT_IN_BSDI_DVDIOCTL_DVD_H) || defined(DVD_STRUCT_IN_DVD_H)
# include <dvd.h>
#else
# include <linux/cdrom.h>
#endif
/* where the data start on a VCD sector */ /* where the data start on a VCD sector */
#define VCD_DATA_START 24 #define VCD_DATA_START 24
/* size of the availablr data on a VCD sector */ /* size of the availablr data on a VCD sector */
...@@ -36,7 +31,7 @@ ...@@ -36,7 +31,7 @@
/****************************************************************************** /******************************************************************************
* Prototypes * * Prototypes *
******************************************************************************/ ******************************************************************************/
int ioctl_GetTrackCount ( int ); int ioctl_GetTrackCount ( int, const char *psz_dev );
int * ioctl_GetSectors ( int ); int * ioctl_GetSectors ( int, const char *psz_dev );
int ioctl_ReadSector ( int, int, byte_t * ); int ioctl_ReadSector ( int, int, byte_t * );
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
#include "debug.h" #include "debug.h"
#include "input_vcd.h" #include "input_vcd.h"
#include "linux_cdrom_tools.h" #include "cdrom_tools.h"
/* how many blocks VCDRead will read in each loop */ /* how many blocks VCDRead will read in each loop */
#define VCD_BLOCKS_ONCE 4 #define VCD_BLOCKS_ONCE 4
...@@ -217,7 +217,8 @@ static void VCDInit( input_thread_t * p_input ) ...@@ -217,7 +217,8 @@ static void VCDInit( input_thread_t * p_input )
p_vcd->i_handle = p_input->i_handle; p_vcd->i_handle = p_input->i_handle;
/* We read the Table Of Content information */ /* We read the Table Of Content information */
p_vcd->nb_tracks = ioctl_GetTrackCount( p_input->i_handle ); p_vcd->nb_tracks = ioctl_GetTrackCount( p_input->i_handle,
p_input->p_source );
if( p_vcd->nb_tracks < 0 ) if( p_vcd->nb_tracks < 0 )
{ {
input_BuffersEnd( p_input->p_method_data ); input_BuffersEnd( p_input->p_method_data );
...@@ -234,7 +235,8 @@ static void VCDInit( input_thread_t * p_input ) ...@@ -234,7 +235,8 @@ static void VCDInit( input_thread_t * p_input )
return; return;
} }
p_vcd->p_sectors = ioctl_GetSectors( p_input->i_handle ); p_vcd->p_sectors = ioctl_GetSectors( p_input->i_handle,
p_input->p_source );
if ( p_vcd->p_sectors == NULL ) if ( p_vcd->p_sectors == NULL )
{ {
input_BuffersEnd( p_input->p_method_data ); input_BuffersEnd( p_input->p_method_data );
......
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