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

This commit is contained in:
Thomas Schmitt 2012-01-01 12:55:41 +00:00
parent dbbb53c15a
commit 5c5d3ce76f
3 changed files with 65 additions and 10 deletions

View File

@ -2,7 +2,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 CDRSKIN 1 "Dec 30, 2011"
.TH CDRSKIN 1 "Jan 01, 2012"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" 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.
Exits with non-zero value if the drive cannot be found and opened.
.TP
.BI \-copy
Subsequent tracks get permission for an unlimited number of copies.
.TP
.BI cuefile= path
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.
@ -718,11 +721,19 @@ for lifting the ban on -multi.
.br
Note: -multi might make DVD media unreadable in some DVD-ROM drives.
.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
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
only to data tracks. There it is default.
.TP
.BI \-nopreemp
Subsequent tracks get marked as having been mastered without pre-emphasis.
.TP
.BI \-pad
Add 30 kiB of trailing zeros to each data track. (This is not sufficient to
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
again before the next track argument. About size specifiers, see option fs=.
.TP
.BI \-preemp
Subsequent tracks get marked as having been mastered with pre-emphasis.
.TP
.BI \-sao
Write CD in Session At Once mode or sequential DVD-R[W] in Disc-at-once
(DAO) mode.
@ -764,6 +778,14 @@ The useful fields in a result line are:
.br
Bus,Target,Lun Number) 'Vendor' 'Mode' 'Revision'
.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
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.

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.
A cdrecord compatible command line interface for libburn.
@ -862,6 +862,7 @@ struct CdrtracK {
int set_by_padsize;
int sector_pad_up; /* enforce single sector padding */
int track_type;
int mode_modifiers;
double sector_size;
int track_type_by_default;
int swap_audio_bytes;
@ -928,7 +929,8 @@ int Cdrtrack_new(struct CdrtracK **track, struct CdrskiN *boss,
int *use_data_image_size,
double *padding, int *set_by_padsize,
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 *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->sector_pad_up= 1;
o->track_type= BURN_MODE1;
o->mode_modifiers= 0;
o->sector_size= 2048.0;
o->track_type_by_default= 1;
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),
&(o->tao_to_sao_tsize),&(o->use_data_image_size),
&(o->padding),&(o->set_by_padsize),&(skin_track_type),
&(o->track_type_by_default),&(o->swap_audio_bytes),
&(o->cdxa_conversion), 0);
&(o->track_type_by_default), &(o->mode_modifiers),
&(o->swap_audio_bytes), &(o->cdxa_conversion), 0);
if(ret<=0)
goto failed;
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,
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_byte_swap(tr,
(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");
fprintf(stderr,
"\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-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_by_default; /* 0= explicit, 1=not set, 2=by file extension */
int swap_audio_bytes;
int track_modemods;
/** CDRWIN cue sheet file */
char cuefile[Cdrskin_adrleN];
@ -3354,7 +3363,6 @@ struct CdrskiN {
char mcn[14];
char next_isrc[13];
/** The list of tracks with their data sources and parameters */
struct CdrtracK *tracklist[Cdrskin_track_maX];
int track_counter;
@ -3516,6 +3524,7 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
o->cdtext_test= 0;
o->mcn[0]= 0;
o->next_isrc[0]= 0;
o->track_modemods= 0;
o->track_type_by_default= 1;
for(i=0;i<Cdrskin_track_maX;i++)
o->tracklist[i]= NULL;
@ -3625,6 +3634,7 @@ int Cdrskin_get_source(struct CdrskiN *skin, char *source_path,
int *use_data_image_size,
double *padding, int *set_by_padsize,
int *track_type, int *track_type_by_default,
int *mode_mods,
int *swap_audio_bytes, int *cdxa_conversion, int flag)
{
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;
*track_type= skin->track_type;
*track_type_by_default= skin->track_type_by_default;
*mode_mods= skin->track_modemods;
*swap_audio_bytes= skin->swap_audio_bytes;
*cdxa_conversion= skin->cdxa_conversion;
return(1);
@ -7309,8 +7320,8 @@ int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
"-fix", "-nofix",
"-raw", "-raw96p", "-raw16", "-raw96r",
"-clone",
"-cdi", "-preemp", "-nopreemp", "-copy", "-nocopy",
"-scms", "-shorttrack", "-noshorttrack", "-packet", "-noclose",
"-cdi",
"-shorttrack", "-noshorttrack", "-packet", "-noclose",
""
};
@ -7550,6 +7561,10 @@ unsupported_blank_option:;
} else if(strcmp(argv[i],"-checkdrive")==0) {
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) {
value_pt= argv[i] + 9;
goto set_cuefile;
@ -7743,6 +7758,9 @@ dvd_obs:;
ClN(printf(
"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
} else if(strncmp(argv[i],"-fs=",4)==0) {
@ -8007,11 +8025,17 @@ msifile_equals:;
} else if(strcmp(argv[i],"--no_rc")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argv[i],"-nocopy")==0) {
skin->track_modemods&= ~BURN_COPY;
} else if(strcmp(argv[i],"-nopad")==0) {
skin->padding= 0.0;
if(skin->verbosity>=Cdrskin_verbose_cmD)
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) {
/* is handled in Cdrpreskin_setup() */;
@ -8032,6 +8056,9 @@ set_padsize:;
if(skin->verbosity>=Cdrskin_verbose_cmD)
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) {
skin->prodvd_cli_compatible= 1;
@ -8041,6 +8068,9 @@ set_padsize:;
} else if(strcmp(argv[i],"-scanbus")==0) {
skin->do_scanbus= 1;
} else if(strcmp(argv[i],"-scms")==0) {
skin->track_modemods|= BURN_SCMS;
} else if(strcmp(argv[i],"--single_track")==0) {
skin->single_track= 1;
if(skin->verbosity>=Cdrskin_verbose_cmD)
@ -8164,6 +8194,9 @@ track_too_large:;
if(skin->smallest_tsize<0 || 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) {
/* is handled in Cdrpreskin_setup() */;
} 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"