From d2914eb45da37d6fa7452be7ae8b7508812d87c5 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 27 Feb 2009 21:17:05 +0000 Subject: [PATCH] New stream_recording mode with start number --- libburn/trunk/cdrskin/cdrskin.1 | 4 +++- libburn/trunk/cdrskin/cdrskin.c | 23 ++++++++++++++++------- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin.1 b/libburn/trunk/cdrskin/cdrskin.1 index 926c6b38..1a56034f 100644 --- a/libburn/trunk/cdrskin/cdrskin.1 +++ b/libburn/trunk/cdrskin/cdrskin.1 @@ -1186,13 +1186,15 @@ Use and report literal Bus,Target,Lun addresses rather than real SCSI and pseudo ATA addresses. This method is outdated and was never compatible with original cdrecord. .TP -.BI stream_recording="on"|"off" +.BI stream_recording="on"|"off"|number By setting "on" request that compliance to the desired speed setting is preferred over management of write errors. With DVD-RAM and BD this can bring effective write speed near to the nominal write speed of the media. But it will also disable the automatic use of replacement blocks if write errors occur. It might as well be disliked or ignored by the drive. .br +If a number is given, then error management stays enabled for all byte +addresses below that number. Any number below 16s is the same as "off". .SH EXAMPLES .SS .B Get an overview of drives and their addresses: diff --git a/libburn/trunk/cdrskin/cdrskin.c b/libburn/trunk/cdrskin/cdrskin.c index cdda201f..fd50bbf0 100644 --- a/libburn/trunk/cdrskin/cdrskin.c +++ b/libburn/trunk/cdrskin/cdrskin.c @@ -2692,10 +2692,13 @@ set_dev:; " --single_track accept only last argument as source_address\n"); #ifdef Cdrskin_libburn_has_stream_recordinG + printf(" stream_recording=\"on\"|\"off\"|number\n"); printf( - " stream_recording=\"on\"|\"off\" \"on\" requests to prefer speed\n"); + " \"on\" requests to prefer speed over write\n"); printf( - " over write error management.\n"); + " error management. A number prevents this with\n"); + printf( + " byte addresses below that number.\n"); #endif #ifdef Cdrskin_allow_libburn_taO @@ -3120,7 +3123,7 @@ struct CdrskiN { int gracetime; int dummy_mode; int force_is_set; - int stream_recording_is_set; + int stream_recording_is_set; /* see burn_write_opts_set_stream_recording() */ int single_track; int prodvd_cli_compatible; @@ -6466,7 +6469,7 @@ burn_failed:; burn_write_opts_set_force(o, !!skin->force_is_set); #endif #ifdef Cdrskin_libburn_has_stream_recordinG - burn_write_opts_set_stream_recording(o, !!skin->stream_recording_is_set); + burn_write_opts_set_stream_recording(o, skin->stream_recording_is_set); #endif if(skin->dummy_mode) { @@ -6988,7 +6991,7 @@ sorry_failed_to_eject:; int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag) { int i,k,l,ret,source_has_size=0, idx= -1; - double value,grab_and_wait_value= -1.0; + double value,grab_and_wait_value= -1.0, num; char *cpt,*value_pt,adr[Cdrskin_adrleN],*blank_mode= ""; struct stat stbuf; @@ -7725,9 +7728,15 @@ set_speed:; set_stream_recording:; if(strcmp(value_pt, "on")==0) skin->stream_recording_is_set= 1; - else + else if(value_pt[0] >= '0' && value_pt[0] <= '9') { + num= Scanf_io_size(value_pt, 0); + num/= 2048.0; + if(num >= 16 && num <= 0x7FFFFFFF) + skin->stream_recording_is_set= num; + else + skin->stream_recording_is_set= 0; + } else skin->stream_recording_is_set= 0; - } else if(strcmp(argv[i],"-swab")==0) { skin->swap_audio_bytes= 0; diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index 05b2db92..bb486832 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2009.02.27.143100" +#define Cdrskin_timestamP "2009.02.27.211707"