Add read_data_blocks via cooked mode. Seems to work better than read_cd.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: _cdio_generic.c,v 1.17 2005/02/25 09:17:41 rocky Exp $
|
$Id: _cdio_generic.c,v 1.18 2005/03/01 00:40:39 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.17 2005/02/25 09:17:41 rocky Exp $";
|
static const char _rcsid[] = "$Id: _cdio_generic.c,v 1.18 2005/03/01 00:40:39 rocky Exp $";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -489,6 +489,18 @@ set_track_flags(track_flags_t *p_track_flag, uint8_t i_flag)
|
|||||||
? 4 : 2;
|
? 4 : 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
driver_return_code_t
|
||||||
|
read_data_sectors_generic (void *p_user_data, void *p_buf, lsn_t i_lsn,
|
||||||
|
uint16_t i_blocksize, uint32_t i_blocks)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
if (0 > cdio_generic_lseek(p_user_data, i_blocksize*i_lsn, SEEK_SET))
|
||||||
|
return DRIVER_OP_ERROR;
|
||||||
|
rc = cdio_generic_read(p_user_data, p_buf, i_blocksize*i_blocks);
|
||||||
|
if (rc > 0) return DRIVER_OP_SUCCESS;
|
||||||
|
return DRIVER_OP_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Local variables:
|
* Local variables:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
$Id: generic.h,v 1.12 2005/02/17 04:57:21 rocky Exp $
|
$Id: generic.h,v 1.13 2005/03/01 00:40:39 rocky Exp $
|
||||||
|
|
||||||
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
Copyright (C) 2004, 2005 Rocky Bernstein <rocky@panix.com>
|
||||||
|
|
||||||
@@ -211,6 +211,11 @@ extern "C" {
|
|||||||
|
|
||||||
void set_track_flags(track_flags_t *p_track_flag, uint8_t flag);
|
void set_track_flags(track_flags_t *p_track_flag, uint8_t flag);
|
||||||
|
|
||||||
|
/*! Read mode 1 or mode2 sectors (using cooked mode). */
|
||||||
|
driver_return_code_t read_data_sectors_generic (void *p_user_data,
|
||||||
|
void *p_buf, lsn_t i_lsn,
|
||||||
|
uint16_t i_blocksize,
|
||||||
|
uint32_t i_blocks);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|||||||
Reference in New Issue
Block a user