Compare commits

..

4 Commits
1.2.4 ... 1.2.0

Author SHA1 Message Date
b69baec77a Updated change log 2012-01-27 11:43:11 +00:00
516e509198 Updated cdrskin tarball generator 2012-01-27 11:41:06 +00:00
9736695026 Made number transition to 1.2.0 2012-01-27 11:39:50 +00:00
e2295ddbf8 Branching for libburn release 1.2.0 2012-01-27 10:23:19 +00:00
29 changed files with 340 additions and 1289 deletions

View File

@ -1,16 +1,4 @@
SVN trunk (to become libburn-1.2.4 or higher)
===============================================================================
* New API call burn_write_opts_set_obs_pad(), ./configure --enable-dvd-obs-pad
* New cdrskin option --obs_pad
* Bug fix: CD SAO sessions with data tracks started by an audio pause
* Bug fix: CD tracks were perceived 2 sectors too short. Nice with TAO, bad with SAO.
* Bug fix: cdrskin SIGSEGV if track source was added when no drive was available
libburn-1.2.2.tar.gz Mon Apr 02 2012
===============================================================================
* Small internal refinements
libburn-1.2.0.tar.gz Sat Jan 28 2012
SVN trunk (to become libburn-1.2.0.tar.gz or higher)
===============================================================================
* Bug fix: cdrskin produced a memory fault if interupted before writing began
* Bug fix: Solaris adapter mishandled write commands which failed on first try
@ -35,6 +23,7 @@ libburn-1.2.0.tar.gz Sat Jan 28 2012
* New cdrskin option cd_start_tno=
* New cdrskin options sao_pregap=, sao_postgap=
libburn-1.1.8.tar.gz Mon Nov 21 2011
===============================================================================
* Bug fix: Misinterpreted mode page 2A if block descriptors are present

View File

@ -118,9 +118,9 @@ test_structest_CPPFLAGS = -Ilibburn
test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
test_structest_SOURCES = test/structest.c
## cdrskin construction site - ts A60816 - B20720
## cdrskin construction site - ts A60816 - B10808
cdrskin_cdrskin_CPPFLAGS = -Ilibburn
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_1_2_4
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_1_2_0
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
# ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking

24
README
View File

@ -4,14 +4,14 @@
This all is under GPL.
(See GPL reference, our clarification and commitment at the end of this text)
------------------------------------------------------------------------------
libburnia-project.org
libburn-project.org
By Mario Danic <mario.danic@gmail.com> and Thomas Schmitt <scdbackup@gmx.net>
Copyright (C) 2006-2012 Mario Danic, Thomas Schmitt
Still containing parts of Libburn. By Derek Foreman <derek@signalmarketing.com>
and Ben Jansens <xor@orodu.net>
Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
http://files.libburnia-project.org/releases/libburn-1.2.2.tar.gz
http://files.libburnia-project.org/releases/libburn-1.2.0.tar.gz
------------------------------------------------------------------------------
@ -19,10 +19,10 @@ Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
From tarball
Obtain libburn-1.2.4.tar.gz, take it to a directory of your choice and do:
Obtain libburn-1.2.0.tar.gz, take it to a directory of your choice and do:
tar xzf libburn-1.2.4.tar.gz
cd libburn-1.2.4
tar xzf libburn-1.2.0.tar.gz
cd libburn-1.2.0
./configure --prefix=/usr
make
@ -77,10 +77,6 @@ configure time by:
--enable-dvd-obs-64k
This may be combined with above --enable-track-src-odirect .
If it is desired that DVD DAO writing and stdio: writing get padded up to
a full write chunk of 32k resp. 64k, then use ./configure option:
--enable-dvd-obs-pad
Alternatively the transport of SCSI commands can be done via libcdio-0.83.
You may install it and re-run libburn's ./configure with option
--enable-libcdio
@ -676,16 +672,6 @@ Project history as far as known to me:
sessions. libisofs and libisoburn improved timestamp handling. Several
minor bugs were fixed.
- Mon Apr 02 2012 release 1.2.2:
The handling of intentional deviations from ECMA-119 specifications has
been improved in libisofs. libisoburn and xorriso now make use of these
improvements. Some rarely occuring bugs have been fixed.
- Fri Jul 20 2012 releae 1.2.4:
libburn and libisofs got some rarely occuring bugs fixed. libisofs learned
to produce HFS+ metadata and Apple Partition Map. The capabilities of
isohybrid options --efi and --mac have been implemented (GPT and APM).
------------------------------------------------------------------------------

View File

@ -4,9 +4,9 @@
cdrskin. By Thomas Schmitt <scdbackup@gmx.net>
Integrated sub project of libburnia-project.org but also published via:
http://scdbackup.sourceforge.net/cdrskin_eng.html
http://scdbackup.sourceforge.net/cdrskin-1.2.4.tar.gz
http://scdbackup.sourceforge.net/cdrskin-1.2.0.tar.gz
Copyright (C) 2006-2012 Thomas Schmitt, provided under GPL version 2 or later.
Copyright (C) 2006-2011 Thomas Schmitt, provided under GPL version 2 or later.
------------------------------------------------------------------------------
@ -26,10 +26,10 @@ By using this software you agree to the disclaimer at the end of this text
Compilation, First Glimpse, Installation
Obtain cdrskin-1.2.4.tar.gz, take it to a directory of your choice and do:
Obtain cdrskin-1.2.0.tar.gz, take it to a directory of your choice and do:
tar xzf cdrskin-1.2.4.tar.gz
cd cdrskin-1.2.4
tar xzf cdrskin-1.2.0.tar.gz
cd cdrskin-1.2.0
Within that directory execute:
@ -576,7 +576,7 @@ contributions in a due way.
Based on and sub project of:
libburnia-project.org
By Mario Danic <mario.danic@gmail.com> and Thomas Schmitt <scdbackup@gmx.net>
Copyright (C) 2006-2012 Mario Danic, Thomas Schmitt
Copyright (C) 2006-2011 Mario Danic, Thomas Schmitt
libburnia-project.org is inspired by and in other components still containing
parts of

View File

@ -38,7 +38,7 @@ original="./libburn_svn_release.tgz"
# My changes are in $changes , mainly in $changes/cdrskin
changes="./libburn-release"
skin_release="1.2.4"
skin_release="1.2.0"
patch_level=""
# patch_level=".pl00"
skin_rev="$skin_release""$patch_level"

View File

@ -38,7 +38,7 @@ original="./libburn_svn.tgz"
# My changes are in $changes , mainly in $changes/cdrskin
changes="./libburn-develop"
skin_release="1.2.5"
skin_release="1.2.1"
patch_level=""
skin_rev="$skin_release""$patch_level"

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 "Version 1.2.3, Jan 13, 2012"
.TH CDRSKIN 1 "Jan 12, 2012"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
@ -1051,10 +1051,9 @@ overwriteable DVD-RW it is 32k.
.BI dvd_obs= default|32k|64k
Linux specific:
Set the number of bytes to be transmitted with each write operation to DVD
or BD media. With most write types, tracks get padded up to the next multiple
of this write size (see option --obs_pad).
A number of 64 KB may improve throughput with systems
which show latency problems. The default depends on media type, option
or BD media. Tracks get padded up to the next multiple of this write
size. A number of 64 KB may improve throughput with bus systems which
show latency problems. The default depends on media type, option
stream_recording=, and on compile time options.
.TP
.BI fallback_program= command
@ -1478,17 +1477,6 @@ Such opening is needed for Bus,Target,Lun addresses unless option
addresses which are not listed with cdrskin --devices but nevertheless point
to a usable drive. (Like /dev/sg0 using the same SCSI address as /dev/sr0.)
.TP
.BI \--obs_pad
Pad the data of last write operation of a DVD-R[W] DAO session or
stdio: pseudo-drive up to the full size of an output chunk.
This padding has to be applied automatically to the other DVD and BD media
types, where it causes e.g. ISO images to have trailing unclaimed blocks.
.br
Use this option if there is the suspicion that DAO sessions abort with
your kernel and/or DVD drive, if their size is not a multiple of 16 blocks.
.br
This option may also get enabled at compile time of libburn.
.TP
.BI \--old_pseudo_scsi_adr
Linux specific:
Use and report literal Bus,Target,Lun addresses rather than real SCSI and

View File

