pub type cdrom_drive_t = cdrom_drive_s;Expand description
\brief Structure for cdparanoia’s CD-ROM access
Aliased Type§
#[repr(C)]pub struct cdrom_drive_t {Show 27 fields
pub p_cdio: *mut _CdIo,
pub opened: i32,
pub cdda_device_name: *mut i8,
pub drive_model: *mut i8,
pub drive_type: i32,
pub bigendianp: i32,
pub nsectors: i32,
pub cd_extra: i32,
pub b_swap_bytes: bool,
pub tracks: u8,
pub disc_toc: [TOC_s; 100],
pub audio_first_sector: i32,
pub audio_last_sector: i32,
pub errordest: i32,
pub messagedest: i32,
pub errorbuf: *mut i8,
pub messagebuf: *mut i8,
pub enable_cdda: Option<unsafe extern "C" fn(*mut cdrom_drive_s, i32) -> i32>,
pub read_toc: Option<unsafe extern "C" fn(*mut cdrom_drive_s) -> i32>,
pub read_audio: Option<unsafe extern "C" fn(*mut cdrom_drive_s, *mut c_void, i32, i64) -> i64>,
pub set_speed: Option<unsafe extern "C" fn(*mut cdrom_drive_s, i32) -> i32>,
pub error_retry: i32,
pub report_all: i32,
pub is_atapi: i32,
pub is_mmc: i32,
pub last_milliseconds: i32,
pub i_test_flags: i32,
}Fields§
§p_cdio: *mut _CdIo§opened: i32< This struct may just represent a candidate for opening
cdda_device_name: *mut i8§drive_model: *mut i8§drive_type: i32§bigendianp: i32< Whether data returned on the CDDA is bigendian or not. 1 if big endian, 0 if little endian and -1 if we don’t know.
nsectors: i32< Number of sectors use in reading. Multiply by CDIO_CD_FRAMESIZE_RAW to get number of bytes used in the read buffer.
cd_extra: i32< -1 if we can’t get multisession info, 0 if there is one session only or the multi-session LBA is less than or 100 (don’t ask me why – I don’t know), and 1 if the multi-session lba is greater than 100.
b_swap_bytes: bool< Swap bytes if Endian-ness of drive mismatches the endian-ness of the computer?
tracks: u8§disc_toc: [TOC_s; 100]< info here starts origin 0 rather than the first track number (usually 1). So to take a track number and use it here, subtract off cdio_get_first_track_num() beforehand.
audio_first_sector: i32§audio_last_sector: i32§errordest: i32§messagedest: i32§errorbuf: *mut i8§messagebuf: *mut i8§enable_cdda: Option<unsafe extern "C" fn(*mut cdrom_drive_s, i32) -> i32>§read_toc: Option<unsafe extern "C" fn(*mut cdrom_drive_s) -> i32>§read_audio: Option<unsafe extern "C" fn(*mut cdrom_drive_s, *mut c_void, i32, i64) -> i64>§set_speed: Option<unsafe extern "C" fn(*mut cdrom_drive_s, i32) -> i32>§error_retry: i32§report_all: i32§is_atapi: i32§is_mmc: i32§last_milliseconds: i32§i_test_flags: i32< Normally set 0. But if we are testing paranoia operation this can be set to one of the flag masks to simulate a particular kind of failure.