Extended struct burn_multi_caps by .might_simulate

This commit is contained in:
Thomas Schmitt 2007-05-28 16:56:58 +00:00
parent bbc91a6363
commit 1b90038fd5
4 changed files with 18 additions and 2 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2007.05.28.132412" #define Cdrskin_timestamP "2007.05.28.165630"

View File

@ -1022,7 +1022,6 @@ int burn_drive_is_enumerable_adr(char *adr)
#define BURN_DRIVE_MAX_LINK_DEPTH 20 #define BURN_DRIVE_MAX_LINK_DEPTH 20
/* ts A60922 ticket 33 */ /* ts A60922 ticket 33 */
/* Try to find an enumerated address with the given stat.st_rdev number */
int burn_drive_resolve_link(char *path, char adr[], int *recursion_count) int burn_drive_resolve_link(char *path, char adr[], int *recursion_count)
{ {
int ret; int ret;
@ -1620,6 +1619,7 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
o->selected_write_mode = wt; o->selected_write_mode = wt;
o->current_profile = d->current_profile; o->current_profile = d->current_profile;
o->current_is_cd_profile = d->current_is_cd_profile; o->current_is_cd_profile = d->current_is_cd_profile;
o->might_simulate = 0;
if (s != BURN_DISC_BLANK && s != BURN_DISC_APPENDABLE) { if (s != BURN_DISC_BLANK && s != BURN_DISC_APPENDABLE) {
return 0; return 0;
@ -1649,6 +1649,9 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
} }
if (wt == BURN_WRITE_RAW) if (wt == BURN_WRITE_RAW)
o->multi_session = o->multi_track = 0; o->multi_session = o->multi_track = 0;
else if(wt == BURN_WRITE_NONE || wt == BURN_WRITE_SAO ||
wt == BURN_WRITE_TAO)
o->might_simulate = !!d->mdata->simulate;
} else if (d->current_profile == 0x11 || d->current_profile == 0x14 || } else if (d->current_profile == 0x11 || d->current_profile == 0x14 ||
d->current_profile == 0x15) { d->current_profile == 0x15) {
/* DVD-R , sequential DVD-RW , DVD-R/DL Sequential */ /* DVD-R , sequential DVD-RW , DVD-R/DL Sequential */
@ -1667,6 +1670,9 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
} }
if (wt == BURN_WRITE_SAO) if (wt == BURN_WRITE_SAO)
o->multi_session = o->multi_track = 0; o->multi_session = o->multi_track = 0;
if (wt == BURN_WRITE_NONE || wt == BURN_WRITE_SAO ||
wt == BURN_WRITE_TAO)
o->might_simulate = 1;
} else if (d->current_profile == 0x12 || d->current_profile == 0x13 || } else if (d->current_profile == 0x12 || d->current_profile == 0x13 ||
d->current_profile == 0x1a) { d->current_profile == 0x1a) {
/* DVD-RAM, overwriteable DVD-RW, DVD+RW */ /* DVD-RAM, overwriteable DVD-RW, DVD+RW */

View File

@ -1411,6 +1411,7 @@ void burn_write_opts_set_fillup(struct burn_write_opts *opts,
/* ts A70303 */ /* ts A70303 */
/** Eventually makes libburn ignore the failure of some conformance checks: /** Eventually makes libburn ignore the failure of some conformance checks:
- the check wether CD write+block type is supported by the drive - the check wether CD write+block type is supported by the drive
- the check wether the media profile supports simulated burning
@param opts The write opts to change @param opts The write opts to change
@param use_force 1=ignore above checks, 0=refuse work on failed check @param use_force 1=ignore above checks, 0=refuse work on failed check
*/ */
@ -1599,6 +1600,10 @@ struct burn_multi_caps {
/** Wether the current profile indicates CD media. 1=yes, 0=no */ /** Wether the current profile indicates CD media. 1=yes, 0=no */
int current_is_cd_profile; int current_is_cd_profile;
/* ts A70528, added to version 0.3.7 */
/** Wether the current profile is able to perform simulated write */
int might_simulate;
}; };
/** Allocates a struct burn_multi_caps (see above) and fills it with values /** Allocates a struct burn_multi_caps (see above) and fills it with values

View File

@ -312,6 +312,11 @@ int telltoc_media(struct burn_drive *drive)
caps->advised_write_mode == BURN_WRITE_RAW ? caps->advised_write_mode == BURN_WRITE_RAW ?
" (advised)" : ""); " (advised)" : "");
printf("\n"); printf("\n");
printf("Write dummy : ");
if (caps->might_simulate)
printf("supposed to work with non-RAW modes\n");
else
printf("will not work\n");
o= burn_write_opts_new(drive); o= burn_write_opts_new(drive);
if (o != NULL) { if (o != NULL) {
burn_write_opts_set_perform_opc(o, 0); burn_write_opts_set_perform_opc(o, 0);