Re-enabled -force with write modes which seem unavailable

This commit is contained in:
Thomas Schmitt 2007-03-03 14:11:52 +00:00
parent 0a4f2e2f10
commit 796dab221d
6 changed files with 36 additions and 4 deletions

View File

@ -135,6 +135,7 @@ or
#define Cdrskin_libburn_has_get_spacE 1 #define Cdrskin_libburn_has_get_spacE 1
#define Cdrskin_libburn_write_mode_ruleS 1 #define Cdrskin_libburn_write_mode_ruleS 1
#define Cdrskin_libburn_has_allow_untested_profileS 1 #define Cdrskin_libburn_has_allow_untested_profileS 1
#define Cdrskin_libburn_has_set_forcE 1
#endif /* Cdrskin_libburn_0_3_3 */ #endif /* Cdrskin_libburn_0_3_3 */
@ -4786,6 +4787,9 @@ burn_failed:;
#ifdef Cdrskin_libburn_has_set_filluP #ifdef Cdrskin_libburn_has_set_filluP
burn_write_opts_set_fillup(o, skin->fill_up_media); burn_write_opts_set_fillup(o, skin->fill_up_media);
#endif #endif
#ifdef Cdrskin_libburn_has_set_forcE
burn_write_opts_set_force(o, !!skin->force_is_set);
#endif
if(skin->dummy_mode) { if(skin->dummy_mode) {
fprintf(stderr, fprintf(stderr,

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2007.03.03.141240" #define Cdrskin_timestamP "2007.03.03.141435"

View File

@ -877,6 +877,8 @@ off_t burn_disc_available_space(struct burn_drive *d,
libburn currently writes only to profiles 0x09 "CD-R", 0x0a "CD-RW", libburn currently writes only to profiles 0x09 "CD-R", 0x0a "CD-RW",
0x11 "DVD-R", 0x12 "DVD-RAM", 0x13 "DVD-RW restricted overwrite", 0x11 "DVD-R", 0x12 "DVD-RAM", 0x13 "DVD-RW restricted overwrite",
0x14 "DVD-RW Sequential Recording" or 0x1a "DVD+RW". 0x14 "DVD-RW Sequential Recording" or 0x1a "DVD+RW".
If enabled by burn_allow_untested_profiles() it also writes to profile
0x15 "DVD-R/DL Sequential Recording".
@param d The drive where the media is inserted. @param d The drive where the media is inserted.
@param pno Profile Number as of mmc5r03c.pdf, table 89 @param pno Profile Number as of mmc5r03c.pdf, table 89
@param name Profile Name (e.g "CD-RW", unknown profiles have empty name) @param name Profile Name (e.g "CD-RW", unknown profiles have empty name)
@ -929,6 +931,7 @@ void burn_read_opts_free(struct burn_read_opts *opts);
@param drive The drive with which to erase a disc. @param drive The drive with which to erase a disc.
@param fast Nonzero to do a fast erase, where only the disc's headers are @param fast Nonzero to do a fast erase, where only the disc's headers are
erased; zero to erase the entire disc. erased; zero to erase the entire disc.
With DVD-RW, fast blanking yields media capable only of DAO.
*/ */
void burn_disc_erase(struct burn_drive *drive, int fast); void burn_disc_erase(struct burn_drive *drive, int fast);
@ -1041,7 +1044,7 @@ int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc,
/** Write a disc in the drive. The drive must be grabbed successfully before /** Write a disc in the drive. The drive must be grabbed successfully before
calling this function. Always ensure that the drive reports a status of calling this function. Always ensure that the drive reports a status of
BURN_DISC_BLANK before calling this function. BURN_DISC_BLANK ot BURN_DISC_APPENDABLE before calling this function.
Note: write_type BURN_WRITE_SAO is currently not capable of writing a mix Note: write_type BURN_WRITE_SAO is currently not capable of writing a mix
of data and audio tracks. You must use BURN_WRITE_TAO for such sessions. of data and audio tracks. You must use BURN_WRITE_TAO for such sessions.
To be set by burn_write_opts_set_write_type(). To be set by burn_write_opts_set_write_type().
@ -1387,6 +1390,14 @@ void burn_write_opts_set_fillup(struct burn_write_opts *opts,
int fill_up_media); int fill_up_media);
/* ts A70303 */
/** Eventually makes libburn ignore the failure of some conformance checks:
- the check wether CD write+block type is supported by the drive
@param opts The write opts to change
@param use_force 1=ignore above checks, 0=refuse work on failed check
*/
void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force);
/** Sets whether to read in raw mode or not /** Sets whether to read in raw mode or not
@param opts The read opts to change @param opts The read opts to change

View File

@ -37,6 +37,7 @@ struct burn_write_opts *burn_write_opts_new(struct burn_drive *drive)
opts->obs_pad = 0; opts->obs_pad = 0;
opts->start_byte = -1; opts->start_byte = -1;
opts->fill_up_media = 0; opts->fill_up_media = 0;
opts->force_is_set = 0;
opts->has_mediacatalog = 0; opts->has_mediacatalog = 0;
opts->format = BURN_CDROM; opts->format = BURN_CDROM;
opts->multi = 0; opts->multi = 0;
@ -288,7 +289,7 @@ try_tao:;
strcat(reasons, "multi track capability lacking, "); strcat(reasons, "multi track capability lacking, ");
if (demands.exotic_track) if (demands.exotic_track)
strcat(reasons, "non-audio, non-data track, "); strcat(reasons, "non-audio, non-data track, ");
if (d->current_is_cd_profile) if (d->current_is_cd_profile && !opts->force_is_set)
if ((d->block_types[BURN_WRITE_TAO] & demands.block_types) != if ((d->block_types[BURN_WRITE_TAO] & demands.block_types) !=
demands.block_types) demands.block_types)
strcat(reasons, "drive dislikes block type, "); strcat(reasons, "drive dislikes block type, ");
@ -350,6 +351,13 @@ void burn_write_opts_set_fillup(struct burn_write_opts *opts,int fill_up_media)
} }
/* ts A70303: API */
void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force)
{
opts->force_is_set = !!use_force;
}
void burn_read_opts_set_raw(struct burn_read_opts *opts, int raw) void burn_read_opts_set_raw(struct burn_read_opts *opts, int raw)
{ {
opts->raw = raw; opts->raw = raw;

View File

@ -41,9 +41,14 @@ struct burn_write_opts
/* ts A61222 : Start address for media which allow a choice */ /* ts A61222 : Start address for media which allow a choice */
off_t start_byte; off_t start_byte;
/* ts A70213 : Wether to fill up the while available space on media */ /* ts A70213 : Wether to fill up the available space on media */
int fill_up_media; int fill_up_media;
/* ts A70303 : Wether to override conformance checks:
- the check wether CD write+block type is supported by the drive
*/
int force_is_set;
/** A disc can have a media catalog number */ /** A disc can have a media catalog number */
int has_mediacatalog; int has_mediacatalog;
unsigned char mediacatalog[13]; unsigned char mediacatalog[13];

View File

@ -1089,7 +1089,11 @@ int burn_disc_close_track_dvd_plus_r(struct burn_write_opts *o,
d->busy = BURN_DRIVE_CLOSING_SESSION; d->busy = BURN_DRIVE_CLOSING_SESSION;
d->close_track_session(d, 0, d->last_track_no); /* CLOSE TRACK, 001b */ d->close_track_session(d, 0, d->last_track_no); /* CLOSE TRACK, 001b */
/* Each session becomes a single logical track. So to distinguish them,
it is mandatory to close the session together with each track. */
d->close_track_session(d, 1, 0); /* CLOSE SESSION, 010b */ d->close_track_session(d, 1, 0); /* CLOSE SESSION, 010b */
d->busy = BURN_DRIVE_WRITING; d->busy = BURN_DRIVE_WRITING;
d->last_track_no++; d->last_track_no++;
return 1; return 1;