vdr/xine-lib-vdr/src/input/vcd/libcdio/MSWindows Makefile.am Makefile.in aspi32.c aspi32.h ioctl.c win32.c win32.h
Darren Salt
pkg-vdr-dvb-changes@lists.alioth.debian.org
Mon, 04 Apr 2005 22:29:43 +0000
Update of /cvsroot/pkg-vdr-dvb/vdr/xine-lib-vdr/src/input/vcd/libcdio/MSWindows
In directory haydn:/tmp/cvs-serv2129/src/input/vcd/libcdio/MSWindows
Added Files:
Makefile.am Makefile.in aspi32.c aspi32.h ioctl.c win32.c
win32.h
Log Message:
Import of VDR-patched xine-lib.
--- NEW FILE: win32.h ---
/*
$Id: win32.h,v 1.1 2005/04/04 22:29:41 dsalt-guest Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "cdio_private.h"
#pragma pack()
typedef struct {
lsn_t start_lsn;
UCHAR Control : 4;
UCHAR Format;
} track_info_t;
typedef struct {
/* Things common to all drivers like this.
This must be first. */
generic_img_private_t gen;
HANDLE h_device_handle; /* device descriptor */
long hASPI;
short i_sid;
long (*lpSendCommand)( void* );
/* Track information */
bool toc_init; /* if true, info below is valid. */
track_info_t tocent[100]; /* entry info for each track */
track_t total_tracks; /* number of tracks in image */
track_t first_track_num; /* track number of first track */
} _img_private_t;
/*!
Reads an audio device using the DeviceIoControl method into data
starting from lsn. Returns 0 if no error.
*/
int win32ioctl_read_audio_sectors (_img_private_t *obj, void *data, lsn_t lsn,
unsigned int nblocks);
/*!
Reads a single mode2 sector using the DeviceIoControl method into
data starting from lsn. Returns 0 if no error.
*/
int
win32ioctl_read_mode2_sector (_img_private_t *env, void *data, lsn_t lsn,
bool mode2_form2);
/*!
Reads a single mode1 sector using the DeviceIoControl method into
data starting from lsn. Returns 0 if no error.
*/
int
win32ioctl_read_mode1_sector (_img_private_t *env, void *data, lsn_t lsn,
bool mode2_form2);
const char *win32ioctl_is_cdrom(const char drive_letter);
/*!
Initialize internal structures for CD device.
*/
bool win32ioctl_init_win32 (_img_private_t *env);
/*!
Read and cache the CD's Track Table of Contents and track info.
Return true if successful or false if an error.
*/
bool win32ioctl_read_toc (_img_private_t *env);
char *win32ioctl_get_mcn (_img_private_t *env);
/*!
Get the format (XA, DATA, AUDIO) of a track.
*/
track_format_t win32ioctl_get_track_format(_img_private_t *env,
track_t track_num);
--- NEW FILE: aspi32.c ---
/*
$Id: aspi32.c,v 1.1 2005/04/04 22:29:41 dsalt-guest Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* This file contains Win32-specific code and implements low-level
control of the CD drive via the ASPI API.
Inspired by vlc's cdrom.h code
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
static const char _rcsid[] = "$Id: aspi32.c,v 1.1 2005/04/04 22:29:41 dsalt-guest Exp $";
#include <cdio/cdio.h>
#include <cdio/sector.h>
#include <cdio/util.h>
#include "cdio_assert.h"
#include "scsi_mmc.h"
#include <string.h>
#ifdef HAVE_WIN32_CDROM
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <windows.h>
#include "win32.h"
#include <sys/stat.h>
#include <sys/types.h>
#include "aspi32.h"
/* General ioctl() CD-ROM command function */
static bool
wnaspi32_mciSendCommand(int id, UINT msg, DWORD flags, void *arg)
{
MCIERROR mci_error;
mci_error = mciSendCommand(id, msg, flags, (DWORD)arg);
if ( mci_error ) {
char error[256];
mciGetErrorString(mci_error, error, 256);
cdio_warn("mciSendCommand() error: %s", error);
}
return(mci_error == 0);
}
const char *
wnaspi32_is_cdrom(const char drive_letter)
{
static char psz_win32_drive[7];
HMODULE hASPI = NULL;
long (*lpGetSupport)( void ) = NULL;
long (*lpSendCommand)( void* ) = NULL;
DWORD dwSupportInfo;
int i_adapter, i_num_adapters;
char c_drive;
hASPI = LoadLibrary( "wnaspi32.dll" );
if( hASPI != NULL ) {
(FARPROC) lpGetSupport = GetProcAddress( hASPI,
"GetASPI32SupportInfo" );
(FARPROC) lpSendCommand = GetProcAddress( hASPI,
"SendASPI32Command" );
}
if( hASPI == NULL || lpGetSupport == NULL || lpSendCommand == NULL ) {
cdio_debug("Unable to load ASPI or get ASPI function pointers");
if( hASPI ) FreeLibrary( hASPI );
return NULL;
}
/* ASPI support seems to be there */
dwSupportInfo = lpGetSupport();
if( HIBYTE( LOWORD ( dwSupportInfo ) ) == SS_NO_ADAPTERS ) {
cdio_debug("no host adapters found (ASPI)");
FreeLibrary( hASPI );
return NULL;
}
if( HIBYTE( LOWORD ( dwSupportInfo ) ) != SS_COMP ) {
cdio_debug("Unable to initalize ASPI layer");
FreeLibrary( hASPI );
return NULL;
}
i_num_adapters = LOBYTE( LOWORD( dwSupportInfo ) );
if( i_num_adapters == 0 ) {
FreeLibrary( hASPI );
return NULL;
}
c_drive = toupper(drive_letter) - 'A';
for( i_adapter = 0; i_adapter < i_num_adapters; i_adapter++ ) {
struct SRB_GetDiskInfo srbDiskInfo;
int i_target;
SRB_HAInquiry srbInquiry;
srbInquiry.SRB_Cmd = SC_HA_INQUIRY;
srbInquiry.SRB_HaId = i_adapter;
lpSendCommand( (void*) &srbInquiry );
if( srbInquiry.SRB_Status != SS_COMP ) continue;
if( !srbInquiry.HA_Unique[3]) srbInquiry.HA_Unique[3]=8;
for(i_target=0; i_target < srbInquiry.HA_Unique[3]; i_target++)
{
int i_lun;
for( i_lun=0; i_lun<8; i_lun++)
{
srbDiskInfo.SRB_Cmd = SC_GET_DISK_INFO;
srbDiskInfo.SRB_Flags = 0;
srbDiskInfo.SRB_Hdr_Rsvd = 0;
srbDiskInfo.SRB_HaId = i_adapter;
srbDiskInfo.SRB_Target = i_target;
srbDiskInfo.SRB_Lun = i_lun;
lpSendCommand( (void*) &srbDiskInfo );
if( (srbDiskInfo.SRB_Status == SS_COMP) &&
(srbDiskInfo.SRB_Int13HDriveInfo == c_drive) ) {
/* Make sure this is a cdrom device */
struct SRB_GDEVBlock srbGDEVBlock;
memset( &srbGDEVBlock, 0, sizeof(struct SRB_GDEVBlock) );
srbGDEVBlock.SRB_Cmd = SC_GET_DEV_TYPE;
srbDiskInfo.SRB_HaId = i_adapter;
srbGDEVBlock.SRB_Target = i_target;
lpSendCommand( (void*) &srbGDEVBlock );
if( ( srbGDEVBlock.SRB_Status == SS_COMP ) &&
( srbGDEVBlock.SRB_DeviceType == DTYPE_CDROM ) ) {
sprintf( psz_win32_drive, "%c:", drive_letter );
FreeLibrary( hASPI );
return(psz_win32_drive);
}
}
}
}
}
FreeLibrary( hASPI );
return NULL;
}
/*!
Initialize CD device.
*/
bool
wnaspi32_init_win32 (_img_private_t *env)
{
HMODULE hASPI = NULL;
long (*lpGetSupport)( void ) = NULL;
long (*lpSendCommand)( void* ) = NULL;
DWORD dwSupportInfo;
int i, j, i_num_adapters;
char c_drive = env->gen.source_name[0];
hASPI = LoadLibrary( "wnaspi32.dll" );
if( hASPI != NULL ) {
(FARPROC) lpGetSupport = GetProcAddress( hASPI,
"GetASPI32SupportInfo" );
(FARPROC) lpSendCommand = GetProcAddress( hASPI,
"SendASPI32Command" );
}
if( hASPI == NULL || lpGetSupport == NULL || lpSendCommand == NULL ) {
cdio_debug("Unable to load ASPI or get ASPI function pointers");
if( hASPI ) FreeLibrary( hASPI );
return false;
}
/* ASPI support seems to be there */
dwSupportInfo = lpGetSupport();
if( HIBYTE( LOWORD ( dwSupportInfo ) ) == SS_NO_ADAPTERS ) {
cdio_debug("no host adapters found (ASPI)");
FreeLibrary( hASPI );
return -1;
}
if( HIBYTE( LOWORD ( dwSupportInfo ) ) != SS_COMP ) {
cdio_debug("unable to initalize ASPI layer");
FreeLibrary( hASPI );
return -1;
}
i_num_adapters = LOBYTE( LOWORD( dwSupportInfo ) );
if( i_num_adapters == 0 ) {
FreeLibrary( hASPI );
return -1;
}
c_drive = toupper(c_drive) - 'A';
for( i = 0; i < i_num_adapters; i++ ) {
for( j = 0; j < 15; j++ ) {
struct SRB_GetDiskInfo srbDiskInfo;
int lun;
for (lun = 0; lun < 8; lun++ ) {
srbDiskInfo.SRB_Cmd = SC_GET_DISK_INFO;
srbDiskInfo.SRB_HaId = i;
srbDiskInfo.SRB_Flags = 0;
srbDiskInfo.SRB_Hdr_Rsvd = 0;
srbDiskInfo.SRB_Target = j;
srbDiskInfo.SRB_Lun = lun;
lpSendCommand( (void*) &srbDiskInfo );
if( (srbDiskInfo.SRB_Status == SS_COMP) ) {
if (srbDiskInfo.SRB_Int13HDriveInfo != c_drive)
{
continue;
} else {
/* Make sure this is a cdrom device */
struct SRB_GDEVBlock srbGDEVBlock;
memset( &srbGDEVBlock, 0, sizeof(struct SRB_GDEVBlock) );
srbGDEVBlock.SRB_Cmd = SC_GET_DEV_TYPE;
srbGDEVBlock.SRB_HaId = i;
srbGDEVBlock.SRB_Target = j;
lpSendCommand( (void*) &srbGDEVBlock );
if( ( srbGDEVBlock.SRB_Status == SS_COMP ) &&
( srbGDEVBlock.SRB_DeviceType == DTYPE_CDROM ) ) {
env->i_sid = MAKEWORD( i, j );
env->hASPI = (long)hASPI;
env->lpSendCommand = lpSendCommand;
cdio_debug("Using ASPI layer");
return true;
} else {
FreeLibrary( hASPI );
cdio_debug( "%c: is not a CD-ROM drive",
env->gen.source_name[0] );
return false;
}
}
}
}
}
}
FreeLibrary( hASPI );
cdio_debug( "Unable to get HaId and target (ASPI)" );
return false;
}
/*!
Reads a single mode2 sector from cd device into data starting from lsn.
Returns 0 if no error.
*/
static int
wnaspi32_mmc_read_sectors (_img_private_t *env, void *data, lsn_t lsn,
int sector_type, unsigned int nblocks)
{
unsigned char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, };
HANDLE hEvent;
struct SRB_ExecSCSICmd ssc;
#if 1
sector_type = 0; /*all types */
int sync = 0;
int header_code = 2;
int i_user_data = 1;
int edc_ecc = 0;
int error_field = 0;
#endif
/* Create the transfer completion event */
hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
if( hEvent == NULL ) {
return 1;
}
/* Data selection */
memset( &ssc, 0, sizeof( ssc ) );
ssc.SRB_Cmd = SC_EXEC_SCSI_CMD;
ssc.SRB_Flags = SRB_DIR_IN | SRB_EVENT_NOTIFY;
ssc.SRB_HaId = LOBYTE( env->i_sid );
ssc.SRB_Target = HIBYTE( env->i_sid );
ssc.SRB_SenseLen = SENSE_LEN;
ssc.SRB_PostProc = (LPVOID) hEvent;
ssc.SRB_CDBLen = 12;
/* Operation code */
ssc.CDBByte[ 0 ] = CDIO_MMC_GPCMD_READ_CD;
CDIO_MMC_SET_READ_TYPE(ssc.CDBByte, sector_type);
CDIO_MMC_SET_READ_LBA(ssc.CDBByte, lsn);
CDIO_MMC_SET_READ_LENGTH(ssc.CDBByte, nblocks);
#if 1
ssc.CDBByte[ 9 ] = (sync << 7) |
(header_code << 5) |
(i_user_data << 4) |
(edc_ecc << 3) |
(error_field << 1);
/* ssc.CDBByte[ 9 ] = READ_CD_USERDATA_MODE2; */
#else
CDIO_MMC_SET_MAIN_CHANNEL_SELECTION_BITS(ssc.CDBByte,
CDIO_MMC_MCSB_ALL_HEADERS);
#endif
/* Result buffer */
ssc.SRB_BufPointer = buf;
ssc.SRB_BufLen = CDIO_CD_FRAMESIZE_RAW;
/* Initiate transfer */
ResetEvent( hEvent );
env->lpSendCommand( (void*) &ssc );
/* If the command has still not been processed, wait until it's
* finished */
if( ssc.SRB_Status == SS_PENDING ) {
WaitForSingleObject( hEvent, INFINITE );
}
CloseHandle( hEvent );
/* check that the transfer went as planned */
if( ssc.SRB_Status != SS_COMP ) {
return 1;
}
/* FIXME! remove the 8 (SUBHEADER size) below... */
memcpy (data, buf, CDIO_CD_FRAMESIZE_RAW);
return 0;
}
/*!
Reads an audio device into data starting from lsn.
Returns 0 if no error.
*/
int
wnaspi32_read_audio_sectors (_img_private_t *env, void *data, lsn_t lsn,
unsigned int nblocks)
{
return wnaspi32_mmc_read_sectors( env, data, lsn, CDIO_MMC_READ_TYPE_CDDA,
nblocks );
}
/*!
Reads a single mode2 sector from cd device into data starting
from lsn. Returns 0 if no error.
*/
int
wnaspi32_read_mode2_sector (_img_private_t *env, void *data, lsn_t lsn)
{
return wnaspi32_mmc_read_sectors(env, data, lsn, CDIO_MMC_READ_TYPE_ANY,
1);
}
/*!
Read and cache the CD's Track Table of Contents and track info.
Return true if successful or false if an error.
*/
bool
wnaspi32_read_toc (_img_private_t *env)
{
HANDLE hEvent;
struct SRB_ExecSCSICmd ssc;
unsigned char p_tocheader[ 4 ];
/* Create the transfer completion event */
hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
if( hEvent == NULL ) {
return false;
}
memset( &ssc, 0, sizeof( ssc ) );
ssc.SRB_Cmd = SC_EXEC_SCSI_CMD;
ssc.SRB_Flags = SRB_DIR_IN | SRB_EVENT_NOTIFY;
ssc.SRB_HaId = LOBYTE( env->i_sid );
ssc.SRB_Target = HIBYTE( env->i_sid );
ssc.SRB_SenseLen = SENSE_LEN;
ssc.SRB_PostProc = (LPVOID) hEvent;
ssc.SRB_CDBLen = 10;
/* Operation code */
ssc.CDBByte[ 0 ] = READ_TOC;
/* Format */
ssc.CDBByte[ 2 ] = READ_TOC_FORMAT_TOC;
/* Starting track */
ssc.CDBByte[ 6 ] = 0;
/* Allocation length and buffer */
ssc.SRB_BufLen = sizeof( p_tocheader );
ssc.SRB_BufPointer = p_tocheader;
ssc.CDBByte[ 7 ] = ( ssc.SRB_BufLen >> 8 ) & 0xff;
ssc.CDBByte[ 8 ] = ( ssc.SRB_BufLen ) & 0xff;
/* Initiate transfer */
ResetEvent( hEvent );
env->lpSendCommand( (void*) &ssc );
/* If the command has still not been processed, wait until it's
* finished */
if( ssc.SRB_Status == SS_PENDING )
WaitForSingleObject( hEvent, INFINITE );
/* check that the transfer went as planned */
if( ssc.SRB_Status != SS_COMP ) {
CloseHandle( hEvent );
return false;
}
env->first_track_num = p_tocheader[2];
env->total_tracks = p_tocheader[3] - p_tocheader[2] + 1;
{
int i, i_toclength;
unsigned char *p_fulltoc;
i_toclength = 4 /* header */ + p_tocheader[0] +
((unsigned int)p_tocheader[1] << 8);
p_fulltoc = malloc( i_toclength );
if( p_fulltoc == NULL ) {
cdio_error( "out of memory" );
CloseHandle( hEvent );
return false;
}
/* Allocation length and buffer */
ssc.SRB_BufLen = i_toclength;
ssc.SRB_BufPointer = p_fulltoc;
ssc.CDBByte[ 7 ] = ( ssc.SRB_BufLen >> 8 ) & 0xff;
ssc.CDBByte[ 8 ] = ( ssc.SRB_BufLen ) & 0xff;
/* Initiate transfer */
ResetEvent( hEvent );
env->lpSendCommand( (void*) &ssc );
/* If the command has still not been processed, wait until it's
* finished */
if( ssc.SRB_Status == SS_PENDING )
WaitForSingleObject( hEvent, INFINITE );
/* check that the transfer went as planned */
if( ssc.SRB_Status != SS_COMP )
env->total_tracks = 0;
for( i = 0 ; i <= env->total_tracks ; i++ ) {
int i_index = 8 + 8 * i;
env->tocent[ i ].start_lsn = ((int)p_fulltoc[ i_index ] << 24) +
((int)p_fulltoc[ i_index+1 ] << 16) +
((int)p_fulltoc[ i_index+2 ] << 8) +
(int)p_fulltoc[ i_index+3 ];
env->tocent[ i ].Control = (UCHAR)p_fulltoc[ 1 + 8 * i ];
cdio_debug( "p_sectors: %i %lu",
i, (unsigned long int) env->tocent[i].start_lsn );
}
free( p_fulltoc );
}
CloseHandle( hEvent );
env->gen.toc_init = true;
return true;
}
/* Eject media will eventually get removed from _cdio_win32.c */
#if 0
/*!
Eject media. Return 1 if successful, 0 otherwise.
*/
int
wnaspi32_eject_media (void *user_data) {
_img_private_t *env = user_data;
MCI_OPEN_PARMS op;
MCI_STATUS_PARMS st;
DWORD i_flags;
char psz_drive[4];
int ret;
memset( &op, 0, sizeof(MCI_OPEN_PARMS) );
op.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO;
strcpy( psz_drive, "X:" );
psz_drive[0] = env->gen.source_name[0];
op.lpstrElementName = psz_drive;
/* Set the flags for the device type */
i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID |
MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE;
if( wnaspi32_mciSendCommand( 0, MCI_OPEN, i_flags, &op ) ) {
st.dwItem = MCI_STATUS_READY;
/* Eject disc */
ret = wnaspi32_mciSendCommand( op.wDeviceID, MCI_SET,
MCI_SET_DOOR_OPEN, 0 ) != 0;
/* Release access to the device */
wnaspi32_mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 );
} else
ret = 0;
return ret;
}
#endif
/*!
Get format of track.
*/
track_format_t
wnaspi32_get_track_format(_img_private_t *env, track_t track_num)
{
MCI_OPEN_PARMS op;
MCI_STATUS_PARMS st;
DWORD i_flags;
int ret;
memset( &op, 0, sizeof(MCI_OPEN_PARMS) );
op.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO;
op.lpstrElementName = env->gen.source_name;
/* Set the flags for the device type */
i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID |
MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE;
if( wnaspi32_mciSendCommand( 0, MCI_OPEN, i_flags, &op ) ) {
st.dwItem = MCI_CDA_STATUS_TYPE_TRACK;
st.dwTrack = track_num;
i_flags = MCI_TRACK | MCI_STATUS_ITEM ;
ret = wnaspi32_mciSendCommand( op.wDeviceID, MCI_STATUS, i_flags, &st );
/* Release access to the device */
wnaspi32_mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 );
switch(st.dwReturn) {
case MCI_CDA_TRACK_AUDIO:
return TRACK_FORMAT_AUDIO;
case MCI_CDA_TRACK_OTHER:
return TRACK_FORMAT_DATA;
default:
return TRACK_FORMAT_XA;
}
}
return TRACK_FORMAT_ERROR;
}
#endif /* HAVE_WIN32_CDROM */
--- NEW FILE: Makefile.in ---
# Makefile.in generated by automake 1.9.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../../../../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/misc/Makefile.common
subdir = src/input/vcd/libcdio/MSWindows
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/_xine.m4 $(top_srcdir)/m4/aa.m4 \
$(top_srcdir)/m4/alsa.m4 $(top_srcdir)/m4/arts.m4 \
$(top_srcdir)/m4/as.m4 $(top_srcdir)/m4/caca.m4 \
$(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/directx.m4 \
$(top_srcdir)/m4/dl.m4 $(top_srcdir)/m4/dvdnav.m4 \
$(top_srcdir)/m4/esd.m4 $(top_srcdir)/m4/ffmpeg.m4 \
$(top_srcdir)/m4/freetype2.m4 $(top_srcdir)/m4/gettext.m4 \
$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
$(top_srcdir)/m4/irixal.m4 $(top_srcdir)/m4/lcmessage.m4 \
$(top_srcdir)/m4/libFLAC.m4 $(top_srcdir)/m4/libfame.m4 \
$(top_srcdir)/m4/ogg.m4 $(top_srcdir)/m4/opengl.m4 \
$(top_srcdir)/m4/pkg.m4 $(top_srcdir)/m4/progtest.m4 \
$(top_srcdir)/m4/sdl.m4 $(top_srcdir)/m4/speex.m4 \
$(top_srcdir)/m4/theora.m4 $(top_srcdir)/m4/vorbis.m4 \
$(top_srcdir)/m4/xv.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
AAINFO = @AAINFO@
AALIB_CFLAGS = @AALIB_CFLAGS@
AALIB_CONFIG = @AALIB_CONFIG@
AALIB_LIBS = @AALIB_LIBS@
ACLOCAL = @ACLOCAL@
ACLOCAL_DIR = @ACLOCAL_DIR@
ALLOCA = @ALLOCA@
ALSA_CFLAGS = @ALSA_CFLAGS@
ALSA_LIBS = @ALSA_LIBS@
ALSA_STATIC_LIB = @ALSA_STATIC_LIB@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
ARTS_CFLAGS = @ARTS_CFLAGS@
ARTS_CONFIG = @ARTS_CONFIG@
ARTS_LIBS = @ARTS_LIBS@
AS = @AS@
ASFLAGS = @ASFLAGS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_ASF_FALSE = @BUILD_ASF_FALSE@
BUILD_ASF_TRUE = @BUILD_ASF_TRUE@
BUILD_DHA_KMOD_FALSE = @BUILD_DHA_KMOD_FALSE@
BUILD_DHA_KMOD_TRUE = @BUILD_DHA_KMOD_TRUE@
BUILD_FAAD_FALSE = @BUILD_FAAD_FALSE@
BUILD_FAAD_TRUE = @BUILD_FAAD_TRUE@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CACA_CFLAGS = @CACA_CFLAGS@
CACA_CONFIG = @CACA_CONFIG@
CACA_LIBS = @CACA_LIBS@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CCAS = @CCAS@
CCASCOMPILE = @CCASCOMPILE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEBUG_CFLAGS = @DEBUG_CFLAGS@
DEFS = @DEFS@
DEPCOMP = @DEPCOMP@
DEPDIR = @DEPDIR@
DEPMOD = @DEPMOD@
DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
DIRECTFB_LIBS = @DIRECTFB_LIBS@
DIRECTX_AUDIO_LIBS = @DIRECTX_AUDIO_LIBS@
DIRECTX_CPPFLAGS = @DIRECTX_CPPFLAGS@
DIRECTX_VIDEO_LIBS = @DIRECTX_VIDEO_LIBS@
DLLTOOL = @DLLTOOL@
DVDNAV_CFLAGS = @DVDNAV_CFLAGS@
DVDNAV_CONFIG = @DVDNAV_CONFIG@
DVDNAV_LIBS = @DVDNAV_LIBS@
DYNAMIC_LD_LIBS = @DYNAMIC_LD_LIBS@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_VCD_FALSE = @ENABLE_VCD_FALSE@
ENABLE_VCD_TRUE = @ENABLE_VCD_TRUE@
ESD_CFLAGS = @ESD_CFLAGS@
ESD_CONFIG = @ESD_CONFIG@
ESD_LIBS = @ESD_LIBS@
EXEEXT = @EXEEXT@
EXTRA_X_CFLAGS = @EXTRA_X_CFLAGS@
EXTRA_X_LIBS = @EXTRA_X_LIBS@
F77 = @F77@
FFLAGS = @FFLAGS@
FFMPEG_CPPFLAGS = @FFMPEG_CPPFLAGS@
FFMPEG_LIBS = @FFMPEG_LIBS@
FIG2DEV = @FIG2DEV@
FREETYPE_CONFIG = @FREETYPE_CONFIG@
FT2_CFLAGS = @FT2_CFLAGS@
FT2_LIBS = @FT2_LIBS@
GENCAT = @GENCAT@
GLIBC21 = @GLIBC21@
GLUT_LIBS = @GLUT_LIBS@
GLU_LIBS = @GLU_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GNOME_VFS_CFLAGS = @GNOME_VFS_CFLAGS@
GNOME_VFS_LIBS = @GNOME_VFS_LIBS@
GOOM_LIBS = @GOOM_LIBS@
HAVE_AA_FALSE = @HAVE_AA_FALSE@
HAVE_AA_TRUE = @HAVE_AA_TRUE@
HAVE_ALSA09_FALSE = @HAVE_ALSA09_FALSE@
HAVE_ALSA09_TRUE = @HAVE_ALSA09_TRUE@
HAVE_ALSA_FALSE = @HAVE_ALSA_FALSE@
HAVE_ALSA_TRUE = @HAVE_ALSA_TRUE@
HAVE_ARMV4L_FALSE = @HAVE_ARMV4L_FALSE@
HAVE_ARMV4L_TRUE = @HAVE_ARMV4L_TRUE@
HAVE_ARTS_FALSE = @HAVE_ARTS_FALSE@
HAVE_ARTS_TRUE = @HAVE_ARTS_TRUE@
HAVE_BSDI_CDROM = @HAVE_BSDI_CDROM@
HAVE_CACA_FALSE = @HAVE_CACA_FALSE@
HAVE_CACA_TRUE = @HAVE_CACA_TRUE@
HAVE_CDROM_IOCTLS_FALSE = @HAVE_CDROM_IOCTLS_FALSE@
HAVE_CDROM_IOCTLS_TRUE = @HAVE_CDROM_IOCTLS_TRUE@
HAVE_COREAUDIO_FALSE = @HAVE_COREAUDIO_FALSE@
HAVE_COREAUDIO_TRUE = @HAVE_COREAUDIO_TRUE@
HAVE_DARWIN_CDROM = @HAVE_DARWIN_CDROM@
HAVE_DIRECTFB_FALSE = @HAVE_DIRECTFB_FALSE@
HAVE_DIRECTFB_TRUE = @HAVE_DIRECTFB_TRUE@
HAVE_DIRECTX_FALSE = @HAVE_DIRECTX_FALSE@
HAVE_DIRECTX_TRUE = @HAVE_DIRECTX_TRUE@
HAVE_DVDNAV_FALSE = @HAVE_DVDNAV_FALSE@
HAVE_DVDNAV_TRUE = @HAVE_DVDNAV_TRUE@
HAVE_DXR3_FALSE = @HAVE_DXR3_FALSE@
HAVE_DXR3_TRUE = @HAVE_DXR3_TRUE@
HAVE_ESD_FALSE = @HAVE_ESD_FALSE@
HAVE_ESD_TRUE = @HAVE_ESD_TRUE@
HAVE_FB_FALSE = @HAVE_FB_FALSE@
HAVE_FB_TRUE = @HAVE_FB_TRUE@
HAVE_FFMMX_FALSE = @HAVE_FFMMX_FALSE@
HAVE_FFMMX_TRUE = @HAVE_FFMMX_TRUE@
HAVE_FFMPEG_FALSE = @HAVE_FFMPEG_FALSE@
HAVE_FFMPEG_TRUE = @HAVE_FFMPEG_TRUE@
HAVE_FIG2DEV_FALSE = @HAVE_FIG2DEV_FALSE@
HAVE_FIG2DEV_TRUE = @HAVE_FIG2DEV_TRUE@
HAVE_FLAC_FALSE = @HAVE_FLAC_FALSE@
HAVE_FLAC_TRUE = @HAVE_FLAC_TRUE@
HAVE_FREEBSD_CDROM = @HAVE_FREEBSD_CDROM@
HAVE_GNOME_VFS_FALSE = @HAVE_GNOME_VFS_FALSE@
HAVE_GNOME_VFS_TRUE = @HAVE_GNOME_VFS_TRUE@
HAVE_IRIXAL_FALSE = @HAVE_IRIXAL_FALSE@
HAVE_IRIXAL_TRUE = @HAVE_IRIXAL_TRUE@
HAVE_LIBFAME_FALSE = @HAVE_LIBFAME_FALSE@
HAVE_LIBFAME_TRUE = @HAVE_LIBFAME_TRUE@
HAVE_LIBMNG_FALSE = @HAVE_LIBMNG_FALSE@
HAVE_LIBMNG_TRUE = @HAVE_LIBMNG_TRUE@
HAVE_LIBPNG_FALSE = @HAVE_LIBPNG_FALSE@
HAVE_LIBPNG_TRUE = @HAVE_LIBPNG_TRUE@
HAVE_LIBRTE_FALSE = @HAVE_LIBRTE_FALSE@
HAVE_LIBRTE_TRUE = @HAVE_LIBRTE_TRUE@
HAVE_LIBSMBCLIENT_FALSE = @HAVE_LIBSMBCLIENT_FALSE@
HAVE_LIBSMBCLIENT_TRUE = @HAVE_LIBSMBCLIENT_TRUE@
HAVE_LINUX_CDROM = @HAVE_LINUX_CDROM@
HAVE_LINUX_FALSE = @HAVE_LINUX_FALSE@
HAVE_LINUX_TRUE = @HAVE_LINUX_TRUE@
HAVE_MACOSX_VIDEO_FALSE = @HAVE_MACOSX_VIDEO_FALSE@
HAVE_MACOSX_VIDEO_TRUE = @HAVE_MACOSX_VIDEO_TRUE@
HAVE_MLIB_FALSE = @HAVE_MLIB_FALSE@
HAVE_MLIB_TRUE = @HAVE_MLIB_TRUE@
HAVE_OPENGL_FALSE = @HAVE_OPENGL_FALSE@
HAVE_OPENGL_TRUE = @HAVE_OPENGL_TRUE@
HAVE_OSS_FALSE = @HAVE_OSS_FALSE@
HAVE_OSS_TRUE = @HAVE_OSS_TRUE@
HAVE_POLYPAUDIO_FALSE = @HAVE_POLYPAUDIO_FALSE@
HAVE_POLYPAUDIO_TRUE = @HAVE_POLYPAUDIO_TRUE@
HAVE_SDL_FALSE = @HAVE_SDL_FALSE@
HAVE_SDL_TRUE = @HAVE_SDL_TRUE@
HAVE_SGMLTOOLS_FALSE = @HAVE_SGMLTOOLS_FALSE@
HAVE_SGMLTOOLS_TRUE = @HAVE_SGMLTOOLS_TRUE@
HAVE_SOLARIS_CDROM = @HAVE_SOLARIS_CDROM@
HAVE_SPEEX_FALSE = @HAVE_SPEEX_FALSE@
HAVE_SPEEX_TRUE = @HAVE_SPEEX_TRUE@
HAVE_STK_FALSE = @HAVE_STK_FALSE@
HAVE_STK_TRUE = @HAVE_STK_TRUE@
HAVE_SUNAUDIO_FALSE = @HAVE_SUNAUDIO_FALSE@
HAVE_SUNAUDIO_TRUE = @HAVE_SUNAUDIO_TRUE@
HAVE_SUNDGA_FALSE = @HAVE_SUNDGA_FALSE@
HAVE_SUNDGA_TRUE = @HAVE_SUNDGA_TRUE@
HAVE_SUNFB_FALSE = @HAVE_SUNFB_FALSE@
HAVE_SUNFB_TRUE = @HAVE_SUNFB_TRUE@
HAVE_SYNCFB_FALSE = @HAVE_SYNCFB_FALSE@
HAVE_SYNCFB_TRUE = @HAVE_SYNCFB_TRUE@
HAVE_THEORA_FALSE = @HAVE_THEORA_FALSE@
HAVE_THEORA_TRUE = @HAVE_THEORA_TRUE@
HAVE_V4L_FALSE = @HAVE_V4L_FALSE@
HAVE_V4L_TRUE = @HAVE_V4L_TRUE@
HAVE_VCDNAV_FALSE = @HAVE_VCDNAV_FALSE@
HAVE_VCDNAV_TRUE = @HAVE_VCDNAV_TRUE@
HAVE_VIDIX_FALSE = @HAVE_VIDIX_FALSE@
HAVE_VIDIX_TRUE = @HAVE_VIDIX_TRUE@
HAVE_VLDXVMC_FALSE = @HAVE_VLDXVMC_FALSE@
HAVE_VLDXVMC_TRUE = @HAVE_VLDXVMC_TRUE@
HAVE_VORBIS_FALSE = @HAVE_VORBIS_FALSE@
HAVE_VORBIS_TRUE = @HAVE_VORBIS_TRUE@
HAVE_W32DLL_FALSE = @HAVE_W32DLL_FALSE@
HAVE_W32DLL_TRUE = @HAVE_W32DLL_TRUE@
HAVE_WIN32_CDROM = @HAVE_WIN32_CDROM@
HAVE_X11_FALSE = @HAVE_X11_FALSE@
HAVE_X11_TRUE = @HAVE_X11_TRUE@
HAVE_XVMC_FALSE = @HAVE_XVMC_FALSE@
HAVE_XVMC_TRUE = @HAVE_XVMC_TRUE@
HAVE_XV_FALSE = @HAVE_XV_FALSE@
HAVE_XV_TRUE = @HAVE_XV_TRUE@
HAVE_XXMC_FALSE = @HAVE_XXMC_FALSE@
HAVE_XXMC_TRUE = @HAVE_XXMC_TRUE@
HAVE_ZLIB_FALSE = @HAVE_ZLIB_FALSE@
HAVE_ZLIB_TRUE = @HAVE_ZLIB_TRUE@
HOST_OS_DARWIN_FALSE = @HOST_OS_DARWIN_FALSE@
HOST_OS_DARWIN_TRUE = @HOST_OS_DARWIN_TRUE@
INCLUDED_INTL_FALSE = @INCLUDED_INTL_FALSE@
INCLUDED_INTL_TRUE = @INCLUDED_INTL_TRUE@
INCLUDES = @INCLUDES@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_M4_FALSE = @INSTALL_M4_FALSE@
INSTALL_M4_TRUE = @INSTALL_M4_TRUE@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLDIR = @INTLDIR@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
IRIXAL_CFLAGS = @IRIXAL_CFLAGS@
IRIXAL_LIBS = @IRIXAL_LIBS@
IRIXAL_STATIC_LIB = @IRIXAL_STATIC_LIB@
KSTAT_LIBS = @KSTAT_LIBS@
LDFLAGS = @LDFLAGS@
LIBCDIO_CFLAGS = @LIBCDIO_CFLAGS@
LIBCDIO_LIBS = @LIBCDIO_LIBS@
LIBFAME_CFLAGS = @LIBFAME_CFLAGS@
LIBFAME_CONFIG = @LIBFAME_CONFIG@
LIBFAME_LIBS = @LIBFAME_LIBS@
LIBFFMPEG_CFLAGS = @LIBFFMPEG_CFLAGS@
LIBFLAC_CFLAGS = @LIBFLAC_CFLAGS@
LIBFLAC_LIBS = @LIBFLAC_LIBS@
LIBICONV = @LIBICONV@
LIBISO9660_LIBS = @LIBISO9660_LIBS@
LIBMODPLUG_CFLAGS = @LIBMODPLUG_CFLAGS@
LIBMODPLUG_LIBS = @LIBMODPLUG_LIBS@
LIBMPEG2_CFLAGS = @LIBMPEG2_CFLAGS@
LIBNAME = @LIBNAME@
LIBOBJS = @LIBOBJS@
LIBPNG_CONFIG = @LIBPNG_CONFIG@
LIBS = @LIBS@
LIBSMBCLIENT_LIBS = @LIBSMBCLIENT_LIBS@
LIBSTK_CFLAGS = @LIBSTK_CFLAGS@
LIBSTK_LIBS = @LIBSTK_LIBS@
LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
LIBTOOL_DEPS = @LIBTOOL_DEPS@
LIBVCDINFO_LIBS = @LIBVCDINFO_LIBS@
LIBVCD_CFLAGS = @LIBVCD_CFLAGS@
LIBVCD_LIBS = @LIBVCD_LIBS@
LIBVCD_SYSDEP = @LIBVCD_SYSDEP@
LINUX_CDROM_TIMEOUT = @LINUX_CDROM_TIMEOUT@
LINUX_INCLUDE = @LINUX_INCLUDE@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_AGE = @LT_AGE@
LT_CURRENT = @LT_CURRENT@
LT_REVISION = @LT_REVISION@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MKNOD = @MKNOD@
MLIB_CFLAGS = @MLIB_CFLAGS@
MLIB_LIBS = @MLIB_LIBS@
MNG_LIBS = @MNG_LIBS@
MSGFMT = @MSGFMT@
NET_LIBS = @NET_LIBS@
OBJC = @OBJC@
OBJCDEPMODE = @OBJCDEPMODE@
OBJCFLAGS = @OBJCFLAGS@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OGG_CFLAGS = @OGG_CFLAGS@
OGG_LIBS = @OGG_LIBS@
OPENGL_CFLAGS = @OPENGL_CFLAGS@
OPENGL_LIBS = @OPENGL_LIBS@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PASS1_CFLAGS = @PASS1_CFLAGS@
PASS2_CFLAGS = @PASS2_CFLAGS@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PNG_CFLAGS = @PNG_CFLAGS@
PNG_LIBS = @PNG_LIBS@
POFILES = @POFILES@
POLYPAUDIO_CFLAGS = @POLYPAUDIO_CFLAGS@
POLYPAUDIO_LIBS = @POLYPAUDIO_LIBS@
POSUB = @POSUB@
PPC_ARCH_FALSE = @PPC_ARCH_FALSE@
PPC_ARCH_TRUE = @PPC_ARCH_TRUE@
RANLIB = @RANLIB@
RT_LIBS = @RT_LIBS@
SDL_CFLAGS = @SDL_CFLAGS@
SDL_CONFIG = @SDL_CONFIG@
SDL_LIBS = @SDL_LIBS@
SET_MAKE = @SET_MAKE@
SGMLTOOLS = @SGMLTOOLS@
SHELL = @SHELL@
SPEC_VERSION = @SPEC_VERSION@
SPEEX_CFLAGS = @SPEEX_CFLAGS@
SPEEX_LIBS = @SPEEX_LIBS@
STATIC = @STATIC@
STRIP = @STRIP@
SUNDGA_CFLAGS = @SUNDGA_CFLAGS@
SUNDGA_LIBS = @SUNDGA_LIBS@
TAR_NAME = @TAR_NAME@
THEORAENC_LIBS = @THEORAENC_LIBS@
THEORAFILE_LIBS = @THEORAFILE_LIBS@
THEORA_CFLAGS = @THEORA_CFLAGS@
THEORA_LIBS = @THEORA_LIBS@
THREAD_CFLAGS = @THREAD_CFLAGS@
THREAD_CFLAGS_CONFIG = @THREAD_CFLAGS_CONFIG@
THREAD_INCLUDES = @THREAD_INCLUDES@
THREAD_LIBS = @THREAD_LIBS@
THREAD_LIBS_CONFIG = @THREAD_LIBS_CONFIG@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
VORBISENC_LIBS = @VORBISENC_LIBS@
VORBISFILE_LIBS = @VORBISFILE_LIBS@
VORBIS_CFLAGS = @VORBIS_CFLAGS@
VORBIS_LIBS = @VORBIS_LIBS@
W32DLL_DEP = @W32DLL_DEP@
W32_NO_OPTIMIZE = @W32_NO_OPTIMIZE@
WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
WIN32_FALSE = @WIN32_FALSE@
WIN32_TRUE = @WIN32_TRUE@
XGETTEXT = @XGETTEXT@
XINE_ACFLAGS = @XINE_ACFLAGS@
XINE_BIN_AGE = @XINE_BIN_AGE@
XINE_BUILD_CC = @XINE_BUILD_CC@
XINE_BUILD_DATE = @XINE_BUILD_DATE@
XINE_BUILD_OS = @XINE_BUILD_OS@
XINE_CONFIG_PREFIX = @XINE_CONFIG_PREFIX@
XINE_DATADIR = @XINE_DATADIR@
XINE_FONTDIR = @XINE_FONTDIR@
XINE_FONTPATH = @XINE_FONTPATH@
XINE_IFACE_AGE = @XINE_IFACE_AGE@
XINE_LOCALEDIR = @XINE_LOCALEDIR@
XINE_LOCALEPATH = @XINE_LOCALEPATH@
XINE_MAJOR = @XINE_MAJOR@
XINE_MINOR = @XINE_MINOR@
XINE_PLUGINDIR = @XINE_PLUGINDIR@
XINE_PLUGINPATH = @XINE_PLUGINPATH@
XINE_PLUGIN_MIN_SYMS = @XINE_PLUGIN_MIN_SYMS@
XINE_SCRIPTPATH = @XINE_SCRIPTPATH@
XINE_SUB = @XINE_SUB@
XVMC_LIB = @XVMC_LIB@
XV_LIB = @XV_LIB@
XXMC_LIB = @XXMC_LIB@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
ZLIB_INCLUDES = @ZLIB_INCLUDES@
ZLIB_LIBS = @ZLIB_LIBS@
ZLIB_LIBS_CONFIG = @ZLIB_LIBS_CONFIG@
ac_ct_AR = @ac_ct_AR@
ac_ct_AS = @ac_ct_AS@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DLLTOOL = @ac_ct_DLLTOOL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_OBJDUMP = @ac_ct_OBJDUMP@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@
am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
w32_path = @w32_path@
XINE_LIB = $(top_builddir)/src/xine-engine/libxine.la
EXTRA_DIST = aspi32.c aspi32.h ioctl.c win32.c win32.h
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/misc/Makefile.common $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/input/vcd/libcdio/MSWindows/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/input/vcd/libcdio/MSWindows/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
$(mkdir_p) $(distdir)/../../../../../misc
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-data-hook install-exec \
install-exec-am install-info install-info-am install-man \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
uninstall uninstall-am uninstall-hook uninstall-info-am
$(XINE_LIB):
@cd $(top_srcdir)/src/xine-engine && $(MAKE)
install-data-hook:
@if test $$MAKELEVEL -le 4 ; then \
if test -x "$(top_srcdir)/post-install.sh" ; then \
$(top_srcdir)/post-install.sh ; \
fi \
fi
pass1:
@$(MAKE) MULTIPASS_CFLAGS="$(PASS1_CFLAGS)"
pass2:
@$(MAKE) MULTIPASS_CFLAGS="$(PASS2_CFLAGS)"
debug:
@$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"
install-debug: debug
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
@list='$(SUBDIRS)'; for subdir in $$list; do \
(cd $$subdir && $(MAKE) $@) || exit; \
done;
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-includeHEADERS: $(include_HEADERS)
@$(NORMAL_INSTALL)
$(install_sh) -d $(DESTDIR)$(includedir)/xine
@list='$(include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/xine/$$p; \
done
uninstall-includeHEADERS:
@$(NORMAL_UNINSTALL)
list='$(include_HEADERS)'; for p in $$list; do \
rm -f $(DESTDIR)$(includedir)/xine/$$p; \
done
uninstall-hook:
@if echo '$(libdir)' | egrep ^'$(XINE_PLUGINDIR)' >/dev/null; then \
list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p="`echo $$p | sed -e 's/\.la$$/\.so/g;s|^.*/||'`"; \
echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
rm -f $(DESTDIR)$(libdir)/$$p; \
done; \
fi
mostlyclean-generic:
-rm -f *~ \#* .*~ .\#*
maintainer-clean-generic:
-@echo "This command is intended for maintainers to use;"
-@echo "it deletes files that may require special tools to rebuild."
-rm -f Makefile.in
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
--- NEW FILE: win32.c ---
/*
$Id: win32.c,v 1.1 2005/04/04 22:29:41 dsalt-guest Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* This file contains Win32-specific code and implements low-level
control of the CD drive. Inspired by vlc's cdrom.h code
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
static const char _rcsid[] = "$Id: win32.c,v 1.1 2005/04/04 22:29:41 dsalt-guest Exp $";
#include <cdio/cdio.h>
#include <cdio/sector.h>
#include <cdio/util.h>
#include "cdio_assert.h"
#include "cdio_private.h" /* protoype for cdio_is_device_win32 */
#include "scsi_mmc.h"
#include <string.h>
#ifdef HAVE_WIN32_CDROM
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <windows.h>
#include <winioctl.h>
#include "win32.h"
#include <sys/stat.h>
#include <sys/types.h>
#include "aspi32.h"
#define WIN_NT ( GetVersion() < 0x80000000 )
/* General ioctl() CD-ROM command function */
static bool
_cdio_mciSendCommand(int id, UINT msg, DWORD flags, void *arg)
{
MCIERROR mci_error;
mci_error = mciSendCommand(id, msg, flags, (DWORD)arg);
if ( mci_error ) {
char error[256];
mciGetErrorString(mci_error, error, 256);
cdio_warn("mciSendCommand() error: %s", error);
}
return(mci_error == 0);
}
static const char *
cdio_is_cdrom(const char drive_letter) {
if ( WIN_NT ) {
return win32ioctl_is_cdrom(drive_letter);
} else {
return wnaspi32_is_cdrom(drive_letter);
}
}
/*!
Initialize CD device.
*/
static bool
_cdio_init_win32 (void *user_data)
{
_img_private_t *env = user_data;
if (env->gen.init) {
cdio_error ("init called more than once");
return false;
}
env->gen.init = true;
env->toc_init = false;
/* Initializations */
env->h_device_handle = NULL;
env->i_sid = 0;
env->hASPI = 0;
env->lpSendCommand = 0;
if ( WIN_NT ) {
return win32ioctl_init_win32(env);
} else {
return wnaspi32_init_win32(env);
}
}
/*!
Release and free resources associated with cd.
*/
static void
_cdio_win32_free (void *user_data)
{
_img_private_t *env = user_data;
if (NULL == env) return;
free (env->gen.source_name);
if( env->h_device_handle )
CloseHandle( env->h_device_handle );
if( env->hASPI )
FreeLibrary( (HMODULE)env->hASPI );
free (env);
}
/*!
Reads an audio device into data starting from lsn.
Returns 0 if no error.
*/
static int
_cdio_read_audio_sectors (void *user_data, void *data, lsn_t lsn,
unsigned int nblocks)
{
_img_private_t *env = user_data;
if ( env->hASPI ) {
return wnaspi32_read_audio_sectors( env, data, lsn, nblocks );
} else {
return win32ioctl_read_audio_sectors( env, data, lsn, nblocks );
}
}
/*!
Reads a single mode1 sector from cd device into data starting
from lsn. Returns 0 if no error.
*/
static int
_cdio_read_mode1_sector (void *user_data, void *data, lsn_t lsn,
bool b_form2)
{
_img_private_t *env = user_data;
if (env->gen.ioctls_debugged == 75)
cdio_debug ("only displaying every 75th ioctl from now on");
if (env->gen.ioctls_debugged == 30 * 75)
cdio_debug ("only displaying every 30*75th ioctl from now on");
if (env->gen.ioctls_debugged < 75
|| (env->gen.ioctls_debugged < (30 * 75)
&& env->gen.ioctls_debugged % 75 == 0)
|| env->gen.ioctls_debugged % (30 * 75) == 0)
cdio_debug ("reading %lu", (unsigned long int) lsn);
env->gen.ioctls_debugged++;
if ( env->hASPI ) {
return 1;
} else {
return win32ioctl_read_mode1_sector( env, data, lsn, b_form2 );
}
}
/*!
Reads nblocks of mode1 sectors from cd device into data starting
from lsn.
Returns 0 if no error.
*/
static int
_cdio_read_mode1_sectors (void *user_data, void *data, lsn_t lsn,
bool b_form2, unsigned int nblocks)
{
_img_private_t *env = user_data;
int i;
int retval;
for (i = 0; i < nblocks; i++) {
if (b_form2) {
if ( (retval = _cdio_read_mode1_sector (env,
((char *)data) + (M2RAW_SECTOR_SIZE * i),
lsn + i, true)) )
return retval;
} else {
char buf[M2RAW_SECTOR_SIZE] = { 0, };
if ( (retval = _cdio_read_mode1_sector (env, buf, lsn + i, false)) )
return retval;
memcpy (((char *)data) + (CDIO_CD_FRAMESIZE * i),
buf, CDIO_CD_FRAMESIZE);
}
}
return 0;
}
/*!
Reads a single mode2 sector from cd device into data starting
from lsn. Returns 0 if no error.
*/
static int
_cdio_read_mode2_sector (void *user_data, void *data, lsn_t lsn,
bool b_form2)
{
char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, };
_img_private_t *env = user_data;
if (env->gen.ioctls_debugged == 75)
cdio_debug ("only displaying every 75th ioctl from now on");
if (env->gen.ioctls_debugged == 30 * 75)
cdio_debug ("only displaying every 30*75th ioctl from now on");
if (env->gen.ioctls_debugged < 75
|| (env->gen.ioctls_debugged < (30 * 75)
&& env->gen.ioctls_debugged % 75 == 0)
|| env->gen.ioctls_debugged % (30 * 75) == 0)
cdio_debug ("reading %lu", (unsigned long int) lsn);
env->gen.ioctls_debugged++;
if ( env->hASPI ) {
int ret;
ret = wnaspi32_read_mode2_sector(user_data, buf, lsn);
if( ret != 0 ) return ret;
if (b_form2)
memcpy (data, buf, M2RAW_SECTOR_SIZE);
else
memcpy (((char *)data), buf + CDIO_CD_SUBHEADER_SIZE, CDIO_CD_FRAMESIZE);
return 0;
} else {
return win32ioctl_read_mode2_sector( env, data, lsn, b_form2 );
}
}
/*!
Reads nblocks of mode2 sectors from cd device into data starting
from lsn.
Returns 0 if no error.
*/
static int
_cdio_read_mode2_sectors (void *user_data, void *data, lsn_t lsn,
bool b_form2, unsigned int nblocks)
{
int i;
int retval;
unsigned int blocksize = b_form2 ? M2RAW_SECTOR_SIZE : CDIO_CD_FRAMESIZE;
for (i = 0; i < nblocks; i++) {
if ( (retval = _cdio_read_mode2_sector (user_data,
((char *)data) + (blocksize * i),
lsn + i, b_form2)) )
return retval;
}
return 0;
}
/*!
Return the size of the CD in logical block address (LBA) units.
*/
static uint32_t
_cdio_stat_size (void *user_data)
{
_img_private_t *env = user_data;
return env->tocent[env->total_tracks].start_lsn;
}
/*!
Set the key "arg" to "value" in source device.
*/
static int
_cdio_set_arg (void *user_data, const char key[], const char value[])
{
_img_private_t *env = user_data;
if (!strcmp (key, "source"))
{
if (!value)
return -2;
free (env->gen.source_name);
env->gen.source_name = strdup (value);
}
else
return -1;
return 0;
}
/*!
Read and cache the CD's Track Table of Contents and track info.
Return true if successful or false if an error.
*/
static bool
_cdio_read_toc (_img_private_t *env)
{
bool ret;
if( env->hASPI ) {
ret = wnaspi32_read_toc( env );
} else {
ret =win32ioctl_read_toc(env);
}
if (ret) env->gen.toc_init = true ;
return true;
}
/*!
Eject media. Return 1 if successful, 0 otherwise.
*/
static int
_cdio_eject_media (void *user_data) {
_img_private_t *env = user_data;
MCI_OPEN_PARMS op;
MCI_STATUS_PARMS st;
DWORD i_flags;
char psz_drive[4];
int ret;
memset( &op, 0, sizeof(MCI_OPEN_PARMS) );
op.lpstrDeviceType = (LPCSTR)MCI_DEVTYPE_CD_AUDIO;
strcpy( psz_drive, "X:" );
psz_drive[0] = env->gen.source_name[0];
op.lpstrElementName = psz_drive;
/* Set the flags for the device type */
i_flags = MCI_OPEN_TYPE | MCI_OPEN_TYPE_ID |
MCI_OPEN_ELEMENT | MCI_OPEN_SHAREABLE;
if( _cdio_mciSendCommand( 0, MCI_OPEN, i_flags, &op ) ) {
st.dwItem = MCI_STATUS_READY;
/* Eject disc */
ret = _cdio_mciSendCommand( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 ) != 0;
/* Release access to the device */
_cdio_mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 );
} else
ret = 0;
return ret;
}
/*!
Return the value associated with the key "arg".
*/
static const char *
_cdio_get_arg (void *user_data, const char key[])
{
_img_private_t *env = user_data;
if (!strcmp (key, "source")) {
return env->gen.source_name;
} else if (!strcmp (key, "access-mode")) {
if (env->hASPI)
return "ASPI";
else if ( WIN_NT )
return "winNT/2K/XP ioctl";
else
return "undefined WIN32";
}
return NULL;
}
/*!
Return the number of of the first track.
CDIO_INVALID_TRACK is returned on error.
*/
static track_t
_cdio_get_first_track_num(void *user_data)
{
_img_private_t *env = user_data;
if (!env->toc_init) _cdio_read_toc (env) ;
return env->first_track_num;
}
/*!
Return the media catalog number MCN.
Note: string is malloc'd so caller should free() then returned
string when done with it.
*/
static char *
_cdio_get_mcn (void *env) {
_img_private_t *_env = env;
if( ! _env->hASPI ) {
win32ioctl_get_mcn(_env);
}
return NULL;
}
/*!
Return the number of tracks in the current medium.
CDIO_INVALID_TRACK is returned on error.
*/
static track_t
_cdio_get_num_tracks(void *user_data)
{
_img_private_t *env = user_data;
if (!env->toc_init) _cdio_read_toc (env) ;
return env->total_tracks;
}
/*!
Get format of track.
*/
static track_format_t
_cdio_get_track_format(void *obj, track_t track_num)
{
_img_private_t *env = obj;
if (!env->gen.toc_init) _cdio_read_toc (env) ;
if (track_num > env->total_tracks || track_num == 0)
return TRACK_FORMAT_ERROR;
if( env->hASPI ) {
return wnaspi32_get_track_format(env, track_num);
} else {
return win32ioctl_get_track_format(env, track_num);
}
}
/*!
Return true if we have XA data (green, mode2 form1) or
XA data (green, mode2 form2). That is track begins:
sync - header - subheader
12 4 - 8
FIXME: there's gotta be a better design for this and get_track_format?
*/
static bool
_cdio_get_track_green(void *obj, track_t track_num)
{
_img_private_t *env = obj;
if (!env->toc_init) _cdio_read_toc (env) ;
if (track_num == CDIO_CDROM_LEADOUT_TRACK) track_num = env->total_tracks+1;
if (track_num > env->total_tracks+1 || track_num == 0)
return false;
switch (_cdio_get_track_format(env, track_num)) {
case TRACK_FORMAT_ERROR:
case TRACK_FORMAT_CDI:
case TRACK_FORMAT_AUDIO:
return false;
default:
break;
}
/* FIXME: Dunno if this is the right way, but it's what
I was using in cd-info for a while.
*/
return ((env->tocent[track_num-1].Control & 2) != 0);
}
/*!
Return the starting MSF (minutes/secs/frames) for track number
track_num in obj. Track numbers start at 1.
The "leadout" track is specified either by
using track_num LEADOUT_TRACK or the total tracks+1.
False is returned if there is no track entry.
*/
static bool
_cdio_get_track_msf(void *env, track_t track_num, msf_t *msf)
{
_img_private_t *_obj = env;
if (NULL == msf) return false;
if (!_obj->toc_init) _cdio_read_toc (_obj) ;
if (track_num == CDIO_CDROM_LEADOUT_TRACK) track_num = _obj->total_tracks+1;
if (track_num > _obj->total_tracks+1 || track_num == 0) {
return false;
} else {
cdio_lsn_to_msf(_obj->tocent[track_num-1].start_lsn, msf);
return true;
}
}
#endif /* HAVE_WIN32_CDROM */
/*!
Return an array of strings giving possible CD devices.
*/
char **
cdio_get_devices_win32 (void)
{
#ifndef HAVE_WIN32_CDROM
return NULL;
#else
char **drives = NULL;
unsigned int num_drives=0;
char drive_letter;
/* Scan the system for CD-ROM drives.
*/
#if FINISHED
/* Now check the currently mounted CD drives */
if (NULL != (ret_drive = cdio_check_mounts("/etc/mtab"))) {
cdio_add_device_list(&drives, drive, &num_drives);
}
/* Finally check possible mountable drives in /etc/fstab */
if (NULL != (ret_drive = cdio_check_mounts("/etc/fstab"))) {
cdio_add_device_list(&drives, drive, &num_drives);
}
#endif
/* Scan the system for CD-ROM drives.
Not always 100% reliable, so use the USE_MNTENT code above first.
*/
for (drive_letter='A'; drive_letter <= 'Z'; drive_letter++) {
const char *drive_str=cdio_is_cdrom(drive_letter);
if (drive_str != NULL) {
cdio_add_device_list(&drives, drive_str, &num_drives);
}
}
cdio_add_device_list(&drives, NULL, &num_drives);
return drives;
#endif /*HAVE_WIN32_CDROM*/
}
/*!
Return a string containing the default CD device if none is specified.
if CdIo is NULL (we haven't initialized a specific device driver),
then find a suitable one and return the default device for that.
NULL is returned if we couldn't get a default device.
*/
char *
cdio_get_default_device_win32(void)
{
#ifdef HAVE_WIN32_CDROM
char drive_letter;
for (drive_letter='A'; drive_letter <= 'Z'; drive_letter++) {
const char *drive_str=cdio_is_cdrom(drive_letter);
if (drive_str != NULL) {
return strdup(drive_str);
}
}
#endif
return NULL;
}
/*!
Return true if source_name could be a device containing a CD-ROM.
*/
bool
cdio_is_device_win32(const char *source_name)
{
unsigned int len;
len = strlen(source_name);
if (NULL == source_name) return false;
#ifdef HAVE_WIN32_CDROM
if ((len == 2) && isalpha(source_name[0])
&& (source_name[len-1] == ':'))
return true;
if ( ! WIN_NT ) return false;
/* Test to see if of form: \\.\x: */
return ( (len == 6)
&& source_name[0] == '\\' && source_name[1] == '\\'
&& source_name[2] == '.' && source_name[3] == '\\'
&& isalpha(source_name[len-2])
&& (source_name[len-1] == ':') );
#else
return false;
#endif
}
/*!
Initialization routine. This is the only thing that doesn't
get called via a function pointer. In fact *we* are the
ones to set that up.
*/
CdIo *
cdio_open_win32 (const char *source_name)
{
#ifdef HAVE_WIN32_CDROM
CdIo *ret;
_img_private_t *_data;
cdio_funcs _funcs = {
.eject_media = _cdio_eject_media,
.free = _cdio_win32_free,
.get_arg = _cdio_get_arg,
.get_default_device = cdio_get_default_device_win32,
.get_devices = cdio_get_devices_win32,
.get_first_track_num= _cdio_get_first_track_num,
.get_mcn = _cdio_get_mcn,
.get_num_tracks = _cdio_get_num_tracks,
.get_track_format = _cdio_get_track_format,
.get_track_green = _cdio_get_track_green,
.get_track_lba = NULL, /* This could be implemented if need be. */
.get_track_msf = _cdio_get_track_msf,
.lseek = NULL,
.read = NULL,
.read_audio_sectors = _cdio_read_audio_sectors,
.read_mode1_sector = _cdio_read_mode1_sector,
.read_mode1_sectors = _cdio_read_mode1_sectors,
.read_mode2_sector = _cdio_read_mode2_sector,
.read_mode2_sectors = _cdio_read_mode2_sectors,
.set_arg = _cdio_set_arg,
.stat_size = _cdio_stat_size
};
_data = _cdio_malloc (sizeof (_img_private_t));
_data->gen.init = false;
_data->gen.fd = -1;
_cdio_set_arg(_data, "source", (NULL == source_name)
? cdio_get_default_device_win32(): source_name);
ret = cdio_new (_data, &_funcs);
if (ret == NULL) return NULL;
if (_cdio_init_win32(_data))
return ret;
else {
_cdio_win32_free (_data);
return NULL;
}
#else
return NULL;
#endif /* HAVE_WIN32_CDROM */
}
bool
cdio_have_win32 (void)
{
#ifdef HAVE_WIN32_CDROM
return true;
#else
return false;
#endif /* HAVE_WIN32_CDROM */
}
--- NEW FILE: ioctl.c ---
/*
$Id: ioctl.c,v 1.1 2005/04/04 22:29:41 dsalt-guest Exp $
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* This file contains Win32-specific code using the DeviceIoControl
access method.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
static const char _rcsid[] = "$Id: ioctl.c,v 1.1 2005/04/04 22:29:41 dsalt-guest Exp $";
#include <cdio/cdio.h>
#include <cdio/sector.h>
#include "cdio_assert.h"
#ifdef HAVE_WIN32_CDROM
#include <windows.h>
#include <winioctl.h>
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "scsi_mmc.h"
/* Win32 DeviceIoControl specifics */
/***** FIXME: #include ntddcdrm.h from Wine, but probably need to
modify it a little.
*/
#define SCSI_IOCTL_DATA_OUT 0 //Give data to SCSI device (e.g. for writing)
#define SCSI_IOCTL_DATA_IN 1 //Get data from SCSI device (e.g. for reading)
#define SCSI_IOCTL_DATA_UNSPECIFIED 2 //No data (e.g. for ejecting)
#define IOCTL_SCSI_PASS_THROUGH 0x4D004
typedef struct ScsiPassThrough {
unsigned short Length;
unsigned char ScsiStatus;
unsigned char PathId;
unsigned char TargetId;
unsigned char Lun;
unsigned char CdbLength;
unsigned char SenseInfoLength;
unsigned char DataIn;
unsigned int DataTransferLength;
unsigned int TimeOutValue;
unsigned int DataBufferOffset;
unsigned int SenseInfoOffset;
unsigned char Cdb[16];
} SCSI_PASS_THROUGH;
#define IOCTL_SCSI_PASS_THROUGH_DIRECT 0x4D014
typedef struct _SCSI_PASS_THROUGH_DIRECT {
USHORT Length;
UCHAR ScsiStatus;
UCHAR PathId;
UCHAR TargetId;
UCHAR Lun;
UCHAR CdbLength;
UCHAR SenseInfoLength;
UCHAR DataIn;
ULONG DataTransferLength;
ULONG TimeOutValue;
PVOID DataBuffer;
ULONG SenseInfoOffset;
UCHAR Cdb[16];
} SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
#ifndef IOCTL_CDROM_BASE
# define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
#endif
#ifndef IOCTL_CDROM_RAW_READ
#define IOCTL_CDROM_RAW_READ CTL_CODE(IOCTL_CDROM_BASE, 0x000F, \
METHOD_OUT_DIRECT, FILE_READ_ACCESS)
#endif
#ifndef IOCTL_CDROM_BASE
# define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM
#endif
#ifndef IOCTL_CDROM_READ_TOC
#define IOCTL_CDROM_READ_TOC \
CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS)
#endif
#ifndef IOCTL_CDROM_RAW_READ
#define IOCTL_CDROM_RAW_READ \
CTL_CODE(IOCTL_CDROM_BASE, 0x000F, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
#endif
#ifndef IOCTL_CDROM_READ_Q_CHANNEL
#define IOCTL_CDROM_READ_Q_CHANNEL \
CTL_CODE(IOCTL_CDROM_BASE, 0x000B, METHOD_BUFFERED, FILE_READ_ACCESS)
#endif
typedef struct _TRACK_DATA {
UCHAR Format;
UCHAR Control : 4;
UCHAR Adr : 4;
UCHAR TrackNumber;
UCHAR Reserved1;
UCHAR Address[4];
} TRACK_DATA, *PTRACK_DATA;
typedef struct _CDROM_TOC {
UCHAR Length[2];
UCHAR FirstTrack;
UCHAR LastTrack;
TRACK_DATA TrackData[CDIO_CD_MAX_TRACKS+1];
} CDROM_TOC, *PCDROM_TOC;
#define IOCTL_CDROM_SUB_Q_CHANNEL 0x00
#define IOCTL_CDROM_CURRENT_POSITION 0x01
#define IOCTL_CDROM_MEDIA_CATALOG 0x02
#define IOCTL_CDROM_TRACK_ISRC 0x03
typedef enum _TRACK_MODE_TYPE {
YellowMode2,
XAForm2,
CDDA
} TRACK_MODE_TYPE, *PTRACK_MODE_TYPE;
typedef struct __RAW_READ_INFO {
LARGE_INTEGER DiskOffset;
ULONG SectorCount;
TRACK_MODE_TYPE TrackMode;
} RAW_READ_INFO, *PRAW_READ_INFO;
typedef struct _CDROM_SUB_Q_DATA_FORMAT {
UCHAR Format;
UCHAR Track;
} CDROM_SUB_Q_DATA_FORMAT, *PCDROM_SUB_Q_DATA_FORMAT;
typedef struct _SUB_Q_HEADER {
UCHAR Reserved;
UCHAR AudioStatus;
UCHAR DataLength[2];
} SUB_Q_HEADER, *PSUB_Q_HEADER;
typedef struct _SUB_Q_MEDIA_CATALOG_NUMBER {
SUB_Q_HEADER Header;
UCHAR FormatCode;
UCHAR Reserved[3];
UCHAR Reserved1 : 7;
UCHAR Mcval :1;
UCHAR MediaCatalog[15];
} SUB_Q_MEDIA_CATALOG_NUMBER, *PSUB_Q_MEDIA_CATALOG_NUMBER;
#include "win32.h"
/*
Returns a string that can be used in a CreateFile call if
c_drive letter is a character. If not NULL is returned.
*/
const char *
win32ioctl_is_cdrom(const char c_drive_letter)
{
UINT uDriveType;
char sz_win32_drive[4];
sz_win32_drive[0]= c_drive_letter;
sz_win32_drive[1]=':';
sz_win32_drive[2]='\\';
sz_win32_drive[3]='\0';
uDriveType = GetDriveType(sz_win32_drive);
switch(uDriveType) {
case DRIVE_CDROM: {
char sz_win32_drive_full[] = "\\\\.\\X:";
sz_win32_drive_full[4] = c_drive_letter;
return strdup(sz_win32_drive_full);
}
default:
cdio_debug("Drive %c is not a CD-ROM", c_drive_letter);
return NULL;
}
}
/*!
Reads an audio device using the DeviceIoControl method into data
starting from lsn. Returns 0 if no error.
*/
int
win32ioctl_read_audio_sectors (_img_private_t *env, void *data, lsn_t lsn,
unsigned int nblocks)
{
DWORD dwBytesReturned;
RAW_READ_INFO cdrom_raw;
/* Initialize CDROM_RAW_READ structure */
cdrom_raw.DiskOffset.QuadPart = CDIO_CD_FRAMESIZE_RAW * lsn;
cdrom_raw.SectorCount = nblocks;
cdrom_raw.TrackMode = CDDA;
if( DeviceIoControl( env->h_device_handle,
IOCTL_CDROM_RAW_READ, &cdrom_raw,
sizeof(RAW_READ_INFO), data,
CDIO_CD_FRAMESIZE_RAW * nblocks,
&dwBytesReturned, NULL ) == 0 ) {
cdio_info("Error reading audio-mode %lu (%ld)\n",
(long unsigned int) lsn, GetLastError());
return 1;
}
return 0;
}
/*!
Reads a single raw sector using the DeviceIoControl method into
data starting from lsn. Returns 0 if no error.
*/
static int
win32ioctl_read_raw_sector (_img_private_t *env, void *buf, lsn_t lsn)
{
SCSI_PASS_THROUGH_DIRECT sptd;
BOOL success;
DWORD dwBytesReturned;
sptd.Length=sizeof(sptd);
sptd.PathId=0; /* SCSI card ID will be filled in automatically */
sptd.TargetId=0; /* SCSI target ID will also be filled in */
sptd.Lun=0; /* SCSI lun ID will also be filled in */
sptd.CdbLength=12; /* CDB size is 12 for ReadCD MMC1 command */
sptd.SenseInfoLength=0; /* Don't return any sense data */
sptd.DataIn=SCSI_IOCTL_DATA_IN; //There will be data from drive
sptd.DataTransferLength=CDIO_CD_FRAMESIZE_RAW;
sptd.TimeOutValue=60; /*SCSI timeout value (60 seconds -
maybe it should be longer) */
sptd.DataBuffer= (PVOID) buf;
sptd.SenseInfoOffset=0;
/* ReadCD CDB12 command. The values were taken from MMC1 draft paper. */
sptd.Cdb[0]=CDIO_MMC_GPCMD_READ_CD;
sptd.Cdb[1]=0;
CDIO_MMC_SET_READ_LBA(sptd.Cdb, lsn);
CDIO_MMC_SET_READ_LENGTH(sptd.Cdb, 1);
sptd.Cdb[9]=0xF8; /* Raw read, 2352 bytes per sector */
sptd.Cdb[10]=0;
sptd.Cdb[11]=0;
sptd.Cdb[12]=0;
sptd.Cdb[13]=0;
sptd.Cdb[14]=0;
sptd.Cdb[15]=0;
/* Send the command to drive */
success=DeviceIoControl(env->h_device_handle,
IOCTL_SCSI_PASS_THROUGH_DIRECT,
(PVOID)&sptd,
(DWORD)sizeof(SCSI_PASS_THROUGH_DIRECT),
NULL, 0,
&dwBytesReturned,
NULL);
if(! success) {
cdio_info("Error reading %lu (%ld)\n", (long unsigned) lsn,
GetLastError());
return 1;
}
return 0;
}
/*!
Reads a single mode2 sector using the DeviceIoControl method into
data starting from lsn. Returns 0 if no error.
*/
int
win32ioctl_read_mode2_sector (_img_private_t *env, void *data, lsn_t lsn,
bool mode2_form2)
{
char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, };
int ret = win32ioctl_read_raw_sector (env, buf, lsn);
if ( 0 != ret) return ret;
memcpy (data,
buf + CDIO_CD_SYNC_SIZE + CDIO_CD_XA_HEADER,
mode2_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE);
return 0;
}
/*!
Reads a single mode2 sector using the DeviceIoControl method into
data starting from lsn. Returns 0 if no error.
*/
int
win32ioctl_read_mode1_sector (_img_private_t *env, void *data, lsn_t lsn,
bool mode2_form2)
{
char buf[CDIO_CD_FRAMESIZE_RAW] = { 0, };
int ret = win32ioctl_read_raw_sector (env, buf, lsn);
if ( 0 != ret) return ret;
memcpy (data,
buf + CDIO_CD_SYNC_SIZE+CDIO_CD_HEADER_SIZE,
mode2_form2 ? M2RAW_SECTOR_SIZE: CDIO_CD_FRAMESIZE);
return 0;
}
/*!
Initialize internal structures for CD device.
*/
bool
win32ioctl_init_win32 (_img_private_t *env)
{
char psz_win32_drive[7];
unsigned int len=strlen(env->gen.source_name);
OSVERSIONINFO ov;
DWORD dw_access_flags;
cdio_debug("using winNT/2K/XP ioctl layer");
memset(&ov,0,sizeof(OSVERSIONINFO));
ov.dwOSVersionInfoSize=sizeof(OSVERSIONINFO);
GetVersionEx(&ov);
if((ov.dwPlatformId==VER_PLATFORM_WIN32_NT) &&
(ov.dwMajorVersion>4))
dw_access_flags = GENERIC_READ|GENERIC_WRITE; /* add gen write on W2k/XP */
else dw_access_flags = GENERIC_READ;
if (cdio_is_device_win32(env->gen.source_name)) {
sprintf( psz_win32_drive, "\\\\.\\%c:", env->gen.source_name[len-2] );
env->h_device_handle = CreateFile( psz_win32_drive,
dw_access_flags,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL );
if( env->h_device_handle == INVALID_HANDLE_VALUE )
{
/* No good. try toggle write. */
dw_access_flags ^= GENERIC_WRITE;
env->h_device_handle = CreateFile( psz_win32_drive,
dw_access_flags,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL );
return (env->h_device_handle == NULL) ? false : true;
}
return true;
}
return false;
}
#define MSF_TO_LBA2(min, sec, frame) \
((int) frame + CDIO_CD_FRAMES_PER_SEC * (CDIO_CD_SECS_PER_MIN*min + sec) \
- CDIO_PREGAP_SECTORS )
/*!
Read and cache the CD's Track Table of Contents and track info.
Return true if successful or false if an error.
*/
bool
win32ioctl_read_toc (_img_private_t *env)
{
DWORD dwBytesReturned;
CDROM_TOC cdrom_toc;
int i;
if( DeviceIoControl( env->h_device_handle,
IOCTL_CDROM_READ_TOC,
NULL, 0, &cdrom_toc, sizeof(CDROM_TOC),
&dwBytesReturned, NULL ) == 0 ) {
cdio_warn( "could not read TOCHDR: %ld" , (long int) GetLastError());
return false;
}
env->first_track_num = cdrom_toc.FirstTrack;
env->total_tracks = cdrom_toc.LastTrack - cdrom_toc.FirstTrack + 1;
for( i = 0 ; i <= env->total_tracks ; i++ ) {
env->tocent[ i ].start_lsn = MSF_TO_LBA2(
cdrom_toc.TrackData[i].Address[1],
cdrom_toc.TrackData[i].Address[2],
cdrom_toc.TrackData[i].Address[3] );
env->tocent[ i ].Control = cdrom_toc.TrackData[i].Control;
env->tocent[ i ].Format = cdrom_toc.TrackData[i].Format;
cdio_debug("p_sectors: %i, %lu", i,
(unsigned long int) (env->tocent[i].start_lsn));
}
env->gen.toc_init = true;
return true;
}
/*!
Return the media catalog number MCN.
Note: string is malloc'd so caller should free() then returned
string when done with it.
*/
char *
win32ioctl_get_mcn (_img_private_t *env) {
DWORD dwBytesReturned;
SUB_Q_MEDIA_CATALOG_NUMBER mcn;
CDROM_SUB_Q_DATA_FORMAT q_data_format;
memset( &mcn, 0, sizeof(mcn) );
q_data_format.Format = IOCTL_CDROM_MEDIA_CATALOG;
q_data_format.Track=1;
if( DeviceIoControl( env->h_device_handle,
IOCTL_CDROM_READ_Q_CHANNEL,
&q_data_format, sizeof(q_data_format),
&mcn, sizeof(mcn),
&dwBytesReturned, NULL ) == 0 ) {
cdio_warn( "could not read Q Channel at track %d", 1);
} else if (mcn.Mcval)
return strdup(mcn.MediaCatalog);
return NULL;
}
/*!
Get the format (XA, DATA, AUDIO) of a track.
*/
track_format_t
win32ioctl_get_track_format(_img_private_t *env, track_t track_num)
{
/* This is pretty much copied from the "badly broken" cdrom_count_tracks
in linux/cdrom.c.
*/
if (env->tocent[track_num-1].Control & 0x04) {
if (env->tocent[track_num-1].Format == 0x10)
return TRACK_FORMAT_CDI;
else if (env->tocent[track_num-1].Format == 0x20)
return TRACK_FORMAT_XA;
else
return TRACK_FORMAT_DATA;
} else
return TRACK_FORMAT_AUDIO;
}
#endif /*HAVE_WIN32_CDROM*/
--- NEW FILE: Makefile.am ---
include $(top_srcdir)/misc/Makefile.common
EXTRA_DIST = aspi32.c aspi32.h ioctl.c win32.c win32.h
--- NEW FILE: aspi32.h ---
/* Win32 aspi specific */
/*
$Id: aspi32.h,v 1.1 2005/04/04 22:29:41 dsalt-guest Exp $
Copyright (C) 2003, 2004 Rocky Bernstein <rocky@panix.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define ASPI_HAID 0
#define ASPI_TARGET 0
#define DTYPE_CDROM 0x05
#define SENSE_LEN 0x0E
#define SC_HA_INQUIRY 0x00
#define SC_GET_DEV_TYPE 0x01
#define SC_EXEC_SCSI_CMD 0x02
#define SC_GET_DISK_INFO 0x06
#define SS_COMP 0x01
#define SS_PENDING 0x00
#define SS_NO_ADAPTERS 0xE8
#define SRB_DIR_IN 0x08
#define SRB_DIR_OUT 0x10
#define SRB_EVENT_NOTIFY 0x40
#define SECTOR_TYPE_MODE2 0x14
#define READ_CD_USERDATA_MODE2 0x10
#define READ_TOC 0x43
#define READ_TOC_FORMAT_TOC 0x0
#pragma pack(1)
struct SRB_GetDiskInfo
{
unsigned char SRB_Cmd;
unsigned char SRB_Status;
unsigned char SRB_HaId;
unsigned char SRB_Flags;
unsigned long SRB_Hdr_Rsvd;
unsigned char SRB_Target;
unsigned char SRB_Lun;
unsigned char SRB_DriveFlags;
unsigned char SRB_Int13HDriveInfo;
unsigned char SRB_Heads;
unsigned char SRB_Sectors;
unsigned char SRB_Rsvd1[22];
};
struct SRB_GDEVBlock
{
unsigned char SRB_Cmd;
unsigned char SRB_Status;
unsigned char SRB_HaId;
unsigned char SRB_Flags;
unsigned long SRB_Hdr_Rsvd;
unsigned char SRB_Target;
unsigned char SRB_Lun;
unsigned char SRB_DeviceType;
unsigned char SRB_Rsvd1;
};
struct SRB_ExecSCSICmd
{
unsigned char SRB_Cmd;
unsigned char SRB_Status;
unsigned char SRB_HaId;
unsigned char SRB_Flags;
unsigned long SRB_Hdr_Rsvd;
unsigned char SRB_Target;
unsigned char SRB_Lun;
unsigned short SRB_Rsvd1;
unsigned long SRB_BufLen;
unsigned char *SRB_BufPointer;
unsigned char SRB_SenseLen;
unsigned char SRB_CDBLen;
unsigned char SRB_HaStat;
unsigned char SRB_TargStat;
unsigned long *SRB_PostProc;
unsigned char SRB_Rsvd2[20];
unsigned char CDBByte[16];
unsigned char SenseArea[SENSE_LEN+2];
};
/*****************************************************************************
%%% SRB - HOST ADAPTER INQUIRY - SC_HA_INQUIRY (0) %%%
*****************************************************************************/
typedef struct // Offset
{ // HX/DEC
BYTE SRB_Cmd; // 00/000 ASPI command code = SC_HA_INQUIRY
BYTE SRB_Status; // 01/001 ASPI command status byte
BYTE SRB_HaId; // 02/002 ASPI host adapter number
BYTE SRB_Flags; // 03/003 ASPI request flags
DWORD SRB_Hdr_Rsvd; // 04/004 Reserved, MUST = 0
BYTE HA_Count; // 08/008 Number of host adapters present
BYTE HA_SCSI_ID; // 09/009 SCSI ID of host adapter
BYTE HA_ManagerId[16]; // 0A/010 String describing the manager
BYTE HA_Identifier[16]; // 1A/026 String describing the host adapter
BYTE HA_Unique[16]; // 2A/042 Host Adapter Unique parameters
WORD HA_Rsvd1; // 3A/058 Reserved, MUST = 0
}
SRB_HAInquiry;
const char * wnaspi32_is_cdrom(const char drive_letter);
/*!
Initialize CD device.
*/
bool wnaspi32_init_win32 (_img_private_t *env);
/*!
Reads an audio device into data starting from lsn.
Returns 0 if no error.
*/
int wnaspi32_read_audio_sectors (_img_private_t *env, void *data, lsn_t lsn,
unsigned int nblocks);
/*!
Reads a single mode2 sector from cd device into data starting
from lsn. Returns 0 if no error.
*/
int wnaspi32_read_mode2_sector (_img_private_t *env, void *data, lsn_t lsn);
/*!
Read and cache the CD's Track Table of Contents and track info.
Return true if successful or false if an error.
*/
bool wnaspi32_read_toc (_img_private_t *env);
/*!
Get format of track.
*/
track_format_t wnaspi32_get_track_format(_img_private_t *env,
track_t track_num);