Now available: "quickest" and "full" formatting for DVD-RW

This commit is contained in:
Thomas Schmitt 2007-01-09 21:14:47 +00:00
parent e6cfff69eb
commit f1b817b520
4 changed files with 57 additions and 7 deletions

View File

@ -414,6 +414,21 @@ from the drive and last several minutes. Depending on mutual compatibility of
drive and media, formatting can yield unusable media. It seems that those die drive and media, formatting can yield unusable media. It seems that those die
too on blanking by cdrecord or dvd+rw-format. Perils of DVD-RW, i fear. too on blanking by cdrecord or dvd+rw-format. Perils of DVD-RW, i fear.
There are three formatting variants with cdrskin currently:
blank=format_overwrite uses "DVD-RW Quick" formatting (MMC-type 15h)
and writes a first session of 128 MB. This leads to media which are expandable
and random addressable by cdrskin.
blank=format_overwrite_quickest uses "DVD-RW Quick" formatting (type 15h) too
but leaves the media in "intermediate" state. One may only write sequentially
to such a DVD. This restriction is lifted after the first write session.
blank=format_overwrite_full uses preferrably "DVD-RW Full Format" (type 10h)
and writes a single 32 kB block to address 0 (in case only type 15h is
available). This formatting lasts as long as writing a full DVD but seems
to yield best quality.
Special compilation variations Special compilation variations

View File

@ -199,7 +199,18 @@ Minimally blank an entire CD.
.TP .TP
format_overwrite format_overwrite
Format a DVD-RW to "Restricted Overwrite". The user should bring some patience. Format a DVD-RW to "Restricted Overwrite". The user should bring some patience.
(Note: this is not an original cdrecord option.) (Note: format_overwrite* are not original cdrecord options.)
.TP
format_overwrite_quickest
Like format_overwrite without creating a 128 MB trailblazer track.
Leads to "intermediate" state which only allows sequential write
beginning from address 0.
The "intermediate" state ends after the first session of writing data.
.TP
format_overwrite_full
Like format_overwrite but claiming full media size rather than just 128 MB.
Only a minimal data packet gets written. Much patience is required.
May lead to media which have very few time overhead before and after write.
.RE .RE
.TP .TP
.BI \-checkdrive .BI \-checkdrive

View File

@ -1829,6 +1829,10 @@ return:
"\tminimal\t\tminimally blank the entire disk\n"); "\tminimal\t\tminimally blank the entire disk\n");
fprintf(stderr, fprintf(stderr,
"\tformat_overwrite\tformat a DVD-RW to \"Restricted Overwrite\"\n"); "\tformat_overwrite\tformat a DVD-RW to \"Restricted Overwrite\"\n");
fprintf(stderr,
"\tformat_overwrite_full\t\tto \"Restricted Overwrite\" in full size\n");
fprintf(stderr,
"\tformat_overwrite_quickest\tto \"Restricted Overwrite\" intermediate\n");
#else /* ! Cdrskin_extra_leaN */ #else /* ! Cdrskin_extra_leaN */
@ -2377,8 +2381,16 @@ struct CdrskiN {
int do_blank; int do_blank;
int blank_fast; int blank_fast;
int no_blank_appendable; int no_blank_appendable;
int blank_format_type; /* 0=blank, 1 to 255 like with burn_disc_format(flag): int blank_format_type; /* 0=blank
1=format_overwrite, 2=format_sequential */ bit0-7:
1=format_overwrite
bit8-15: bit0-7 of burn_disc_format(flag)
bit8 = write zeros after formatting
bit9 = insist in size 0
bit10= format to maximum available size
2=format_sequential (unimplemented yet)
*/
double blank_format_size; /* to be used with burn_disc_format() */
int do_burn; int do_burn;
int burnfree; int burnfree;
@ -2503,6 +2515,7 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
o->blank_fast= 0; o->blank_fast= 0;
o->no_blank_appendable= 0; o->no_blank_appendable= 0;
o->blank_format_type= 0; o->blank_format_type= 0;
o->blank_format_size= 0.0;
o->do_burn= 0; o->do_burn= 0;
o->write_type= BURN_WRITE_SAO; o->write_type= BURN_WRITE_SAO;
o->block_type= BURN_BLOCK_SAO; o->block_type= BURN_BLOCK_SAO;
@ -2911,7 +2924,8 @@ int Cdrskin_abort_handler(struct CdrskiN *skin, int signum, int flag)
Cleanup_set_handlers(NULL,NULL,1); /* allow abort */ Cleanup_set_handlers(NULL,NULL,1); /* allow abort */
return(0); /* let exit */ return(0); /* let exit */
} }
#endif /* Not_yeT */ #endif
usleep(1000000);
return(-2); /* do only process the control thread */ return(-2); /* do only process the control thread */
} }
@ -3928,7 +3942,7 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
if(skin->verbosity>=Cdrskin_verbose_progresS) if(skin->verbosity>=Cdrskin_verbose_progresS)
Cdrskin_report_disc_status(skin,s,0); Cdrskin_report_disc_status(skin,s,0);
do_format= skin->blank_format_type; do_format= skin->blank_format_type & 0xff;
if(do_format) { if(do_format) {
verb= "format"; verb= "format";
presperf= "formatting"; presperf= "formatting";
@ -4031,7 +4045,8 @@ unsupported_with_dvd_minus_rw:;
#ifdef Cdrskin_libburn_has_burn_disc_formaT #ifdef Cdrskin_libburn_has_burn_disc_formaT
} else if(do_format==1) { } else if(do_format==1) {
burn_disc_format(drive,(off_t) 128*1024*1024,1); burn_disc_format(drive,(off_t) skin->blank_format_size,
(skin->blank_format_type>>8)&0xff);
#endif #endif
} else { } else {
@ -5131,8 +5146,17 @@ set_blank:;
skin->blank_fast= 1; skin->blank_fast= 1;
blank_mode= "fast"; blank_mode= "fast";
} else if(strcmp(cpt,"format_overwrite")==0) { } else if(strcmp(cpt,"format_overwrite")==0) {
skin->do_blank= 1;
skin->blank_format_type= 1|(1<<8);
skin->blank_format_size= 128*1024*1024;
} else if(strcmp(cpt,"format_overwrite_full")==0) {
skin->do_blank= 1;
skin->blank_format_type= 1|(1<<8)|(1<<10);
skin->blank_format_size= 32*1024; /* write just a minimal packet */
} else if(strcmp(cpt,"format_overwrite_quickest")==0) {
skin->do_blank= 1; skin->do_blank= 1;
skin->blank_format_type= 1; skin->blank_format_type= 1;
skin->blank_format_size= 0;
} else if(strcmp(cpt,"format_sequential")==0) { } else if(strcmp(cpt,"format_sequential")==0) {
skin->do_blank= 1; skin->do_blank= 1;
skin->blank_format_type= 2; skin->blank_format_type= 2;

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2007.01.09.140302" #define Cdrskin_timestamP "2007.01.09.211152"