Main Page | Data Structures | Directories | File List | Data Fields | Globals

read.h File Reference

The top-level header for sector (block, frame)-related libcdio calls. More...

Go to the source code of this file.

Functions

off_t cdio_lseek (const CdIo_t *p_cdio, off_t offset, int whence)
ssize_t cdio_read (const CdIo_t *p_cdio, void *p_buf, size_t i_size)
driver_return_code_t cdio_read_audio_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn)
driver_return_code_t cdio_read_audio_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, uint32_t i_blocks)
driver_return_code_t cdio_read_data_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, uint16_t i_blocksize, uint32_t i_blocks)
driver_return_code_t cdio_read_mode1_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2)
driver_return_code_t cdio_read_mode1_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2, uint32_t i_blocks)
driver_return_code_t cdio_read_mode2_sector (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2)
driver_return_code_t cdio_read_mode2_sectors (const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, bool b_form2, uint32_t i_blocks)


Detailed Description

The top-level header for sector (block, frame)-related libcdio calls.


Function Documentation

off_t cdio_lseek const CdIo_t p_cdio,
off_t  offset,
int  whence
 

Reposition read offset Similar to (if not the same as) libc's lseek()

Parameters:
p_cdio object to get information from
offset amount to seek
whence like corresponding parameter in libc's lseek, e.g. SEEK_SET or SEEK_END.
Returns:
(off_t) -1 on error.

ssize_t cdio_read const CdIo_t p_cdio,
void *  p_buf,
size_t  i_size
 

Reads into buf the next size bytes. Similar to (if not the same as) libc's read()

Parameters:
p_cdio object to read from
p_buf place to read data into. The caller should make sure this location can store at least i_size bytes.
i_size number of bytes to read
Returns:
(ssize_t) -1 on error.

driver_return_code_t cdio_read_audio_sector const CdIo_t p_cdio,
void *  p_buf,
lsn_t  i_lsn
 

Read an audio sector

Parameters:
p_cdio object to read from
p_buf place to read data into. The caller should make sure this location can store at least CDIO_FRAMESIZE_RAW bytes.
i_lsn sector to read

driver_return_code_t cdio_read_audio_sectors const CdIo_t p_cdio,
void *  p_buf,
lsn_t  i_lsn,
uint32_t  i_blocks
 

Reads audio sectors

Parameters:
p_cdio object to read from
p_buf place to read data into. The caller should make sure this location can store at least CDIO_FRAMESIZE_RAW i_blocks bytes.
i_lsn sector to read
i_blocks number of sectors to read

driver_return_code_t cdio_read_data_sectors const CdIo_t p_cdio,
void *  p_buf,
lsn_t  i_lsn,
uint16_t  i_blocksize,
uint32_t  i_blocks
 

Read a data sector

Parameters:
p_cdio object to read from
p_buf place to read data into. The caller should make sure this location can store at least ISO_BLOCKSIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE depending on the kind of sector getting read. If you don't know whether you have a Mode 1/2, Form 1/ Form 2/Formless sector best to reserve space for the maximum, M2RAW_SECTOR_SIZE.
i_lsn sector to read
i_blocksize size of block. Should be either CDIO_CD_FRAMESIZE, M2RAW_SECTOR_SIZE, or M2F2_SECTOR_SIZE. See comment above under p_buf.
i_blocks number of blocks to read

driver_return_code_t cdio_read_mode1_sector const CdIo_t p_cdio,
void *  p_buf,
lsn_t  i_lsn,
bool  b_form2
 

Reads a mode 1 sector

Parameters:
p_cdio object to read from
p_buf place to read data into.
i_lsn sector to read
b_form2 true for reading mode 1 form 2 sectors or false for mode 1 form 1 sectors.

driver_return_code_t cdio_read_mode1_sectors const CdIo_t p_cdio,
void *  p_buf,
lsn_t  i_lsn,
bool  b_form2,
uint32_t  i_blocks
 

Reads mode 1 sectors

Parameters:
p_cdio object to read from
p_buf place to read data into
i_lsn sector to read
b_form2 true for reading mode 1 form 2 sectors or false for mode 1 form 1 sectors.
i_blocks number of sectors to read

driver_return_code_t cdio_read_mode2_sector const CdIo_t p_cdio,
void *  p_buf,
lsn_t  i_lsn,
bool  b_form2
 

Reads a mode 2 sector

Parameters:
p_cdio object to read from
p_buf place to read data into. The caller should make sure this location can store at least M2RAW_SECTOR_SIZE (for form 1) or CDIO_CD_FRAMESIZE (for form 2) bytes.
i_lsn sector to read
b_form2 true for reading mode 2 form 2 sectors or false for mode 2 form 1 sectors.
Returns:
0 if no error, nonzero otherwise.

driver_return_code_t cdio_read_mode2_sectors const CdIo_t p_cdio,
void *  p_buf,
lsn_t  i_lsn,
bool  b_form2,
uint32_t  i_blocks
 

Reads mode 2 sectors

Parameters:
p_cdio object to read from
p_buf place to read data into. The caller should make sure this location can store at least M2RAW_SECTOR_SIZE (for form 1) or CDIO_CD_FRAMESIZE (for form 2) * i_blocks bytes.
i_lsn sector to read
b_form2 true for reading mode2 form 2 sectors or false for mode 2 form 1 sectors.
i_blocks number of sectors to read
Returns:
0 if no error, nonzero otherwise.


Generated on Thu Sep 29 12:15:30 2005 for libcdio by  doxygen 1.3.9.1