@ -87,7 +87,7 @@ or
/** The official program version */
#ifndef Cdrskin_prog_versioN
#define Cdrskin_prog_versioN "1.2.4"
#define Cdrskin_prog_versioN "1.2.0"
#endif
/** The official libburn interface revision to use.
@ -100,7 +100,7 @@ or
#define Cdrskin_libburn_minoR 2
#endif
#ifndef Cdrskin_libburn_micrO
#define Cdrskin_libburn_micrO 4
#define Cdrskin_libburn_micrO 0
#endif
@ -120,34 +120,34 @@ or
#undef Cdrskin_libburn_versioN
#endif
#ifdef Cdrskin_libburn_1_2_4
#define Cdrskin_libburn_versioN "1.2.4"
#ifdef Cdrskin_libburn_1_2_0
#define Cdrskin_libburn_versioN "1.2.0"
#endif
#ifdef Cdrskin_libburn_1_2_5
#define Cdrskin_libburn_versioN "1.2.5"
#ifdef Cdrskin_libburn_1_2_1
#define Cdrskin_libburn_versioN "1.2.1"
#endif
#ifndef Cdrskin_libburn_versioN
#define Cdrskin_libburn_1_2_4
#define Cdrskin_libburn_versioN "1.2.4"
#define Cdrskin_libburn_1_2_0
#define Cdrskin_libburn_versioN "1.2.0"
#endif
#ifdef Cdrskin_libburn_1_2_4
#ifdef Cdrskin_libburn_1_2_0
#undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 1
#define Cdrskin_libburn_minoR 2
#define Cdrskin_libburn_micrO 4
#define Cdrskin_libburn_micrO 0
#endif
#ifdef Cdrskin_libburn_1_2_5
#ifdef Cdrskin_libburn_1_2_1
#undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 1
#define Cdrskin_libburn_minoR 2
#define Cdrskin_libburn_micrO 5
#define Cdrskin_libburn_micrO 1
#endif
@ -1341,13 +1341,8 @@ int Cdrtrack_open_source_path(struct CdrtracK *track, int *fd, int flag)
else {
*fd= -1;
ret= Cdrskin_get_device_adr(track->boss,&device_adr,&raw_adr,
&no_convert_fs_adr,0);
if(ret <= 0) {
fprintf(stderr,
"cdrskin: FATAL : No drive found. Cannot prepare track.\n");
return(0);
}
Cdrskin_get_device_adr(track->boss,&device_adr,&raw_adr,
&no_convert_fs_adr,0);
/*
fprintf(stderr,
"cdrskin: DEBUG : device_adr='%s' , raw_adr='%s' , ncfs=%d\n",
@ -2340,7 +2335,7 @@ int Cdrpreskin_fallback(struct CdrpreskiN *preskin, int argc, char **argv,
execvp(hargv[0], hargv);
failure:;
fprintf(stderr,"cdrskin: FATAL : Cannot start fallback program '%s'\n",
preskin->fallback_program);
hargv[0]);
fprintf(stderr,"cdrskin: errno=%d \"%s\"\n",
errno, (errno > 0 ? strerror(errno) : "unidentified error"));
exit(15);
@ -2507,7 +2502,7 @@ return:
*/
{
int i,ret;
char *value_pt, reason[4096], *argpt;
char *value_pt, reason[4096];
#ifndef Cdrskin_extra_leaN
if(argc>1) {
@ -2546,10 +2541,6 @@ return:
for (i= 1;i<argc;i++) {
argpt= argv[i];
if (strncmp(argpt, "--", 2) == 0 && strlen(argpt) > 3)
argpt++;
if(strcmp(argv[i],"--abort_handler")==0) {
o->abort_handler= 3;
@ -2569,8 +2560,8 @@ return:
} else if(strcmp(argv[i],"--allow_untested_media")==0) {
o->allow_untested_media= 1;
} else if(strcmp(argpt, "blank=help") == 0 ||
strcmp(argpt, "-blank=help") == 0) {
} else if(strcmp(argv[i],"blank=help")==0 ||
strcmp(argv[i],"-blank=help")==0) {
#ifndef Cdrskin_extra_leaN
@ -2671,11 +2662,11 @@ no_adr_trn_mem:;
#endif /* Cdrskin_extra_leaN */
} else if(strncmp(argpt, "-dev=", 5) == 0) {
value_pt= argpt + 5;
} else if(strncmp(argv[i],"-dev=",5)==0) {
value_pt= argv[i]+5;
goto set_dev;
} else if(strncmp(argpt, "dev=", 4) == 0) {
value_pt= argpt + 4;
} else if(strncmp(argv[i],"dev=",4)==0) {
value_pt= argv[i]+4;
set_dev:;
if(strcmp(value_pt,"help")==0) {
@ -2768,8 +2759,8 @@ set_dev:;
o->drive_exclusive= 2;
o->demands_cdrskin_caps= 1;
} else if(strcmp(argpt,"driveropts=help")==0 ||
strcmp(argpt,"-driveropts=help")==0) {
} else if(strcmp(argv[i],"driveropts=help")==0 ||
strcmp(argv[i],"-driveropts=help")==0) {
#ifndef Cdrskin_extra_leaN
@ -2869,7 +2860,6 @@ set_dev:;
printf(" --no_convert_fs_adr only literal translations of dev=\n");
printf(
" --no_rc as first argument: do not read startup files\n");
printf(" --obs_pad pad DVD DAO to full 16 or 32 blocks\n");
printf(" --old_pseudo_scsi_adr use and report literal Bus,Target,Lun\n");
printf(" rather than real SCSI and pseudo ATA.\n");
printf(" --prodvd_cli_compatible react on some DVD types more like\n");
@ -3075,23 +3065,23 @@ see_cdrskin_eng_html:;
"cdrskin: NOTE : option --no_rc would only work as first argument.\n");
#ifndef Cdrskin_disable_raw96R
} else if(strcmp(argpt,"-raw96r")==0) {
} else if(strcmp(argv[i],"-raw96r")==0) {
strcpy(o->write_mode_name,"RAW/RAW96R");
#endif
} else if(strcmp(argpt,"-sao")==0 || strcmp(argpt,"-dao")==0) {
} else if(strcmp(argv[i],"-sao")==0 || strcmp(argv[i],"-dao")==0) {
strcpy(o->write_mode_name,"SAO");
} else if(strcmp(argpt,"-scanbus")==0) {
} else if(strcmp(argv[i],"-scanbus")==0) {
o->no_whitelist= 1;
} else if(strcmp(argpt,"-tao")==0) {
} else if(strcmp(argv[i],"-tao")==0) {
strcpy(o->write_mode_name,"TAO");
} else if(strcmp(argv[i],"-V")==0 || strcmp(argpt, "-Verbose") == 0) {
} else if(strcmp(argv[i],"-V")==0 || strcmp(argv[i],"-Verbose")==0) {
burn_set_scsi_logging(2 | 4); /* log SCSI to stderr */
} else if(strcmp(argv[i],"-v")==0 || strcmp(argpt, "-verbose") == 0) {
} else if(strcmp(argv[i],"-v")==0 || strcmp(argv[i],"-verbose")==0) {
(o->verbosity)++;
ClN(printf("cdrskin: verbosity level : %d\n",o->verbosity));
set_severities:;
@ -3105,7 +3095,7 @@ set_severities:;
(o->verbosity)+= strlen(argv[i])-1;
goto set_severities;
} else if(strcmp(argpt,"-version")==0) {
} else if(strcmp(argv[i],"-version")==0) {
int major, minor, micro;
printf(
@ -3137,10 +3127,10 @@ set_severities:;
printf("Build timestamp : %s\n",Cdrskin_build_timestamP);
{ret= 2; goto ex;}
} else if(strcmp(argpt,"-waiti")==0) {
} else if(strcmp(argv[i],"-waiti")==0) {
o->do_waiti= 1;
} else if(strcmp(argpt,"-xamix")==0) {
} else if(strcmp(argv[i],"-xamix")==0) {
fprintf(stderr,
"cdrskin: FATAL : Option -xamix not implemented and data not yet convertible to other modes.\n");
return(0);
@ -3325,7 +3315,6 @@ struct CdrskiN {
int force_is_set;
int stream_recording_is_set; /* see burn_write_opts_set_stream_recording() */
int dvd_obs; /* DVD write chunk size: 0, 32k or 64k */
int obs_pad; /* Whether to force obs end padding */
int stdio_sync; /* stdio fsync interval: -1, 0, >=32 */
int single_track;
int prodvd_cli_compatible;
@ -3577,7 +3566,6 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
o->force_is_set= 0;
o->stream_recording_is_set= 0;
o->dvd_obs= 0;
o->obs_pad= 0;
o->stdio_sync= 0;
o->single_track= 0;
o->prodvd_cli_compatible= 0;
@ -3718,25 +3706,12 @@ int Cdrskin_destroy(struct CdrskiN **o, int flag)
}
int Cdrskin_assert_driveno(struct CdrskiN *skin, int flag)
{
if(skin->driveno < 0 || (unsigned int) skin->driveno >= skin->n_drives) {
fprintf(stderr,
"cdrskin: FATAL : No drive found. Cannot perform desired operation.\n");
return(0);
}
return(1);
}
/** Return the addresses of the drive. device_adr is the libburn persistent
address of the drive, raw_adr is the address as given by the user.
*/
int Cdrskin_get_device_adr(struct CdrskiN *skin,
char **device_adr, char **raw_adr, int *no_convert_fs_adr, int flag)
{
if(skin->driveno < 0 || (unsigned int) skin->driveno >= skin->n_drives)
return(0);
burn_drive_get_adr(&skin->drives[skin->driveno],skin->device_adr);
*device_adr= skin->device_adr;
*raw_adr= skin->preskin->raw_device_adr;
@ -3807,10 +3782,6 @@ int Cdrskin_attach_fifo(struct CdrskiN *skin, int flag)
int profile_number;
char profile_name[80];
ret= Cdrskin_assert_driveno(skin, 0);
if(ret <= 0)
return(ret);
/* Refuse here and thus use libburn fifo only with single track, non-CD */
ret= burn_disc_get_profile(skin->drives[skin->driveno].drive,
&profile_number, profile_name);
@ -3989,9 +3960,6 @@ int Cdrskin_grab_drive(struct CdrskiN *skin, int flag)
drive= NULL;
skin->grabbed_drive= drive;
} else {
ret= Cdrskin_assert_driveno(skin, 0);
if(ret <= 0)
return(ret);
drive= skin->drives[skin->driveno].drive;
skin->grabbed_drive= drive;
}
@ -6988,7 +6956,6 @@ burn_failed:;
else
#endif
burn_write_opts_set_dvd_obs(o, skin->dvd_obs);
burn_write_opts_set_obs_pad(o, skin->obs_pad);
burn_write_opts_set_stdio_fsync(o, skin->stdio_sync);
if(skin->dummy_mode) {
@ -7506,7 +7473,7 @@ int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
{
int i,k,l,ret, idx= -1, cd_start_tno;
double value,grab_and_wait_value= -1.0, num;
char *cpt,*value_pt,adr[Cdrskin_adrleN],*blank_mode= "", *argpt;
char *cpt,*value_pt,adr[Cdrskin_adrleN],*blank_mode= "";
struct stat stbuf;
/* cdrecord 2.01 options which are not scheduled for implementation, yet */
@ -7557,32 +7524,28 @@ int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
for (i= 1;i<argc;i++) {
argpt= argv[i];
if (strncmp(argpt, "--", 2) == 0 && strlen(argpt) > 3)
argpt++;
/* is this a known option which is not planned to be implemented ? */
/* such an option will not be accepted as data source */
for(k=0;ignored_partial_options[k][0]!=0;k++) {
if(argpt[0]=='-')
if(strncmp(argpt+1,ignored_partial_options[k],
strlen(ignored_partial_options[k]))==0)
if(argv[i][0]=='-')
if(strncmp(argv[i]+1,ignored_partial_options[k],
strlen(ignored_partial_options[k]))==0)
goto no_volunteer;
if(strncmp(argpt,ignored_partial_options[k],
strlen(ignored_partial_options[k]))==0)
if(strncmp(argv[i],ignored_partial_options[k],
strlen(ignored_partial_options[k]))==0)
goto no_volunteer;
}
for(k=0;ignored_full_options[k][0]!=0;k++)
if(strcmp(argpt,ignored_full_options[k])==0)
if(strcmp(argv[i],ignored_full_options[k])==0)
goto no_volunteer;
if(0) {
no_volunteer:;
skin->preskin->demands_cdrecord_caps= 1;
if(skin->preskin->fallback_program[0])
fprintf(stderr,"cdrskin: NOTE : Unimplemented option: '%s'\n",argpt);
fprintf(stderr,"cdrskin: NOTE : Unimplemented option: '%s'\n",argv[i]);
else
fprintf(stderr,"cdrskin: NOTE : ignoring unimplemented option : '%s'\n",
argpt);
argv[i]);
fprintf(stderr,
"cdrskin: NOTE : option is waiting for a volunteer to implement it.\n");
continue;
@ -7647,21 +7610,21 @@ set_abort_max_wait:;
value/= 2048.0;
skin->assert_write_lba= value;
} else if(strcmp(argpt,"-atip")==0) {
} else if(strcmp(argv[i],"-atip")==0) {
if(skin->do_atip<1)
skin->do_atip= 1;
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: will put out some -atip style lines\n"));
} else if(strcmp(argpt,"-audio")==0) {
} else if(strcmp(argv[i],"-audio")==0) {
skin->track_type= BURN_AUDIO;
skin->track_type_by_default= 0;
} else if(strncmp(argpt,"-blank=",7)==0) {
cpt= argpt + 7;
} else if(strncmp(argv[i],"-blank=",7)==0) {
cpt= argv[i]+7;
goto set_blank;
} else if(strncmp(argpt,"blank=",6)==0) {
cpt= argpt + 6;
} else if(strncmp(argv[i],"blank=",6)==0) {
cpt= argv[i]+6;
set_blank:;
skin->blank_format_type= 0;
blank_mode= cpt;
@ -7779,18 +7742,18 @@ set_cd_start_tno:;
} else if(strcmp(argv[i],"--cdtext_verbose")==0) {
skin->cdtext_test= 1;
} else if(strcmp(argpt,"-checkdrive")==0) {
} else if(strcmp(argv[i],"-checkdrive")==0) {
skin->do_checkdrive= 1;
} else if(strcmp(argpt,"-copy")==0) {
} else if(strcmp(argv[i],"-copy")==0) {
skin->track_modemods|= BURN_COPY;
skin->track_modemods&= ~BURN_SCMS;
} else if(strncmp(argpt, "-cuefile=", 9)==0) {
value_pt= argpt + 9;
} else if(strncmp(argv[i],"-cuefile=", 9)==0) {
value_pt= argv[i] + 9;
goto set_cuefile;
} else if(strncmp(argpt, "cuefile=", 8)==0) {
value_pt= argpt + 8;
} else if(strncmp(argv[i],"cuefile=", 8)==0) {
value_pt= argv[i] + 8;
set_cuefile:;
if(strlen(value_pt) >= sizeof(skin->cuefile)) {
fprintf(stderr,
@ -7801,7 +7764,7 @@ set_cuefile:;
strcpy(skin->cuefile, value_pt);
skin->do_burn= 1;
} else if(strcmp(argpt,"-data")==0) {
} else if(strcmp(argv[i],"-data")==0) {
option_data:;
/* All Subsequent Tracks Option */
skin->cdxa_conversion= (skin->cdxa_conversion & ~0x7fffffff) | 0;
@ -7843,9 +7806,9 @@ option_data:;
#endif /* ! Cdrskin_extra_leaN */
} else if(strncmp(argpt,"-dev=",5)==0) {
} else if(strncmp(argv[i],"-dev=",5)==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strncmp(argpt,"dev=",4)==0) {
} else if(strncmp(argv[i],"dev=",4)==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strncmp(argv[i],"direct_write_amount=",20)==0) {
@ -7881,27 +7844,27 @@ option_data:;
} else if(strcmp(argv[i],"--drive_scsi_exclusive")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strncmp(argpt, "-driveropts=", 12)==0) {
value_pt= argpt + 12;
} else if(strncmp(argv[i],"-driveropts=",12)==0) {
value_pt= argv[i]+12;
goto set_driveropts;
} else if(strncmp(argpt, "driveropts=", 11)==0) {
value_pt= argpt + 11;
} else if(strncmp(argv[i],"driveropts=",11)==0) {
value_pt= argv[i]+11;
set_driveropts:;
if(strcmp(value_pt,"burnfree")==0 || strcmp(value_pt,"burnproof")==0) {
skin->burnfree= 1;
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: burnfree : on\n"));
} else if(strcmp(argpt+11,"noburnfree")==0 ||
strcmp(argpt+11,"noburnproof")==0 ) {
} else if(strcmp(argv[i]+11,"noburnfree")==0 ||
strcmp(argv[i]+11,"noburnproof")==0 ) {
skin->burnfree= 0;
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: burnfree : off\n"));
} else if(strcmp(argpt+11,"help")==0) {
} else if(strcmp(argv[i]+11,"help")==0) {
/* handled in Cdrpreskin_setup() */;
} else
goto ignore_unknown;
} else if(strcmp(argpt,"-dummy")==0) {
} else if(strcmp(argv[i],"-dummy")==0) {
skin->dummy_mode= 1;
} else if(strncmp(argv[i], "-dvd_obs=", 9)==0) {
@ -7920,7 +7883,7 @@ dvd_obs:;
} else
skin->dvd_obs= num;
} else if(strcmp(argpt,"-eject")==0) {
} else if(strcmp(argv[i],"-eject")==0) {
skin->do_eject= 1;
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: eject after work : on\n"));
@ -7967,10 +7930,10 @@ dvd_obs:;
ClN(printf(
"cdrskin: will fill up last track to full free media space\n"));
} else if(strcmp(argpt,"-force")==0) {
} else if(strcmp(argv[i],"-force")==0) {
skin->force_is_set= 1;
} else if(strcmp(argpt,"-format")==0) {
} else if(strcmp(argv[i],"-format")==0) {
skin->do_blank= 1;
skin->blank_format_type= 3|(1<<10);
skin->blank_format_size= 0;
@ -7984,11 +7947,11 @@ dvd_obs:;
#ifndef Cdrskin_extra_leaN
} else if(strncmp(argpt, "-fs=", 4) == 0) {
value_pt= argpt + 4;
} else if(strncmp(argv[i],"-fs=",4)==0) {
value_pt= argv[i]+4;
goto fs_equals;
} else if(strncmp(argpt, "fs=", 3) == 0) {
value_pt= argpt + 3;
} else if(strncmp(argv[i],"fs=",3)==0) {
value_pt= argv[i]+3;
fs_equals:;
if(skin->fifo_enabled) {
value= Scanf_io_size(value_pt,0);
@ -8007,11 +7970,11 @@ fs_equals:;
grab_and_wait_value= Scanf_io_size(value_pt,0);
skin->preskin->demands_cdrskin_caps= 1;
} else if(strncmp(argpt, "-gracetime=", 11) == 0) {
value_pt= argpt + 11;
} else if(strncmp(argv[i],"-gracetime=",11)==0) {
value_pt= argv[i]+11;
goto gracetime_equals;
} else if(strncmp(argpt, "gracetime=", 10) == 0) {
value_pt= argpt + 10;
} else if(strncmp(argv[i],"gracetime=",10)==0) {
value_pt= argv[i]+10;
gracetime_equals:;
sscanf(value_pt,"%d",&(skin->gracetime));
@ -8046,16 +8009,16 @@ gracetime_equals:;
} else if(strcmp(argv[i],"--ignore_signals")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argpt,"-immed")==0) {
} else if(strcmp(argv[i],"-immed")==0) {
skin->modesty_on_drive= 1;
skin->min_buffer_percent= 75;
skin->max_buffer_percent= 95;
} else if(strncmp(argpt, "-index=", 7) == 0) {
value_pt= argpt + 7;
} else if(strncmp(argv[i],"-index=", 7) == 0) {
value_pt= argv[i] + 7;
goto set_index;
} else if(strncmp(argpt, "index=", 6) == 0) {
value_pt= argpt + 6;
} else if(strncmp(argv[i],"index=", 6) == 0) {
value_pt= argv[i] + 6;
set_index:;
if(skin->index_string != NULL)
free(skin->index_string);
@ -8085,17 +8048,17 @@ set_index:;
skin->sheet_v07t_blocks++;
skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(argpt,"-inq")==0) {
} else if(strcmp(argv[i],"-inq")==0) {
skin->do_checkdrive= 2;
} else if(strcmp(argpt,"-isosize")==0) {
} else if(strcmp(argv[i],"-isosize")==0) {
skin->use_data_image_size= 1;
} else if(strncmp(argpt, "-isrc=", 6) == 0) {
value_pt= argpt + 6;
} else if(strncmp(argv[i],"-isrc=", 6) == 0) {
value_pt= argv[i] + 6;
goto set_isrc;
} else if(strncmp(argpt, "isrc=", 5) == 0) {
value_pt= argpt + 5;
} else if(strncmp(argv[i],"isrc=", 5) == 0) {
value_pt= argv[i] + 5;
set_isrc:;
if(strlen(value_pt) != 12) {
fprintf(stderr,
@ -8121,10 +8084,10 @@ set_isrc:;
} else if(strncmp(argv[i],"fallback_program=",17)==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argpt,"-load")==0) {
} else if(strcmp(argv[i],"-load")==0) {
skin->do_load= 1;
} else if(strcmp(argpt,"-lock")==0) {
} else if(strcmp(argv[i],"-lock")==0) {
skin->do_load= 2;
} else if(strcmp(argv[i],"--long_toc")==0) {
@ -8132,11 +8095,11 @@ set_isrc:;
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: will put out some -atip style lines plus -toc\n"));
} else if(strncmp(argpt,"-mcn=", 5) == 0) {
value_pt= argpt + 5;
} else if(strncmp(argv[i],"-mcn=", 5) == 0) {
value_pt= argv[i] + 5;
goto set_mcn;
} else if(strncmp(argpt,"mcn=", 4) == 0) {
value_pt= argpt + 4;
} else if(strncmp(argv[i],"mcn=", 4) == 0) {
value_pt= argv[i] + 4;
set_mcn:;
if(strlen(value_pt) != 13) {
fprintf(stderr,
@ -8145,11 +8108,11 @@ set_mcn:;
}
memcpy(skin->mcn, value_pt, 14);
} else if(strncmp(argpt, "-minbuf=", 8) == 0) {
value_pt= argpt + 8;
} else if(strncmp(argv[i],"-minbuf=",8)==0) {
value_pt= argv[i]+8;
goto minbuf_equals;
} else if(strncmp(argpt, "minbuf=", 7) == 0) {
value_pt= argpt + 7;
} else if(strncmp(argv[i],"minbuf=",7)==0) {
value_pt= argv[i]+7;
minbuf_equals:;
skin->modesty_on_drive= 1;
sscanf(value_pt,"%lf",&value);
@ -8163,11 +8126,11 @@ minbuf_equals:;
ClN(printf("cdrskin: minbuf=%d percent desired buffer fill\n",
skin->min_buffer_percent));
} else if(strcmp(argpt,"-minfo") == 0 ||
strcmp(argpt,"-media-info") == 0) {
} else if(strcmp(argv[i],"-minfo") == 0 ||
strcmp(argv[i],"-media-info") == 0) {
skin->do_atip= 4;
} else if(strcmp(argpt, "-mode2") == 0) {
} else if(strcmp(argv[i], "-mode2") == 0) {
fprintf(stderr,
"cdrskin: NOTE : defaulting option -mode2 to option -data\n");
goto option_data;
@ -8227,14 +8190,14 @@ minbuf_equals:;
}
skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(argpt,"-multi")==0) {
} else if(strcmp(argv[i],"-multi")==0) {
skin->multi= 1;
} else if(strncmp(argpt, "-msifile=", 9) == 0) {
value_pt= argpt + 9;
} else if(strncmp(argv[i],"-msifile=",9)==0) {
value_pt= argv[i]+9;
goto msifile_equals;
} else if(strncmp(argpt, "msifile=", 8) == 0) {
value_pt= argpt + 8;
} else if(strncmp(argv[i],"msifile=",8)==0) {
value_pt= argv[i]+8;
msifile_equals:;
if(strlen(value_pt)>=sizeof(skin->msifile)) {
fprintf(stderr,
@ -8245,7 +8208,7 @@ msifile_equals:;
strcpy(skin->msifile, value_pt);
skin->do_msinfo= 1;
} else if(strcmp(argpt,"-msinfo")==0) {
} else if(strcmp(argv[i],"-msinfo")==0) {
skin->do_msinfo= 1;
} else if(strcmp(argv[i],"--no_abort_handler")==0) {
@ -8260,53 +8223,50 @@ msifile_equals:;
} else if(strcmp(argv[i],"--no_rc")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argpt,"-nocopy")==0) {
} else if(strcmp(argv[i],"-nocopy")==0) {
skin->track_modemods&= ~BURN_COPY;
} else if(strcmp(argpt,"-nopad")==0) {
} 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(argpt,"-nopreemp")==0) {
} else if(strcmp(argv[i],"-nopreemp")==0) {
skin->track_modemods&= ~BURN_PREEMPHASIS;
} else if(strcmp(argv[i],"--obs_pad")==0) {
skin->obs_pad= 1;
} else if(strcmp(argv[i],"--old_pseudo_scsi_adr")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argpt,"-pad")==0) {
} else if(strcmp(argv[i],"-pad")==0) {
skin->padding= 15*2048;
skin->set_by_padsize= 0;
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: padding : %.f\n",skin->padding));
} else if(strncmp(argpt, "-padsize=", 9) == 0) {
value_pt= argpt + 9;
} else if(strncmp(argv[i],"-padsize=",9)==0) {
value_pt= argv[i]+9;
goto set_padsize;
} else if(strncmp(argpt, "padsize=", 8) == 0) {
value_pt= argpt + 8;
} else if(strncmp(argv[i],"padsize=",8)==0) {
value_pt= argv[i]+8;
set_padsize:;
skin->padding= Scanf_io_size(value_pt, 0);
skin->padding= Scanf_io_size(argv[i]+8,0);
skin->set_by_padsize= 1;
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: padding : %.f\n",skin->padding));
} else if(strcmp(argpt,"-preemp")==0) {
} 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;
} else if(strcmp(argpt,"-sao")==0 || strcmp(argpt,"-dao")==0) {
} else if(strcmp(argv[i],"-sao")==0 || strcmp(argv[i],"-dao")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argpt,"-scanbus")==0) {
} else if(strcmp(argv[i],"-scanbus")==0) {
skin->do_scanbus= 1;
} else if(strcmp(argpt,"-scms")==0) {
} else if(strcmp(argv[i],"-scms")==0) {
skin->track_modemods|= BURN_SCMS;
} else if(strcmp(argv[i],"--single_track")==0) {
@ -8350,11 +8310,11 @@ set_sao_pregap:;
return(0);
}
} else if(strncmp(argpt, "-speed=", 7) == 0) {
value_pt= argpt + 7;
} else if(strncmp(argv[i],"-speed=",7)==0) {
value_pt= argv[i]+7;
goto set_speed;
} else if(strncmp(argpt, "speed=", 6) == 0) {
value_pt= argpt + 6;
} else if(strncmp(argv[i],"speed=",6)==0) {
value_pt= argv[i]+6;
set_speed:;
if(strcmp(value_pt,"any")==0)
skin->x_speed= -1;
@ -8409,10 +8369,10 @@ set_stream_recording:;
skin->stream_recording_is_set= 0;
} else
skin->stream_recording_is_set= 0;
} else if(strcmp(argpt,"-swab")==0) {
} else if(strcmp(argv[i],"-swab")==0) {
skin->swap_audio_bytes= 0;
} else if(strcmp(argpt,"-tao")==0) {
} else if(strcmp(argv[i],"-tao")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strncmp(argv[i],"tao_to_sao_tsize=",17)==0) {
@ -8431,29 +8391,29 @@ set_stream_recording:;
skin->tell_media_space= 1;
skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(argpt, "-text") == 0) {
} else if(strcmp(argv[i], "-text") == 0) {
skin->use_cdtext= 1;
} else if(strncmp(argpt, "-textfile=", 10) == 0) {
value_pt= argpt + 10;
} else if(strncmp(argv[i],"-textfile=", 10)==0) {
value_pt= argv[i] + 10;
goto set_textfile;
} else if(strncmp(argpt ,"textfile=", 9) == 0) {
value_pt= argpt + 9;
} else if(strncmp(argv[i],"textfile=", 9)==0) {
value_pt= argv[i] + 9;
set_textfile:;
ret= Cdrskin_read_textfile(skin, value_pt, 0);
if(ret <= 0)
return(ret);
} else if(strcmp(argpt,"-toc")==0) {
} else if(strcmp(argv[i],"-toc")==0) {
skin->do_atip= 2;
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: will put out some -atip style lines plus -toc\n"));
} else if(strncmp(argpt, "-tsize=", 7) == 0) {
value_pt= argpt + 7;
} else if(strncmp(argv[i],"-tsize=",7)==0) {
value_pt= argv[i]+7;
goto set_tsize;
} else if(strncmp(argpt, "tsize=", 6) == 0) {
value_pt= argpt + 6;
} else if(strncmp(argv[i],"tsize=",6)==0) {
value_pt= argv[i]+6;
set_tsize:;
skin->fixed_size= Scanf_io_size(value_pt,0);
if(skin->fixed_size>Cdrskin_tracksize_maX) {
@ -8469,18 +8429,18 @@ track_too_large:;
} else if(strcmp(argv[i],"--two_channel")==0) {
skin->track_modemods&= ~BURN_4CH;
} else if(strcmp(argv[i],"-V")==0 || strcmp(argpt, "-Verbose")==0) {
} 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(argpt,"-verbose")==0) {
} else if(strcmp(argv[i],"-v")==0 || strcmp(argv[i],"-verbose")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argv[i],"-vv")==0 || strcmp(argv[i],"-vvv")==0 ||
strcmp(argv[i],"-vvvv")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strcmp(argpt,"-version")==0) {
} else if(strcmp(argv[i],"-version")==0) {
/* is handled in Cdrpreskin_setup() and should really not get here */;
} else if(strcmp(argpt,"-waiti")==0) {
} else if(strcmp(argv[i],"-waiti")==0) {
/* is handled in Cdrpreskin_setup() */;
} else if(strncmp(argv[i],"write_start_address=",20)==0) {
@ -8490,17 +8450,17 @@ track_too_large:;
skin->write_start_address));
skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(argpt, "-xa") == 0) {
} else if(strcmp(argv[i], "-xa") == 0) {
fprintf(stderr,"cdrskin: NOTE : defaulting option -xa to option -data\n");
goto option_data;
} else if(strcmp(argpt, "-xa1") == 0) {
} else if(strcmp(argv[i], "-xa1") == 0) {
/* All Subsequent Tracks Option */
skin->cdxa_conversion= (skin->cdxa_conversion & ~0x7fffffff) | 1;
skin->track_type= BURN_MODE1;
skin->track_type_by_default= 0;
} else if(strcmp(argpt, "-xa2") == 0) {
} else if(strcmp(argv[i], "-xa2") == 0) {
fprintf(stderr,
"cdrskin: NOTE : defaulting option -xa2 to option -data\n");
goto option_data;
@ -8760,15 +8720,12 @@ int Cdrskin_create(struct CdrskiN **o, struct CdrpreskiN **preskin,
{*exit_value= 2; goto ex;}
}
skin->n_drives= 1;
skin->driveno= 0;
burn_drive_release(skin->drives[0].drive, 0);
} else {
while (!burn_drive_scan(&(skin->drives), &(skin->n_drives))) {
usleep(20000);
/* >>> ??? set a timeout ? */
}
if(skin->n_drives <= 0)
skin->driveno= -1;
}
burn_msgs_set_severities(skin->preskin->queue_severity,

View File

@ -65,7 +65,7 @@ connected via SCSI, PATA (aka IDE, ATA), USB, or SATA.
GPL software included:<BR>
</H2>
<DL>
<DT>libburn-1.2.4</DT>
<DT>libburn-1.2.0</DT>
<DD>(founded by Derek Foreman and Ben Jansens,
developed and maintained since August 2006 by
Thomas Schmitt from team of libburnia-project.org)
@ -200,13 +200,13 @@ Standalone ISO 9660 multi-session CD/DVD/BD tool
<P>
<DL>
<DT>Download as source code (see README):</DT>
<DD><A HREF="cdrskin-1.2.4.tar.gz">cdrskin-1.2.4.tar.gz</A>
<DD><A HREF="cdrskin-1.2.0.tar.gz">cdrskin-1.2.0.tar.gz</A>
(930 KB).
</DD>
<DD><A HREF="cdrskin-1.2.4.tar.gz.sig">cdrskin-1.2.4.tar.gz.sig</A></DD>
<DD><A HREF="cdrskin-1.2.0.tar.gz.sig">cdrskin-1.2.0.tar.gz.sig</A></DD>
<DD>
(detached GPG signature for verification by
<KBD>gpg --verify cdrskin-1.2.4.tar.gz.sig cdrskin-1.2.4.tar.gz</KBD>
<KBD>gpg --verify cdrskin-1.2.0.tar.gz.sig cdrskin-1.2.0.tar.gz</KBD>
<BR>
after <KBD>gpg --keyserver keys.gnupg.net --recv-keys ABC0A854</KBD>).
</DD>
@ -257,19 +257,31 @@ cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
<HR>
<P>
Enhancements towards previous stable version cdrskin-1.2.2:
Enhancements towards previous stable version cdrskin-1.1.8:
<UL>
<LI>New option --obs_pad</LI>
<LI>Implemented option textfile=</LI>
<LI>Implemented option combination -vv -toc for cdtext.dat production
<LI>Implemented options mcn= and isrc=</LI>
<LI>Implemented options -scms -copy -nocopy -preemp -nopreemp</LI>
<LI>Implemented option index=</LI>
<LI>Partly implemented options cuefile= and -text</LI>
<LI>New option input_sheet_v07t= for CD-TEXT definition</LI>
<LI>New options --cdtext_dummy and --cdtext_verbose</LI>
<LI>New options --four_channel --two_channel</LI>
<LI>New option cd_start_tno=</LI>
<LI>New options sao_pregap=, sao_postgap=</LI>
</LI>
<!--
<LI>none</LI>
-->
</UL>
Bug fixes towards cdrskin-1.2.2:
Bug fixes towards cdrskin-1.1.8:
<UL>
<LI>CD SAO sessions with data tracks started by an audio pause</LI>
<LI>CD tracks were perceived 2 sectors too short. Nice with TAO, bad with SAO.</LI>
<LI>Memory fault if track source was added when no drive was available</LI>
<LI>Memory fault if interupted before writing began</LI>
<LI>Solaris adapter mishandled write commands which failed on first try</LI>
<LI>Interrupting libburn while drive tray is loading led to endless loop</LI>
<LI>Progress report with blanking and formatting could be bogus</LI>
<!--
<LI>none</LI>
-->
@ -279,8 +291,8 @@ Bug fixes towards cdrskin-1.2.2:
<P>
<DL>
<DT><H3>Development snapshot, version 1.2.5 :</H3></DT>
<DD>Enhancements towards current stable version 1.2.4:
<DT><H3>Development snapshot, version 1.2.1 :</H3></DT>
<DD>Enhancements towards current stable version 1.2.0:
<UL>
<LI>none yet</LI>
<!--
@ -290,7 +302,7 @@ Bug fixes towards cdrskin-1.2.2:
</UL>
</DD>
<DD>Bug fixes towards cdrskin-1.2.4:
<DD>Bug fixes towards cdrskin-1.2.0:
<UL>
<LI>none yet</LI>
<!--
@ -299,10 +311,10 @@ Bug fixes towards cdrskin-1.2.2:
</DD>
<DD>&nbsp;</DD>
<DD><A HREF="README_cdrskin_devel">README 1.2.5</A>
<DD><A HREF="cdrskin__help_devel">cdrskin-1.2.5 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin-1.2.5 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 1.2.5)</A></DD>
<DD><A HREF="README_cdrskin_devel">README 1.2.1</A>
<DD><A HREF="cdrskin__help_devel">cdrskin-1.2.1 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin-1.2.1 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 1.2.1)</A></DD>
<DD>&nbsp;</DD>
<DT>Maintainers of cdrskin unstable packages please use SVN of
<A HREF="http://libburnia-project.org"> libburnia-project.org</A></DT>
@ -322,7 +334,7 @@ admins with full system souvereignty.</DT>
<A HREF="README_cdrskin_devel">upcoming README</A> ):
</DD>
<DD>
<A HREF="cdrskin-1.2.5.tar.gz">cdrskin-1.2.5.tar.gz</A>
<A HREF="cdrskin-1.2.1.tar.gz">cdrskin-1.2.1.tar.gz</A>
(930 KB).
</DD>

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2012.07.20.113001"
#define Cdrskin_timestamP "2012.01.27.103001"

