More appropriate drive status during format and close of DVD+RW

This commit is contained in:
Thomas Schmitt 2006-12-23 18:43:31 +00:00
parent 1ce6ec4a3a
commit 7e30dbfc5a
4 changed files with 20 additions and 7 deletions

View File

@ -170,6 +170,7 @@ or
#define Cdrskin_libburn_has_get_profilE 1 #define Cdrskin_libburn_has_get_profilE 1
#define Cdrskin_libburn_has_set_start_bytE 1 #define Cdrskin_libburn_has_set_start_bytE 1
#define Cdrskin_libburn_has_wrote_welL 1 #define Cdrskin_libburn_has_wrote_welL 1
#define Cdrskin_libburn_has_bd_formattinG 1
#endif /* Cdrskin_libburn_0_2_7 */ #endif /* Cdrskin_libburn_0_2_7 */
#ifndef Cdrskin_libburn_versioN #ifndef Cdrskin_libburn_versioN
@ -3981,7 +3982,7 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
double elapsed_time,elapsed_total_time,current_time; double elapsed_time,elapsed_total_time,current_time;
double estim_time,estim_minutes,estim_seconds,percent; double estim_time,estim_minutes,estim_seconds,percent;
int ret,fifo_percent,fill,space,advance_interval=0,new_mb,old_mb,time_to_tell; int ret,fifo_percent,fill,space,advance_interval=0,new_mb,old_mb,time_to_tell;
int fs,bs,old_track_idx,buffer_fill; int fs,bs,old_track_idx,buffer_fill,formatting= 0;
char fifo_text[80],mb_text[40]; char fifo_text[80],mb_text[40];
char *debug_mark= ""; /* use this to prepend a marker text for experiments */ char *debug_mark= ""; /* use this to prepend a marker text for experiments */
@ -3993,6 +3994,11 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
elapsed_time= current_time-*last_time; elapsed_time= current_time-*last_time;
time_to_tell= (elapsed_time>=1.0)&&(elapsed_total_time>=1.0); time_to_tell= (elapsed_time>=1.0)&&(elapsed_total_time>=1.0);
#ifdef Cdrskin_libburn_has_bd_formattinG
if(drive_status==BURN_DRIVE_FORMATTING)
formatting= 1;
#endif
if(drive_status==BURN_DRIVE_WRITING) { if(drive_status==BURN_DRIVE_WRITING) {
; ;
} else if(drive_status==BURN_DRIVE_WRITING_LEADIN } else if(drive_status==BURN_DRIVE_WRITING_LEADIN
@ -4000,15 +4006,14 @@ int Cdrskin_burn_pacifier(struct CdrskiN *skin,
#ifdef Cdrskin_allow_libburn_taO #ifdef Cdrskin_allow_libburn_taO
|| drive_status==BURN_DRIVE_WRITING_PREGAP || drive_status==BURN_DRIVE_WRITING_PREGAP
#endif #endif
|| formatting) {
) {
if(time_to_tell || skin->is_writing) { if(time_to_tell || skin->is_writing) {
if(skin->verbosity>=Cdrskin_verbose_progresS) { if(skin->verbosity>=Cdrskin_verbose_progresS) {
if(skin->is_writing) if(skin->is_writing)
fprintf(stderr,"\n"); fprintf(stderr,"\n");
fprintf(stderr, fprintf(stderr,
"\rcdrskin: working pre-track (burning since %.f seconds) ", "\rcdrskin: %s (burning since %.f seconds) ",
elapsed_total_time); (formatting?"formatting":"working pre-track"), elapsed_total_time);
} }
skin->is_writing= 0; skin->is_writing= 0;
advance_interval= 1; advance_interval= 1;

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.12.23.141315" #define Cdrskin_timestamP "2006.12.23.184353"

View File

@ -229,7 +229,11 @@ enum burn_drive_status
/** The drive is told to close a track (TAO only) */ /** The drive is told to close a track (TAO only) */
BURN_DRIVE_CLOSING_TRACK, BURN_DRIVE_CLOSING_TRACK,
/** The drive is told to close a session (TAO only) */ /** The drive is told to close a session (TAO only) */
BURN_DRIVE_CLOSING_SESSION BURN_DRIVE_CLOSING_SESSION,
/* ts A61223 */
/** The drive is formatting media */
BURN_DRIVE_FORMATTING
}; };

View File

@ -870,6 +870,7 @@ int burn_disc_close_session_dvd_plus_rw(struct burn_write_opts *o,
{ {
struct burn_drive *d = o->drive; struct burn_drive *d = o->drive;
d->busy = BURN_DRIVE_CLOSING_SESSION;
/* This seems to be a quick end : "if (!dvd_compat)" */ /* This seems to be a quick end : "if (!dvd_compat)" */
/* >>> Stop de-icing (ongoing background format) quickly /* >>> Stop de-icing (ongoing background format) quickly
by mmc_close() i(but with opcode[2]=0). by mmc_close() i(but with opcode[2]=0).
@ -878,6 +879,7 @@ int burn_disc_close_session_dvd_plus_rw(struct burn_write_opts *o,
*/ */
/* Else: end eventual background format in a "DVD-RO" compatible way */ /* Else: end eventual background format in a "DVD-RO" compatible way */
d->close_track_session(d, 1, 0); /* same as CLOSE SESSION for CD */ d->close_track_session(d, 1, 0); /* same as CLOSE SESSION for CD */
d->busy = BURN_DRIVE_WRITING;
return 1; return 1;
} }
@ -912,10 +914,12 @@ int burn_disc_setup_dvd_plus_rw(struct burn_write_opts *o,
char msg[160]; char msg[160];
if (d->bg_format_status==0 || d->bg_format_status==1) { if (d->bg_format_status==0 || d->bg_format_status==1) {
d->busy = BURN_DRIVE_FORMATTING;
/* start or re-start dvd_plus_rw formatting */ /* start or re-start dvd_plus_rw formatting */
ret = d->format_unit(d); ret = d->format_unit(d);
if (ret <= 0) if (ret <= 0)
return 0; return 0;
d->busy = BURN_DRIVE_WRITING;
} }
d->nwa = 0; d->nwa = 0;
if (o->start_byte >= 0) if (o->start_byte >= 0)