Implemented options -scms -copy -nocopy -preemp -nopreemp

This commit is contained in:
Thomas Schmitt 2012-01-01 12:55:41 +00:00
parent 0c3fa9b341
commit e5742f724a
3 changed files with 65 additions and 10 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 CDRSKIN 1 "Dec 30, 2011" .TH CDRSKIN 1 "Jan 01, 2012"
.\" 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:
@ -498,6 +498,9 @@ Print this list of blanking types.
Retrieve some info about the addressed drive and then exit. Retrieve some info about the addressed drive and then exit.
Exits with non-zero value if the drive cannot be found and opened. Exits with non-zero value if the drive cannot be found and opened.
.TP .TP
.BI \-copy
Subsequent tracks get permission for an unlimited number of copies.
.TP
.BI cuefile= path .BI cuefile= path
Read a session description from a cue sheet file in CDRWIN format. Read a session description from a cue sheet file in CDRWIN format.
Base the tracks on a single file which is given in the sheet by command FILE. Base the tracks on a single file which is given in the sheet by command FILE.
@ -718,11 +721,19 @@ for lifting the ban on -multi.
.br .br
Note: -multi might make DVD media unreadable in some DVD-ROM drives. Note: -multi might make DVD media unreadable in some DVD-ROM drives.
.TP .TP
.BI \-nocopy
Subsequent tracks get permission for a single level of copies. I.e. those
copies would then be marked by -scms as offering no permission for further
copies.
.TP
.BI \-nopad .BI \-nopad
Do not add trailing zeros to the data stream. Nevertheless, since there seems Do not add trailing zeros to the data stream. Nevertheless, since there seems
to be no use for audio tracks with incomplete last sector, this option applies to be no use for audio tracks with incomplete last sector, this option applies
only to data tracks. There it is default. only to data tracks. There it is default.
.TP .TP
.BI \-nopreemp
Subsequent tracks get marked as having been mastered without pre-emphasis.
.TP
.BI \-pad .BI \-pad
Add 30 kiB of trailing zeros to each data track. (This is not sufficient to Add 30 kiB of trailing zeros to each data track. (This is not sufficient to
avoid problems with various CD-ROM read drivers.) avoid problems with various CD-ROM read drivers.)
@ -732,6 +743,9 @@ Add the given amount of trailing zeros to the next data track. This option
gets reset to padsize=0 after that next track is written. It may be set gets reset to padsize=0 after that next track is written. It may be set
again before the next track argument. About size specifiers, see option fs=. again before the next track argument. About size specifiers, see option fs=.
.TP .TP
.BI \-preemp
Subsequent tracks get marked as having been mastered with pre-emphasis.
.TP
.BI \-sao .BI \-sao
Write CD in Session At Once mode or sequential DVD-R[W] in Disc-at-once Write CD in Session At Once mode or sequential DVD-R[W] in Disc-at-once
(DAO) mode. (DAO) mode.
@ -764,6 +778,14 @@ The useful fields in a result line are:
.br .br
Bus,Target,Lun Number) 'Vendor' 'Mode' 'Revision' Bus,Target,Lun Number) 'Vendor' 'Mode' 'Revision'
.TP .TP
.BI \-scms
Subsequent tracks get no permission for being copied. This is usually done
for tracks which are copies of tracks that were marked with -nocopy (but not
yet with -scms). So copies of copies are prohibited.
.br
This option gets reset by option -copy. So the combination -copy -nocopy means
-nocopy surely without -scms.
.TP
.BI speed= number .BI speed= number
Set speed of drive. With data CD, 1x speed corresponds to a throughput of Set speed of drive. With data CD, 1x speed corresponds to a throughput of
150,000 bytes/second. With DVD, 1x = 1,385,000 bytes/second. 150,000 bytes/second. With DVD, 1x = 1,385,000 bytes/second.

View File

