Giving up drive probing by mode page sending

This commit is contained in:
Thomas Schmitt 2010-01-14 16:04:57 +00:00
parent 734759190a
commit 1e42a76415
3 changed files with 29 additions and 19 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2010.01.13.171546"
#define Cdrskin_timestamP "2010.01.14.160633"

View File

@ -908,20 +908,27 @@ static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out)
out->c2_errors = !!d->mdata->c2_pointers;
out->drive = d;
#ifdef Libburn_pioneer_dvr_216d_dummy_probe_wM
#ifdef Libburn_dummy_probe_write_modeS
/* ts A91112 */
/* Set default block types. The call d->probe_write_modes() is quite
obtrusive. It may be performed explicitely by new API call
burn_drive_probe_cd_write_modes().
*/
out->tao_block_types = d->block_types[BURN_WRITE_TAO] =
BURN_BLOCK_MODE1 | BURN_BLOCK_RAW0;
out->sao_block_types = d->block_types[BURN_WRITE_SAO] = BURN_BLOCK_SAO;
if (out->write_dvdram || out->write_dvdr ||
out->write_cdrw || out->write_cdr) {
out->tao_block_types = d->block_types[BURN_WRITE_TAO] =
BURN_BLOCK_MODE1 | BURN_BLOCK_RAW0;
out->sao_block_types = d->block_types[BURN_WRITE_SAO] =
BURN_BLOCK_SAO;
} else {
out->tao_block_types = d->block_types[BURN_WRITE_TAO] = 0;
out->sao_block_types = d->block_types[BURN_WRITE_SAO] = 0;
}
out->raw_block_types = d->block_types[BURN_WRITE_RAW] = 0;
out->packet_block_types = 0;
#else /* Libburn_pioneer_dvr_216d_dummy_probe_wM */
#else /* Libburn_dummy_probe_write_modeS */
/* update available block types for burners */
if (out->write_dvdram || out->write_dvdr ||
@ -932,15 +939,14 @@ static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out)
out->raw_block_types = d->block_types[BURN_WRITE_RAW];
out->packet_block_types = d->block_types[BURN_WRITE_PACKET];
#endif /* ! Libburn_pioneer_dvr_216d_dummy_probe_wM */
#endif /* ! Libburn_dummy_probe_write_modeS */
return 1;
}
#ifdef Libburn_pioneer_dvr_216d_dummy_probe_wM
/* ts A91112 candidate for API */
/* ts A91112 - B00114 API */
/* Probe available CD write modes and block types.
*/
int burn_drive_probe_cd_write_modes(struct burn_drive_info *dinfo)
@ -959,8 +965,6 @@ int burn_drive_probe_cd_write_modes(struct burn_drive_info *dinfo)
return 1;
}
#endif /* Libburn_pioneer_dvr_216d_dummy_probe_wM */
/* ts A70907 : added parameter flag */
/* @param flag bit0= reset global drive list */

View File

@ -1064,6 +1064,19 @@ int burn_drive_obtain_scsi_adr(char *path, int *bus_no, int *host_no,
*/
int burn_drive_grab(struct burn_drive *drive, int load);
/* ts B00114 */
/* Probe available CD write modes and block types. In earlier versions this
was done unconditionally on drive examination or aquiration. But it is
lengthy and obtrusive, up to spoiling burn runs on the examined drives.
So now this probing is omitted by default. All drives which announce to be
capable of CD or DVD writing, get blindly attributed the capability for
SAO and TAO. Applications which are interested in RAW modes or want to
rely on the traditional write mode information, may use this call.
@param drive_info drive object to be inquired
@return >0 indicates success, <=0 means failure
@since 0.7.6
*/
int burn_drive_probe_cd_write_modes(struct burn_drive_info *drive_info);
/* ts A90824 */
/** Calm down or alert a drive. Some drives stay alert after reading for
@ -2931,16 +2944,9 @@ BURN_END_DECLS
For other modes resp. real probing one has to call
burn_drive_probe_cd_write_modes().
# define Libburn_pioneer_dvr_216d_dummy_probe_wM 1
*/
#ifdef Libburn_pioneer_dvr_216d_dummy_probe_wM
#define Libburn_dummy_probe_write_modeS 1
/* Probe available CD write modes and block types.
@param drive_info drive object to be inquired
*/
int burn_drive_probe_cd_write_modes(struct burn_drive_info *drive_info)
#endif /* Libburn_pioneer_dvr_216d_dummy_probe_wM */
#endif /*LIBBURN_H*/