New -stream_recording mode with start address, "on" is now 32s
This commit is contained in:
@ -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),
|
||||
|
Reference in New Issue
Block a user