@ -1,6 +1,6 @@
/* /*
cdrskin.c , Copyright 2006-2011 Thomas Schmitt <scdbackup@gmx.net> cdrskin.c , Copyright 2006-2012 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later. Provided under GPL version 2 or later.
A cdrecord compatible command line interface for libburn. A cdrecord compatible command line interface for libburn.
@ -862,6 +862,7 @@ struct CdrtracK {
int set_by_padsize; int set_by_padsize;
int sector_pad_up; /* enforce single sector padding */ int sector_pad_up; /* enforce single sector padding */
int track_type; int track_type;
int mode_modifiers;
double sector_size; double sector_size;
int track_type_by_default; int track_type_by_default;
int swap_audio_bytes; int swap_audio_bytes;
@ -928,7 +929,8 @@ int Cdrtrack_new(struct CdrtracK **track, struct CdrskiN *boss,
int *use_data_image_size, int *use_data_image_size,
double *padding, int *set_by_padsize, double *padding, int *set_by_padsize,
int *track_type, int *track_type_by_default, int *track_type, int *track_type_by_default,
int *swap_audio_bytes, int *cdxa_conversion, int flag); int *mode_mods, int *swap_audio_bytes,
int *cdxa_conversion, int flag);
int Cdrskin_get_fifo_par(struct CdrskiN *skin, int *fifo_enabled, int Cdrskin_get_fifo_par(struct CdrskiN *skin, int *fifo_enabled,
int *fifo_size, int *fifo_start_at, int flag); int *fifo_size, int *fifo_start_at, int flag);
@ -947,6 +949,7 @@ int Cdrtrack_new(struct CdrtracK **track, struct CdrskiN *boss,
o->set_by_padsize= 0; o->set_by_padsize= 0;
o->sector_pad_up= 1; o->sector_pad_up= 1;
o->track_type= BURN_MODE1; o->track_type= BURN_MODE1;
o->mode_modifiers= 0;
o->sector_size= 2048.0; o->sector_size= 2048.0;
o->track_type_by_default= 1; o->track_type_by_default= 1;
o->swap_audio_bytes= 0; o->swap_audio_bytes= 0;
@ -974,8 +977,8 @@ int Cdrtrack_new(struct CdrtracK **track, struct CdrskiN *boss,
ret= Cdrskin_get_source(boss,o->source_path,&(o->fixed_size), ret= Cdrskin_get_source(boss,o->source_path,&(o->fixed_size),
&(o->tao_to_sao_tsize),&(o->use_data_image_size), &(o->tao_to_sao_tsize),&(o->use_data_image_size),
&(o->padding),&(o->set_by_padsize),&(skin_track_type), &(o->padding),&(o->set_by_padsize),&(skin_track_type),
&(o->track_type_by_default),&(o->swap_audio_bytes), &(o->track_type_by_default), &(o->mode_modifiers),
&(o->cdxa_conversion), 0); &(o->swap_audio_bytes), &(o->cdxa_conversion), 0);
if(ret<=0) if(ret<=0)
goto failed; goto failed;
strcpy(o->original_source_path,o->source_path); strcpy(o->original_source_path,o->source_path);
@ -1671,7 +1674,7 @@ int Cdrtrack_add_to_session(struct CdrtracK *track, int trackno,
} }
} }
burn_track_define_data(tr,0,(int) lib_padding,sector_pad_up, burn_track_define_data(tr,0,(int) lib_padding,sector_pad_up,
track->track_type); track->track_type | track->mode_modifiers);
burn_track_set_default_size(tr, (off_t) track->tao_to_sao_tsize); burn_track_set_default_size(tr, (off_t) track->tao_to_sao_tsize);
burn_track_set_byte_swap(tr, burn_track_set_byte_swap(tr,
(track->track_type==BURN_AUDIO && track->swap_audio_bytes)); (track->track_type==BURN_AUDIO && track->swap_audio_bytes));
@ -2923,6 +2926,11 @@ see_cdrskin_eng_html:;
"\t-xa1\t\tSubsequent tracks are CD-ROM XA mode 2 form 1 - 2056 bytes\n"); "\t-xa1\t\tSubsequent tracks are CD-ROM XA mode 2 form 1 - 2056 bytes\n");
fprintf(stderr, fprintf(stderr,
"\t-isosize\tUse iso9660 file system size for next data track\n"); "\t-isosize\tUse iso9660 file system size for next data track\n");
fprintf(stderr,"\t-preemp\t\tAudio tracks are mastered with 50/15 microseconds preemphasis\n");
fprintf(stderr,"\t-nopreemp\tAudio tracks are mastered with no preemphasis (default)\n");
fprintf(stderr,"\t-copy\t\tAudio tracks have unlimited copy permission\n");
fprintf(stderr,"\t-nocopy\t\tAudio tracks may only be copied once for personal use (default)\n");
fprintf(stderr,"\t-scms\t\tAudio tracks will not have any copy permission at all\n");
fprintf(stderr,"\t-pad\t\tpadsize=30k\n"); fprintf(stderr,"\t-pad\t\tpadsize=30k\n");
fprintf(stderr, fprintf(stderr,
"\t-nopad\t\tDo not pad (default, but applies only to data tracks)\n"); "\t-nopad\t\tDo not pad (default, but applies only to data tracks)\n");
@ -3336,6 +3344,7 @@ struct CdrskiN {
int track_type; int track_type;
int track_type_by_default; /* 0= explicit, 1=not set, 2=by file extension */ int track_type_by_default; /* 0= explicit, 1=not set, 2=by file extension */
int swap_audio_bytes; int swap_audio_bytes;
int track_modemods;
/** CDRWIN cue sheet file */ /** CDRWIN cue sheet file */
char cuefile[Cdrskin_adrleN]; char cuefile[Cdrskin_adrleN];
@ -3354,7 +3363,6 @@ struct CdrskiN {
char mcn[14]; char mcn[14];
char next_isrc[13]; char next_isrc[13];
/** The list of tracks with their data sources and parameters */ /** The list of tracks with their data sources and parameters */
struct CdrtracK *tracklist[Cdrskin_track_maX]; struct CdrtracK *tracklist[Cdrskin_track_maX];
int track_counter; int track_counter;
@ -3516,6 +3524,7 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
o->cdtext_test= 0; o->cdtext_test= 0;
o->mcn[0]= 0; o->mcn[0]= 0;
o->next_isrc[0]= 0; o->next_isrc[0]= 0;
o->track_modemods= 0;
o->track_type_by_default= 1; o->track_type_by_default= 1;
for(i=0;i<Cdrskin_track_maX;i++) for(i=0;i<Cdrskin_track_maX;i++)
o->tracklist[i]= NULL; o->tracklist[i]= NULL;
@ -3625,6 +3634,7 @@ int Cdrskin_get_source(struct CdrskiN *skin, char *source_path,
int *use_data_image_size, int *use_data_image_size,
double *padding, int *set_by_padsize, double *padding, int *set_by_padsize,
int *track_type, int *track_type_by_default, int *track_type, int *track_type_by_default,
int *mode_mods,
int *swap_audio_bytes, int *cdxa_conversion, int flag) int *swap_audio_bytes, int *cdxa_conversion, int flag)
{ {
strcpy(source_path,skin->source_path); strcpy(source_path,skin->source_path);
@ -3635,6 +3645,7 @@ int Cdrskin_get_source(struct CdrskiN *skin, char *source_path,
*set_by_padsize= skin->set_by_padsize; *set_by_padsize= skin->set_by_padsize;
*track_type= skin->track_type; *track_type= skin->track_type;
*track_type_by_default= skin->track_type_by_default; *track_type_by_default= skin->track_type_by_default;
*mode_mods= skin->track_modemods;
*swap_audio_bytes= skin->swap_audio_bytes; *swap_audio_bytes= skin->swap_audio_bytes;
*cdxa_conversion= skin->cdxa_conversion; *cdxa_conversion= skin->cdxa_conversion;
return(1); return(1);
@ -7309,8 +7320,8 @@ int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
"-fix", "-nofix", "-fix", "-nofix",
"-raw", "-raw96p", "-raw16", "-raw96r", "-raw", "-raw96p", "-raw16", "-raw96r",
"-clone", "-clone",
"-cdi", "-preemp", "-nopreemp", "-copy", "-nocopy", "-cdi",
"-scms", "-shorttrack", "-noshorttrack", "-packet", "-noclose", "-shorttrack", "-noshorttrack", "-packet", "-noclose",
"" ""
}; };
@ -7550,6 +7561,10 @@ unsupported_blank_option:;
} else if(strcmp(argv[i],"-checkdrive")==0) { } else if(strcmp(argv[i],"-checkdrive")==0) {
skin->do_checkdrive= 1; skin->do_checkdrive= 1;
} else if(strcmp(argv[i],"-copy")==0) {
skin->track_modemods|= BURN_COPY;
skin->track_modemods&= ~BURN_SCMS;
} else if(strncmp(argv[i],"-cuefile=", 9)==0) { } else if(strncmp(argv[i],"-cuefile=", 9)==0) {
value_pt= argv[i] + 9; value_pt= argv[i] + 9;
goto set_cuefile; goto set_cuefile;
@ -7743,6 +7758,9 @@ dvd_obs:;
ClN(printf( ClN(printf(
"cdrskin: will format DVD+RW by blank=format_overwrite_full -force\n")); "cdrskin: will format DVD+RW by blank=format_overwrite_full -force\n"));
} else if(strcmp(argv[i],"--four_channel")==0) {
skin->track_modemods|= BURN_4CH;
#ifndef Cdrskin_extra_leaN #ifndef Cdrskin_extra_leaN
} else if(strncmp(argv[i],"-fs=",4)==0) { } else if(strncmp(argv[i],"-fs=",4)==0) {
@ -8007,11 +8025,17 @@ msifile_equals:;
} 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() */;
} else if(strcmp(argv[i],"-nocopy")==0) {
skin->track_modemods&= ~BURN_COPY;
} else if(strcmp(argv[i],"-nopad")==0) { } else if(strcmp(argv[i],"-nopad")==0) {
skin->padding= 0.0; skin->padding= 0.0;
if(skin->verbosity>=Cdrskin_verbose_cmD) if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: padding : off\n")); ClN(printf("cdrskin: padding : off\n"));
} else if(strcmp(argv[i],"-nopreemp")==0) {
skin->track_modemods&= ~BURN_PREEMPHASIS;
} else if(strcmp(argv[i],"--old_pseudo_scsi_adr")==0) { } else if(strcmp(argv[i],"--old_pseudo_scsi_adr")==0) {
/* is handled in Cdrpreskin_setup() */; /* is handled in Cdrpreskin_setup() */;
@ -8032,6 +8056,9 @@ set_padsize:;
if(skin->verbosity>=Cdrskin_verbose_cmD) if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: padding : %.f\n",skin->padding)); ClN(printf("cdrskin: padding : %.f\n",skin->padding));
} else if(strcmp(argv[i],"-preemp")==0) {
skin->track_modemods|= BURN_PREEMPHASIS;
} else if(strcmp(argv[i],"--prodvd_cli_compatible")==0) { } else if(strcmp(argv[i],"--prodvd_cli_compatible")==0) {
skin->prodvd_cli_compatible= 1; skin->prodvd_cli_compatible= 1;
@ -8041,6 +8068,9 @@ set_padsize:;
} else if(strcmp(argv[i],"-scanbus")==0) { } else if(strcmp(argv[i],"-scanbus")==0) {
skin->do_scanbus= 1; skin->do_scanbus= 1;
} else if(strcmp(argv[i],"-scms")==0) {
skin->track_modemods|= BURN_SCMS;
} else if(strcmp(argv[i],"--single_track")==0) { } else if(strcmp(argv[i],"--single_track")==0) {
skin->single_track= 1; skin->single_track= 1;
if(skin->verbosity>=Cdrskin_verbose_cmD) if(skin->verbosity>=Cdrskin_verbose_cmD)
@ -8164,6 +8194,9 @@ track_too_large:;
if(skin->smallest_tsize<0 || skin->smallest_tsize>skin->fixed_size) if(skin->smallest_tsize<0 || skin->smallest_tsize>skin->fixed_size)
skin->smallest_tsize= skin->fixed_size; skin->smallest_tsize= skin->fixed_size;
} else if(strcmp(argv[i],"--two_channel")==0) {
skin->track_modemods&= ~BURN_4CH;
} else if(strcmp(argv[i],"-V")==0 || strcmp(argv[i],"-Verbose")==0) { } else if(strcmp(argv[i],"-V")==0 || strcmp(argv[i],"-Verbose")==0) {
/* is handled in Cdrpreskin_setup() */; /* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argv[i],"-v")==0 || strcmp(argv[i],"-verbose")==0) { } else if(strcmp(argv[i],"-v")==0 || strcmp(argv[i],"-verbose")==0) {

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2012.01.01.124645" #define Cdrskin_timestamP "2012.01.01.125539"