View File

@ -11104,7 +11104,7 @@ Made number transition to 1.2.0
+ cdrskin/add_ts_changes_to_libburn_1_2_1
Updated cdrskin tarball generator
27 Jan 2012 [4601]
[]
ChangeLog
cdrskin/changelog.txt
Updated change log
@ -11134,254 +11134,12 @@ Updated change log
* New cdrskin options sao_pregap=, sao_postgap=
2012.01.27.150951 [4605]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 1.2.1
27 Jan 2012 [4606]
- cdrskin/add_ts_changes_to_libburn_1_1_8
- cdrskin/add_ts_changes_to_libburn_1_1_9
+ cdrskin/add_ts_changes_to_libburn_1_2_0
+ cdrskin/add_ts_changes_to_libburn_1_2_1
Updated cdrskin tarball generator
27 Jan 2012 [4607]
ChangeLog
cdrskin/changelog.txt
Updated change log
27 Jan 2012 [4608]
svn move -m libburn release 1.2.0 is ready
http://svn.libburnia-project.org/libburn/branches/1.2.0
http://svn.libburnia-project.org/libburn/tags/1.2.0
27 Jan 2012 [tag:4612] [4613]
libburn/write.c
ChangeLog
Corrected small flaws of libburn release tarball
27 Jan 2012 [4614] [4615]
libburn/write.c
One of the flaws was phony. Corrected back.
------------------------------------ cycle - cdrskin-1.2.1 - 2012.01.27.150951
2012.02.02.190720 [4624]
libburn/write.c
libburn/spc.c
Reacted on warnings of Debian buildd
06 Feb 2012 [4625]
doc/cdtext.txt
Small corrections in CD-TEXT documentation
08 Feb 2012 [4626]
doc/cdtext.txt
Small corrections in CD-TEXT documentation
2012.02.11.171228 [4627]
libburn/crc.c
Mathematical description of crc_ccitt() versus crc_11021()
2012.02.13.102837 [4628]
libburn/spc.c
Added LG drive sense code 2 06 00 to error list (officially listed is 3 06 00)
2012.02.19.101022 [4631]
libburn/crc.h
libburn/crc.c
Re-implemented the CRC functions under own copyright
2012.02.22.103056 [4632]
libburn/util.c
doc/mediainfo.txt
Added to DVD manufacturer list: "UmeDisc Limited"
2012.03.21.193320 [4671]
cdrskin/cdrskin.c
Reacted on warning of cppcheck
2 Apr 2012 [4684]
svn copy -m Branching for libburn release 1.2.2
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/1.2.2
2012.04.02.110001 [4685]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 1.2.2
02 Apr 2012 [4686]
- cdrskin/add_ts_changes_to_libburn_1_2_0
- cdrskin/add_ts_changes_to_libburn_1_2_1
+ cdrskin/add_ts_changes_to_libburn_1_2_2
+ cdrskin/add_ts_changes_to_libburn_1_2_3
Updated cdrskin tarball generator
02 Apr 2012 [4687]
ChangeLog
cdrskin/changelog.txt
Updated change log
----------------------------------- release - libburn-1.2.2 - 2012.04.02.110001
* Small internal refinements
2012.04.02.172347 [4691]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 1.2.3
02 Apr 2012 [4692]
- cdrskin/add_ts_changes_to_libburn_1_2_0
- cdrskin/add_ts_changes_to_libburn_1_2_1
+ cdrskin/add_ts_changes_to_libburn_1_2_2
+ cdrskin/add_ts_changes_to_libburn_1_2_3
Updated cdrskin tarball generator
02 Apr 2012 [4693]
ChangeLog
cdrskin/changelog.txt
Updated change log
02 Apr 2012 [4694]
svn move -m libburn release 1.2.2 is ready
http://svn.libburnia-project.org/libburn/branches/1.2.2
http://svn.libburnia-project.org/libburn/tags/1.2.2
------------------------------------ cycle - cdrskin-1.2.3 - 2012.04.02.172347
2012.04.04.100754 [4698]
cdrskin/cdrskin.c
Bug fix: cdrskin SIGSEGV if track source was added when no drive was available
2012.04.04.183902 [4699]
libburn/crc.c
Reacted on warning of Debian buildd
2012.04.08.112703 [4701]
libburn/libburn.h
libburn/options.h
libburn/options.c
libburn/write.c
libburn/libdax_msgs.h
libburn/libburn.ver
New API call burn_write_opts_set_obs_pad()
2012.04.08.112825 [4702]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
New option --obs_pad
2012.04.10.181239 [4704]
cdrskin/cdrskin.c
Now recognizing long options with double dash
13 Apr 2012 [4706]
cdrskin/cdrskin.1
Small correction in cdrskin man page
2012.04.13.202654 [4707]
configure.ac
libburn/libburn.h
libburn/options.c
cdrskin/cdrskin.1
Compile time option for obs_pad
18 Apr 2012 [4708]
doc/cdtext.txt
Augmented CD-TEXT documentation by a complete example of packs
18 Apr 2012 [4709]
doc/cookbook.txt
Small change in cookbook.txt about DVD-R DL
2012.05.08.080449 [4731]
libburn/crc.c
Corrections of CRC-32 algorithm for 32 bit systems. Mentioning of start value.
2012.05.30.202249 [4744]
libburn/write.c
libburn/mmc.c
doc/cookbook.txt
Bug fix: CD SAO sessions with data tracks started by an audio pause
2012.06.17.173420 [4762]
libburn/sector.c
Improved reported number of missing bytes in case of track source shortage
2012.07.08.103007 [4778]
libburn/structure.c
Bug fix: CD tracks were perceived 2 sectors too short. Nice with TAO, bad with SAO.
20 Jul 2012 [4794]
svn copy -m "Branching for libburn release 1.2.4"
http://svn.libburnia-project.org/libburn/trunk
http://svn.libburnia-project.org/libburn/branches/1.2.4
2012.07.20.113001 [4795]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 1.2.4
20 Jul 2012 [4796]
- cdrskin/add_ts_changes_to_libburn_1_2_2
- cdrskin/add_ts_changes_to_libburn_1_2_3
+ cdrskin/add_ts_changes_to_libburn_1_2_4
+ cdrskin/add_ts_changes_to_libburn_1_2_5
Updated cdrskin tarball generator
20 Jul 2012 []
ChangeLog
cdrskin/changelog.txt
Updated change log
----------------------------------- release - libburn-1.2.4 - 2012.07.20.113001
* New API call burn_write_opts_set_obs_pad(), ./configure --enable-dvd-obs-pad
* New cdrskin option --obs_pad
* Bug fix: CD SAO sessions with data tracks started by an audio pause
* Bug fix: CD tracks were perceived 2 sectors too short. Nice with TAO, bad with SAO.
* Bug fix: cdrskin SIGSEGV if track source was added when no drive was available
[]
ChangeLog
cdrskin/changelog.txt
Updated change log
------------------------------------ cycle - cdrskin-1.2.5 -
------------------------------------ cycle - cdrskin-1.1.9 -
@ -11395,11 +11153,6 @@ Important: When adding a public API function then add its name to file
===============================================================================
>>> TRACK SHORTAGE
xorriso: If libburn fails to produce the announced number of blocks
libburn : FAILURE : Premature end of input encountered. Missing: 2048 bytes
But actually several hundered blocks are missing.
CD-TEXT:
- with SAO
- libburn:
@ -11411,7 +11164,7 @@ CD-TEXT:
qemu:
- Re-assess benefit of BLKFLSBUF as of dvd+rw-tools/transport.hxx
- Re-asses benefit of BLKFLSBUF as of dvd+rw-tools/transport.hxx
- Centralize SCSI log /tmp file opening
@ -11439,6 +11192,11 @@ pntadm -A 10.0.0.24 -f MANUAL -i 010008544255E7 -m 10.0.0.0 -y 10.0.0.0
)
----------------------------------------------------------------------------
- find out from where libburn/crc.c stems. What algorithm is crc_32() ?
--------------------------------- bugs -------------------------------------
- handle HD DVD profiles 0x50 "HD DVD-ROM", 0x51 "HD DVD-R", 0x52 "HD DVD-RAM"
@ -11472,6 +11230,8 @@ Provide DVD+R DL layer break setter
Check all SORRY and FATAL errors whether they should become FAILUREs
problem with telltoc: double descriptor list from before load and after load
What about cdrskin rc files ? Forward with fallback runs ?

