New options -dvd_obs and -stdio_sync

This commit is contained in:
Thomas Schmitt 2009-11-17 13:41:28 +00:00
parent 7b653579a0
commit f7e469528d
6 changed files with 143 additions and 8 deletions

View File

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH XORRISO 1 "Oct 27, 2009" .TH XORRISO 1 "Nov 17, 2009"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -1992,6 +1992,19 @@ in order to set an own address limit.
"data" causes full speed to start when superblock and directory entries are "data" causes full speed to start when superblock and directory entries are
written and writing of file content blocks begins. written and writing of file content blocks begins.
.TP .TP
\fB-dvd_obs\fR "default"|"32k"|"64k"
Linux specific:
Set the number of bytes to be transmitted with each write operation to DVD
or BD media. A number of 64 KB may improve throughput with bus systems which
show latency problems. The default depends on media type, on option
-stream_recording , and on compile time options.
.TP
\fB-stdio_sync\fR "on"|"off"|number
Set the number of bytes after which to force output to stdio: pseudo drives.
This forcing keeps the memory from being clogged with lots of
pending data for slow devices. Default "on" is the same as "16m".
Forced output can be disabled by "off".
.TP
\fB\-dummy\fR "on"|"off" \fB\-dummy\fR "on"|"off"
If "on" then simulate burning or refuse with FAILURE event if If "on" then simulate burning or refuse with FAILURE event if
no simulation is possible, do neither blank nor format. no simulation is possible, do neither blank nor format.
@ -2934,10 +2947,12 @@ Writing to stdout is possible only if -as "mkisofs" was among the start
arguments or if other start arguments pointed the output drive to arguments or if other start arguments pointed the output drive to
standard output. standard output.
.br .br
Not original mkisofs options are --quoted_path_list (see -quoted_path_list), Not original mkisofs options are --quoted_path_list , --hardlinks , --acl ,
isolinux_mbr= (see -boot_image isolinux isohybrid=), --xattr , --md5 , --stdio_sync . They work like the xorriso options with the
--hardlinks (see -hardlinks "on") --acl (see -acl "on"), same name and hardcoded argument "on", e.g. -acl "on".
--xattr (see -xattr "on"). Explicit arguments are expected by --stdio_sync and --scdbackup_tag.
.br
Quite special is isolinux_mbr= (see -boot_image isolinux isohybrid=).
.br .br
Personalites "\fBxorrisofs\fR", "\fBgenisoimage\fR", and "\fBgenisofs\fR" Personalites "\fBxorrisofs\fR", "\fBgenisoimage\fR", and "\fBgenisofs\fR"
are aliases for "mkisofs". are aliases for "mkisofs".

View File

