From 055876d6b7b92f7ff565b8a51063192a55e63826 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 12 Nov 2009 18:00:01 +0000 Subject: [PATCH] Macro Libburn_pioneer_dvr_216d_dummy_probe_wM for omitting write mode probe --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/drive.c | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index f3aaf37..d6ad6e9 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.11.12.175735" +#define Cdrskin_timestamP "2009.11.12.180048" diff --git a/libburn/drive.c b/libburn/drive.c index b986b71..6cd4aa0 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -910,6 +910,22 @@ static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out) out->write_simulate = !!d->mdata->simulate; out->c2_errors = !!d->mdata->c2_pointers; out->drive = d; + +#ifdef Libburn_pioneer_dvr_216d_dummy_probe_wM + + /* 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; + out->raw_block_types = d->block_types[BURN_WRITE_RAW] = 0; + out->packet_block_types = 0; + +#else /* Libburn_pioneer_dvr_216d_dummy_probe_wM */ + /* update available block types for burners */ if (out->write_dvdram || out->write_dvdr || out->write_cdrw || out->write_cdr) @@ -918,10 +934,37 @@ static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out) out->sao_block_types = d->block_types[BURN_WRITE_SAO]; 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 */ + return 1; } +#ifdef Libburn_pioneer_dvr_216d_dummy_probe_wM + +/* ts A91112 candidate for API */ +/* Probe available CD write modes and block types. +*/ +int burn_drive_probe_cd_write_modes(struct burn_drive_info *dinfo) +{ + struct burn_drive *d = dinfo->drive; + + if (d == NULL) + return 0; + if (dinfo->write_dvdram || dinfo->write_dvdr || + dinfo->write_cdrw || dinfo->write_cdr) + d->probe_write_modes(d); + dinfo->tao_block_types = d->block_types[BURN_WRITE_TAO]; + dinfo->sao_block_types = d->block_types[BURN_WRITE_SAO]; + dinfo->raw_block_types = d->block_types[BURN_WRITE_RAW]; + dinfo->packet_block_types = d->block_types[BURN_WRITE_PACKET]; + return 1; +} + +#endif /* Libburn_pioneer_dvr_216d_dummy_probe_wM */ + + /* ts A70907 : added parameter flag */ /* @param flag bit0= reset global drive list */ int burn_drive_scan_sync(struct burn_drive_info *drives[],