New API burn_write_opts_set_multi(). (But libburn cannot burn next session yet)

This commit is contained in:
Thomas Schmitt 2006-11-06 11:42:21 +00:00
parent b96fbd5bd8
commit d7c34f05e4
5 changed files with 48 additions and 6 deletions

View File

@ -194,6 +194,7 @@ or
/* put macros under test caveat here */ /* put macros under test caveat here */
#define Cdrskin_allow_libburn_taO 1 #define Cdrskin_allow_libburn_taO 1
#define Cdrskin_libburn_has_multI 1
#endif #endif
@ -2275,6 +2276,7 @@ struct CdrskiN {
/** The write mode (like SAO or RAW96/R). See libburn. */ /** The write mode (like SAO or RAW96/R). See libburn. */
enum burn_write_types write_type; enum burn_write_types write_type;
int block_type; int block_type;
int multi;
int do_eject; int do_eject;
char eject_device[Cdrskin_strleN]; char eject_device[Cdrskin_strleN];
@ -2388,6 +2390,7 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
strcpy(o->write_mode_name,"SAO"); strcpy(o->write_mode_name,"SAO");
o->write_type= BURN_WRITE_SAO; o->write_type= BURN_WRITE_SAO;
o->block_type= BURN_BLOCK_SAO; o->block_type= BURN_BLOCK_SAO;
o->multi= 0;
o->burnfree= 0; o->burnfree= 0;
o->do_eject= 0; o->do_eject= 0;
o->eject_device[0]= 0; o->eject_device[0]= 0;
@ -3327,7 +3330,11 @@ int Cdrskin_checkdrive(struct CdrskiN *skin, int flag)
printf("Identifikation : '%s'\n",drive_info->product); printf("Identifikation : '%s'\n",drive_info->product);
printf("Revision : '%s'\n",drive_info->revision); printf("Revision : '%s'\n",drive_info->revision);
printf("Driver flags : %s\n","BURNFREE"); printf("Driver flags : %s\n","BURNFREE");
#ifdef Cdrskin_allow_libburn_taO
printf("Supported modes: %s\n","TAO SAO RAW/R96R");
#else
printf("Supported modes: %s\n","SAO RAW/R96R"); printf("Supported modes: %s\n","SAO RAW/R96R");
#endif
ret= 1; ret= 1;
ex:; ex:;
return(ret); return(ret);
@ -4093,6 +4100,13 @@ int Cdrskin_burn(struct CdrskiN *skin, int flag)
o= burn_write_opts_new(drive); o= burn_write_opts_new(drive);
burn_write_opts_set_perform_opc(o, 0); burn_write_opts_set_perform_opc(o, 0);
#ifdef Cdrskin_libburn_has_multI
if(skin->multi)
fprintf(stderr,
"cdrskin: NOTE : Option -multi set. Media will be appendable.\n");
burn_write_opts_set_multi(o,skin->multi);
#endif
burn_write_opts_set_write_type(o,skin->write_type,skin->block_type); burn_write_opts_set_write_type(o,skin->write_type,skin->block_type);
if(skin->dummy_mode) { if(skin->dummy_mode) {
fprintf(stderr, fprintf(stderr,
@ -4399,7 +4413,7 @@ int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
static char ignored_full_options[][41]= { static char ignored_full_options[][41]= {
"-d", "-Verbose", "-V", "-silent", "-s", "-setdropts", "-prcap", "-inq", "-d", "-Verbose", "-V", "-silent", "-s", "-setdropts", "-prcap", "-inq",
"-reset", "-abort", "-overburn", "-ignsize", "-useinfo", "-format", "-load", "-reset", "-abort", "-overburn", "-ignsize", "-useinfo", "-format", "-load",
"-lock", "-msinfo", "-multi", "-fix", "-nofix", "-waiti", "-lock", "-msinfo", "-fix", "-nofix", "-waiti",
"-immed", "-force", "-raw", "-raw96p", "-raw16", "-immed", "-force", "-raw", "-raw96p", "-raw16",
"-clone", "-text", "-mode2", "-xa", "-xa1", "-xa2", "-xamix", "-clone", "-text", "-mode2", "-xa", "-xa1", "-xa2", "-xamix",
"-cdi", "-isosize", "-preemp", "-nopreemp", "-copy", "-nocopy", "-cdi", "-isosize", "-preemp", "-nopreemp", "-copy", "-nocopy",
@ -4707,6 +4721,13 @@ gracetime_equals:;
} else if(strcmp(argv[i],"--ignore_signals")==0) { } else if(strcmp(argv[i],"--ignore_signals")==0) {
/* is handled in Cdrpreskin_setup() */; /* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argv[i],"-multi")==0) {
#ifdef Cdrskin_libburn_has_multI
skin->multi= 1;
#else
fprintf(stderr,"cdrskin: SORRY : Option -multi is not available yet.\n");
#endif
} else if(strcmp(argv[i],"--no_abort_handler")==0) { } else if(strcmp(argv[i],"--no_abort_handler")==0) {
/* is handled in Cdrpreskin_setup() */; /* is handled in Cdrpreskin_setup() */;
@ -4716,9 +4737,6 @@ gracetime_equals:;
} else if(strcmp(argv[i],"--no_convert_fs_adr")==0) { } else if(strcmp(argv[i],"--no_convert_fs_adr")==0) {
/* is handled in Cdrpreskin_setup() */; /* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argv[i],"--old_pseudo_scsi_adr")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argv[i],"--no_rc")==0) { } else if(strcmp(argv[i],"--no_rc")==0) {
/* is handled in Cdrpreskin_setup() */; /* is handled in Cdrpreskin_setup() */;
@ -4727,6 +4745,9 @@ gracetime_equals:;
if(skin->verbosity>=Cdrskin_verbose_cmD) if(skin->verbosity>=Cdrskin_verbose_cmD)
printf("cdrskin: padding : off\n"); printf("cdrskin: padding : off\n");
} else if(strcmp(argv[i],"--old_pseudo_scsi_adr")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argv[i],"-pad")==0) { } else if(strcmp(argv[i],"-pad")==0) {
skin->padding= 15*2048; skin->padding= 15*2048;
skin->set_by_padsize= 0; skin->set_by_padsize= 0;

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.11.06.073810" #define Cdrskin_timestamP "2006.11.06.114159"

View File

@ -1004,6 +1004,15 @@ void burn_write_opts_set_has_mediacatalog(struct burn_write_opts *opts, int has_
void burn_write_opts_set_mediacatalog(struct burn_write_opts *opts, unsigned char mediacatalog[13]); void burn_write_opts_set_mediacatalog(struct burn_write_opts *opts, unsigned char mediacatalog[13]);
/* ts A61106 */
/* Sets the multi flag which eventually marks the emerging session as not being
the last one and thus creating a BURN_DISC_APPENDABLE media.
@param multi 1=media will be appendable, 0=media will be closed (default)
*/
void burn_write_opts_set_multi(struct burn_write_opts *opts, int multi);
/** Sets whether to read in raw mode or not /** Sets whether to read in raw mode or not
@param opts The read opts to change @param opts The read opts to change
@param raw_mode If non-zero, reading will be done in raw mode, so that everything in the data tracks on the @param raw_mode If non-zero, reading will be done in raw mode, so that everything in the data tracks on the

View File

@ -152,6 +152,14 @@ void burn_write_opts_set_mediacatalog(struct burn_write_opts *opts,
memcpy(opts->mediacatalog, &mediacatalog, 13); memcpy(opts->mediacatalog, &mediacatalog, 13);
} }
/* ts A61106 */
void burn_write_opts_set_multi(struct burn_write_opts *opts, int multi)
{
opts->multi = !!multi;
}
void burn_read_opts_set_raw(struct burn_read_opts *opts, int raw) void burn_read_opts_set_raw(struct burn_read_opts *opts, int raw)
{ {
opts->raw = raw; opts->raw = raw;
@ -198,3 +206,4 @@ void burn_read_opts_set_hardware_error_retries(struct burn_read_opts *opts,
{ {
opts->hardware_error_retries = hardware_error_retries; opts->hardware_error_retries = hardware_error_retries;
} }

View File

@ -319,7 +319,10 @@ void spc_select_write_params(struct burn_drive *d,
c.page->data[10] = (bufe << 6) c.page->data[10] = (bufe << 6)
+ (sim << 4) + (sim << 4)
+ o->write_type; + o->write_type;
c.page->data[11] = (o->multi << 6) | o->control;
/* ts A61106 : MMC-1 table 110 : multi==0 or multi==3 */
c.page->data[11] = ((3 * !!o->multi) << 6) | o->control;
c.page->data[12] = spc_block_type(o->block_type); c.page->data[12] = spc_block_type(o->block_type);
/* ts A61104 */ /* ts A61104 */