@ -4819,6 +4819,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag)
m->padding= 300*1024; m->padding= 300*1024;
m->alignment= 0; m->alignment= 0;
m->do_stream_recording= 0; m->do_stream_recording= 0;
m->dvd_obs= 0;
m->stdio_sync= 0;
m->keep_boot_image= 0; m->keep_boot_image= 0;
m->patch_isolinux_image= 0; m->patch_isolinux_image= 0;
m->boot_image_bin_path[0]= 0; m->boot_image_bin_path[0]= 0;
@ -7075,6 +7077,31 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag)
if(!(is_default && no_defaults)) if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2); Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->dvd_obs == 0);
strcpy(mode, "default");
if(xorriso->dvd_obs == 32768 || xorriso->dvd_obs == 65536)
sprintf(mode, "%dk", xorriso->dvd_obs / 1024);
sprintf(line,"-dvd_obs %s\n", mode);
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->stdio_sync == 0);
strcpy(line, "-stdio_sync ");
if(xorriso->stdio_sync == -1)
strcat(line, "off");
else if(xorriso->stdio_sync == 0)
strcat(line, "on");
else if(xorriso->stdio_sync % 512) {
Sfile_off_t_text(line+strlen(line), (off_t) (xorriso->stdio_sync * 2048),
0);
} else {
Sfile_off_t_text(line+strlen(line), (off_t) (xorriso->stdio_sync / 512), 0);
strcat(line, "m");
}
strcat(line, "\n");
if(!(is_default && no_defaults))
Xorriso_status_result(xorriso,filter,fp,flag&2);
is_default= (xorriso->fs==4*512); is_default= (xorriso->fs==4*512);
if((xorriso->fs/512)*512==xorriso->fs) if((xorriso->fs/512)*512==xorriso->fs)
sprintf(line,"-fs %dm\n", xorriso->fs/512); sprintf(line,"-fs %dm\n", xorriso->fs/512);
@ -10436,6 +10463,8 @@ int Xorriso_cdrskin_help(struct XorrisO *xorriso, int flag)
"\t--grow_overwriteable_iso\temulate multi-session on DVD+RW, BD-RE", "\t--grow_overwriteable_iso\temulate multi-session on DVD+RW, BD-RE",
"\twrite_start_address=#\t\twrite to byte address on DVD+RW, BD-RE", "\twrite_start_address=#\t\twrite to byte address on DVD+RW, BD-RE",
"\tstream_recording=on\t\ttry to get full speed on DVD-RAM, BD", "\tstream_recording=on\t\ttry to get full speed on DVD-RAM, BD",
"\tdvd_obs=default|32k|64k\t\tbytes per DVD/BD write operation",
"\tstdio_sync=on|off|number\twhether to fsync output to \"stdio:\"",
"\t-help\t\tprint this text to stderr and exit emulation", "\t-help\t\tprint this text to stderr and exit emulation",
"Actually this is the integrated ISO RockRidge filesystem manipulator xorriso", "Actually this is the integrated ISO RockRidge filesystem manipulator xorriso",
"lending its libburn capabilities to a very limited cdrecord emulation. Only", "lending its libburn capabilities to a very limited cdrecord emulation. Only",
@ -10659,6 +10688,16 @@ no_volunteer:;
cpt= strchr(argv[i], '=')+1; cpt= strchr(argv[i], '=')+1;
Xorriso_option_stream_recording(xorriso, cpt, 0); Xorriso_option_stream_recording(xorriso, cpt, 0);
} else if(strncmp(argv[i], "-dvd_obs=", 9)==0 ||
strncmp(argv[i], "dvd_obs=", 8)==0) {
cpt= strchr(argv[i], '=') + 1;
Xorriso_option_dvd_obs(xorriso, cpt, 0);
} else if(strncmp(argv[i], "-stdio_sync=", 12)==0 ||
strncmp(argv[i], "stdio_sync=", 11)==0) {
cpt= strchr(argv[i], '=') + 1;
Xorriso_option_stdio_sync(xorriso, cpt, 0);
} else if(strcmp(argv[i], "-toc")==0 || strcmp(argv[i], "--long_toc")==0) { } else if(strcmp(argv[i], "-toc")==0 || strcmp(argv[i], "--long_toc")==0) {
do_toc= 1; do_toc= 1;
} else if(strncmp(argv[i], "-tsize=", 7)==0 || } else if(strncmp(argv[i], "-tsize=", 7)==0 ||
@ -10943,6 +10982,7 @@ int Xorriso_genisofs_help(struct XorrisO *xorriso, int flag)
" -no-emul-boot Boot image is 'no emulation' image", " -no-emul-boot Boot image is 'no emulation' image",
" -boot-info-table Patch boot image with info table", " -boot-info-table Patch boot image with info table",
" isolinux_mbr=on|auto|off Control eventual isohybrid MBR generation", " isolinux_mbr=on|auto|off Control eventual isohybrid MBR generation",
" --stdio_sync on|off|number Control forced output to disk files",
" -z, -transparent-compression", " -z, -transparent-compression",
" Enable transparent compression of files", " Enable transparent compression of files",
" -v, -verbose Verbose", " -v, -verbose Verbose",
@ -11131,6 +11171,11 @@ int Xorriso_genisofs(struct XorrisO *xorriso, char *whom,
} else if(strcmp(argv[i], "-z")==0 || } else if(strcmp(argv[i], "-z")==0 ||
strcmp(argv[i], "-transparent-compression")==0) { strcmp(argv[i], "-transparent-compression")==0) {
Xorriso_option_zisofs(xorriso, "by_magic=on", 0); Xorriso_option_zisofs(xorriso, "by_magic=on", 0);
} else if(strcmp(argv[i], "--stdio_sync")==0) {
if(i+1>=argc)
goto not_enough_args;
i++;
Xorriso_option_stdio_sync(xorriso, argv[i], 0);
} else } else
was_other_option= 1; was_other_option= 1;
@ -14889,6 +14934,26 @@ int Xorriso_option_dummy(struct XorrisO *xorriso, char *mode, int flag)
} }
/* Option -dvd_obs "default"|"32k"|"64k" */
int Xorriso_option_dvd_obs(struct XorrisO *xorriso, char *obs, int flag)
{
double num;
if(strcmp(obs, "default") == 0)
num= 0;
else
num = Scanf_io_size(obs,0);
if(num != 0 && num != 32768 && num != 65536) {
sprintf(xorriso->info_text,
"-dvd_obs : Bad size. Acceptable are 0, 32k, 64k");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
} else
xorriso->dvd_obs= num;
return(1);
}
/* Option -eject */ /* Option -eject */
/* @param flag bit0=do not report toc of eventually remaining drives /* @param flag bit0=do not report toc of eventually remaining drives
*/ */
@ -16162,6 +16227,11 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag)
" Set the burn speed. Default is 0 = maximum speed.", " Set the burn speed. Default is 0 = maximum speed.",
" -stream_recording \"on\"|\"off\"", " -stream_recording \"on\"|\"off\"",
" Try to circumvent slow checkread on DVD-RAM, BD-RE, BD-R.", " Try to circumvent slow checkread on DVD-RAM, BD-RE, BD-R.",
" -dvd_obs \"default\"|\"32k\"|\"64k\"",
" Set number of bytes per DVD/BD write operation.",
" -stdio_sync \"on\"|\"off\"|number",
" Set number of bytes after which to force output to stdio",
" pseudo drives. \"on\" is the same as 16m.",
" -fs number[\"k\"|\"m\"]", " -fs number[\"k\"|\"m\"]",
" Set the size of the fifo buffer. (Default is 4m)", " Set the size of the fifo buffer. (Default is 4m)",
" -eject \"in\"|\"out\"|\"all\"", " -eject \"in\"|\"out\"|\"all\"",
@ -18707,6 +18777,30 @@ int Xorriso_option_status_history_max(struct XorrisO *xorriso, int num,
} }
/* Option -stdio_sync "on"|"off"|size */
int Xorriso_option_stdio_sync(struct XorrisO *xorriso, char *rythm, int flag)
{
double num;
if(strcmp(rythm, "default") == 0 || strcmp(rythm, "on") == 0)
num= 0;
if(strcmp(rythm, "off") == 0)
num= -1;
else
num = Scanf_io_size(rythm, 0);
if(num > 0)
num /= 2048;
if(num != -1 && num != 0 && (num < 32 || num > 512 * 1024)) {
sprintf(xorriso->info_text,
"-stdio_sync : Bad size. Acceptable are -1, 0, 32k ... 1g");
Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0);
return(0);
} else
xorriso->stdio_sync= num;
return(1);
}
/* Option -stream_recording */ /* Option -stream_recording */
int Xorriso_option_stream_recording(struct XorrisO *xorriso, char *mode, int Xorriso_option_stream_recording(struct XorrisO *xorriso, char *mode,
int flag) int flag)
@ -19249,7 +19343,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"backslash_codes","blank", "backslash_codes","blank",
"calm_drive","cd","cdi","cdx","charset","close", "calm_drive","cd","cdi","cdx","charset","close",
"commit_eject","compliance", "commit_eject","compliance",
"dev","dialog","disk_dev_ino","disk_pattern","dummy","eject", "dev","dialog","disk_dev_ino","disk_pattern","dummy","dvd_obs","eject",
"iso_rr_pattern","follow","format","fs","gid","grow_blindly","hardlinks", "iso_rr_pattern","follow","format","fs","gid","grow_blindly","hardlinks",
"history","indev","in_charset","joliet", "history","indev","in_charset","joliet",
"list_delimiter","list_profiles","local_charset", "list_delimiter","list_profiles","local_charset",
@ -19259,7 +19353,7 @@ int Xorriso_count_args(struct XorrisO *xorriso, int argc, char **argv,
"prog","prog_help","publisher","quoted_not_list","quoted_path_list", "prog","prog_help","publisher","quoted_not_list","quoted_path_list",
"reassure","report_about","rom_toc_scan", "reassure","report_about","rom_toc_scan",
"session_log","speed","split_size","status","status_history_max", "session_log","speed","split_size","status","status_history_max",
"stream_recording","system_id","temp_mem_limit", "stdio_sync","stream_recording","system_id","temp_mem_limit",
"uid","unregister_filter","use_readline","volid","volset_id", "uid","unregister_filter","use_readline","volid","volset_id",
"xattr","zisofs", "xattr","zisofs",
"" ""
@ -19597,6 +19691,10 @@ next_command:;
(*idx)++; (*idx)++;
ret= Xorriso_option_dummy(xorriso, arg1, 0); ret= Xorriso_option_dummy(xorriso, arg1, 0);
} else if(strcmp(cmd,"dvd_obs")==0) {
(*idx)++;
ret= Xorriso_option_dvd_obs(xorriso, arg1, 0);
} else if(strcmp(cmd,"dux")==0 || strcmp(cmd,"dusx")==0) { } else if(strcmp(cmd,"dux")==0 || strcmp(cmd,"dusx")==0) {
ret= Xorriso_option_lsx(xorriso, argc, argv, idx, (cmd[2]!='s')|4); ret= Xorriso_option_lsx(xorriso, argc, argv, idx, (cmd[2]!='s')|4);
@ -20028,6 +20126,10 @@ next_command:;
sscanf(arg1,"%d",&num1); sscanf(arg1,"%d",&num1);
ret= Xorriso_option_status_history_max(xorriso, num1, 0); ret= Xorriso_option_status_history_max(xorriso, num1, 0);
} else if(strcmp(cmd,"stdio_sync")==0) {
(*idx)++;
ret= Xorriso_option_stdio_sync(xorriso, arg1, 0);
} else if(strcmp(cmd,"stream_recording")==0) { } else if(strcmp(cmd,"stream_recording")==0) {
(*idx)++; (*idx)++;
ret= Xorriso_option_stream_recording(xorriso, arg1, 0); ret= Xorriso_option_stream_recording(xorriso, arg1, 0);

View File

@ -614,6 +614,9 @@ int Xorriso_option_drive_class(struct XorrisO *xorriso,
/* Option -dummy "on"|"off" */ /* Option -dummy "on"|"off" */
int Xorriso_option_dummy(struct XorrisO *xorriso, char *mode, int flag); int Xorriso_option_dummy(struct XorrisO *xorriso, char *mode, int flag);
/* Option -dvd_obs "default"|"32k"|"64k" */
int Xorriso_option_dvd_obs(struct XorrisO *xorriso, char *obs, int flag);
/* Option -eject */ /* Option -eject */
/* @param flag bit0=do not report toc of eventually remaining drives /* @param flag bit0=do not report toc of eventually remaining drives
*/ */
@ -927,6 +930,9 @@ int Xorriso_option_status(struct XorrisO *xorriso, char *mode, int flag);
int Xorriso_option_status_history_max(struct XorrisO *xorriso, int num1, int Xorriso_option_status_history_max(struct XorrisO *xorriso, int num1,
int flag); int flag);
/* Option -stdio_sync "on"|"off"|size */
int Xorriso_option_stdio_sync(struct XorrisO *xorriso, char *rythm, int flag);
/* Option -stream_recording */ /* Option -stream_recording */
int Xorriso_option_stream_recording(struct XorrisO *xorriso, char *mode, int Xorriso_option_stream_recording(struct XorrisO *xorriso, char *mode,
int flag); int flag);

View File

@ -259,6 +259,9 @@ struct XorrisO { /* the global context of xorriso */
int do_stream_recording; /* 0=no, 1=yes, 2=for data, not for dir int do_stream_recording; /* 0=no, 1=yes, 2=for data, not for dir
>=16 means yes with number as start LBA */ >=16 means yes with number as start LBA */
int dvd_obs; /* DVD write chunk size: 0, 32k or 64k */
int stdio_sync; /* stdio fsync interval: -1, 0, >=32 */
int keep_boot_image; int keep_boot_image;
int patch_isolinux_image; int patch_isolinux_image;
char boot_image_bin_path[SfileadrL]; char boot_image_bin_path[SfileadrL];

View File

@ -1 +1 @@
#define Xorriso_timestamP "2009.11.17.123150" #define Xorriso_timestamP "2009.11.17.134239"

View File

@ -1445,6 +1445,15 @@ int Xorriso_make_write_options(
else if(xorriso->do_stream_recording >= 16) else if(xorriso->do_stream_recording >= 16)
stream_mode= xorriso->do_stream_recording; stream_mode= xorriso->do_stream_recording;
burn_write_opts_set_stream_recording(*burn_options, stream_mode); burn_write_opts_set_stream_recording(*burn_options, stream_mode);
#ifdef Xorriso_dvd_obs_default_64K
if(xorriso->dvd_obs == 0)
burn_write_opts_set_dvd_obs(*burn_options, 64 * 1024);
else
#endif
burn_write_opts_set_dvd_obs(*burn_options, xorriso->dvd_obs);
burn_write_opts_set_stdio_fsync(*burn_options, xorriso->stdio_sync);
burn_write_opts_set_underrun_proof(*burn_options, 1); burn_write_opts_set_underrun_proof(*burn_options, 1);
return(1); return(1);
} }