View File

@ -8,7 +8,7 @@ debug_opts="-O2"
def_opts=
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
fifo_opts=""
libvers="-DCdrskin_libburn_1_2_4"
libvers="-DCdrskin_libburn_1_2_0"
# To be used if Makefile.am uses libburn_libburn_la_CFLAGS
# burn="libburn/libburn_libburn_la-"
@ -41,15 +41,15 @@ do
elif test "$i" = "-compile_dewav"
then
compile_dewav=1
elif test "$i" = "-libburn_1_2_4"
elif test "$i" = "-libburn_1_2_0"
then
libvers="-DCdrskin_libburn_1_2_4"
libvers="-DCdrskin_libburn_1_2_0"
libdax_audioxtr_o="$burn"libdax_audioxtr.o
libdax_msgs_o="$burn"libdax_msgs.o
cleanup_src_or_obj="$burn"cleanup.o
elif test "$i" = "-libburn_svn"
then
libvers="-DCdrskin_libburn_1_2_5"
libvers="-DCdrskin_libburn_1_2_1"
libdax_audioxtr_o="$burn"libdax_audioxtr.o
libdax_msgs_o="$burn"libdax_msgs.o
cleanup_src_or_obj="$burn"cleanup.o
@ -99,7 +99,7 @@ do
echo "Options:"
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
echo " -compile_dewav compile program test/dewav without libburn."
echo " -libburn_1_2_4 set macro to match libburn-1.2.4"
echo " -libburn_1_2_0 set macro to match libburn-1.2.0"
echo " -libburn_svn set macro to match current libburn-SVN."
echo " -dvd_obs_64k 64 KB default size for DVD/BD writing."
echo " -use_libcdio link with -lcdio because libburn uses it."

