* vcd.c : VCD input module for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
- * $Id: vcd.c,v 1.20 2003/05/17 20:30:31 gbazin Exp $
+ * $Id: vcd.c,v 1.22 2003/05/22 12:00:57 gbazin Exp $
*
* Author: Johan Bilien <jobi@via.ecp.fr>
*
int i_chapter = 1;
vcddev_t *vcddev;
-#ifdef WIN32
- /* On Win32 we want the VCD access plugin to be explicitly requested,
- * we end up with lots of problems otherwise */
- if( !p_input->psz_access || !*p_input->psz_access ) return( -1 );
-#endif
-
/* parse the options passed in command line : */
psz_orig = psz_parser = psz_source = strdup( p_input->psz_name );
for ( i_index = 0 ; i_index < i_blocks ; i_index++ )
{
- if ( ioctl_ReadSector( VLC_OBJECT(p_input), p_vcd->vcddev,
- p_vcd->i_sector, p_buffer + i_index * VCD_DATA_SIZE,
- VCD_DATA_START, VCD_DATA_SIZE ) < 0 )
+ if ( ioctl_ReadSectors( VLC_OBJECT(p_input), p_vcd->vcddev,
+ p_vcd->i_sector, p_buffer + i_index * VCD_DATA_SIZE, 1,
+ VCD_TYPE ) < 0 )
{
msg_Err( p_input, "could not read sector %d", p_vcd->i_sector );
return -1;
if ( i_len % VCD_DATA_SIZE ) /* this should not happen */
{
- if ( ioctl_ReadSector( VLC_OBJECT(p_input), p_vcd->vcddev,
- p_vcd->i_sector, p_last_sector, VCD_DATA_START,
- VCD_DATA_SIZE ) < 0 )
+ if ( ioctl_ReadSectors( VLC_OBJECT(p_input), p_vcd->vcddev,
+ p_vcd->i_sector, p_last_sector, 1, VCD_TYPE ) < 0 )
{
msg_Err( p_input, "could not read sector %d", p_vcd->i_sector );
return -1;
return -1;
}
- if( ioctl_ReadSector( VLC_OBJECT(p_input), p_vcd->vcddev,
- VCD_ENTRIES_SECTOR, p_sector, VCD_DATA_START, VCD_DATA_SIZE ) < 0 )
+ if( ioctl_ReadSectors( VLC_OBJECT(p_input), p_vcd->vcddev,
+ VCD_ENTRIES_SECTOR, p_sector, 1, VCD_TYPE ) < 0 )
{
msg_Err( p_input, "could not read entry points sector" );
free( p_sector );