#include <vlc_common.h>
#include <vlc_access.h>
+#include <vlc_charset.h>
+#include <vlc_fs.h>
#include <limits.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
-#include <errno.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
#include "cdrom_internals.h"
#include "cdrom.h"
-#include <vlc_charset.h>
#include <vlc_meta.h>
/*****************************************************************************
}
#else
- if( stat( psz_dev, &fileinfo ) < 0 )
+ if( vlc_stat( psz_dev, &fileinfo ) < 0 )
{
free( p_vcddev );
return NULL;
i_ret = win32_vcd_open( p_this, psz_dev, p_vcddev );
#else
p_vcddev->i_device_handle = -1;
- p_vcddev->i_device_handle = open( psz_dev, O_RDONLY | O_NONBLOCK );
+ p_vcddev->i_device_handle = vlc_open( psz_dev, O_RDONLY | O_NONBLOCK );
i_ret = (p_vcddev->i_device_handle == -1) ? -1 : 0;
#endif
}
/* Open the cue file and try to parse it */
msg_Dbg( p_this,"trying .cue file: %s", psz_cuefile );
- cuefile = utf8_fopen( psz_cuefile, "rt" );
+ cuefile = vlc_fopen( psz_cuefile, "rt" );
if( cuefile == NULL )
{
msg_Dbg( p_this, "could not find .cue file" );
}
msg_Dbg( p_this,"guessing vcd image file: %s", psz_vcdfile );
- p_vcddev->i_vcdimage_handle = utf8_open( psz_vcdfile,
+ p_vcddev->i_vcdimage_handle = vlc_open( psz_vcdfile,
O_RDONLY | O_NONBLOCK | O_BINARY );
while( fgets( line, 1024, cuefile ) && !b_found )
strcpy( psz_vcdfile + (p_pos - psz_cuefile + 1), filename );
} else psz_vcdfile = strdup( filename );
msg_Dbg( p_this,"using vcd image file: %s", psz_vcdfile );
- p_vcddev->i_vcdimage_handle = utf8_open( psz_vcdfile,
+ p_vcddev->i_vcdimage_handle = vlc_open( psz_vcdfile,
O_RDONLY | O_NONBLOCK | O_BINARY );
}
b_found = true;
IOObjectRelease( iterator );
}
- if( service == NULL )
+ if( !service )
{
msg_Err( p_this, "search for kIOCDMediaClass came up empty" );
return( NULL );
uint8_t **pp_buffer, int *pi_buffer )
{
VLC_UNUSED( p_object );
+ VLC_UNUSED( p_vcddev );
+ VLC_UNUSED( pp_buffer );
+ VLC_UNUSED( pi_buffer );
return -1;
}
#elif defined( WIN32 )
static int CdTextRead( vlc_object_t *p_object, const vcddev_t *p_vcddev,
uint8_t **pp_buffer, int *pi_buffer )
{
+ VLC_UNUSED( p_object );
+
CDROM_READ_TOC_EX TOCEx;
memset(&TOCEx, 0, sizeof(TOCEx));
TOCEx.Format = CDROM_READ_TOC_EX_FORMAT_CDTEXT;