View File

@ -1,4 +1,4 @@
AC_INIT([libburn], [1.2.4], [http://libburnia-project.org])
AC_INIT([libburn], [1.2.0], [http://libburnia-project.org])
AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h])
@ -96,8 +96,6 @@ dnl 1.1.4 = libburn.so.4.67.0
dnl 1.1.6 = libburn.so.4.69.0
dnl 1.1.8 = libburn.so.4.71.0
dnl 1.2.0 = libburn.so.4.73.0
dnl 1.2.2 = libburn.so.4.75.0
dnl 1.2.4 = libburn.so.4.77.0
dnl
dnl So LT_CURRENT, LT_REVISION and LT_AGE get set directly here.
dnl SONAME of the emerging library is LT_CURRENT - LT_AGE.
@ -123,7 +121,7 @@ dnl
dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
BURN_MAJOR_VERSION=1
BURN_MINOR_VERSION=2
BURN_MICRO_VERSION=4
BURN_MICRO_VERSION=0
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
AC_SUBST(BURN_MAJOR_VERSION)
@ -134,14 +132,14 @@ AC_SUBST(BURN_VERSION)
dnl Libtool versioning
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
dnl
dnl This is the release version libburn-1.2.4
dnl This is the release version libburn-1.2.0
dnl ### This is the development version after above release version
dnl LT_CURRENT++, LT_AGE++ has not yet happened.
dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
dnl
dnl SONAME = 81 - 77 = 4 . Linux library name = libburn.so.4.77.0
LT_CURRENT=81
LT_AGE=77
dnl SONAME = 77 - 73 = 4 . Linux library name = libburn.so.4.73.0
LT_CURRENT=77
LT_AGE=73
LT_REVISION=0
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
@ -229,19 +227,6 @@ else
fi
CFLAGS="$LIBBURN_DVD_OBS_64K $CFLAGS"
dnl ts B20413
AC_ARG_ENABLE(dvd-obs-pad,
[ --enable-dvd-obs-pad pad DVD DAO sessions to 32 resp. 64 KB, default=no],
, enable_dvd_obs_pad=no)
if test x$enable_dvd_obs_pad = xyes; then
LIBBURN_DVD_OBS_PAD="-DLibburn_dvd_always_obs_paD"
echo "enabled padding of DVD DAO sessions to 32 resp. 64 KB"
else
LIBBURN_DVD_OBS_64K=
echo "disabled padding of DVD DAO sessions to 32 resp. 64 KB"
fi
CFLAGS="$LIBBURN_DVD_OBS_PAD $CFLAGS"
dnl ts A91218
AC_ARG_ENABLE(libcdio,
[ --enable-libcdio Enable EXPERIMENTAL use of libcdio as system adapter, default=no],

View File

@ -113,16 +113,16 @@ Sony documents the cleartext part as "Genre information that would supplement
the Genre Code, such as 'USA Rock music in the 60s'". Always ASCII encoded.
Pack type 0x88 records information from the CD's Table of Content, as of
READ PMA/TOC/ATIP Format 0010b (mmc3r10g.pdf, table 237 TOC Track Descriptor
READ PMA/TOC/ATIP Format 0010b (mmc5r03c.pdf, table 490 TOC Track Descriptor
Format, Q Sub-channel).
See below, Format of a CD-TEXT packs array, for more details about the content
of pack type 0x88.
See below, Format of CD-TEXT packs, for more details about the content of
pack type 0x88.
Pack type 0x89 is yet quite unclear. It might be a representation of Playback
Skip Interval, Mode-5 Q sub-channel, POINT 01 to 40 (mmc3r10g.pdf 4.2.3.6.3).
Skip Interval, Mode-5 Q sub-channel, POINT 01 to 40 (mmc5r03.pdf 4.2.3.7.4).
If so, then this seems not to apply to write type SAO, because the CUE SHEET
format offers no way to express Mode-5 Q.
See below, Format of a CD-TEXT packs array, for an example of this pack type.
See below, Format of CD-TEXT packs, for an example of this pack type.
Pack type 0x8d is documented by Sony as "Closed Information: (use 8859-1 Code)
Any information can be recorded on disc as memorandum. Information in this
@ -139,7 +139,7 @@ ISRC consists of 12 characters: 2 country code [0-9A-Z], 3 owner code [0-9A-Z],
2 year digits (00 to 99), 5 serial number digits (00000 to 99999).
Pack type 0x8f summarizes the whole list of text packs of a block.
See below, Format of a CD-TEXT packs array, for details.
See below, Format of CD-TEXT packs, for details.
-------------------------------------------------------------------------------
@ -180,8 +180,8 @@ the next text of the same pack type. If no text of the same type follows,
then the remaining text bytes are set to 0.
The CRC algorithm uses divisor 0x11021. The resulting 16-bit residue of the
polynomial division get inverted and written as big-endian number to bytes
16 and 17 of the pack.
polynomial division gets exored with 0xffff and written as big-endian
number to bytes 16 and 17 of the pack.
The text packs are grouped in up to 8 blocks of at most 256 packs. Each block
@ -189,7 +189,7 @@ is in charge for one language. Sequence numbers of each block are counted
separately. All packs of block 0 come before the packs of block 1.
The limitation of block number and sequence numbers imply that there are at
most 2048 text packs possible. (READ TOC/PMA/ATIP could retrieve 3640 packs,
most 2048 text packs possible. (READ TOC/PMS/ATIP could retrieve 3640 packs,
as it is limited to 64 kB - 2.)
@ -401,7 +401,7 @@ Byte :Value Meaning
-------------------------------------------------------------------------------
Overview of libburn API calls for CD-TEXT (see libburn/libburn.h for details):
libburn API calls for CD-TEXT (see libburn/libburn.h for details):
libburn can retrieve the set of text packs from a CD:
@ -651,12 +651,12 @@ There are three more text attributes mentioned in man cdrecord for defining
the corresponding CD-TEXT attributes: ARRANGER, COMPOSER, MESSAGE.
--------------------------------------------------------
Example of a CDRWIN cue sheet file named NIGHTCATS.CUE :
--------------------------------------------------------
--------------------------------------
Example of a CDRWIN cue sheet file :
--------------------------------------
CATALOG 1234567890123
FILE "audiodata.bin" BINARY
FILE "cdtext.bin" BINARY
TITLE "Joyful Nights"
TRACK 01 AUDIO
FLAGS DCP
@ -680,35 +680,6 @@ TITLE "Joyful Nights"
ISRC XYBLG1100006
INDEX 01 13:20:33
By
$ cdrskin -v dev=/dev/sr0 -text cuefile=NIGHTCATS.CUE
this yields as text packs:
0 : 80 00 00 00 J o y f u l N i g h t f0 f7
1 : 80 00 01 0c s 00 S o n g o f J o 43 1c
2 : 80 01 02 0a y 00 H u m p t y D u m 43 f9
3 : 80 02 03 0a p t y 00 M e e O w w w 24 72
4 : 80 03 04 08 w 00 00 00 00 00 00 00 00 00 00 00 6e af
5 : 81 00 05 00 00 F e l i x a n d T 4d 51
6 : 81 01 06 0b h e P u r r s 00 C a t a7 40
7 : 81 02 07 03 w a l k B e a u t i e 59 80
8 : 81 02 08 0f s 00 M i a K i t t e n 30 c9
9 : 81 03 09 0a 00 00 00 00 00 00 00 00 00 00 00 00 ad 19
10 : 82 00 0a 00 00 F r i e d r i c h S 70 8f
11 : 82 01 0b 0b c h i l l e r 00 M o t h 33 43
12 : 82 02 0c 04 e r G o o s e 00 M i a d6 f5
13 : 82 03 0d 03 K i t t e n 00 00 00 00 00 f5 83
14 : 8e 00 0e 00 1 2 3 4 5 6 7 8 9 0 1 2 92 3e
15 : 8e 00 0f 0c 3 00 X Y B L G 1 1 0 1 2 c0 2b
16 : 8e 01 10 0a 3 4 00 X Y B L G 1 1 0 0 bb b3
17 : 8e 02 11 09 0 0 5 00 X Y B L G 1 1 0 f3 bf
18 : 8e 03 12 08 0 0 0 6 00 00 00 00 00 00 00 00 5b 5c
19 : 8f 00 13 00 00 01 03 00 05 05 04 00 00 00 00 00 9b fe
20 : 8f 01 14 00 00 00 00 00 00 00 05 03 15 00 00 00 11 0b
21 : 8f 02 15 00 00 00 00 00 09 00 00 00 00 00 00 00 da 77
--------------------------------------
Some restrictions apply in the libburn call burn_session_by_cue_file():

View File

@ -296,9 +296,8 @@ A pre-gap of 2 seconds is mandatory only for the first track. Pre-gap and
post-gap may be needed with further tracks if they have neighbors with
different DATA FORM values. (Such mixing is not yet supported by libburn.)
DATA FORM is 00h for audio payload, 01h for audio pause (Lead-in and Lead-out),
10h for data, 14h for data pause (Lead-in and Lead-out).
This shall be ored with 40h for CD-TEXT in Lead-in.
DATA FORM is 00h for audio payload, 01h for audio pause, 10h for data,
41h for CD-TEXT in Lead-in.
(mmc5r03c.pdf 6.33.3.11 CD-DA Data Form, 6.33.3.12 CD-ROM mode 1 Form)
SCMS value 80h in conjunction with bit5 of CTL is an indicator for exhausted
@ -319,8 +318,7 @@ The next entry (eventually being the first one) describes the Lead-in.
Its content is
(CTL|ADR ,00h,00h, DATA FORM ,00h,00h,00h,00h)
With the CTL|ADR for the first track: 41h for data, 01h for audio.
DATA FORM is pause (audio=01h, data=14h). Ored with 40h if CD-TEXT shall
be stored in Lean-in.
DATA FORM is 41h if CD-TEXT shall be stored in Lean-in. Else it is 01h.
The LBA for the first write is negative: -150. This corresponds to MSF address
00h:00h:00h. All addresses are to be given in MSF format.
@ -356,9 +354,8 @@ A track must at least contain 300 payload blocks: 4 seconds of audio or
(mmc5r03c.pdf 6.33.3.6)
At the end of the session there is a lead-out entry
(CTL|ADR,AAh,01h,DATA FORM,00h,MIN,SEC,FRAME)
(CTL|ADR,AAh,01h,01h,00h,MIN,SEC,FRAME)
marking the end of the last track. (With libburn CTL is as of the last track.)
DATA FORM is 01h for audio, 14h for data.
-------------------------------------------------------------------------------
@ -974,7 +971,7 @@ Media type can be recognized by Current Profile from 46h GET CONFIGURATION.
DVD-R 0011h
DVD-RW Restricted Overwrite 0013h
DVD-RW Sequential Recording 0014h
DVD-R/DL Sequential Recording 0015h (can only do single-session)
(DVD-R/DL Sequential Recording 0015h untested, might be single-session only)
There are two approaches for writing to sequential DVD-R[W]: DAO and
Incremental. Not all media and drives offer Incremental which allows
@ -1256,13 +1253,11 @@ track of the session.
-------------------------------------------------------------------------------
Hearsay about DVD-R/DL (Dual Layer) :
Meanwhile confirmed by one user:
DVD-R/DL can assume profile 0015h DVD-R Dual Layer Sequential which is supposed
to behave like DVD-R or 0016h DVD-R Dual Layer Jump which has no counterpart
with DVD-R.
A half-sentence in mmc5r03c.pdf 6.3.3.3.3 indicates that closing a session
A half-sentence in mmc5r03c.pdf 6.3.3.3.3 might indicate that closing a session
by 5Bh CLOSE TRACK SESSION Close Function 010b overrides the multi-session bits
in mode page 05h.
growisofs applies this function in case of not DAO, though. A comment in

View File

@ -1186,9 +1186,6 @@ TYG11 TAIYO YUDEN DVD-R DL 8x
TYG-BD Y01 TAIYO YUDEN Co., Ltd. 1-2X LTH [Blu]
TYG-BD Y03 TAIYO YUDEN Co., Ltd. 1-4X LTH [Blu]
"UmeDisc Ltd. HK"
UMEDISC DL1 Elite DVD+R DL [User report feb 2012]
"Unifino Inc."
UTJR001001 UNIFINO 4X [Hij]

View File

@ -1,568 +1,47 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2012 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
Containing disabled code pieces from other GPL programs.
They are just quotes for reference.
The activated code uses plain polynomial division and other primitve
algorithms to build tables of pre-computed CRC values. It then computes
the CRCs by algorithms which are derived from mathematical considerations
and from analysing the mathematical meaning of the disabled code pieces.
The comments here are quite detailed in order to prove my own understanding
of the topic.
*/
#ifdef HAVE_CONFIG_H
#include "../config.h"
#endif
#include "crc.h"
/* Exploration ts B00214 :
ECMA-130, 22.3.6 "CRC field"
"This field contains the inverted parity bits. The CRC code word must be
divisible by the check polynomial. [...]
The generating polynomial shall be
G(x) = x^16 + x^12 + x^5 + 1
"
Also known as CRC-16-CCITT, CRC-CCITT
Used in libburn for raw write modes in sector.c.
There is also disabled code in read.c which would use it.
ts B11222:
The same algorithm is prescribed for CD-TEXT in MMC-3 Annex J.
"CRC Field consists of 2 bytes. Initiator system may use these bytes
to check errors in the Pack. The polynomial is x^16 + x^12 + x^5 + 1.
All bits shall be inverted."
libburn/cdtext.c uses a simple bit shifting function : crc_11021()
ts B20211:
Discussion why both are equivalent in respect to their result:
Both map the bits of the given bytes to a polynomial over the finite field
of two elements "GF(2)". If bytes 0 .. M are given, then bit n of byte m
is mapped to the coefficient of x exponent (n + ((M - m) * 8) + 16).
I.e. they translate the bits into a polynomial with the highest bit
becomming the coefficient of the highest power of x. Then this polynomial
is multiplied by (x exp 16).
The set of all such polynomials forms a commutative ring. Its addition
corresponds to bitwise exclusive or. Addition and subtraction are identical.
Multiplication with polynomials of only one single non-zero coefficient
corresponds to leftward bit shifting by the exponent of that coefficient.
The same rules apply as with elementary school arithmetics on integer
numbers, but with surprising results due to the finite nature of the
coefficient number space.
Note that multiplication is _not_ an iteration of addition here.
Function crc_11021() performs a division with residue by the euclidian
algorithm. I.e. it splits polynomial d into quotient q(d) and residue r(d)
in respect to the polynomial p = x exp 16 + x exp 12 + x exp 5 + x exp 0
d = p * q(d) + r(d)
where r(d) is of a polynomial degree lower than p, i.e. only x exp 15
or lower have non-zero coefficients.
The checksum crc(D) is derived by reverse mapping (r(d) * (x exp 16)).
I.e. by mapping the coefficient of (x exp n) to bit n of the 16 bit word
crc(D).
The function result is the bit-wise complement of crc(D).
Function crc_ccitt uses a table ccitt_table of r(d) values for the
polynomials d which represent the single byte values 0x00 to 0xff.
It computes r(d) by computing the residues of an iteratively expanded
polynomial. The expansion of the processed byte string A by the next byte B
from the input byte string happens by shifting the string 8 bits to the
left, and by oring B onto bits 0 to 7.
In the space of polynomials, the already processed polynomial "a" (image of
byte string A) gets expanded by polynomial b (the image of byte B) like this
a * X + b
where X is (x exp 8), i.e. the single coefficient polynomial of degree 8.
The following argumentation uses algebra with commutative, associative
and distributive laws.
Valid especially with polynomials is this rule:
(1): r(a + b) = r(a) + r(b)
because r(a) and r(b) are of degree lower than degree(p) and
degree(a + b) <= max(degree(a), degree(b))
Further valid are:
(2): r(a) = r(r(a))
(3): r(p * a) = 0
The residue of this expanded polynomial can be expressed by means of the
residue r(a) which is known from the previous iteration step, and the
residue r(b) which may be looked up in ccitt_table.
r(a * X + b)
= r(p * q(a) * X + r(a) * X + p * q(b) + r(b))
Applying rule (1):
= r(p * q(a) * X) + r(r(a) * X) + r(p * q(b)) + r(r(b))
Rule (3) and rule (2):
= r(r(a) * X) + r(b)
Be h(a) and l(a) chosen so that: r(a) = h(a) * X + l(a),
and l(a) has zero coefficients above (x exp 7), and h(a) * X has zero
coefficients below (x exp 8). (They correspond to the high and low byte
of the 16 bit word crc(A).)
So the previous statement can be written as:
= r(h(a) * X * X) + r(l(a) * X) + r(b)
Since the degree of l(a) is lower than 8, the degree of l(a) * X is lower
than 16. Thus it cannot be divisible by p which has degree 16.
So: r(l(a) * X) = l(a) * X
This yields
= l(a) * X + r(h(a) * X * X + b)
h(a) * X * X is the polynomial representation of the high byte of 16 bit
word crc(A).
So in the world of bit patterns the iteration step is:
crc(byte string A expanded by byte B)
= (low_byte(crc(A)) << 8) ^ crc(high_byte(crc(A)) ^ B)
And this is what function crc_ccitt() does, modulo swapping the exor
operants and the final bit inversion which is prescribed by ECMA-130
and MMC-3 Annex J.
The start value of the table driven byte shifting algorithm may be
different from the start value of an equivalent bit shifting algorithm.
This is because the final flushing by zero bits is already pre-computed
in the table. So the start value of the table driven algorithm must be
the CRC of the 0-polynomial under the start value of the bit shifting
algorithm.
This fact is not of much importance here, because the start value of
the bit shifter is 0x0000 which leads to CRC 0x0000 and thus to start
value 0x0000 with the table driven byte shifter.
*/
/* Plain implementation of polynomial division on a Galois field, where
addition and subtraction both are binary exor. Euclidian algorithm.
Divisor is x^16 + x^12 + x^5 + 1 = 0x11021.
This is about ten times slower than the table driven algorithm.
*/
static int crc_11021(unsigned char *data, int count, int flag)
{
int acc = 0, i;
for (i = 0; i < count * 8 + 16; i++) {
acc = (acc << 1);
if (i < count * 8)
acc |= ((data[i / 8] >> (7 - (i % 8))) & 1);
if (acc & 0x10000)
acc ^= 0x11021;
}
return acc;
}
/* This is my own table driven implementation for which i claim copyright.
Copyright (c) 2012 Thomas Schmitt <scdbackup@gmx.net>
*/
unsigned short crc_ccitt(unsigned char *data, int count)
{
static unsigned short crc_tab[256], tab_initialized = 0;
unsigned short acc = 0;
unsigned char b[1];
int i;
if (!tab_initialized) {
/* Create table of byte residues */
for (i = 0; i < 256; i++) {
b[0] = i;
crc_tab[i] = crc_11021(b, 1, 0);
}
tab_initialized = 1;
}
/* There seems to be a speed advantage on amd64 if (acc << 8) is the
second operant of exor, and *(data++) seems faster than data[i].
*/
for (i = 0; i < count; i++)
acc = crc_tab[(acc >> 8) ^ *(data++)] ^ (acc << 8);
/* ECMA-130 22.3.6 and MMC-3 Annex J (CD-TEXT) want the result with
inverted bits
*/
return ~acc;
}
/*
This was the function inherited with libburn-0.2.
static unsigned short ccitt_table[256] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
};
unsigned short crc_ccitt(unsigned char *q, int len)
{
unsigned short crc = 0;
while (len-- > 0)
crc = ccitt_table[(crc >> 8 ^ *q++) & 0xff] ^ (crc << 8);
return ~crc;
}
*/
/* Exploration ts B00214 :
ECMA-130, 14.3 "EDC field"
"The EDC field shall consist of 4 bytes recorded in positions 2064 to 2067.
The error detection code shall be a 32-bit CRC applied on bytes 0 to 2063.
The least significant bit of a data byte is used first. The EDC codeword
must be divisible by the check polynomial:
P(x) = (x^16 + x^15 + x^2 + 1) . (x^16 + x^2 + x + 1)
The least significant parity bit (x^0) is stored in the most significant
bit position of byte 2067.
"
Used for raw writing in sector.c
ts B20211:
Discussion why function crc_32() implements above prescription of ECMA-130.
See end of this file for the ofunction inherited with libburn-0.2.
The mentioned polynomial product
(x^16 + x^15 + x^2 + 1) . (x^16 + x^2 + x + 1)
yields this sum of x exponents
32 31 18 16
18 17 4 2
17 16 3 1
16 15 2 0
======================================
32 31 16 15 4 3 1 0
(The number of x^18 and x^17 is divisible by two and thus 0 in GF(2).)
This yields as 33 bit number:
0x18001801b
If above prescription gets implemented straight forward by function
crc_18001801b(), then its results match the ones of crc_32() with all test
strings which i could invent.
The function consists of a conventional polynomial division with reverse
input order of bits per byte.
Further it swaps the bits in the resulting 32 bit word. That is because
sector.c:sector_headers writes the 4 bytes of crc_32() as little endian.
The ECMA-130 prescription rather demands big endianness and bit swapping
towards the normal bit order in bytes:
"The EDC field shall consist of 4 bytes recorded in positions 2064 to 2067.
[...]
The least significant parity bit (x^0) is stored in the most
significant bit position of byte 2067."
-----------------------------------------------------------------------
*/
/* Overall bit mirroring of a 32 bit word */
unsigned int rfl32(unsigned int acc)
{
unsigned int inv_acc;
int i;
inv_acc = 0;
for (i = 0; i < 32; i++)
if (acc & (1 << i))
inv_acc |= 1 << (31 - i);
return inv_acc;
}
/* Plain implementation of polynomial division on a Galois field, where
addition and subtraction both are binary exor. Euclidian algorithm.
Divisor is (x^16 + x^15 + x^2 + 1) * (x^16 + x^2 + x + 1).
This is about ten times slower than the table driven algorithm.
@param flag bit0= do not mirror bits in input bytes and result word
(Useful for building the byte indexed CRC table)
*/
static unsigned int crc_18001801b(unsigned char *data, int count, int flag)
{
unsigned int acc = 0, top;
long int i;
unsigned int inv_acc;
for (i = 0; i < count * 8 + 32; i++) {
top = acc & 0x80000000;
acc = (acc << 1);
if (i < count * 8) {
if (flag & 1)
/* Normal bit sequence of input bytes */
acc |= ((data[i / 8] >> (7 - (i % 8))) & 1);
else
/* Bit sequence of input bytes mirrored */
acc |= ((data[i / 8] >> (i % 8)) & 1);
}
if (top)
acc ^= 0x8001801b;
}
if (flag & 1)
return (unsigned int) (acc & 0xffffffff);
/* The bits of the whole 32 bit result are mirrored for ECMA-130
output compliance and for sector.c habit to store CRC little endian
although ECMA-130 prescribes it big endian.
*/
inv_acc = rfl32((unsigned int) acc);
return inv_acc;
}
/*
-----------------------------------------------------------------------
Above discussion why crc_ccitt() and crc_11021() yield identical results
can be changed from 16 bit to 32 bit by chosing h(a) and l(a) so that:
r(a) = h(a) * X * X * X + l(a)
h(a) corresponds to the highest byte of crc(A), whereas l(a) corresponds
to the lower three bytes of crc(A).
This yields
r(a * X + b)
= l(a) * X + r(h(a) * X * X * X * X + b)
h(a) * X * X * X * X is the polynomial representation of the high byte of
32 bit word crc(A).
So in the world of bit patterns we have:
crc(byte string A expanded by byte B)
= (lowest_three_bytes(crc(A)) << 8) ^ crc(high_byte(crc(A)) ^ B)
Regrettably this does not yet account for the byte-internal mirroring of
bits during the conversion from bit pattern to polynomial, and during
conversion from polynomial residue to bit pattern.
Be rfl8(D) the result of byte-internal mirroring of bit pattern D,
and mirr8(d) its corresponding polynom.
Be now h(a) and l(a) chosen so that: r(mirr8(a)) = h(a) * X * X * X + l(a)
This corresponds to highest byte and lower three bytes of crc(A).
r(mirr8(a) * X + mirr8(b))
= r(h(a) * X * X * X * X) + r(l(a) * X) + r(mirr8(b))
= l(a)) * X + r(h(a) * X * X * X * X + mirr8(b))
The corresponding bit pattern operation is
crc(mirrored byte string A expanded by mirrored byte B)
= (lowest_three_bytes(crc(A)) << 8) ^ crc(high_byte(crc(A)) ^ rfl8(B))
This demands a final result mirroring to meet the ECMA-130 prescription.
rfl8() can be implemented as lookup table.
The start value of the bit shifting iteration is 0x00000000, which leads
to the same start value for the table driven byte shifting.
The following function crc32_by_tab() yields the same results as functions
crc_18001801b() and crc_32():
-----------------------------------------------------------------------
*/
/* Byte-internal bit mirroring function.
*/
unsigned int rfl8(unsigned int acc)
{
unsigned int inv_acc;
int i, j;
inv_acc = 0;
for (j = 0; j < 4; j++)
for (i = 0; i < 8; i++)
if (acc & (1 << (i + 8 * j)))
inv_acc |= 1 << ((7 - i) + 8 * j);
return inv_acc;
}
#ifdef Libburn_with_crc_illustratioN
/* Not needed for libburn. The new implementation of function crc_32() is the
one that is used.
*/
unsigned int crc32_by_tab(unsigned char *data, int count, int flag)
{
static unsigned int crc_tab[256], tab_initialized = 0;
static unsigned char mirr_tab[256];
unsigned int acc, inv_acc;
unsigned char b[1];
int i;
if (!tab_initialized) {
for (i = 0; i < 256; i++) {
b[0] = i;
/* Create table of non-mirrored 0x18001801b residues */
crc_tab[i] = crc_18001801b(b, 1, 1);
/* Create table of mirrored byte values */
mirr_tab[i] = rfl8(i);
}
tab_initialized = 1;
}
acc = 0;
for (i = 0; i < count; i++)
acc = (acc << 8) ^ crc_tab[(acc >> 24) ^ mirr_tab[data[i]]];
/* The bits of the whole 32 bit result are mirrored for ECMA-130
output compliance and for sector.c habit to store CRC little endian
although ECMA-130 prescribes it big endian.
*/
inv_acc = rfl32((unsigned int) acc);
return inv_acc;
}
#endif /* Libburn_with_crc_illustratioN */
/*
-----------------------------------------------------------------------
Above function yields sufficient performance, nevertheless the old function
crc_32() (see below) is faster by avoiding the additional mirror table
lookup.
A test with 10 times 650 MB on 3000 MHz amd64:
crc_18001801b : 187 s
crc32_by_tab : 27 s
crc_32 : 16 s
So how does crc_32() avoid the application of bit mirroring to B ?.
Inherited crc_32() performs
crc = crc32_table[(crc ^ *data++) & 0xffL] ^ (crc >> 8);
Above function crc32_by_tab() would be
crc = crc_tab[(crc >> 24) ^ mirr_tab[*data++]] ^ (crc << 8);
The shortcut does not change the polynomial representation of the algorithm
or the mapping from and to bit patterns. It only mirrors the bit direction
in the bytes and in the 32-bit words which are involved in the bit pattern
computation. This affects input (which is desired), intermediate state
(which is as good as unmirrored), and final output (which would be slightly
undesirable if libburn could not use the mirrored result anyway).
Instead of the high byte (crc >> 24), the abbreviated algorithm uses
the low byte of the mirrored intermediate checksum (crc & 0xffL).
Instead of shifting the other three intermediate bytes to the left
(crc << 8), the abbreviated algorithm shifts them to the right (crc >> 8).
In both cases they overwrite the single byte that was used for computing
the table index.
The byte indexed table of CRC values needs to hold mirrored 32 bit values.
The byte index [(crc ^ *data++) & 0xffL] would need to be mirrored, which
would eat up the gain of not mirroring the input bytes. But this mirroring
can be pre-computed into the table by exchanging each value with the value
of its mirrored index.
So this relation exists between the CRC table crc_tab[] of crc32_by_tab()
and the table crc32_table[] of the abbreviated algorithm crc_32():
crc_tab[i] == rfl32(crc32_table[rfl8(i)])
for i={0..255}.
I compared the generated table in crc32_by_tab() by this test
for (i = 0; i < 256; i++) {
if (rfl32(crc_tab[rfl8(i)]) != crc32_table[i] ||
crc_tab[i] != rfl32(crc32_table[rfl8(i)])) {
printf("DEVIATION : i = %d\n", i);
exit(1);
}
}
No screaming abort happened.
-----------------------------------------------------------------------
*/
/* This is my own mirrored table implementation for which i claim copyright.
With gcc -O2 it shows the same efficiency as the inherited implementation
below. With -O3, -O1, or -O0 it is only slightly slower.
Copyright (c) 2012 Thomas Schmitt <scdbackup@gmx.net>
*/
unsigned int crc_32(unsigned char *data, int count)
{
static unsigned int crc_tab[256], tab_initialized = 0;
unsigned int acc = 0;
unsigned char b[1];
int i;
if (!tab_initialized) {
/* Create table of mirrored 0x18001801b residues in
bit-mirrored index positions.
*/
for (i = 0; i < 256; i++) {
b[0] = i;
crc_tab[rfl8(i)] = rfl32(crc_18001801b(b, 1, 1));
}
tab_initialized = 1;
}
for (i = 0; i < count; i++)
acc = (acc >> 8) ^ crc_tab[(acc & 0xff) ^ data[i]];
/* The bits of the whole 32 bit result stay mirrored for ECMA-130
output 8-bit mirroring and for sector.c habit to store the CRC
little endian although ECMA-130 prescribes it big endian.
*/
return acc;
}
/*
-----------------------------------------------------------------------
This was the function inherited with libburn-0.2 which implements the
abbreviated algorithm. Its obscure existence led me to above insights.
My compliments to the (unknown) people who invented this.
unsigned long crc32_table[256] = {
static unsigned short ccitt_table[256] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
0x8108, 0x9129, 0xA14A, 0xB16B, 0xC18C, 0xD1AD, 0xE1CE, 0xF1EF,
0x1231, 0x0210, 0x3273, 0x2252, 0x52B5, 0x4294, 0x72F7, 0x62D6,
0x9339, 0x8318, 0xB37B, 0xA35A, 0xD3BD, 0xC39C, 0xF3FF, 0xE3DE,
0x2462, 0x3443, 0x0420, 0x1401, 0x64E6, 0x74C7, 0x44A4, 0x5485,
0xA56A, 0xB54B, 0x8528, 0x9509, 0xE5EE, 0xF5CF, 0xC5AC, 0xD58D,
0x3653, 0x2672, 0x1611, 0x0630, 0x76D7, 0x66F6, 0x5695, 0x46B4,
0xB75B, 0xA77A, 0x9719, 0x8738, 0xF7DF, 0xE7FE, 0xD79D, 0xC7BC,
0x48C4, 0x58E5, 0x6886, 0x78A7, 0x0840, 0x1861, 0x2802, 0x3823,
0xC9CC, 0xD9ED, 0xE98E, 0xF9AF, 0x8948, 0x9969, 0xA90A, 0xB92B,
0x5AF5, 0x4AD4, 0x7AB7, 0x6A96, 0x1A71, 0x0A50, 0x3A33, 0x2A12,
0xDBFD, 0xCBDC, 0xFBBF, 0xEB9E, 0x9B79, 0x8B58, 0xBB3B, 0xAB1A,
0x6CA6, 0x7C87, 0x4CE4, 0x5CC5, 0x2C22, 0x3C03, 0x0C60, 0x1C41,
0xEDAE, 0xFD8F, 0xCDEC, 0xDDCD, 0xAD2A, 0xBD0B, 0x8D68, 0x9D49,
0x7E97, 0x6EB6, 0x5ED5, 0x4EF4, 0x3E13, 0x2E32, 0x1E51, 0x0E70,
0xFF9F, 0xEFBE, 0xDFDD, 0xCFFC, 0xBF1B, 0xAF3A, 0x9F59, 0x8F78,
0x9188, 0x81A9, 0xB1CA, 0xA1EB, 0xD10C, 0xC12D, 0xF14E, 0xE16F,
0x1080, 0x00A1, 0x30C2, 0x20E3, 0x5004, 0x4025, 0x7046, 0x6067,
0x83B9, 0x9398, 0xA3FB, 0xB3DA, 0xC33D, 0xD31C, 0xE37F, 0xF35E,
0x02B1, 0x1290, 0x22F3, 0x32D2, 0x4235, 0x5214, 0x6277, 0x7256,
0xB5EA, 0xA5CB, 0x95A8, 0x8589, 0xF56E, 0xE54F, 0xD52C, 0xC50D,
0x34E2, 0x24C3, 0x14A0, 0x0481, 0x7466, 0x6447, 0x5424, 0x4405,
0xA7DB, 0xB7FA, 0x8799, 0x97B8, 0xE75F, 0xF77E, 0xC71D, 0xD73C,
0x26D3, 0x36F2, 0x0691, 0x16B0, 0x6657, 0x7676, 0x4615, 0x5634,
0xD94C, 0xC96D, 0xF90E, 0xE92F, 0x99C8, 0x89E9, 0xB98A, 0xA9AB,
0x5844, 0x4865, 0x7806, 0x6827, 0x18C0, 0x08E1, 0x3882, 0x28A3,
0xCB7D, 0xDB5C, 0xEB3F, 0xFB1E, 0x8BF9, 0x9BD8, 0xABBB, 0xBB9A,
0x4A75, 0x5A54, 0x6A37, 0x7A16, 0x0AF1, 0x1AD0, 0x2AB3, 0x3A92,
0xFD2E, 0xED0F, 0xDD6C, 0xCD4D, 0xBDAA, 0xAD8B, 0x9DE8, 0x8DC9,
0x7C26, 0x6C07, 0x5C64, 0x4C45, 0x3CA2, 0x2C83, 0x1CE0, 0x0CC1,
0xEF1F, 0xFF3E, 0xCF5D, 0xDF7C, 0xAF9B, 0xBFBA, 0x8FD9, 0x9FF8,
0x6E17, 0x7E36, 0x4E55, 0x5E74, 0x2E93, 0x3EB2, 0x0ED1, 0x1EF0
};
unsigned long crc32_table[256] = {
0x00000000L, 0x90910101L, 0x91210201L, 0x01B00300L,
0x92410401L, 0x02D00500L, 0x03600600L, 0x93F10701L,
0x94810801L, 0x04100900L, 0x05A00A00L, 0x95310B01L,
@ -627,16 +106,47 @@ unsigned int crc_32(unsigned char *data, int count)
0xE541F401L, 0x75D0F500L, 0x7460F600L, 0xE4F1F701L,
0xE381F801L, 0x7310F900L, 0x72A0FA00L, 0xE231FB01L,
0x71C0FC00L, 0xE151FD01L, 0xE0E1FE01L, 0x7070FF00L
};
};
unsigned int crc_32(unsigned char *data, int len)
{
/* Exploration ts B00214 :
ECMA-130, 22.3.6 "CRC field"
Generating polynomial: x^16 + x^12 + x^5 + 1
Also known as CRC-16-CCITT, CRC-CCITT
Use in libburn for raw write modes in sector.c.
There is also disabled code in read.c which would use it.
ts B11222:
libburn/cdtext.c uses a simple bit shifting function : crc_11021()
*/
unsigned short crc_ccitt(unsigned char *q, int len)
{
unsigned short crc = 0;
while (len-- > 0)
crc = ccitt_table[(crc >> 8 ^ *q++) & 0xff] ^ (crc << 8);
return ~crc;
}
/* Exploration ts B00214 :
ECMA-130, 14.3 "EDC field"
"The EDC codeword must be divisible by the check polynomial:
P(x) = (x^16 + x^15 + x^2 + 1) . (x^16 + x^2 + x + 1)
"
>>> Test whether this coincides with CRC-32 IEEE 802.3
x^32 + x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10
+ x^8 + x^7 + x^5 + x^4 + x^2 + x + 1
Used for raw writing in sector.c
*/
unsigned int crc_32(unsigned char *data, int len)
{
unsigned int crc = 0;
while (len-- > 0)
crc = crc32_table[(crc ^ *data++) & 0xffL] ^ (crc >> 8);
return crc;
}
*/
}

View File

@ -1,21 +1,11 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2012 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
#ifndef BURN__CRC_H
#define BURN__CRC_H
#ifdef Xorriso_standalonE
/* Source module crc.c of yet unclear ancestry is excluded from GNU xorriso */
/* ts B20219 : The functions have been re-implemented from scratch after
studying texts about CRC computation and understanding the
meaning of the underlying ECMA-130 specs.
Nevertheless, there is no need to include them into xorriso
because it does neither CD-TEXT nor raw CD writing.
*/
#ifndef Libburn_no_crc_C
#define Libburn_no_crc_C 1
#endif

View File

@ -1477,8 +1477,6 @@ off_t burn_disc_available_space(struct burn_drive *d,
0x40 "BD-ROM",
Read-only for now is this BD-R profile (testers wanted)
0x42 "BD-R random recording"
Empty drives are supposed to report
0x00 ""
@param d The drive where the media is inserted.
@param pno Profile Number. See also mmc5r03c.pdf, table 89
@param name Profile Name (see above list, unknown profiles have empty name)
@ -2929,14 +2927,10 @@ void burn_write_opts_set_format(struct burn_write_opts *opts, int format);
*/
int burn_write_opts_set_simulate(struct burn_write_opts *opts, int sim);
/** Controls buffer underrun prevention. This is only needed with CD media
and possibly with old DVD-R drives. All other media types are not
vulnerable to burn failure due to buffer underrun.
/** Controls buffer underrun prevention
@param opts The write opts to change
@param underrun_proof if non-zero, buffer underrun protection is enabled
@return Returns 1 if the drive announces to be capable of underrun
prevention,
Returns 0 if not.
@return Returns 1 on success and 0 on failure.
*/
int burn_write_opts_set_underrun_proof(struct burn_write_opts *opts,
int underrun_proof);
@ -3079,19 +3073,6 @@ void burn_write_opts_set_stream_recording(struct burn_write_opts *opts,
*/
void burn_write_opts_set_dvd_obs(struct burn_write_opts *opts, int obs);
/* ts B20406 */
/** Overrides the automatic decision whether to pad up the last write chunk to
its full size. This applies to DVD, BD and stdio: pseudo-drives.
Note: This override may get enabled fixely already at compile time by
defining macro Libburn_dvd_always_obs_paD .
@param opts The write opts to change
@param pad 1 means to pad up in any case, 0 means automatic decision.
@since 1.2.4
*/
void burn_write_opts_set_obs_pad(struct burn_write_opts *opts, int pad);
/* ts A91115 */
/** Sets the rythm by which stdio pseudo drives force their output data to
be consumed by the receiving storage device. This forcing keeps the memory
@ -3451,7 +3432,7 @@ void burn_version(int *major, int *minor, int *micro);
*/
#define burn_header_version_major 1
#define burn_header_version_minor 2
#define burn_header_version_micro 4
#define burn_header_version_micro 0
/** Note:
Above version numbers are also recorded in configure.ac because libtool
wants them as parameters at build time.

View File

@ -176,7 +176,6 @@ burn_write_opts_set_has_mediacatalog;
burn_write_opts_set_leadin_text;
burn_write_opts_set_mediacatalog;
burn_write_opts_set_multi;
burn_write_opts_set_obs_pad;
burn_write_opts_set_perform_opc;
burn_write_opts_set_simulate;
burn_write_opts_set_start_byte;

View File

@ -411,7 +411,6 @@ Range "libdax_msgs" : 0x00000000 to 0x0000ffff
0x00000001 (DEBUG,ZERO) = Test error message
0x00000002 (DEBUG,ZERO) = Debugging message
0x00000003 (FATAL,HIGH) = Out of virtual memory
0x00000004 (FATAL,HIGH) = Generic fatal error
------------------------------------------------------------------------------

View File

@ -908,12 +908,6 @@ int mmc_write(struct burn_drive *d, int start, struct buffer *buf)
extern int burn_sg_log_scsi;
#endif
/*
fprintf(stderr, "libburn_DEBUG: buffer sectors= %d bytes= %d\n",
buf->sectors, buf->bytes);
*/
c = &(d->casual_command);
#ifdef Libburn_log_in_and_out_streaM

View File

@ -1,6 +1,6 @@
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2012 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -46,13 +46,7 @@ struct burn_write_opts *burn_write_opts_new(struct burn_drive *drive)
opts->underrun_proof = drive->mdata->underrun_proof;
opts->perform_opc = 1;
opts->obs = -1;
#ifdef Libburn_dvd_always_obs_paD
opts->obs_pad = 1;
#else
opts->obs_pad = 0;
#endif
opts->start_byte = -1;
opts->fill_up_media = 0;
opts->force_is_set = 0;
@ -486,13 +480,6 @@ void burn_write_opts_set_dvd_obs(struct burn_write_opts *opts, int obs)
}
/* ts B20406: API */
void burn_write_opts_set_obs_pad(struct burn_write_opts *opts, int pad)
{
opts->obs_pad = 2 * !!pad;
}
/* ts A91115: API */
void burn_write_opts_set_stdio_fsync(struct burn_write_opts *opts, int rythm)
{

View File

@ -1,6 +1,6 @@
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2012 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -42,9 +42,7 @@ struct burn_write_opts
/* ts A61219 : Output block size to trigger buffer flush if hit.
-1 with CD, 32 kB with DVD */
int obs;
int obs_pad; /* >0 pad up last block to obs, 0 do not
2 indicates burn_write_opts_set_obs_pad(,1)
*/
int obs_pad; /* 1=pad up last block to obs */
/* ts A61222 : Start address for media which allow a choice */
off_t start_byte;

View File

@ -185,18 +185,13 @@ static void get_bytes(struct burn_track *track, int count, unsigned char *data)
if (track->end_on_premature_eoi && shortage >= count &&
!track->open_ended) {
char msg[80];
off_t missing, inp_block_size, track_blocks;
inp_block_size = burn_sector_length(track->mode);
track_blocks = burn_track_get_sectors_2(track, 1);
missing = track_blocks * inp_block_size - track->sourcecount;
/* Memorize that premature end of input happened */
sprintf(msg,
"Premature end of input encountered. Missing: %.f bytes",
(double) missing);
"Premature end of input encountered. Missing: %d bytes",
shortage);
libdax_msgs_submit(libdax_messenger, -1, 0x00020180,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
msg, 0,0);
/* Memorize that premature end of input happened */
track->end_on_premature_eoi = 2;
}
if (track->open_ended || track->end_on_premature_eoi)

View File

@ -1090,12 +1090,6 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
else
sprintf(msg, "Logical unit is not ready");
goto return_retry;
case 0x06:
if (*ascq == 0)
sprintf(msg, "No reference position found");
else
break;
goto return_fail;
case 0x08:
if (*ascq == 0)
sprintf(msg, "Logical unit communication failure");
@ -1711,7 +1705,7 @@ int scsi_eval_cmd_outcome(struct burn_drive *d, struct command *c, void *fp,
int loop_count, int flag)
{
enum response outcome;
int done = -1, usleep_time;
int done = -1, usleep_time, ret;
char *msg = NULL;
if (burn_sg_log_scsi & 3)
@ -1738,9 +1732,7 @@ int scsi_eval_cmd_outcome(struct burn_drive *d, struct command *c, void *fp,
}
if (time(NULL) + usleep_time / 1000000 - start_time >
timeout_ms / 1000 + 1) {
done = -1; /* In case of alloc failure */
BURN_ALLOC_MEM_VOID(msg, char, 320);
done = 1;
BURN_ALLOC_MEM(msg, char, 320);
sprintf(msg,
"Timeout exceed (%d ms). Retry canceled.\n",
timeout_ms);
@ -1748,6 +1740,7 @@ int scsi_eval_cmd_outcome(struct burn_drive *d, struct command *c, void *fp,
0x0002018a,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
done = 1;
goto err_ex;
}
if (d->cancel)

View File

@ -794,9 +794,7 @@ int burn_disc_cd_toc_extensions(struct burn_drive *drive, int flag)
if (ret > 0) {
ret = mmc_four_char_to_int(
buf->data + 24);
if (ret < prev_entry->track_blocks &&
((!drive->current_is_cd_profile) ||
ret < prev_entry->track_blocks - 2))
if (ret < prev_entry->track_blocks)
prev_entry->track_blocks = ret;
}
prev_entry->extensions_valid |= 1;

View File

@ -227,7 +227,6 @@ char *burn_guess_manufacturer(int prf,
{"TT", 8, "TDK Corporation"},
{"TY", 8, "Taiyo Yuden Company Limited"},
{"TYG", 3, "Taiyo Yuden Company Limited"},
{"UME", 3, "UmeDisc Limited"},
{"UTJR001", 7, "Unifino Inc."},
{"VERBAT", 5, "Mitsubishi Kagaku Media Co."},
{"YUDEN", 5, "Taiyo Yuden Company Limited"},

View File

@ -455,7 +455,7 @@ struct cue_sheet *burn_create_toc_entries(struct burn_write_opts *o,
struct burn_session *session,
int nwa)
{
int i, m, s, f, form, runtime = -150, ret, track_length;
int i, m, s, f, form, pform, runtime = -150, ret, track_length;
int leadin_form, leadin_start, pregap = 150, postgap;
unsigned char ctladr, scms;
struct burn_drive *d;
@ -469,8 +469,6 @@ struct cue_sheet *burn_create_toc_entries(struct burn_write_opts *o,
#ifdef Libburn_track_multi_indeX
int j;
#else
int pform;
#endif
if (ntr < 1) {
@ -508,13 +506,11 @@ struct cue_sheet *burn_create_toc_entries(struct burn_write_opts *o,
"Track mode has unusable value", 0, 0);
goto failed;
}
if (tar[0]->mode & BURN_AUDIO)
leadin_form = 0x01;
else
leadin_form = 0x14;
if (o->num_text_packs > 0) {
leadin_form |= 0x40;
leadin_form = 0x41;
} else {
leadin_form = 0x01;
/* Check for CD-TEXT in session. Not the final creation,
because the cue sheet content might be needed for CD-TEXT
pack type 0x88 "TOC".
@ -524,7 +520,7 @@ struct cue_sheet *burn_create_toc_entries(struct burn_write_opts *o,
if (ret < 0)
goto failed;
else if (ret > 0)
leadin_form |= 0x40;
leadin_form = 0x41;
}
}
@ -604,10 +600,7 @@ struct cue_sheet *burn_create_toc_entries(struct burn_write_opts *o,
if (tar[0]->pregap2_size < 150)
tar[0]->pregap2_size = 150;
#ifndef Libburn_track_multi_indeX
pform = form;
#endif
for (i = 0; i < ntr; i++) {
/* ts A70125 :
@ -795,19 +788,13 @@ XXX this is untested :)
rem -= burn_sector_length(tar[i]->mode);
runtime--;
}
#ifndef Libburn_track_multi_indeX
pform = form;
#endif
}
burn_lba_to_msf(runtime, &m, &s, &f);
e[2].pmin = m;
e[2].psec = s;
e[2].pframe = f;
ret = add_cue(sheet, ctladr | 1, 0xAA, 1, leadin_form & 0x3f,
0, runtime);
ret = add_cue(sheet, ctladr | 1, 0xAA, 1, 1, 0, runtime);
if (ret <= 0)
goto failed;
return sheet;
@ -1601,29 +1588,15 @@ int burn_disc_open_track_dvd_plus_r(struct burn_write_opts *o,
if (o->write_type == BURN_WRITE_SAO &&
! burn_track_is_open_ended(s->track[tnum])) {
/* Reserve track */
/* Round track size up to write chunk size and reserve track */
size = ((off_t) burn_track_get_sectors_2(s->track[tnum], 1))
* (off_t) 2048;
if (o->obs_pad) {
/* Round track size up to write chunk size */
/* o->obs should be 32k or 64k already. But 32k
alignment was once performed in d->reserve_track()*/
if (o->obs % 32768)
o->obs += 32768 - (o->obs % 32768);
if (size % o->obs)
size += (off_t) (o->obs - (size % o->obs));
}
/* <<< Only for now until the first DVD+R succeeded */
if (!o->obs_pad) {
sprintf(msg, "Program error: encountered DVD+R without chunk padding");
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00000004,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
{ret = 0; goto ex;}
}
/* o->obs should be 32k or 64k already. But 32k alignment
was once performed in d->reserve_track() */
if (o->obs % 32768)
o->obs += 32768 - (o->obs % 32768);
if (size % o->obs)
size += (off_t) (o->obs - (size % o->obs));
ret = d->reserve_track(d, size);
if (ret <= 0) {
sprintf(msg, "Cannot reserve track of %.f bytes",
@ -2298,13 +2271,11 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
}
if (o->obs_pad < 2)
o->obs_pad = 0; /* no filling-up of last 32k buffer */
o->obs_pad = 0; /* no filling-up of track's last 32k buffer */
if (d->current_profile == 0x43) /* BD-RE */
o->obs = Libburn_bd_re_obS;
if (d->do_stream_recording) {
if (o->obs_pad < 2)
o->obs_pad = 1;
o->obs_pad = 1;
if (d->current_profile == 0x43) /* BD-RE */
o->obs = Libburn_bd_re_streamed_obS;
}
@ -2341,8 +2312,7 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
burn_track_set_size(t, default_size);
}
/* Whether to fill-up last 32k buffer of track. */
if (o->obs_pad < 2)
o->obs_pad = (o->write_type != BURN_WRITE_SAO);
o->obs_pad = (o->write_type != BURN_WRITE_SAO);
ret = burn_disc_setup_dvd_minus_r(o, disc);
if (ret <= 0) {
sprintf(msg,
@ -2383,8 +2353,7 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
goto early_failure;
}
/* ??? padding needed ??? cowardly doing it for now */
if (o->obs_pad < 2)
o->obs_pad = 1; /* fill-up track's last 32k buffer */
o->obs_pad = 1; /* fill-up track's last 32k buffer */
if (d->do_stream_recording) {
if (d->current_profile == 0x41) /* BD-R */
o->obs = Libburn_bd_re_streamed_obS;
@ -2799,8 +2768,7 @@ int burn_stdio_write_sync(struct burn_write_opts *o,
struct burn_drive *d = o->drive;
d->needs_close_session = 0;
if (o->obs_pad < 2)
o->obs_pad = 0; /* no filling-up of track's last 32k buffer */
o->obs_pad = 0; /* no filling-up of track's last 32k buffer */
o->obs = 32*1024; /* buffer size */
if (disc->sessions != 1)