New -stream_recording mode with start address, "on" is now 32s

master
Thomas Schmitt 14 years ago
parent f0734966ff
commit 1af09c3ac8
  1. 11
      xorriso/xorriso.1
  2. 27
      xorriso/xorriso.c
  3. 3
      xorriso/xorriso_private.h
  4. 2
      xorriso/xorriso_timestamp.h
  5. 24
      xorriso/xorrisoburn.c

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Feb 23, 2008"
.TH XORRISO 1 "Feb 27, 2008"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -1696,12 +1696,19 @@ MMC drives usually activate their own idea of speed and take
the speed value given by the burn program only as upper limit
for their own decision.
.TP
\fB\-stream_recording\fR "on"|"off"
\fB\-stream_recording\fR "on"|"off"|"full"|"data"|number
Setting "on" tries to circumvent the management of defects on DVD-RAM, BD-RE,
or BD-R. Defect management keeps partly damaged media usable. But it reduces
write speed to half nominal speed even if the media is in perfect shape.
For the case of flawless media, one may use -stream_recording "on" to get
full speed.
.br
"full" tries full speed with all write operations, whereas "on" does this
only above byte address 32s. One may give a number of at least 16s
in order to set an own address limit.
.br
"data" causes full speed to start when superblock and directory entries are
written and writing of file content blocks begins.
.TP
\fB\-dummy\fR "on"|"off"
If "on" then simulate burning or refuse with FAILURE event if

@ -6208,8 +6208,16 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->do_stream_recording==0);
sprintf(line,"-stream_recording %s\n",
xorriso->do_stream_recording ? "on" : "off");
strcpy(mode, "off");
if(xorriso->do_stream_recording == 1)
strcpy(mode, "full");
if(xorriso->do_stream_recording == 2)
strcpy(mode, "data");
else if(xorriso->do_stream_recording == 32)
strcpy(mode, "on");
else if(xorriso->do_stream_recording >= 16)
sprintf(mode, "%ds", xorriso->do_stream_recording);
sprintf(line,"-stream_recording %s\n", mode);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
@ -16386,9 +16394,22 @@ int Xorriso_option_status_history_max(struct XorrisO *xorriso, int num,
int Xorriso_option_stream_recording(struct XorrisO *xorriso, char *mode,
int flag)
{
double num;
if(strcmp(mode,"on")==0 || mode[0]==0)
xorriso->do_stream_recording= 32;
else if(strcmp(mode,"full")==0)
xorriso->do_stream_recording= 1;
else
else if(strcmp(mode,"data")==0)
xorriso->do_stream_recording= 2;
else if(mode[0] >= '0' && mode[0] <= '9') {
num= Scanf_io_size(mode, 0);
num/= 2048.0;
if(num >= 16 && num <= 0x7FFFFFFF)
xorriso->do_stream_recording= num;
else
xorriso->do_stream_recording= 0;
} else
xorriso->do_stream_recording= 0;
return(1);
}

@ -201,7 +201,8 @@ struct XorrisO { /* the global context of xorriso */
/* <<< not sure whether to keep this after libisofs will have
learned to pad up MBR images to full MB */
int do_stream_recording;
int do_stream_recording; /* 0=no, 1=yes, 2=for data, not for dir
>=16 means yes with number as start LBA */
int keep_boot_image;
int patch_isolinux_image;

@ -1 +1 @@
#define Xorriso_timestamP "2009.02.28.175926"
#define Xorriso_timestamP "2009.02.28.181358"

@ -873,7 +873,7 @@ int Xorriso_make_write_options(
struct XorrisO *xorriso, struct burn_drive *drive,
struct burn_write_opts **burn_options, int flag)
{
int drive_role;
int drive_role, stream_mode= 0;
*burn_options= burn_write_opts_new(drive);
if(*burn_options==NULL) {
@ -887,8 +887,11 @@ int Xorriso_make_write_options(
burn_write_opts_set_multi(*burn_options,
!(xorriso->do_close || drive_role==0 || drive_role==3));
burn_drive_set_speed(drive, xorriso->speed, xorriso->speed);
burn_write_opts_set_stream_recording(*burn_options,
!! xorriso->do_stream_recording);
if(xorriso->do_stream_recording == 1)
stream_mode= 1;
else if(xorriso->do_stream_recording >= 16)
stream_mode= xorriso->do_stream_recording;
burn_write_opts_set_stream_recording(*burn_options, stream_mode);
burn_write_opts_set_underrun_proof(*burn_options, 1);
return(1);
}
@ -1080,7 +1083,7 @@ int Xorriso_auto_format(struct XorrisO *xorriso, int flag)
*/
int Xorriso_write_session(struct XorrisO *xorriso, int flag)
{
int ret, relax= 0, i, pacifier_speed= 0;
int ret, relax= 0, i, pacifier_speed= 0, data_lba;
int major, minor, micro;
char xorriso_id[256], *img_id, sfe[5*SfileadrL], *cpt;
struct isoburn_imgen_opts *sopts= NULL;
@ -1363,11 +1366,17 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag)
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
{ret= 0; goto ex;}
}
isoburn_igopt_get_effective_lba(sopts, &(xorriso->session_lba));
ret= Xorriso_make_write_options(xorriso, drive, &burn_options, 0);
if(ret<=0)
goto ex;
isoburn_igopt_get_effective_lba(sopts, &(xorriso->session_lba));
if(xorriso->do_stream_recording == 2) {
ret= isoburn_igopt_get_data_start(sopts, &data_lba);
if(ret <=0 || data_lba < 16)
data_lba= 51200; /* 100 MB */
burn_write_opts_set_stream_recording(burn_options, data_lba);
}
ret= Xorriso_sanitize_image_size(xorriso, drive, disc, burn_options, flag&1);
if(ret<=0 || (flag&1)) {
@ -1577,7 +1586,8 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
}
if(first_base_time > 0 &&
current_time - first_base_time >= 10 &&
progress.sectors > first_base_count) {
progress.sectors > first_base_count &&
progress.sector > first_base_count) {
norm= (1.0 - quot);
if(norm < 0.0001)
norm= 0.0001;
@ -1597,7 +1607,7 @@ int Xorriso_pacifier_loop(struct XorrisO *xorriso, struct burn_drive *drive,
norm+= 1.0;
}
time_prediction/= norm;
if(time_prediction < 30*86400) {
if(time_prediction < 30*86400 && time_prediction > 0) {
time_prediction+= current_time + 1;
Ftimetxt(time_prediction, date_text, 4);
sprintf(xorriso->info_text+strlen(xorriso->info_text),

Loading…
Cancel
Save