From 3326fcdb2d85197536e1604b3cb29860f7246392 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 28 May 2007 16:56:58 +0000 Subject: [PATCH] Extended struct burn_multi_caps by .might_simulate --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/drive.c | 8 +++++++- libburn/libburn.h | 5 +++++ test/telltoc.c | 5 +++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index 48e171d..4871955 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2007.05.28.132412" +#define Cdrskin_timestamP "2007.05.28.165630" diff --git a/libburn/drive.c b/libburn/drive.c index a2fa83b..be9fe2f 100644 --- a/libburn/drive.c +++ b/libburn/drive.c @@ -1022,7 +1022,6 @@ int burn_drive_is_enumerable_adr(char *adr) #define BURN_DRIVE_MAX_LINK_DEPTH 20 /* 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 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->current_profile = d->current_profile; o->current_is_cd_profile = d->current_is_cd_profile; + o->might_simulate = 0; if (s != BURN_DISC_BLANK && s != BURN_DISC_APPENDABLE) { 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) 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 || d->current_profile == 0x15) { /* 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) 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 || d->current_profile == 0x1a) { /* DVD-RAM, overwriteable DVD-RW, DVD+RW */ diff --git a/libburn/libburn.h b/libburn/libburn.h index ebae095..d7842f2 100644 --- a/libburn/libburn.h +++ b/libburn/libburn.h @@ -1411,6 +1411,7 @@ void burn_write_opts_set_fillup(struct burn_write_opts *opts, /* ts A70303 */ /** 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 the media profile supports simulated burning @param opts The write opts to change @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 */ 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 diff --git a/test/telltoc.c b/test/telltoc.c index a2e3783..8dc866d 100644 --- a/test/telltoc.c +++ b/test/telltoc.c @@ -312,6 +312,11 @@ int telltoc_media(struct burn_drive *drive) caps->advised_write_mode == BURN_WRITE_RAW ? " (advised)" : ""); 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); if (o != NULL) { burn_write_opts_set_perform_opc(o, 0);