From ffb7fe64c9737797fd18f9b9613a0f098209ea29 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 26 Aug 2020 16:29:40 +0200 Subject: [PATCH] New -read_speed prefixes "soft_force:" and "soft_corr:" --- xorriso/base_obj.c | 2 + xorriso/drive_mgt.c | 80 +++++++++++++-- xorriso/opts_d_h.c | 5 +- xorriso/opts_p_z.c | 49 +++++++--- xorriso/text_io.c | 10 ++ xorriso/xorriso.1 | 31 +++++- xorriso/xorriso.info | 189 ++++++++++++++++++++---------------- xorriso/xorriso.texi | 31 +++++- xorriso/xorriso_private.h | 3 + xorriso/xorriso_timestamp.h | 2 +- 10 files changed, 283 insertions(+), 119 deletions(-) diff --git a/xorriso/base_obj.c b/xorriso/base_obj.c index e09b9326..d09ecb9c 100644 --- a/xorriso/base_obj.c +++ b/xorriso/base_obj.c @@ -242,6 +242,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->auto_close= 0; m->write_speed= 0; /* max */ m->read_speed= -2; /* do not set */ + m->read_speed_force= 0; + m->read_speed_corr= 250000; /* look back at most 0.25 seconds with _force */ m->fs= 4*512; /* 4 MiB */ m->padding= 300*1024; m->do_padding_by_libisofs= 0; diff --git a/xorriso/drive_mgt.c b/xorriso/drive_mgt.c index 492546d5..d0b9310b 100644 --- a/xorriso/drive_mgt.c +++ b/xorriso/drive_mgt.c @@ -1,7 +1,7 @@ /* xorriso - creates, loads, manipulates and burns ISO 9660 filesystem images. - Copyright 2007-2019 Thomas Schmitt, + Copyright 2007-2020 Thomas Schmitt, Provided under GPL version 2 or later. @@ -204,6 +204,42 @@ ex:; } +/* @param flag: bit0= set read speed + bit1= set write speed +*/ +int Xorriso_set_speed(struct XorrisO *xorriso, struct burn_drive *drive, + int read_speed, int write_speed, int flag) +{ + int r_speed = 0, w_speed = 0, ret = 0, profile_no= 0; + char profile_name[80]; + + if((flag & 3) == 0) + return(0); + if(xorriso->read_speed == -2) { + if(!(flag & 2)) + return(0); + } + if(flag & 1) + r_speed= read_speed; + if(flag & 2) + w_speed= write_speed; + + ret= burn_disc_get_profile(drive, &profile_no, profile_name); + if(ret <= 0) + profile_no= 0; + if((r_speed > 0 || w_speed > 0) && profile_no >= 0x10) { + ret= burn_drive_set_speed_exact(drive, r_speed, w_speed); + if(ret > 0) + goto ex; + } + burn_drive_set_speed(drive, r_speed, w_speed); + ret= 2; +ex:; + Xorriso_process_msg_queues(xorriso,0); + return(ret); +} + + /* @param flag bit0= acquire as isoburn input drive bit1= acquire as libburn output drive (as isoburn drive if bit0) bit2= regard overwritable media as blank @@ -573,8 +609,7 @@ int Xorriso_aquire_drive(struct XorrisO *xorriso, char *adr, char *show_adr, if(ret <= 0) goto ex; } - if(xorriso->read_speed != -2) - burn_drive_set_speed(drive, xorriso->read_speed, 0); + Xorriso_set_speed(xorriso, drive, xorriso->read_speed, 0, 1); read_ret= ret= isoburn_read_image(drive, ropts, &volset); /* <<< Resetting to normal thresholds */ @@ -2308,12 +2343,13 @@ int Xorriso_scsi_log(struct XorrisO *xorriso, int flag) int Xorriso_check_md5_range(struct XorrisO *xorriso, off_t start_lba, off_t end_lba, char md5[16], int flag) { - int ret; + int ret, us_corr = 0; struct burn_drive_info *dinfo= NULL; struct burn_drive *drive= NULL; - off_t pos, data_count, to_read; + off_t pos, data_count, to_read, slowdown_count= 0; char *data= NULL, data_md5[16]; void *ctx = NULL; + struct timeval prev_time; ret= Xorriso_get_drive_handles(xorriso, &dinfo, &drive, "on attempt to check session MD5 checksum", 0); @@ -2327,8 +2363,10 @@ int Xorriso_check_md5_range(struct XorrisO *xorriso, off_t start_lba, Xorriso_no_malloc_memory(xorriso, NULL, 0); goto ex; } - if(xorriso->read_speed != -2) - burn_drive_set_speed(drive, xorriso->read_speed, 0); + if(xorriso->read_speed_force > 0) /* initialize forced speed limit */ + burn_nominal_slowdown(xorriso->read_speed_force, xorriso->read_speed_corr, + &prev_time, &us_corr, (off_t) 0, 1); + Xorriso_set_speed(xorriso, drive, xorriso->read_speed, 0, 1); Xorriso_process_msg_queues(xorriso,0); for(pos= start_lba; pos < end_lba; pos+= 32) { to_read= 32; @@ -2339,6 +2377,15 @@ int Xorriso_check_md5_range(struct XorrisO *xorriso, off_t start_lba, if(ret <= 0) goto ex; iso_md5_compute(ctx, data, (int) data_count); + if(xorriso->read_speed_force > 0 && pos + to_read <= end_lba) { + slowdown_count+= data_count; + if(slowdown_count >= 128 * 1024) { + burn_nominal_slowdown(xorriso->read_speed_force, + xorriso->read_speed_corr, + &prev_time, &us_corr, slowdown_count, 0); + slowdown_count= 0; + } + } xorriso->pacifier_count+= data_count; xorriso->pacifier_byte_count+= data_count; Xorriso_pacifier_callback(xorriso, "content bytes read", @@ -2741,7 +2788,7 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist, { int i, j, ret, total_count= 0, sectors= -1, sector_size= -1, skip_reading; int prev_quality= -1, quality= -1, retry= 0, profile_no, is_cd= 0; - int eccb_size= 16; + int eccb_size= 16, us_corr = 0; int start_sec, end_sec, first_value, fret, suspect_tao_end= 0; char profile_name[80]; int start_lba= 0; @@ -2749,6 +2796,8 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist, struct burn_drive_info *dinfo; char *data= NULL, *data_pt; off_t data_count, to_read, read_count= 0, write_amount, skipped_to_read; + off_t slowdown_count= 0; + struct timeval prev_time; double pre_read_time, post_read_time, time_diff, total_time_diff= 0; double last_abort_file_time= 0; void *ctx= NULL; @@ -2861,8 +2910,10 @@ int Xorriso_check_interval(struct XorrisO *xorriso, struct SpotlisT *spotlist, goto ex; } - if(xorriso->read_speed != -2) - burn_drive_set_speed(drive, xorriso->read_speed, 0); + if(xorriso->read_speed_force > 0) /* initialize forced speed limit */ + burn_nominal_slowdown(xorriso->read_speed_force, xorriso->read_speed_corr, + &prev_time, &us_corr, (off_t) 0, 1); + Xorriso_set_speed(xorriso, drive, xorriso->read_speed, 0, 1); Xorriso_process_msg_queues(xorriso,0); start_lba= from_lba; to_read= read_chunk; @@ -3020,6 +3071,15 @@ abort_check:; if(job->data_to_limit >= 0 && read_count > job->data_to_limit) write_amount-= (read_count - job->data_to_limit); } + if(xorriso->read_speed_force > 0) { + slowdown_count+= data_count; + if(slowdown_count >= 128 * 1024) { + burn_nominal_slowdown(xorriso->read_speed_force, + xorriso->read_speed_corr, + &prev_time, &us_corr, slowdown_count, 0); + slowdown_count= 0; + } + } if(write_amount > 0) { if(job->data_to_fd >= 0) { ret= lseek(job->data_to_fd, diff --git a/xorriso/opts_d_h.c b/xorriso/opts_d_h.c index 940060eb..cbb32d1c 100644 --- a/xorriso/opts_d_h.c +++ b/xorriso/opts_d_h.c @@ -1779,9 +1779,10 @@ int Xorriso_option_help(struct XorrisO *xorriso, int flag) " Enable or disable status and content changes of drive.", " -scsi_dev_family \"default\"|\"sr\"|\"scd\"|\"sg\"", " Linux specific: Choose device file type.", -" -read_speed number[\"k/s\"|\"m/s\"|\"[x]CD\"|\"[x]DVD\"|\"[x]BD\"]", +" -read_speed number[\"k/s\"|\"[x]CD\"|\"[x]DVD\"|\"[x]BD\"]|keyword", " Set the read speed. Default is \"none\" = do not set speed", -" before reading.", +" before reading. Prefix \"soft_force:\" enables slowdown by", +" software.", " -grow_blindly \"off\"|predicted_nwa", " Switch between modifying and blind growing.", " -load \"session\"|\"track\"|\"lba\"|\"sbsector\"|\"volid\"|\"auto\" id", diff --git a/xorriso/opts_p_z.c b/xorriso/opts_p_z.c index 92c54fad..a4ba1aac 100644 --- a/xorriso/opts_p_z.c +++ b/xorriso/opts_p_z.c @@ -1408,12 +1408,31 @@ int Xorriso_option_sleep(struct XorrisO *xorriso, char *duration, int flag) /* Commands -speed , -read_speed */ /* @param flag bit0= -read_speed rather than -speed */ -int Xorriso_option_speed(struct XorrisO *xorriso, char *speed, int flag) +int Xorriso_option_speed(struct XorrisO *xorriso, char *speed_in, int flag) { - int is_cd= 1, unit_found= 0, ret, profile_number, intspeed= 1; + int is_cd= 1, unit_found= 0, ret, profile_number, intspeed= 1, for_force= 0; double num= -2.0; - char *cpt, profile_name[80]; + char *cpt, profile_name[80], *speed; + speed= speed_in; + + if(strncmp(speed, "soft_corr:", 10) == 0 && (flag & 1)) { + sscanf(speed + 10, "%lf", &num); + if(num > 1.0e9 || num < 0.0) { + sprintf(xorriso->info_text, + "-read_speed soft_corr: Value too small or too large (0 to 1e9): '%s'", + speed + 10); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); + return(0); + } + xorriso->read_speed_corr= num; + return(1); + } + + if(strncmp(speed, "soft_force:", 11) == 0 && (flag & 1)) { + for_force= 1; + speed+= 11; + } if(speed[0] == 0 || strcmp(speed, "any") == 0 || strcmp(speed, "max") == 0) { intspeed= 0; } else if(strcmp(speed, "min") == 0) { @@ -1425,13 +1444,8 @@ int Xorriso_option_speed(struct XorrisO *xorriso, char *speed, int flag) if(num <= 0) intspeed= num; } - if(intspeed <= 0) { - if(flag & 1) - xorriso->read_speed= intspeed; - else - xorriso->write_speed= intspeed; - return(1); - } + if(intspeed <= 0) + goto set_speed_and_exit; for(cpt= speed+strlen(speed)-1; cpt>=speed; cpt--) if(isdigit(*cpt) || *cpt=='.') @@ -1472,17 +1486,24 @@ bd_speed:; if(num> 2.0e9) { sprintf(xorriso->info_text, - "-speed: Value too large or not recognizable: '%s'", speed); + "%s: Value too large or not recognizable: '%s'", + flag & 1 ? "-read_speed" : "-speed", speed); Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "SORRY", 0); return(0); } intspeed= num; if(intspeed < num) intspeed++; - if(flag & 1) - xorriso->read_speed= intspeed; - else + +set_speed_and_exit:; + if(flag & 1) { + if(for_force) + xorriso->read_speed_force= intspeed; + else + xorriso->read_speed= intspeed; + } else { xorriso->write_speed= intspeed; + } return(1); } diff --git a/xorriso/text_io.c b/xorriso/text_io.c index c036a7e5..19e75214 100644 --- a/xorriso/text_io.c +++ b/xorriso/text_io.c @@ -3434,6 +3434,16 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag) is_default= (xorriso->read_speed == -2); sprintf(line,"-read_speed %s\n", Xorriso__speedname(xorriso->read_speed)); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso,filter,fp,flag&2); + is_default= (xorriso->read_speed_force <= 0); + sprintf(line,"-read_speed soft_force:%s\n", + xorriso->read_speed_force <= 0 ? + "0" : Xorriso__speedname(xorriso->read_speed_force)); + if(!(is_default && no_defaults)) + Xorriso_status_result(xorriso,filter,fp,flag&2); + is_default= (xorriso->read_speed_corr == 250000); + sprintf(line,"-read_speed soft_corr:%d\n", xorriso->read_speed_corr); if(!(is_default && no_defaults)) Xorriso_status_result(xorriso,filter,fp,flag&2); diff --git a/xorriso/xorriso.1 b/xorriso/xorriso.1 index b925b6d7..079a0057 100644 --- a/xorriso/xorriso.1 +++ b/xorriso/xorriso.1 @@ -9,7 +9,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 "Version 1.5.3, Aug 06, 2020" +.TH XORRISO 1 "Version 1.5.3, Aug 26, 2020" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: @@ -819,9 +819,32 @@ or high. Therefore "min" cannot become higher than 1x speed of the involved medium type. Read speed "max" cannot become lower than 52xCD, 24xDVD, or 20xBD, depending on the medium type. .br -MMC drives usually activate their own idea of speed and take -the speed value given by the burn program only as hint -for their own decision. +MMC drives usually activate their own idea of speed and take the speed value +given by the burn program only as hint for their own decision. Friendly drives +adjust their constant angular velocity so that the desired speed is reached +at the outer rim of the medium. But often there is only the choice between +very slow and very loud. +.br +Sometimes no speed setting is obeyed at all, but speed is adjusted to the +demand frequency of the reading program. So xorriso offers to set an additional +software enforced limit by prefix "soft_force:". The program will take care +not to read faster than the soft_force speed. +This may be combined with setting the drive speed to a higher value. +Setting "soft_force:0" disables this feature. +.br +"soft_force:" tries to correct in subsequent waiting periods lost or surplus +time of up to 0.25 seconds. This smoothens the overall data stream but also +enables short times of higher speed to compensate short times of low speed. +Prefix "soft_corr:" sets this hindsight span by giving a number of +microseconds. Not more than 1 billion = 1000 seconds. +Very short times can cause speed deviations, because systematic inaccuracies of +the waiting function cannot be compensated. +.br +Examples (combinable): +.br + \-read_speed 6xBD +.br + \-read_speed soft_force:4xBD \-read_speed soft_corr:100000 .TP \fB\-load\fR entity id Load a particular (possibly outdated) ISO session from \-dev or \-indev. diff --git a/xorriso/xorriso.info b/xorriso/xorriso.info index a222c9d7..3ecd7ed1 100644 --- a/xorriso/xorriso.info +++ b/xorriso/xorriso.info @@ -753,7 +753,28 @@ activate them only after image loading. than 52xCD, 24xDVD, or 20xBD, depending on the medium type. MMC drives usually activate their own idea of speed and take the speed value given by the burn program only as hint for their own - decision. + decision. Friendly drives adjust their constant angular velocity + so that the desired speed is reached at the outer rim of the + medium. But often there is only the choice between very slow and + very loud. + Sometimes no speed setting is obeyed at all, but speed is adjusted + to the demand frequency of the reading program. So xorriso offers + to set an additional software enforced limit by prefix + "soft_force:". The program will take care not to read faster than + the soft_force speed. This may be combined with setting the drive + speed to a higher value. Setting "soft_force:0" disables this + feature. + "soft_force:" tries to correct in subsequent waiting periods lost + or surplus time of up to 0.25 seconds. This smoothens the overall + data stream but also enables short times of higher speed to + compensate short times of low speed. Prefix "soft_corr:" sets this + hindsight span by giving a number of microseconds. Not more than 1 + billion = 1000 seconds. Very short times can cause speed + deviations, because systematic inaccuracies of the waiting function + cannot be compensated. + Examples (combinable): + -read_speed 6xBD + -read_speed soft_force:4xBD -read_speed soft_corr:100000 -load entity id Load a particular (possibly outdated) ISO session from -dev or -indev. Usually all available sessions are shown with command @@ -5374,7 +5395,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * # starts a comment line: Scripting. (line 156) * -abort_on controls abort on error: Exception. (line 27) * -abstract_file sets abstract file name: SetWrite. (line 250) -* -acl controls handling of ACLs: Loading. (line 144) +* -acl controls handling of ACLs: Loading. (line 165) * -add inserts one or more paths: Insert. (line 44) * -add_plainly inserts one or more paths: Insert. (line 68) * -alter_date sets timestamps in ISO image: Manip. (line 139) @@ -5384,14 +5405,14 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -application_id sets application id: SetWrite. (line 197) * -application_use sets application use field: SetWrite. (line 272) * -as emulates mkisofs or cdrecord: Emulation. (line 13) -* -assert_volid rejects undesired images: Loading. (line 84) -* -auto_charset learns character set from image: Loading. (line 96) +* -assert_volid rejects undesired images: Loading. (line 105) +* -auto_charset learns character set from image: Loading. (line 117) * -backslash_codes enables backslash conversion: Scripting. (line 71) -* -ban_stdio_write demands real drive: Loading. (line 316) +* -ban_stdio_write demands real drive: Loading. (line 337) * -biblio_file sets biblio file name: SetWrite. (line 256) * -blank erases media: Writing. (line 57) * -boot_image controls bootability: Bootable. (line 75) -* -calm_drive reduces drive activity: Loading. (line 306) +* -calm_drive reduces drive activity: Loading. (line 327) * -cd sets working directory in ISO: Navigate. (line 7) * -cdx sets working directory on disk: Navigate. (line 15) * -changes_pending overrides change status: Writing. (line 12) @@ -5425,15 +5446,15 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -cp_rx copies file trees to disk: Restore. (line 110) * -cp_rx copies file trees to disk <1>: Restore. (line 118) * -cut_out inserts piece of data file: Insert. (line 139) -* -data_cache_size adjusts read cache size: Loading. (line 332) +* -data_cache_size adjusts read cache size: Loading. (line 353) * -dev acquires one drive for input and output: AqDrive. (line 12) * -devices gets list of drives: Inquiry. (line 7) * -device_links gets list of drives: Inquiry. (line 17) * -dialog enables dialog mode: DialogCtl. (line 7) -* -disk_dev_ino fast incremental backup: Loading. (line 226) +* -disk_dev_ino fast incremental backup: Loading. (line 247) * -disk_pattern controls pattern expansion: Insert. (line 34) * -displacement compensate altered image start address: Loading. - (line 57) + (line 78) * -drive_access control device file locking: AqDrive. (line 72) * -drive_class controls drive accessability: AqDrive. (line 43) * -du show directory size in ISO image: Navigate. (line 78) @@ -5442,8 +5463,8 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -dusx show directory size on disk: Navigate. (line 88) * -dux show directory size on disk: Navigate. (line 84) * -dvd_obs set write block size: SetWrite. (line 336) -* -early_stdio_test classifies stdio drives: Loading. (line 320) -* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 208) +* -early_stdio_test classifies stdio drives: Loading. (line 341) +* -ecma119_map names w/o Rock Ridge, Joliet: Loading. (line 229) * -eject ejects drive tray: Writing. (line 50) * -end writes pending session and ends program: Scripting. (line 151) * -errfile_log logs problematic disk files: Scripting. (line 116) @@ -5454,13 +5475,13 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -extract_cut copies file piece to disk: Restore. (line 87) * -extract_l copies files to disk: Restore. (line 83) * -extract_single copies file to disk: Restore. (line 80) -* -file_name_limit curbs length of file names: Loading. (line 246) +* -file_name_limit curbs length of file names: Loading. (line 267) * -file_size_limit limits data file size: SetInsert. (line 7) * -find traverses and alters ISO tree: CmdFind. (line 7) * -findx traverses disk tree: Navigate. (line 91) * -follow softlinks and mount points: SetInsert. (line 69) * -format formats media: Writing. (line 87) -* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 194) +* -for_backup -acl,-xattr,-hardlinks,-md5: Loading. (line 215) * -fs sets size of fifo: SetWrite. (line 402) * -getfacl shows ACL in ISO image: Navigate. (line 60) * -getfacl_r shows ACL in ISO image: Navigate. (line 66) @@ -5468,15 +5489,15 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -getfattr_r shows xattr in ISO image: Navigate. (line 75) * -gid sets global ownership: SetWrite. (line 293) * -grow_blindly overrides next writeable address: AqDrive. (line 112) -* -hardlinks controls handling of hard links: Loading. (line 107) +* -hardlinks controls handling of hard links: Loading. (line 128) * -help prints help text: Scripting. (line 19) * -hfsplus enables production of HFS+ partition: SetWrite. (line 14) * -hide excludes file names from directory trees: Manip. (line 177) * -history brings text into readline history: Scripting. (line 42) * -indev acquires a drive for input: AqDrive. (line 23) -* -in_charset sets input character set: Loading. (line 91) +* -in_charset sets input character set: Loading. (line 112) * -iso_nowtime fixed "now" time for ISO 9660 objects: Loading. - (line 220) + (line 241) * -iso_rr_pattern controls pattern expansion: Manip. (line 10) * -jigdo clears JTE or or adds parameter to JTE: Jigdo. (line 37) * -joliet enables production of Joliet tree: SetWrite. (line 10) @@ -5489,7 +5510,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -list_profiles lists supported media: Writing. (line 163) * -list_speeds lists available write speeds: Writing. (line 139) * -lns creates ISO symbolic link: Insert. (line 181) -* -load addresses a particular session as input: Loading. (line 33) +* -load addresses a particular session as input: Loading. (line 54) * -local_charset sets terminal character set: Charset. (line 57) * -logfile logs output channels to file: Frontend. (line 19) * -ls lists files in ISO image: Navigate. (line 24) @@ -5504,7 +5525,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -map_l inserts paths from disk file: Insert. (line 96) * -map_single inserts path: Insert. (line 93) * -mark sets synchronizing message: Frontend. (line 23) -* -md5 controls handling of MD5 sums: Loading. (line 163) +* -md5 controls handling of MD5 sums: Loading. (line 184) * -mkdir creates ISO directory: Insert. (line 177) * -modesty_on_drive keep drive buffer hungry: SetWrite. (line 342) * -mount issues mount command for ISO session: Restore. (line 153) @@ -5545,7 +5566,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -pwdx tells working directory on disk: Navigate. (line 21) * -quoted_not_list sets exclusions: SetInsert. (line 66) * -quoted_path_list inserts paths from disk file: Insert. (line 85) -* -read_fs filesystem type for image loading: Loading. (line 75) +* -read_fs filesystem type for image loading: Loading. (line 96) * -read_mkisofsrc searches and reads .mkisofsrc file: Emulation. (line 155) * -read_speed set read speed: Loading. (line 11) @@ -5561,7 +5582,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top (line 57) * -rollback discards pending changes: Writing. (line 9) * -rollback_end ends program without writing: Scripting. (line 154) -* -rom_toc_scan searches for sessions: Loading. (line 278) +* -rom_toc_scan searches for sessions: Loading. (line 299) * -rr_reloc_dir sets name of relocation directory: SetWrite. (line 150) * -scdbackup_tag enables scdbackup checksum tag: Emulation. (line 179) * -scsi_dev_family choose Linux device file type: AqDrive. (line 95) @@ -5609,7 +5630,7 @@ File: xorriso.info, Node: CommandIdx, Next: ConceptIdx, Prev: Legal, Up: Top * -volume_date sets volume timestamp: SetWrite. (line 211) * -write_type chooses TAO or SAO/DAO: SetWrite. (line 423) * -x enables automatic execution order of arguments: ArgSort. (line 16) -* -xattr controls handling of xattr (EA): Loading. (line 151) +* -xattr controls handling of xattr (EA): Loading. (line 172) * -zisofs controls zisofs production: SetWrite. (line 296)  @@ -5621,7 +5642,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top [index] * Menu: -* ACL, control handling, -acl: Loading. (line 144) +* ACL, control handling, -acl: Loading. (line 165) * ACL, set in ISO image, -setfacl: Manip. (line 68) * ACL, set in ISO image, -setfacl_list: Manip. (line 94) * ACL, set in ISO image, -setfacl_r: Manip. (line 92) @@ -5636,8 +5657,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Appended partition, in MBR or GPT: Bootable. (line 282) * Automatic execution order, of arguments, -x: ArgSort. (line 16) * Backslash Interpretation, _definition: Processing. (line 53) -* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 226) -* Backup, enable features, -for_backup: Loading. (line 194) +* Backup, enable fast incremental, -disk_dev_ino: Loading. (line 247) +* Backup, enable features, -for_backup: Loading. (line 215) * Backup, scdbackup checksum tag, -scdbackup: Emulation. (line 179) * Blank media, _definition: Media. (line 29) * Blank, format, Immed bit, -use_immed_bit: SetWrite. (line 380) @@ -5645,10 +5666,10 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Bootability, control, -boot_image: Bootable. (line 75) * Bugs, reporting: Bugreport. (line 6) * cdrecord, Emulation: Emulation. (line 120) -* Character Set, for input, -in_charset: Loading. (line 91) +* Character Set, for input, -in_charset: Loading. (line 112) * Character Set, for input/output, -charset: Charset. (line 54) * Character Set, for output, -out_charset: SetWrite. (line 285) -* Character set, learn from image, -auto_charset: Loading. (line 96) +* Character set, learn from image, -auto_charset: Loading. (line 117) * Character Set, of terminal, -local_charset: Charset. (line 57) * Character Set, _definition: Charset. (line 6) * CHRP partition, _definition: Bootable. (line 294) @@ -5676,8 +5697,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Directory, delete, -rmdir: Manip. (line 29) * disk_path, _definition: Insert. (line 6) * Drive, accessability, -drive_class: AqDrive. (line 43) -* Drive, classify stdio, -early_stdio_test: Loading. (line 320) -* Drive, demand real MMC, -ban_stdio_write: Loading. (line 316) +* Drive, classify stdio, -early_stdio_test: Loading. (line 341) +* Drive, demand real MMC, -ban_stdio_write: Loading. (line 337) * Drive, eject tray, -eject: Writing. (line 50) * Drive, for input and output, -dev: AqDrive. (line 12) * Drive, for input, -indev: AqDrive. (line 23) @@ -5685,7 +5706,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Drive, get drive list, -devices: Inquiry. (line 7) * Drive, get drive list, -device_links: Inquiry. (line 17) * Drive, list supported media, -list_profiles: Writing. (line 163) -* Drive, reduce activity, -calm_drive: Loading. (line 306) +* Drive, reduce activity, -calm_drive: Loading. (line 327) * Drive, report SCSI commands, -scsi_log: Scripting. (line 143) * Drive, write and eject, -commit_eject: Writing. (line 53) * Drive, _definition: Drives. (line 6) @@ -5701,8 +5722,8 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Examples: Examples. (line 6) * extattr, _definition: Extras. (line 66) * File content, copy, -concat: Restore. (line 125) -* File names, curb length, -file_name_limit: Loading. (line 246) -* File names, if neither Rock Ridge nor Joliet: Loading. (line 208) +* File names, curb length, -file_name_limit: Loading. (line 267) +* File names, if neither Rock Ridge nor Joliet: Loading. (line 229) * Filter, apply to file tree, -set_filter_r: Filter. (line 84) * Filter, apply to file, -set_filter: Filter. (line 58) * Filter, ban registration, -close_filter_list: Filter. (line 50) @@ -5720,15 +5741,15 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Group, in ISO image, -chgrp: Manip. (line 49) * Group, in ISO image, -chgrp_r: Manip. (line 53) * Growing, _definition: Methods. (line 20) -* Hard links, control handling, -hardlinks: Loading. (line 107) +* Hard links, control handling, -hardlinks: Loading. (line 128) * HFS+ allocation block size: Bootable. (line 409) * HFS+ serial number: Bootable. (line 406) * hidden, set in ISO image, -hide: Manip. (line 177) * HP-PA boot sector, production: Bootable. (line 381) -* Image reading, cache size, -data_cache_size: Loading. (line 332) -* Image, demand volume ID, -assert_volid: Loading. (line 84) +* Image reading, cache size, -data_cache_size: Loading. (line 353) +* Image, demand volume ID, -assert_volid: Loading. (line 105) * Image, discard pending changes, -rollback: Writing. (line 9) -* Image, filesystem to load, -read_fs: Loading. (line 75) +* Image, filesystem to load, -read_fs: Loading. (line 96) * Image, override change status, -changes_pending: Writing. (line 12) * Image, set abstract file name, -abstract_file: SetWrite. (line 250) * Image, set application id, -application_id: SetWrite. (line 197) @@ -5777,14 +5798,14 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Jigdo Template Extraction, -jigdo: Jigdo. (line 37) * Jigdo Template Extraction, _definition: Jigdo. (line 6) * LBA, _definition: Drives. (line 17) -* libisofs, fixed "now" time: Loading. (line 220) +* libisofs, fixed "now" time: Loading. (line 241) * Linux device type, -scsi_dev_family: AqDrive. (line 95) * List delimiter, _definition: Processing. (line 9) * Local Character Set, _definition: Charset. (line 11) * MBR bootable/active flag, enforce: Bootable. (line 349) * MBR, set, -boot_image system_area=: Bootable. (line 200) * MBR, _definition: Extras. (line 27) -* MD5, control handling, -md5: Loading. (line 163) +* MD5, control handling, -md5: Loading. (line 184) * Media, erase, -blank: Writing. (line 57) * Media, format, -format: Writing. (line 87) * Media, list formats, -list_formats: Writing. (line 128) @@ -5876,20 +5897,20 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Result layout, more shell-like, -sh_style_result: Scripting. (line 61) * Rock Ridge, _definition: Extras. (line 6) -* Session, altered start address, -displacement: Loading. (line 57) +* Session, altered start address, -displacement: Loading. (line 78) * Session, info string, -session_string: Inquiry. (line 74) * Session, issue mount command, -mount: Restore. (line 153) * Session, log when written, -session_log: Scripting. (line 134) * Session, mount command line, -mount_cmd: Inquiry. (line 49) * Session, mount parameters, -mount_opts: Inquiry. (line 65) -* Session, select as input, -load: Loading. (line 33) +* Session, select as input, -load: Loading. (line 54) * Session, _definition: Model. (line 6) * Sorting order, for -x, -list_arg_sorting: ArgSort. (line 26) * SUN Disk Label, production: Bootable. (line 371) * SUN SPARC boot images, activation: Bootable. (line 450) * Symbolic link, create, -lns: Insert. (line 181) * System area, _definition: Bootable. (line 200) -* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 278) +* Table-of-content, search sessions, -rom_toc_scan: Loading. (line 299) * Table-of-content, show, -toc: Inquiry. (line 27) * Timestamps, set in ISO image, -alter_date: Manip. (line 139) * Timestamps, set in ISO image, -alter_date_r: Manip. (line 174) @@ -5923,7 +5944,7 @@ File: xorriso.info, Node: ConceptIdx, Prev: CommandIdx, Up: Top * Write, set speed, -speed: SetWrite. (line 307) * Write, simulation, -dummy: SetWrite. (line 399) * Write, TAO or SAO/DAO, -write_type: SetWrite. (line 423) -* xattr, control handling, -xattr: Loading. (line 151) +* xattr, control handling, -xattr: Loading. (line 172) * xattr, set in ISO image, -setfattr: Manip. (line 103) * xattr, set in ISO image, -setfattr_list: Manip. (line 120) * xattr, set in ISO image, -setfattr_r: Manip. (line 118) @@ -5947,48 +5968,48 @@ Node: Commands25588 Node: ArgSort27265 Node: AqDrive28759 Node: Loading35916 -Node: Insert56034 -Node: SetInsert67537 -Node: Manip76969 -Node: CmdFind87069 -Node: Filter105998 -Node: Writing110620 -Node: SetWrite122875 -Node: Bootable147952 -Node: Jigdo174907 -Node: Charset179910 -Node: Exception183239 -Node: DialogCtl189368 -Node: Inquiry191970 -Node: Navigate200852 -Node: Verify209309 -Node: Restore219780 -Node: Emulation228946 -Node: Scripting239402 -Node: Frontend247185 -Node: Examples256811 -Node: ExDevices257989 -Node: ExCreate258650 -Node: ExDialog259950 -Node: ExGrowing261221 -Node: ExModifying262030 -Node: ExBootable262540 -Node: ExCharset263095 -Node: ExPseudo263991 -Node: ExCdrecord264918 -Node: ExMkisofs265238 -Node: ExGrowisofs267135 -Node: ExException268288 -Node: ExTime268746 -Node: ExIncBackup269204 -Node: ExRestore273230 -Node: ExRecovery274176 -Node: Files274748 -Node: Environ276082 -Node: Seealso276830 -Node: Bugreport277547 -Node: Legal278138 -Node: CommandIdx279150 -Node: ConceptIdx296766 +Node: Insert57303 +Node: SetInsert68806 +Node: Manip78238 +Node: CmdFind88338 +Node: Filter107267 +Node: Writing111889 +Node: SetWrite124144 +Node: Bootable149221 +Node: Jigdo176176 +Node: Charset181179 +Node: Exception184508 +Node: DialogCtl190637 +Node: Inquiry193239 +Node: Navigate202121 +Node: Verify210578 +Node: Restore221049 +Node: Emulation230215 +Node: Scripting240671 +Node: Frontend248454 +Node: Examples258080 +Node: ExDevices259258 +Node: ExCreate259919 +Node: ExDialog261219 +Node: ExGrowing262490 +Node: ExModifying263299 +Node: ExBootable263809 +Node: ExCharset264364 +Node: ExPseudo265260 +Node: ExCdrecord266187 +Node: ExMkisofs266507 +Node: ExGrowisofs268404 +Node: ExException269557 +Node: ExTime270015 +Node: ExIncBackup270473 +Node: ExRestore274499 +Node: ExRecovery275445 +Node: Files276017 +Node: Environ277351 +Node: Seealso278099 +Node: Bugreport278816 +Node: Legal279407 +Node: CommandIdx280419 +Node: ConceptIdx298035  End Tag Table diff --git a/xorriso/xorriso.texi b/xorriso/xorriso.texi index be73660d..2ff4aa09 100644 --- a/xorriso/xorriso.texi +++ b/xorriso/xorriso.texi @@ -50,7 +50,7 @@ @c man .\" First parameter, NAME, should be all caps @c man .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection @c man .\" other parameters are allowed: see man(7), man(1) -@c man .TH XORRISO 1 "Version 1.5.3, Aug 06, 2020" +@c man .TH XORRISO 1 "Version 1.5.3, Aug 26, 2020" @c man .\" Please adjust this date whenever revising the manpage. @c man .\" @c man .\" Some roff macros, for reference: @@ -1047,9 +1047,32 @@ or high. Therefore "min" cannot become higher than 1x speed of the involved medium type. Read speed "max" cannot become lower than 52xCD, 24xDVD, or 20xBD, depending on the medium type. @* -MMC drives usually activate their own idea of speed and take -the speed value given by the burn program only as hint -for their own decision. +MMC drives usually activate their own idea of speed and take the speed value +given by the burn program only as hint for their own decision. Friendly drives +adjust their constant angular velocity so that the desired speed is reached +at the outer rim of the medium. But often there is only the choice between +very slow and very loud. +@* +Sometimes no speed setting is obeyed at all, but speed is adjusted to the +demand frequency of the reading program. So xorriso offers to set an additional +software enforced limit by prefix "soft_force:". The program will take care +not to read faster than the soft_force speed. +This may be combined with setting the drive speed to a higher value. +Setting "soft_force:0" disables this feature. +@* +"soft_force:" tries to correct in subsequent waiting periods lost or surplus +time of up to 0.25 seconds. This smoothens the overall data stream but also +enables short times of higher speed to compensate short times of low speed. +Prefix "soft_corr:" sets this hindsight span by giving a number of +microseconds. Not more than 1 billion = 1000 seconds. +Very short times can cause speed deviations, because systematic inaccuracies of +the waiting function cannot be compensated. +@* +Examples (combinable): +@* + -read_speed 6xBD +@* + -read_speed soft_force:4xBD -read_speed soft_corr:100000 @c man .TP @item -load entity id @kindex -load addresses a particular session as input diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index 1bfb7dc4..64819e9f 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -366,6 +366,9 @@ struct XorrisO { /* the global context of xorriso */ int write_speed; /* Write speed in libburn units : 1000 bytes/second , 0 = Max, -1 = Min, -2= do not set */ int read_speed; /* Read speed. See above */ + int read_speed_force; /* >0 : use burn_nominal_slowdown() in + Xorriso_check_interval() */ + int read_speed_corr; /* parameter max_corr for burn_nominal_slowdown */ int fs; /* fifo size in 2048 byte chunks : at most 1 GB */ int padding; /* number of bytes to add after ISO 9660 image */ diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index d706b247..dc19035f 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2020.08.06.153930" +#define Xorriso_timestamP "2020.08.26.142853"