Compare commits
117 Commits
ZeroSixEig
...
ZeroSevenF
Author | SHA1 | Date | |
---|---|---|---|
a90702d1cb | |||
08e6008195 | |||
2e5e4ec336 | |||
402da8dc3d | |||
b238ad5a51 | |||
28f4454a9d | |||
cb8c23ed5a | |||
54bb1ab395 | |||
872068ba7c | |||
2bd800ed14 | |||
da0b3b3939 | |||
93aa6ccc6f | |||
d6edfc9961 | |||
2945ab61d7 | |||
d35f7d0de1 | |||
e335aa26b4 | |||
496d794bcd | |||
c88a428d5e | |||
dc8ecdd77e | |||
259d1cd2b7 | |||
7fddf9ffc5 | |||
6109a7bc08 | |||
9b28a9b272 | |||
f39ff2c2f6 | |||
c8e0472637 | |||
acb2f3b173 | |||
504677de4f | |||
ae8f65e956 | |||
c2c10e263e | |||
43761c55ef | |||
b28165f10b | |||
25489521bb | |||
79a33ca2ac | |||
738b83ac03 | |||
677b007100 | |||
0fc685fc85 | |||
ca2cae9b0a | |||
055876d6b7 | |||
9160b1dcbb | |||
0f37170759 | |||
ce3d4dbed3 | |||
f9acd4ee3d | |||
d118b82a13 | |||
76a4c0ac44 | |||
83f80364c5 | |||
9064b56c56 | |||
405e6b020e | |||
ffe80264c7 | |||
d158e7f456 | |||
4384b0c006 | |||
e78353b7dd | |||
3c2ad1be42 | |||
937a226543 | |||
cca24711b8 | |||
e646686145 | |||
f3070d2e71 | |||
e0c501a59a | |||
39a7d18266 | |||
de8ecab9b4 | |||
e9a6b9c36d | |||
e65ccb2b5e | |||
96a5a2a28a | |||
ca97df9798 | |||
22905f7349 | |||
a318da9463 | |||
3c69b684a8 | |||
4457061656 | |||
758f5a5c1e | |||
c8c4da8e8e | |||
4fdebcae9f | |||
82ee4c8788 | |||
ad4a286736 | |||
9017f0716f | |||
7973546a4c | |||
2e6f83b3b3 | |||
fdd190b65c | |||
97ac17512f | |||
28a1b4dcba | |||
b724ab2130 | |||
567beb1d9f | |||
eb62395e41 | |||
1d6c97c79f | |||
5e4c1cf967 | |||
719096b0a7 | |||
75dca6c6e9 | |||
1ef3a24885 | |||
790b4f31ee | |||
9362a0240b | |||
82e884c432 | |||
f6d6dcfad0 | |||
970ae46cfa | |||
693784cbf5 | |||
3a98bc52f9 | |||
6038928fe4 | |||
2e547b0bba | |||
e968e81409 | |||
557299d350 | |||
6642342274 | |||
40b3380d4d | |||
3b018684c7 | |||
96beb44455 | |||
9805ce7534 | |||
407471898c | |||
cf9a2031a4 | |||
d9fc6cc275 | |||
78713d8912 | |||
169963eced | |||
22c187cd61 | |||
b900831914 | |||
654d71ef07 | |||
0571f4dc2e | |||
ff23614200 | |||
c59300b27a | |||
635996a327 | |||
93287896a6 | |||
4da88193fa | |||
3091eeb9c9 |
11
Makefile.am
11
Makefile.am
@ -12,6 +12,9 @@ lib_LTLIBRARIES = libburn/libburn.la
|
||||
# Build libraries
|
||||
libburn_libburn_la_LDFLAGS = \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
|
||||
# This causes undesired .o names
|
||||
# configure.ac appends -D options to variable CFLAG
|
||||
### libburn_libburn_la_CFLAGS = $(LIBBURN_DVD_OBS_64K)
|
||||
libburn_libburn_la_LIBADD = $(LIBBURN_ARCH_LIBS) $(THREAD_LIBS)
|
||||
libburn_libburn_la_SOURCES = \
|
||||
libburn/async.c \
|
||||
@ -25,13 +28,13 @@ libburn_libburn_la_SOURCES = \
|
||||
libburn/debug.h \
|
||||
libburn/drive.c \
|
||||
libburn/drive.h \
|
||||
libburn/ecma130ab.c \
|
||||
libburn/ecma130ab.h \
|
||||
libburn/error.h \
|
||||
libburn/file.c \
|
||||
libburn/file.h \
|
||||
libburn/init.c \
|
||||
libburn/init.h \
|
||||
libburn/lec.c \
|
||||
libburn/lec.h \
|
||||
libburn/libburn.h \
|
||||
libburn/libdax_audioxtr.h \
|
||||
libburn/libdax_audioxtr.c \
|
||||
@ -107,9 +110,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 - A90507
|
||||
## cdrskin construction site - ts A60816 - A91206
|
||||
cdrskin_cdrskin_CPPFLAGS = -Ilibburn
|
||||
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_6_7
|
||||
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_7_4
|
||||
|
||||
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(LIBBURN_EXTRALIBS)
|
||||
# ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking
|
||||
|
88
README
88
README
@ -11,7 +11,7 @@ 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-0.6.6.pl00.tar.gz
|
||||
http://files.libburnia-project.org/releases/libburn-0.7.4.pl00.tar.gz
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@ -19,10 +19,10 @@ Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
|
||||
|
||||
From tarball
|
||||
|
||||
Obtain libburn-0.6.6.pl00.tar.gz, take it to a directory of your choice and do:
|
||||
Obtain libburn-0.7.4.pl00.tar.gz, take it to a directory of your choice and do:
|
||||
|
||||
tar xzf libburn-0.6.6.pl00.tar.gz
|
||||
cd libburn-0.6.6
|
||||
tar xzf libburn-0.7.4.pl00.tar.gz
|
||||
cd libburn-0.7.4
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
|
||||
@ -47,8 +47,8 @@ Our build system is based on autotools. For preparing the build of a SVN
|
||||
snapshot you will need autotools of at least version 1.7.
|
||||
Do in a directory of your choice:
|
||||
|
||||
svn co http://svn.libburnia-project.org/libburn/trunk libburn-0.6.3
|
||||
cd libburn-0.6.3
|
||||
svn co http://svn.libburnia-project.org/libburn/trunk libburn-svn
|
||||
cd libburn-svn
|
||||
./bootstrap
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
@ -57,6 +57,26 @@ Do in a directory of your choice:
|
||||
Warning: The trunk might contain experimental features which might not
|
||||
persist until next release.
|
||||
|
||||
|
||||
Special ./configure options
|
||||
|
||||
In some situations Linux may deliver a better write performance to drives if
|
||||
the track input is read with O_DIRECT (see man 2 open). The API call
|
||||
burn_os_open_track_src() and the input readers of cdrskin and libburn fifo
|
||||
can be told to use this peculiar read mode by:
|
||||
--enable-track-src-odirect
|
||||
|
||||
But often libburn call burn_write_opts_set_dvd_obs(opts, 64*1024) will yield
|
||||
even better performance in such a situation. 64k can be made default at
|
||||
configure time by:
|
||||
--enable-dvd-obs-64k
|
||||
This may be combined with above --enable-track-src-odirect .
|
||||
|
||||
Make sure to re-compile all source files after running ./configure
|
||||
make clean ; make
|
||||
make install
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
An important part of the project, libisofs, is hosted in a bzr repository at
|
||||
@ -137,7 +157,8 @@ The project components (list subject to growth, hopefully):
|
||||
Rock Ridge extensions. Manipulation is not only adding or
|
||||
overwriting of files but also deleting, renaming, attribute
|
||||
changing, incremental backups, activating boot images, and
|
||||
extracting of files from ISO images to disk.
|
||||
extracting of files from ISO images to disk. An own ISO 9660
|
||||
extension stores ACLs, xattr, and MD5 of file content.
|
||||
See xorriso/README for more.
|
||||
|
||||
- "test" is a collection of application gestures and examples given by the
|
||||
@ -401,6 +422,59 @@ Project history as far as known to me:
|
||||
- 08 May 2009 libburn-0.6.6 fixes a bug with aborting on broken output pipe
|
||||
and a bug with device scan on FreeBSD.
|
||||
|
||||
- 31 May 2009 libisofs-0.6.20 can record hard link relations in ISO images
|
||||
and offers support with restoring them to disk. Current Linux kernels will
|
||||
mount images with such hard links but will attribute a unique inode number
|
||||
to each file.
|
||||
|
||||
- 28 Jun 2009 libisoburn-0.4.0: xorriso can record and restore hard link
|
||||
relations of files. Performance of data reading has been improved. Option
|
||||
-find now supports logical operators with its tests.
|
||||
|
||||
- 14 Jul 2009 libburn-0.6.8 fixes bugs and shortcommings with old MMC-1 drives
|
||||
and with large SCSI bus numbers as handed out by Linux for USB drives.
|
||||
|
||||
- 20 Jul 2009 libisoburn-0.4.0.pl01 fixes a regression in xorriso which caused
|
||||
data loss in older sessions if xorriso was used underneath growisofs.
|
||||
Affected are releases since libisoburn-0.3.2 in january 2009.
|
||||
|
||||
- 25 Aug 2009 libisofs-0.6.22 can record MD5 checksums for the whole session
|
||||
and for each single data file. Checksum tags allow to verify superblock and
|
||||
directory tree before importing them.
|
||||
|
||||
- 27 Aug 2009 libburn-0.7.0 allows to calm down a drive and to inquire its
|
||||
supported profiles. It works around some pitfalls with U3 enhanced memory
|
||||
sticks which emulate a CD-ROM.
|
||||
|
||||
- 27 Aug 2009 libisoburn-0.4.0.pl00 can record MD5 checksums by which one may
|
||||
verify the session or single data files in the image. When comparing image
|
||||
files with files in the local filesystem, the MD5 sums avoid the need for
|
||||
reading file content from the image.
|
||||
|
||||
- 22 Sep 2009 libisoburn-0.4.0.pl01 fixes a bug in xorriso option -cut_out.
|
||||
|
||||
- 08 Oct 2009 libisofs-0.6.24 fixes a bug which could cause the loss of blanks
|
||||
in file names when a new session got added to an ISO image. With names
|
||||
shorter than 251 characters this happened only to trailing blanks.
|
||||
|
||||
- 08 Oct 2009 libisoburn-0.4.0.pl02 fixes bugs with xorriso option -for_backup,
|
||||
with xorrisofs -help, and with xorrecord -help.
|
||||
|
||||
- 12 Oct 2009 libburn-0.7.2 fixes a bug with CD TAO multi-track dummy sessions.
|
||||
It can retrieve media product info and can process track input which was
|
||||
prepared for CD-ROM XA Mode 2 Form 1. cdrskin now performs option -minfo.
|
||||
|
||||
- 28 Oct 2009 libisoburn-0.4.4 fixes a bug with cdrecord emulation and
|
||||
introduces new information options about media type and ISO image id strings.
|
||||
On Linux it helps with mounting two sessions of the same media
|
||||
simultaneously.
|
||||
|
||||
- 12 Nov 2009 libburn-0.7.2.pl01 works around problems with Pioneer DVR-216D.
|
||||
DVD-R runs made the drive stuck. Ejecting the tray did not work properly.
|
||||
|
||||
- 06 Dec 2009 libburn-0.7.4 works around problems with newer DVD burners,
|
||||
provides throughput enhancements with hampered busses on Linux, and new
|
||||
API calls to log SCSI commands and to control the libburn fifo.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
@ -4,7 +4,8 @@
|
||||
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-0.6.7.tar.gz
|
||||
http://scdbackup.sourceforge.net/cdrskin-0.7.4.pl00.tar.gz
|
||||
|
||||
Copyright (C) 2006-2009 Thomas Schmitt, provided under GPL version 2.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
@ -23,10 +24,10 @@ By using this software you agree to the disclaimer at the end of this text
|
||||
|
||||
Compilation, First Glimpse, Installation
|
||||
|
||||
Obtain cdrskin-0.6.7.tar.gz, take it to a directory of your choice and do:
|
||||
Obtain cdrskin-0.7.4.pl00.tar.gz, take it to a directory of your choice and do:
|
||||
|
||||
tar xzf cdrskin-0.6.7.tar.gz
|
||||
cd cdrskin-0.6.7
|
||||
tar xzf cdrskin-0.7.4.pl00.tar.gz
|
||||
cd cdrskin-0.7.4
|
||||
|
||||
Within that directory execute:
|
||||
|
||||
@ -34,8 +35,7 @@ Within that directory execute:
|
||||
make
|
||||
|
||||
This will already produce a cdrskin binary. But it will be necessary to
|
||||
install libburn in order to use this binary. Installation of libburn is
|
||||
beyond the scope of cdrskin. For this, see included libburn docs.
|
||||
install libburn in order to use this binary.
|
||||
|
||||
In order to surely get a standalone binary, execute
|
||||
|
||||
@ -72,7 +72,7 @@ It is not necessary for the standalone cdrskin binary to have libburn
|
||||
installed, since it incorporates the necessary libburn parts at compile time.
|
||||
It will not collide with an installed version of libburn either.
|
||||
But libpthread must be installed on the system and glibc has to match. (See
|
||||
below for a way to create a statically linked binary.)
|
||||
below for a way to create a totally static linked binary.)
|
||||
|
||||
To install the man page, you may do: echo $MANPATH and choose one of the
|
||||
listed directories to copy the man-page under its ./man1 directory. Like:
|
||||
@ -397,6 +397,21 @@ drive. See man page section FILES for a way to lift that ban.
|
||||
|
||||
Special compilation variations
|
||||
|
||||
All following options of ./configure and cdrskin/compile_cdrskin.sh are
|
||||
combinable.
|
||||
|
||||
In some situations Linux may deliver a better write performance to drives if
|
||||
the track input is read with O_DIRECT (see man 2 open). The API call
|
||||
burn_os_open_track_src() and the input readers of cdrskin and libburn fifo
|
||||
can be told to use this peculiar read mode by:
|
||||
--enable-track-src-odirect
|
||||
|
||||
But often cdrskin option dvd_obs=64k will yield even better performance in
|
||||
such a situation. 64k can be made default at compile time by
|
||||
cdrskin/compile_cdrskin.sh -dvd_obs_64k
|
||||
It can also be enabled at configure time by
|
||||
./configure ... --enable-dvd-obs-64k ...
|
||||
|
||||
You may get a (super fat) statically linked binary by :
|
||||
cdrskin/compile_cdrskin.sh -static
|
||||
if your system supports static linking, at all. This will not help with kernels
|
||||
|
@ -38,7 +38,7 @@ original="./libburn_svn_release.tgz"
|
||||
# My changes are in $changes , mainly in $changes/cdrskin
|
||||
changes="./libburn-release"
|
||||
|
||||
skin_release="0.6.6"
|
||||
skin_release="0.7.4"
|
||||
patch_level=".pl00"
|
||||
skin_rev="$skin_release""$patch_level"
|
||||
|
||||
@ -117,6 +117,7 @@ cp -a "$cdrskin_dir" "$cdrskin_target"
|
||||
|
||||
# Remove copied vim.swp and binaries
|
||||
rm "$cdrskin_target"/.*.swp
|
||||
rm "$cdrskin_target"/.*.swo
|
||||
rm "$cdrskin_target"/*.o
|
||||
rm "$cdrskin_target"/cdrfifo
|
||||
rm "$cdrskin_target"/cdrskin
|
@ -38,7 +38,7 @@ original="./libburn_svn.tgz"
|
||||
# My changes are in $changes , mainly in $changes/cdrskin
|
||||
changes="./libburn-develop"
|
||||
|
||||
skin_release="0.6.7"
|
||||
skin_release="0.7.5"
|
||||
patch_level=""
|
||||
skin_rev="$skin_release""$patch_level"
|
||||
|
||||
@ -116,6 +116,7 @@ cp -a "$cdrskin_dir" "$cdrskin_target"
|
||||
|
||||
# Remove copied vim.swp and binaries
|
||||
rm "$cdrskin_target"/.*.swp
|
||||
rm "$cdrskin_target"/.*.swo
|
||||
rm "$cdrskin_target"/*.o
|
||||
rm "$cdrskin_target"/cdrfifo
|
||||
rm "$cdrskin_target"/cdrskin
|
@ -25,6 +25,11 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
#ifndef Cdrfifo_standalonE
|
||||
/* <<< until release of 0.7.4 : for Libburn_has_open_trac_srC */
|
||||
#include "../libburn/libburn.h"
|
||||
#endif
|
||||
|
||||
#include "cdrfifo.h"
|
||||
|
||||
|
||||
@ -120,7 +125,7 @@ struct CdrfifO {
|
||||
struct burn_source object.
|
||||
@param chunk_size Size of buffer block for a single transaction (0=default)
|
||||
@param buffer_size Size of fifo buffer
|
||||
@param flag Unused yet
|
||||
@param flag bit0= Debugging verbosity
|
||||
@return 1 on success, <=0 on failure
|
||||
*/
|
||||
int Cdrfifo_new(struct CdrfifO **ff, int source_fd, int dest_fd,
|
||||
@ -174,7 +179,13 @@ int Cdrfifo_new(struct CdrfifO **ff, int source_fd, int dest_fd,
|
||||
o->follow_up_fd_idx= -1;
|
||||
o->next= o->prev= NULL;
|
||||
o->chain_idx= 0;
|
||||
|
||||
#ifdef Libburn_has_open_trac_srC
|
||||
o->buffer= burn_os_alloc_buffer((size_t) buffer_size, 0);
|
||||
#else
|
||||
o->buffer= TSOB_FELD(char,buffer_size);
|
||||
#endif /* ! Libburn_has_open_trac_srC */
|
||||
|
||||
if(o->buffer==NULL)
|
||||
goto failed;
|
||||
return(1);
|
||||
@ -226,8 +237,14 @@ int Cdrfifo_destroy(struct CdrfifO **ff, int flag)
|
||||
|
||||
if(o->iso_fs_descr!=NULL)
|
||||
free((char *) o->iso_fs_descr);
|
||||
|
||||
if(o->buffer!=NULL)
|
||||
#ifdef Libburn_has_open_trac_srC
|
||||
burn_os_free_buffer(o->buffer, o->buffer_size, 0);
|
||||
#else
|
||||
free((char *) o->buffer);
|
||||
#endif /* Libburn_has_open_trac_srC */
|
||||
|
||||
free((char *) o);
|
||||
(*ff)= NULL;
|
||||
return(1);
|
||||
@ -616,7 +633,7 @@ return: <0 = error , 0 = idle , 1 = did some work
|
||||
*/
|
||||
{
|
||||
double buffer_space;
|
||||
int can_read,can_write,ret,did_work= 0,idx,sod,eop_is_near,eop_idx;
|
||||
int can_read,can_write= 0,ret,did_work= 0,idx,sod,eop_is_near,eop_idx;
|
||||
|
||||
buffer_space= Cdrfifo_tell_buffer_space(o,0);
|
||||
if(o->dest_fd>=0) if(FD_ISSET((o->dest_fd),wts)) {
|
||||
@ -659,6 +676,46 @@ return: <0 = error , 0 = idle , 1 = did some work
|
||||
after_write:;
|
||||
if(o->source_fd>=0) if(FD_ISSET((o->source_fd),rds)) {
|
||||
can_read= o->buffer_size - o->write_idx;
|
||||
|
||||
#ifdef Libburn_has_open_trac_srC
|
||||
|
||||
/* ts A91115
|
||||
This chunksize must be aligned to filesystem blocksize.
|
||||
*/
|
||||
#define Cdrfifo_o_direct_chunK 32768
|
||||
|
||||
if(o->write_idx < o->read_idx && o->write_idx + can_read > o->read_idx)
|
||||
can_read= o->read_idx - o->write_idx;
|
||||
if(o->fd_in_limit>=0.0)
|
||||
if(can_read > o->fd_in_limit - o->fd_in_counter)
|
||||
can_read= o->fd_in_limit - o->fd_in_counter;
|
||||
/* Make sure to read with properly aligned size */
|
||||
if(can_read > Cdrfifo_o_direct_chunK)
|
||||
can_read= Cdrfifo_o_direct_chunK;
|
||||
else if(can_read < Cdrfifo_o_direct_chunK)
|
||||
can_read= -1;
|
||||
ret= 0;
|
||||
if(can_read>0)
|
||||
ret= read(o->source_fd,o->buffer+o->write_idx,can_read);
|
||||
if(can_read < 0) {
|
||||
/* waiting for a full Cdrfifo_o_direct_chunK to fit */
|
||||
if(can_write <= 0 && o->dest_fd >= 0) {
|
||||
fd_set rds,wts,exs;
|
||||
struct timeval wt;
|
||||
|
||||
FD_ZERO(&rds);
|
||||
FD_ZERO(&wts);
|
||||
FD_ZERO(&exs);
|
||||
FD_SET((o->dest_fd),&wts);
|
||||
wt.tv_sec= 0;
|
||||
wt.tv_usec= 10000;
|
||||
select(o->dest_fd + 1,&rds, &wts, &exs, &wt);
|
||||
|
||||
}
|
||||
} else
|
||||
|
||||
#else /* Libburn_has_open_trac_srC */
|
||||
|
||||
if(can_read>o->chunk_size)
|
||||
can_read= o->chunk_size;
|
||||
if(o->write_idx<o->read_idx && o->write_idx+can_read > o->read_idx)
|
||||
@ -669,6 +726,9 @@ after_write:;
|
||||
ret= 0;
|
||||
if(can_read>0)
|
||||
ret= read(o->source_fd,o->buffer+o->write_idx,can_read);
|
||||
|
||||
#endif /* ! Libburn_has_open_trac_srC */
|
||||
|
||||
if(ret==-1) {
|
||||
|
||||
/* >>> handle input error */;
|
||||
|
@ -33,7 +33,7 @@ struct CdrfifO;
|
||||
struct burn_source object.
|
||||
@param chunk_size Size of buffer block for a single transaction (0=default)
|
||||
@param buffer_size Size of fifo buffer
|
||||
@param flag unused yet
|
||||
@param flag bit0= Debugging verbosity
|
||||
@return 1 on success, <=0 on failure
|
||||
*/
|
||||
int Cdrfifo_new(struct CdrfifO **ff, int source_fd, int dest_fd,
|
||||
|
@ -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 "May 07, 2009"
|
||||
.TH CDRSKIN 1 "Nov 16, 2009"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@ -497,7 +497,15 @@ or DVD-R[W] in Disc-at-once mode.
|
||||
.TP
|
||||
.BI \-data
|
||||
Subsequent tracks are data tracks. This option is default and only needed
|
||||
to mark the end of the range of an eventual option -audio.
|
||||
to mark the end of the range of an eventual option -audio or -xa1.
|
||||
.br
|
||||
Options -mode2, -xa, and -xa2 get mapped to -data, not using the desired CD
|
||||
sector formats and thus not taking advantage of eventual higher payload.
|
||||
.BI \-xa1
|
||||
Subsequent tracks are data tracks with input suitable for CD-ROM XA mode 2
|
||||
form 1. This differs from -data input by 8 additional header bytes per block.
|
||||
cdrskin will not write CD-ROM XA but rather strip the header bytes and write as
|
||||
-data tracks.
|
||||
.TP
|
||||
.BI dev= target
|
||||
Set the address of the drive to use. Valid are at least the
|
||||
@ -616,6 +624,10 @@ modesty_on_drive=1:min_percent=<percentage>:max_percent=95
|
||||
.br
|
||||
Percentage is permissible between 25 and 95.
|
||||
.TP
|
||||
.BI -minfo
|
||||
Print information about the loaded media. This includes media type, writability
|
||||
state, and a quite readable table of content.
|
||||
.TP
|
||||
.BI msifile= path
|
||||
Run option -msinfo and copy the result line into the file given by path.
|
||||
Unlike -msinfo this option does not redirect all normal output away from
|
||||
@ -679,13 +691,6 @@ 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 \-raw96r
|
||||
Write CD in RAW/RAW96R mode. This mode allows to put more payload bytes
|
||||
into a CD sector but obviously at the cost of error correction. It can only
|
||||
be used for tracks of fixely predicted size. Some drives allow this mode but
|
||||
then behave strange or even go bad for the next few attempts to burn a CD.
|
||||
One should use it only if inavoidable.
|
||||
.TP
|
||||
.BI \-sao
|
||||
Write CD in Session At Once mode or sequential DVD-R[W] in Disc-at-once
|
||||
(DAO) mode.
|
||||
@ -791,6 +796,11 @@ Level 2 additionally reports about option settings derived from arguments or
|
||||
startup files. Level 3 is for debugging and useful mainly in conjunction with
|
||||
somebody who had a look into the program sourcecode.
|
||||
.TP
|
||||
.BI \-V
|
||||
Enable logging of SCSI commands to stderr. This allows expert examination
|
||||
of the interaction between libburn and the drive. The commands are specified
|
||||
in SCSI-3 standards SPC, SBC, MMC.
|
||||
.TP
|
||||
.BI \-waiti
|
||||
Wait until input data is available at stdin or EOF occurs at stdin.
|
||||
Only then begin to access any drives.
|
||||
@ -889,6 +899,14 @@ Both, write_start_address and direct_write_amount size must be aligned to a
|
||||
media dependend transaction size. With DVD-RAM, BD-RE, DVD+RW this is 2k, with
|
||||
overwriteable DVD-RW it is 32k.
|
||||
.TP
|
||||
.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. 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
|
||||
Set a command name to be executed if cdrskin encounters a known cdrecord
|
||||
option which it does not yet support. If a non-empty command is given with
|
||||
@ -981,6 +999,10 @@ List all ignored cdrecord options. The "-" options cannot be used as addresses
|
||||
of track sources. No track source address may begin with a text equal to an
|
||||
option which ends by "=". The list is ended by an empty line.
|
||||
.TP
|
||||
.BI \--long_toc
|
||||
Like option -toc but marking each session start by a line "first: X last: Y"
|
||||
and each session end by "track:lout ...".
|
||||
.TP
|
||||
.BI \--no_rc
|
||||
Only if used as first command line argument this option prevents reading and
|
||||
interpretation of eventual startup files. See section FILES below.
|
||||
@ -999,6 +1021,22 @@ which can only do DAO but not Incremental Streaming.
|
||||
.BI \--single_track
|
||||
Accept only the last argument of the command line as track source address.
|
||||
.TP
|
||||
.BI stdio_sync= on|off|number
|
||||
Set the number of bytes after which to force output to drives with prefix
|
||||
"stdio:". This forcing keeps the memory from being clogged with lots of
|
||||
pending data for slow devices. Default "on" is the same as "16m".
|
||||
Forced output can be disabled by "off".
|
||||
.TP
|
||||
.BI stream_recording= on|off|number
|
||||
By setting "on" request that compliance to the desired speed setting is
|
||||
preferred over management of write errors. With DVD-RAM and BD this can
|
||||
bring effective write speed near to the nominal write speed of the media.
|
||||
But it will also disable the automatic use of replacement blocks
|
||||
if write errors occur. It might as well be disliked or ignored by the drive.
|
||||
.br
|
||||
If a number is given, then error management stays enabled for all byte
|
||||
addresses below that number. Any number below 16s is the same as "off".
|
||||
.TP
|
||||
.BI tao_to_sao_tsize= size
|
||||
Set an exact fixed size for the next track to be in effect only if the track
|
||||
source cannot deliver a size prediction and no tsize= was specified and an
|
||||
@ -1185,16 +1223,9 @@ Linux specific:
|
||||
Use and report literal Bus,Target,Lun addresses rather than real SCSI and
|
||||
pseudo ATA addresses. This method is outdated and was never compatible with
|
||||
original cdrecord.
|
||||
.TP
|
||||
.BI stream_recording="on"|"off"|number
|
||||
By setting "on" request that compliance to the desired speed setting is
|
||||
preferred over management of write errors. With DVD-RAM and BD this can
|
||||
bring effective write speed near to the nominal write speed of the media.
|
||||
But it will also disable the automatic use of replacement blocks
|
||||
if write errors occur. It might as well be disliked or ignored by the drive.
|
||||
.br
|
||||
If a number is given, then error management stays enabled for all byte
|
||||
addresses below that number. Any number below 16s is the same as "off".
|
||||
.BI --xa1-ignore
|
||||
Silently interpret option -xa1 as -data. This may be necessary if a frontent
|
||||
does not prepare -xa1 block headers but insists in using option -xa1.
|
||||
.SH EXAMPLES
|
||||
.SS
|
||||
.B Get an overview of drives and their addresses:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -34,10 +34,12 @@ CD-R, DVD-R, DVD+R, DVD+R/DL, BD-R, CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE
|
||||
|
||||
<P>
|
||||
<H2>Hardware requirements:</H2>
|
||||
A CD/DVD/BD recorder suitable for
|
||||
<A HREF="http://libburnia-project.org">http://libburnia-project.org</A> <BR>
|
||||
(SCSI , ATA , USB , or SATA writers compliant to standard MMC-3 for CD
|
||||
and to MMC-5 for DVD or BD).
|
||||
About any CD, DVD, or BD recorder produced in the recent ten years.
|
||||
<BR>
|
||||
<A HREF="http://libburnia-project.org">libburn</A>
|
||||
supports recorders which are compliant to standards MMC-1 for CD and
|
||||
MMC-5 for DVD or BD. Linux and FreeBSD allow to access drives connected
|
||||
via SCSI, PATA (aka IDE, ATA), USB, or SATA.
|
||||
<BR>
|
||||
</P>
|
||||
|
||||
@ -59,7 +61,7 @@ and to MMC-5 for DVD or BD).
|
||||
GPL software included:<BR>
|
||||
</H2>
|
||||
<DL>
|
||||
<DT>libburn-0.6.6</DT>
|
||||
<DT>libburn-0.7.4</DT>
|
||||
<DD>(founded by Derek Foreman and Ben Jansens,
|
||||
developed and maintained since August 2006 by
|
||||
Thomas Schmitt from team of libburnia-project.org)
|
||||
@ -109,7 +111,7 @@ as listed by option --devices.</DT>
|
||||
<DT>Get info about a particular drive or loaded media:</DT>
|
||||
<DD>$<KBD> cdrskin dev=0,1,0 -checkdrive</KBD></DD>
|
||||
<DD>$<KBD> cdrskin dev=ATA:1,0,0 -v -atip</KBD></DD>
|
||||
<DD>$<KBD> cdrskin dev=/dev/hdc -toc</KBD></DD>
|
||||
<DD>$<KBD> cdrskin dev=/dev/hdc -minfo</KBD></DD>
|
||||
|
||||
<DT>Prepare CD-RW or DVD-RW for re-use, DVD-RAM or BD-RE for first use:</DT>
|
||||
<DD>$<KBD> cdrskin -v dev=/dev/sg1 blank=as_needed -eject</KBD></DD>
|
||||
@ -191,8 +193,8 @@ Standalone ISO 9660 multi-session CD/DVD/BD tool
|
||||
<P>
|
||||
<DL>
|
||||
<DT>Download as source code (see README):</DT>
|
||||
<DD><A HREF="cdrskin-0.6.6.pl00.tar.gz">cdrskin-0.6.6.pl00.tar.gz</A>
|
||||
(750 KB).
|
||||
<DD><A HREF="cdrskin-0.7.4.pl00.tar.gz">cdrskin-0.7.4.pl00.tar.gz</A>
|
||||
(810 KB).
|
||||
</DD>
|
||||
<DD>
|
||||
The cdrskin tarballs are source code identical with libburn releases
|
||||
@ -241,20 +243,24 @@ cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
Enhancements towards previous stable version cdrskin-0.6.4.pl00:
|
||||
Enhancements towards previous stable version cdrskin-0.7.0.pl00:
|
||||
<UL>
|
||||
<LI>none</LI>
|
||||
<LI>Implemented option -V for logging of SCSI commands</LI>
|
||||
<LI>New options dvd_obs= and stdio_fsync=</LI>
|
||||
<LI>New ./configure options --enable-track-src-odirect, --enable-dvd-obs-64k
|
||||
</LI>
|
||||
<LI>New compile_cdrskin.sh option -dvd_obs_64k</LI>
|
||||
<!--
|
||||
<LI>none</LI>
|
||||
-->
|
||||
</UL>
|
||||
|
||||
Bug fixes towards cdrskin-0.6.4.pl00:
|
||||
Bug fixes towards cdrskin-0.7.2.pl00:
|
||||
<UL>
|
||||
<LI>Improper abort handling with broken pipe during output to
|
||||
a stdio: pseudo-drive
|
||||
</LI>
|
||||
<LI>Device scan stalled on FreeBSD with non-burner USB device</LI>
|
||||
<LI>Workaround for Pioneer DVR-216D which got stuck on DVD-R burns.</LI>
|
||||
<LI>Workaround for Pioneer DVR-216D which did not always eject the tray.</LI>
|
||||
<LI>DVD DAO track size was rounded up much too generously</LI>
|
||||
<LI>SIGSEGV from NULL pointer with media product id inquiry on LG GH22LS30</LI>
|
||||
<!--
|
||||
<LI>none</LI>
|
||||
-->
|
||||
@ -264,8 +270,8 @@ a stdio: pseudo-drive
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
<DT><H3>Development snapshot, version 0.6.7 :</H3></DT>
|
||||
<DD>Enhancements towards current stable version 0.6.6.pl00:
|
||||
<DT><H3>Development snapshot, version 0.7.5 :</H3></DT>
|
||||
<DD>Enhancements towards current stable version 0.7.4.pl00:
|
||||
<UL>
|
||||
<LI>none yet</LI>
|
||||
<!--
|
||||
@ -274,7 +280,7 @@ a stdio: pseudo-drive
|
||||
</UL>
|
||||
</DD>
|
||||
|
||||
<DD>Bug fixes towards cdrskin-0.6.6.pl00:
|
||||
<DD>Bug fixes towards cdrskin-0.7.4.pl00:
|
||||
<UL>
|
||||
<LI>none yet</LI>
|
||||
<!--
|
||||
@ -283,10 +289,10 @@ a stdio: pseudo-drive
|
||||
</DD>
|
||||
|
||||
<DD> </DD>
|
||||
<DD><A HREF="README_cdrskin_devel">README 0.6.7</A>
|
||||
<DD><A HREF="cdrskin__help_devel">cdrskin_0.6.7 --help</A></DD>
|
||||
<DD><A HREF="cdrskin_help_devel">cdrskin_0.6.7 -help</A></DD>
|
||||
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.6.7)</A></DD>
|
||||
<DD><A HREF="README_cdrskin_devel">README 0.7.5</A>
|
||||
<DD><A HREF="cdrskin__help_devel">cdrskin_0.7.5 --help</A></DD>
|
||||
<DD><A HREF="cdrskin_help_devel">cdrskin_0.7.5 -help</A></DD>
|
||||
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.7.5)</A></DD>
|
||||
<DD> </DD>
|
||||
<DT>Maintainers of cdrskin unstable packages please use SVN of
|
||||
<A HREF="http://libburnia-project.org"> libburnia-project.org</A></DT>
|
||||
@ -306,8 +312,8 @@ admins with full system souvereignty.</DT>
|
||||
<A HREF="README_cdrskin_devel">upcoming README</A> ):
|
||||
</DD>
|
||||
<DD>
|
||||
<A HREF="cdrskin-0.6.7.tar.gz">cdrskin-0.6.7.tar.gz</A>
|
||||
(750 KB).
|
||||
<A HREF="cdrskin-0.7.5.tar.gz">cdrskin-0.7.5.tar.gz</A>
|
||||
(810 KB).
|
||||
</DD>
|
||||
|
||||
<!-- This is not offered any more since spring 2008
|
||||
|
@ -1 +1 @@
|
||||
#define Cdrskin_timestamP "2009.07.07.191134"
|
||||
#define Cdrskin_timestamP "2009.12.06.160001"
|
||||
|
@ -1761,6 +1761,17 @@ Version leap to 0.2.6
|
||||
Published cdrskin-0.2.6.pl01 on cdrskin home pages
|
||||
|
||||
------------------------------- cycle - cdrskin-0.2.6.pl01 - 2006.11.23.114611
|
||||
* Enabled TAO
|
||||
* Bug fixed: Trailing trash appended to .wav files caused error message
|
||||
and, if exceeding fifo size, could even stall a burn.
|
||||
* Multi-session CDs (for now restricted to write mode TAO), -multi, -msinfo
|
||||
* Bug fixed: False speed with first pacifier cycle. Potential SIGFPE by NaN.
|
||||
* Enabled named pipes and other non-plain file types as track sources
|
||||
(actually already in previous cycle)
|
||||
* Bug fixed: Default speed was not highest possible but announced as "MAX"
|
||||
* SAO is preferred default write mode, TAO is default when needed
|
||||
* libisofs unbundled from libburn+cdrskin
|
||||
* Hints for porting to other operating systems are now in sg-*.c
|
||||
|
||||
|
||||
2006.11.24.121745 [437]
|
||||
@ -6634,15 +6645,954 @@ Made number transition and activated development documentation
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_5
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_6_6
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_6_7
|
||||
Updated cdrskin tarball generator
|
||||
|
||||
7 May 2009 [2636]
|
||||
cdrskin/changelog.txt
|
||||
Documented changes and release timestamp
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.6.7 - 2009.05.07.181034
|
||||
|
||||
8 May 2009 [2637]
|
||||
svn move -m libburn release 0.6.6 is ready
|
||||
http://svn.libburnia-project.org/libburn/branches/ZeroSixSix
|
||||
http://svn.libburnia-project.org/libburn/tags/ZeroSixSix
|
||||
|
||||
2009.05.17.144304 [2645]
|
||||
cdrskin/cdrskin.c
|
||||
Made -scanbus work with SCSI bus numbers like 85 (USB, kernel 2.6.18.2)
|
||||
|
||||
2009.06.02.162841 [2655]
|
||||
libburn/drive.c
|
||||
libburn/async.c
|
||||
libburn/options.c
|
||||
libburn/spc.c
|
||||
libburn/libdax_msgs.h
|
||||
Rectified use of burn_drive.mdata->valid
|
||||
|
||||
2 Jun 2009 [2656]
|
||||
test/libburner.c
|
||||
Avoided SIGSEGV if no drives were found by scan
|
||||
|
||||
2009.06.02.172201 [2657]
|
||||
libburn/drive.c
|
||||
Avoided to enumerate faulty drive objects
|
||||
|
||||
2009.06.03.085637 [2658]
|
||||
libburn/spc.c
|
||||
Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
|
||||
|
||||
2009.06.03.185118 [2659]
|
||||
libburn/transport.h
|
||||
libburn/drive.c
|
||||
libburn/spc.c
|
||||
libburn/mmc.c
|
||||
Bug fix: No usable media was detected with old MMC-1 drives
|
||||
|
||||
2009.06.14.095004 [2669]
|
||||
libburn/sg-linux.c
|
||||
Retrying 3 times on EBUSY drives with generous usleep intervals
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.6.7 - 2009.06.14.095833
|
||||
Made -scanbus work with high SCSI bus numbers
|
||||
Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
|
||||
Bug fix: No usable media was detected with old MMC-1 drives
|
||||
|
||||
|
||||
7 Jul 2009 [2691]
|
||||
acinclude.m4
|
||||
configure.ac
|
||||
configure options --enable-libdir-pkgconfig and --enable-pkgconfig-path=DIR
|
||||
|
||||
2009.07.07.191134 [2692]
|
||||
Timestamp for revision 2691
|
||||
|
||||
14 Jul 2009 [2894]
|
||||
svn copy -m "Branching for libburn release 0.6.8"
|
||||
http://svn.libburnia-project.org/libburn/trunk
|
||||
http://svn.libburnia-project.org/libburn/branches/ZeroSixEight
|
||||
|
||||
2009.07.14.100001 [2695]
|
||||
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 and activated development documentation
|
||||
|
||||
14 Jul 2009 [2696]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_6
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_7
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_6_8
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_6_9
|
||||
Updated cdrskin tarball generator
|
||||
|
||||
14 Jul 2009 [2697]
|
||||
cdrskin/changelog.txt
|
||||
Documented changes and release timestamp
|
||||
|
||||
------------------------------ release - cdrskin-0.6.8.pl00 - 2009.07.14.100001
|
||||
Made -scanbus work with high SCSI bus numbers
|
||||
Bug fix: Old MMC-1 drives were rejected because of mode page 2Ah length
|
||||
Bug fix: No usable media was detected with old MMC-1 drives
|
||||
|
||||
|
||||
2009.07.14.133159 [2698]
|
||||
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 and activated development documentation
|
||||
|
||||
14 Jul 2009 [2699]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_6
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_7
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_6_8
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_6_9
|
||||
Updated cdrskin tarball generator
|
||||
|
||||
14 Jul 2009 [2700]
|
||||
cdrskin/changelog.txt
|
||||
Documented changes and release timestamp
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.6.9 - 2009.07.14.133159
|
||||
|
||||
14 Jul 2009 [2702]
|
||||
svn move -m libburn release 0.6.8 is ready
|
||||
http://svn.libburnia-project.org/libburn/branches/ZeroSixEight
|
||||
http://svn.libburnia-project.org/libburn/tags/ZeroSixEight
|
||||
|
||||
|
||||
2009.08.15.133055 [2721]
|
||||
libburn/write.c
|
||||
Added test code about output blocks size as comment.
|
||||
|
||||
2009.08.15.133332 [2722]
|
||||
libburn/libburn.h
|
||||
libburn/transport.h
|
||||
libburn/drive.c
|
||||
libburn/mmc.h
|
||||
libburn/mmc.c
|
||||
New API calls burn_drive_get_all_profiles(), burn_obtain_profile_name()
|
||||
|
||||
2009.08.15.133744 [2723]
|
||||
cdrskin/cdrskin.c
|
||||
Listing all profiles with cdrskin -v -atip
|
||||
|
||||
2009.08.23.130326 [2735]
|
||||
libburn/drive.c
|
||||
libburn/spc.c
|
||||
libburn/mmc.c
|
||||
Adapted to pitfalls of U3 memory sticks which appear as CD-ROM drives
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.6.9 - 2009.08.23.132942
|
||||
New API calls burn_drive_get_all_profiles(), burn_obtain_profile_name()
|
||||
Adapted to pitfalls of U3 memory sticks which appear as CD-ROM drives
|
||||
|
||||
|
||||
2009.08.24.131146 [2736]
|
||||
libburn/libburn.h
|
||||
libburn/transport.h
|
||||
libburn/drive.c
|
||||
libburn/sbc.c
|
||||
New API call burn_drive_snooze()
|
||||
|
||||
2009.08.24.161646 [2737]
|
||||
libburn/libburn.h
|
||||
libburn/drive.c
|
||||
Made burn_drive_snooze() safe for emulated drives
|
||||
|
||||
2009.08.24.202517 [2740]
|
||||
libburn/transport.h
|
||||
libburn/sbc.c
|
||||
libburn/mmc.c
|
||||
Implemented automatic START UNIT after STOP UNIT before any other SCSI command
|
||||
|
||||
2009.08.27.123001 [2746]
|
||||
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 and activated development documentation
|
||||
|
||||
27 Aug 2009 [2747]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_8
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_9
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_0
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_1
|
||||
Updated cdrskin tarball generator
|
||||
|
||||
27 Aug 2009 [2748]
|
||||
cdrskin/changelog.txt
|
||||
Documented changes and release timestamp
|
||||
|
||||
------------------------------ release - cdrskin-0.7.0.pl00 - 2009.08.27.123001
|
||||
New API calls burn_drive_get_all_profiles(), burn_obtain_profile_name()
|
||||
New API call burn_drive_snooze()
|
||||
Adapted to pitfalls of U3 memory sticks which appear as CD-ROM drives
|
||||
Listing all supported profiles with option -atip
|
||||
|
||||
|
||||
2009.08.27.143351 [2749]
|
||||
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 development version 0.7.1
|
||||
|
||||
27 Aug 2009 [2750]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_8
|
||||
- cdrskin/add_ts_changes_to_libburn_0_6_9
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_0
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_1
|
||||
Updated cdrskin tarball generator
|
||||
|
||||
27 Aug 2009 [2751]
|
||||
cdrskin/changelog.txt
|
||||
Documented changes and release timestamp
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.08.27.143351
|
||||
|
||||
2009.09.01.082602 [2773]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin.1
|
||||
Disabled write mode -raw96r
|
||||
|
||||
2009.09.01.095750 [2774] [2775]
|
||||
libburn/libburn.h
|
||||
libburn/sector.h
|
||||
libburn/sector.c
|
||||
libburn/lec.h
|
||||
libburn/lec.c
|
||||
libburn/read.c
|
||||
libburn/write.c
|
||||
Disabled code using libburn/lec.c
|
||||
|
||||
2009.09.01.113957 [2777]
|
||||
cdrskin/cdrskin.c
|
||||
Aligned the output columns of cdrskin --devices
|
||||
|
||||
2009.09.01.133520 [2778]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin.1
|
||||
New option --long_toc, now printing media summary at end of TOC
|
||||
|
||||
2009.09.02.131514 [2779]
|
||||
Makefile.am
|
||||
libburn/sector.c
|
||||
- libburn/lec.h
|
||||
- libburn/lec.c
|
||||
cdrskin/compile_cdrskin.sh
|
||||
Removed lec.c from libburn
|
||||
|
||||
2009.09.02.133307 [2780]
|
||||
libburn/libburn.h
|
||||
libburn/util.c
|
||||
+ doc/mediainfo.txt
|
||||
cdrskin/cdrskin.c
|
||||
New API call burn_guess_cd_manufacturer()
|
||||
|
||||
2009.09.04.202255 [2781]
|
||||
libburn/libburn.h
|
||||
libburn/drive.c
|
||||
libburn/util.c
|
||||
libburn/spc.c
|
||||
libburn/mmc.h
|
||||
libburn/mmc.c
|
||||
New API calls burn_get_media_product_id() and burn_guess_manufacturer()
|
||||
|
||||
2009.09.04.202357 [2782]
|
||||
cdrskin/cdrskin.c
|
||||
Option -atip now reports Product Id and Manufacturer for most CD, DVD, BD types
|
||||
|
||||
4 Sep 2009 [2783]
|
||||
doc/mediainfo.txt
|
||||
Updated media info documentation
|
||||
|
||||
2009.09.04.204432 [2784]
|
||||
cdrskin/cdrskin.c
|
||||
Adjusted column width of media info messages
|
||||
|
||||
2009.09.05.072512 [2785]
|
||||
cdrskin/cdrskin.c
|
||||
Adjusted column width of media summary message
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.05.072659
|
||||
* New option --long_toc, now printing media summary at end of TOC
|
||||
* New API call burn_guess_cd_manufacturer()
|
||||
* New API calls burn_get_media_product_id() and burn_guess_manufacturer()
|
||||
|
||||
|
||||
2009.09.05.113043 [2786]
|
||||
libburn/util.h
|
||||
libburn/util.c
|
||||
libburn/mmc.c
|
||||
Made product ID surely a single printable word
|
||||
|
||||
2009.09.05.114326 [2787]
|
||||
libburn/sg-linux.c
|
||||
Silenced a valgrind warning caused by not recognizing side effects of a ioctl
|
||||
|
||||
2009.09.05.115112 [2788]
|
||||
cdrskin/cdrskin.c
|
||||
Closed a small memory leak with drive inquiry
|
||||
|
||||
2009.09.05.120947 [2789]
|
||||
cdrskin/cdrskin.c
|
||||
Made cdrskin/compile_cdrskin.sh -libburn_0_7_0 work again
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.05.121334
|
||||
|
||||
2009.09.05.131859 [2790]
|
||||
cdrskin/cdrskin.c
|
||||
Re-enabled output of product id and manufacturer
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.05.132208
|
||||
|
||||
2009.09.05.165127 [2791]
|
||||
libburn/libburn.h
|
||||
libburn/drive.c
|
||||
libburn/util.c
|
||||
libburn/mmc.c
|
||||
Introduced flag bit0 for API call burn_get_media_product_id()
|
||||
|
||||
2009.09.05.165257 [2792]
|
||||
cdrskin/cdrskin.c
|
||||
"Manufacturer:", "Media type:" as cdrecord, own "Product Id:" and "Producer:"
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.05.172818
|
||||
* New -atip report lines "Product Id:" and "Producer:"
|
||||
|
||||
|
||||
2009.09.06.092330 [2793]
|
||||
libburn/util.c
|
||||
Made recognition of CD media codes work in burn_guess_manufacturer()
|
||||
|
||||
2009.09.06.092654 [2794]
|
||||
libburn/libburn.h
|
||||
libburn/drive.c
|
||||
cdrskin/cdrskin.c
|
||||
Changed new API call burn_get_media_product_id() to burn_disc_get_media_id()
|
||||
|
||||
06 Sep 2009 [2795]
|
||||
doc/mediainfo.txt
|
||||
Corrected misformatted manufacturer strings of DVD- media
|
||||
|
||||
2009.09.06.112121 [2796]
|
||||
libburn/mmc.c
|
||||
doc/mediainfo.txt
|
||||
Avoided to read third sixpack of manufacturer bytes with DVD-R media
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.06.115138
|
||||
|
||||
2009.09.09.125305 [2801]
|
||||
libburn/libburn.h
|
||||
libburn/transport.h
|
||||
libburn/drive.c
|
||||
libburn/mmc.c
|
||||
New API call burn_disc_get_cd_info()
|
||||
|
||||
2009.09.09.134030 [2802]
|
||||
libburn/transport.h
|
||||
libburn/drive.c
|
||||
libburn/mmc.c
|
||||
Correction with erasable bit of burn_disc_get_cd_info()
|
||||
|
||||
2009.09.09.153951 [2803]
|
||||
libburn/libburn.h
|
||||
libburn/mmc.c
|
||||
New struct burn_toc_entry extension for Last Recorded Address
|
||||
|
||||
2009.09.09.173452 [2804]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin.1
|
||||
Emulation of some -minfo output
|
||||
|
||||
2009.09.09.174337 [2805]
|
||||
cdrskin/cdrskin.c
|
||||
Silenced compiler warning
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.09.174446
|
||||
* New API call burn_disc_get_cd_info()
|
||||
* Emulation of some -minfo output
|
||||
|
||||
|
||||
2009.09.10.071253 [2806]
|
||||
cdrskin/cdrskin.c
|
||||
Removed Media summary from -minfo because of incompatible counting rules
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.10.084912
|
||||
|
||||
|
||||
2009.09.11.112528 [2807]
|
||||
libburn/libburn.h
|
||||
libburn/transport.h
|
||||
libburn/structure.h
|
||||
libburn/structure.c
|
||||
libburn/sector.c
|
||||
New API call burn_track_set_cdxa_conv()
|
||||
|
||||
2009.09.11.120959 [2808]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin.1
|
||||
Interpreting options -mode2, -xa, -xa1, -xa2 but producing CD-ROM Mode 1 tracks
|
||||
|
||||
12 Sep 2009 [2809]
|
||||
cdrskin/cdrskin_eng.html
|
||||
Updated cdrskin web page
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.12.134510
|
||||
* New API call burn_track_set_cdxa_conv()
|
||||
* Better interpretation of options -mode2, -xa, -xa1, -xa2
|
||||
* New option --xa1-ignore
|
||||
|
||||
|
||||
2009.09.13.095055 [2810]
|
||||
libburn/drive.c
|
||||
Evaluating read capacity with role 2 drives (regular files and block devices)
|
||||
|
||||
2009.09.18.161214 [2815]
|
||||
libburn/sector.c
|
||||
Fixing SIGSEGV with CD SAO introduced with revision 2807
|
||||
|
||||
2009.09.18.161944 [2816]
|
||||
libburn/read.c
|
||||
libburn/libdax_msgs.h
|
||||
Refusing to read beyond media_read_capacity
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.09.18.164446
|
||||
|
||||
|
||||
2009.09.20.111911 [2820]
|
||||
libburn/libburn.h
|
||||
Mentioned need for 2056 byte fifo chunks with burn_track_set_cdxa_conv()
|
||||
|
||||
2009.09.22.192545 [2822]
|
||||
libburn/sbc.c
|
||||
Revoked instruction to retry STOP UNIT
|
||||
|
||||
2009.09.22.192802 [2823]
|
||||
libburn/sg-linux.c
|
||||
Restricted retry to the timeout for single SCSI commands (200 seconds)
|
||||
|
||||
2009.10.04.151239 [2830]
|
||||
libburn/write.c
|
||||
libburn/libdax_msgs.h
|
||||
Fixed CD TAO multi-track -dummy bug reported by Philippe Rouquier
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.1 - 2009.10.08.174136
|
||||
* Bug fix: CD TAO sessions with multiple tracks did not work in -dummy mode
|
||||
|
||||
|
||||
2009.10.09.123651 [2847]
|
||||
libburn/mmc.c
|
||||
Determining read capacity for DVD-RAM
|
||||
|
||||
2009.10.09.123840 [2848]
|
||||
cdrskin/cdrskin.c
|
||||
Made -minfo stupidly report overwriteable media as "erasable" and "complete"
|
||||
|
||||
2009.10.09.200411 [2849]
|
||||
libburn/read.c
|
||||
Made read_capacity error message of burn_read_data() depending on flag bit1
|
||||
|
||||
2009.10.09.200730 [2850]
|
||||
cdrskin/cdrskin.c
|
||||
Made -minfo subtract 2 from track size if "Data" and last 2 blocks unreadable
|
||||
|
||||
12 Oct 2009 [2854]
|
||||
svn copy -m "Branching for libburn release 0.7.2" \
|
||||
http://svn.libburnia-project.org/libburn/trunk \
|
||||
http://svn.libburnia-project.org/libburn/branches/ZeroSevenTwo
|
||||
|
||||
2009.10.12.080001 [2855]
|
||||
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 and activated development documentation
|
||||
|
||||
12 Oct 2009 [2856]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_7_0
|
||||
- cdrskin/add_ts_changes_to_libburn_0_7_1
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_2
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_3
|
||||
Updated cdrskin tarball generator
|
||||
|
||||
12 Oct 2009 [2867]
|
||||
cdrskin/changelog.txt
|
||||
Documented changes and release timestamp
|
||||
|
||||
------------------------------ release - cdrskin-0.7.2.pl00 - 2009.10.12.080001
|
||||
* Bug fix: CD TAO sessions with multiple tracks did not work in -dummy mode
|
||||
* Better interpretation of options -mode2, -xa, -xa1, -xa2
|
||||
* New option --xa1-ignore
|
||||
* Emulation of some -minfo output
|
||||
* New -atip report lines "Product Id:" and "Producer:"
|
||||
* New API call burn_guess_cd_manufacturer()
|
||||
* New API calls burn_get_media_product_id() and burn_guess_manufacturer()
|
||||
* New API call burn_disc_get_cd_info()
|
||||
* New API call burn_track_set_cdxa_conv()
|
||||
|
||||
|
||||
2009.10.12.103503 [2858]
|
||||
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 0.7.3
|
||||
|
||||
12 Oct 2009 [2859]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_7_0
|
||||
- cdrskin/add_ts_changes_to_libburn_0_7_1
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_2
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_3
|
||||
Updated cdrskin tarball generator
|
||||
|
||||
12 Oct 2009 [2860]
|
||||
cdrskin/changelog.txt
|
||||
Documented changes and release timestamp
|
||||
|
||||
12 Oct 2009 [2861]
|
||||
svn move -m "libburn release 0.7.2 is ready" \
|
||||
http://svn.libburnia-project.org/libburn/branches/ZeroSevenTwo \
|
||||
http://svn.libburnia-project.org/libburn/tags/ZeroSevenTwo
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.10.12.105750
|
||||
|
||||
|
||||
2009.10.17.131852 [2865] [2864]
|
||||
Makefile.am
|
||||
libburn/libburn.h
|
||||
libburn/sector.c
|
||||
+ libburn/ecma130ab.h
|
||||
+ libburn/ecma130ab.c
|
||||
cdrskin/compile_cdrskin.sh
|
||||
Re-implemented ECMA-130 P-parity, Q-parity and scrambling for BURN_WRITE_RAW
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 -
|
||||
* Re-implemented ECMA-130 P-parity, Q-parity and scrambling for BURN_WRITE_RAW
|
||||
|
||||
|
||||
2009.10.19.115722 [2867]
|
||||
libburn/ecma130ab.c
|
||||
Optimizations with parity computation, clarification about nature of logarithms
|
||||
|
||||
2009.10.20.160131 [2868]
|
||||
libburn/libburn.h
|
||||
libburn/ecma130ab.c
|
||||
More optimizations with parity computation
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.10.20.160131
|
||||
|
||||
|
||||
2009.10.27.100637 [2871]
|
||||
libburn/mmc.c
|
||||
Bug fix: burn_drive->disc_id or burn_drive->disc_app_code altered by stray 0. Thanks to George Danchev.
|
||||
|
||||
2009.10.27.101031 [2872]
|
||||
libburn/sg-freebsd.c
|
||||
Bug fix: Closed memory leak with failure to open device file under FreeBSD. Thanks to George Danchev.
|
||||
|
||||
2009.10.30.134640 [2880]
|
||||
libburn/libburn.h
|
||||
libburn/spc.c
|
||||
libburn/mmc.c
|
||||
libburn/sg-linux.c
|
||||
Test macros for finding reason of stall problem with Pioneer DVD-216D on DVD-R
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.10.30.134640
|
||||
|
||||
|
||||
2009.11.03.184626 [2881]
|
||||
libburn/libburn.h
|
||||
libburn/mmc.c
|
||||
Test macro for SL_V in mode page 05
|
||||
|
||||
2009.11.04.084506 [2882]
|
||||
libburn/libburn.h
|
||||
libburn/write.c
|
||||
Test macro for SEND OPC INFORMATION before DVD-R track
|
||||
|
||||
2009.11.05.170409 [2883]
|
||||
libburn/libburn.h
|
||||
libburn/transport.h
|
||||
libburn/write.c
|
||||
libburn/sbc.c
|
||||
libburn/mmc.c
|
||||
Test macros for double START UNIT and SET CD SPEED
|
||||
|
||||
2009.11.08.120917 [2884]
|
||||
libburn/mmc.c
|
||||
Corrected allocation length with GET CONFIGURATION
|
||||
|
||||
2009.11.08.121334 [2885]
|
||||
libburn/spc.h
|
||||
libburn/spc.c
|
||||
libburn/mmc.h
|
||||
libburn/sg-linux.c
|
||||
Made SCSI command log more complete and more readable
|
||||
|
||||
2009.11.10.132154 [2886]
|
||||
libburn/mmc.c
|
||||
Avoiding START UNIT before the drive gets released
|
||||
|
||||
2009.11.10.203412 [2887]
|
||||
libburn/libburn.h
|
||||
libburn/write.c
|
||||
libburn/spc.c
|
||||
libburn/sbc.c
|
||||
libburn/mmc.c
|
||||
libburn/sg-linux.c
|
||||
Hopefully solved the endless burn problem with Pioneer DVR-216D
|
||||
|
||||
2009.11.11.100714 [2888]
|
||||
libburn/write.c
|
||||
Increased stdio flush interval from 1 MB to 16 MB
|
||||
|
||||
2009.11.11.100822 [2889]
|
||||
cdrskin/cdrskin.c
|
||||
Reporting number of pending bytes while thanking for patience in -vvv mode
|
||||
|
||||
2009.11.11.105028 [2890]
|
||||
cdrskin/cdrskin.c
|
||||
Silenced a compiler warning about potentially uninitialized variable
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.11.11.105159
|
||||
* Workaround for Pioneer DVR-216D which got stuck on DVD-R burns
|
||||
|
||||
|
||||
11 Nov 2009 [2891]
|
||||
cdrskin/cdrskin_eng.html
|
||||
Updated cdrskin home page about DVR-216D workaround
|
||||
|
||||
2009.11.12.175514 [2892]
|
||||
libburn/libburn.h
|
||||
libburn/init.c
|
||||
libburn/write.c
|
||||
libburn/sg-linux.c
|
||||
Made SCSI logger permanent and controllable via API call
|
||||
|
||||
2009.11.12.175735 [2893]
|
||||
libburn/spc.c
|
||||
libburn/sbc.c
|
||||
libburn/mmc.c
|
||||
Workaround for Pioneer DVR-216D refusal to eject
|
||||
|
||||
2009.11.12.180048 [2894]
|
||||
libburn/drive.c
|
||||
Macro Libburn_pioneer_dvr_216d_dummy_probe_wM for omitting write mode probe
|
||||
|
||||
2009.11.12.180241 [2895]
|
||||
cdrskin/cdrskin.c
|
||||
Implemented option -V for logging of SCSI commands
|
||||
|
||||
2009.11.12.193617 [2896]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin.1
|
||||
Man page entry and help text for option -V
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.11.12.194644
|
||||
* Implemented option -V for logging of SCSI commands
|
||||
* Workaround for Pioneer DVR-216D refusal to eject
|
||||
|
||||
|
||||
13 Nov 2009 [2898]
|
||||
svn copy -m Branching for libburn bugfix release 0.7.2.pl01 \
|
||||
http://svn.libburnia-project.org/libburn/tags/ZeroSevenTwo \
|
||||
http://svn.libburnia-project.org/libburn/branches/ZeroSevenTwoPl01
|
||||
|
||||
2009.11.12.230001 [2899]
|
||||
README
|
||||
libburn/write.c
|
||||
libburn/sbc.c
|
||||
cdrskin/README
|
||||
cdrskin/cdrskin_eng.html
|
||||
cdrskin/cdrskin_timestamp.h
|
||||
libburn-0.7.2.pl01 : Workarounds for Pioneer DVR-216D rev 1.09
|
||||
|
||||
13 Nov 2009 [2900]
|
||||
svn move -m libburn bugfix release 0.7.2.pl01 is ready \
|
||||
http://svn.libburnia-project.org/libburn/branches/ZeroSevenTwoPl01 \
|
||||
http://svn.libburnia-project.org/libburn/tags/ZeroSevenTwoPl01
|
||||
|
||||
-------------------------------- patch - cdrskin-0.7.2.pl01 - 2009.11.12.230001
|
||||
* Workaround for Pioneer DVR-216D which got stuck on DVD-R burns
|
||||
* Workaround for Pioneer DVR-216D refusal to eject
|
||||
|
||||
|
||||
2009.11.15.115923 [2901]
|
||||
libburn/file.c
|
||||
Corrected an outdated remark
|
||||
|
||||
2009.11.15.152541 [2902]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrfifo.c
|
||||
cdrskin/compile_cdrskin.sh
|
||||
New compile_cdrskin.sh option -o_direct (Linux only)
|
||||
|
||||
2009.11.15.153140 [2903]
|
||||
libburn/libburn.h
|
||||
libburn/options.h
|
||||
libburn/options.c
|
||||
libburn/write.c
|
||||
New API calls burn_write_opts_set_dvd_obs(), burn_write_opts_set_stdio_fsync()
|
||||
|
||||
2009.11.15.165016 [2904]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin.1
|
||||
New options dvd_obs= and stdio_fsync=
|
||||
|
||||
2009.11.16.165420 [2905]
|
||||
configure.ac
|
||||
Makefile.am
|
||||
libburn/write.c
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrfifo.h
|
||||
cdrskin/cdrfifo.c
|
||||
cdrskin/cdrskin.1
|
||||
Configure options --enable-cdrskin-fifo-odirect, --enable-dvd-obs-64k
|
||||
|
||||
16 Nov 2009 [2906]
|
||||
cdrskin/compile_cdrskin.sh
|
||||
New compile_cdrskin.sh option -dvd_obs_64k, adapted to new .o names of libburn
|
||||
|
||||
16 Nov 2009 [2907]
|
||||
README
|
||||
cdrskin/README
|
||||
cdrskin/cdrskin_eng.html
|
||||
Updated build instructions of libburn and cdrskin
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.11.16.180334
|
||||
* New API calls burn_write_opts_set_dvd_obs(), burn_write_opts_set_stdio_fsync()
|
||||
* New options dvd_obs= and stdio_fsync=
|
||||
* Configure option --enable-dvd-obs-64k
|
||||
* New compile_cdrskin.sh option -dvd_obs_64k
|
||||
|
||||
|
||||
2009.11.17.093602 [2908]
|
||||
configure.ac
|
||||
Makefile.am
|
||||
cdrskin/compile_cdrskin.sh
|
||||
Revoked usage of libburn_libburn_la_CFLAGS in Makefile.am (ugly .o names)
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.11.17.100248
|
||||
|
||||
|
||||
17 Nov 2009 [2912]
|
||||
cdrskin/compile_cdrskin.sh
|
||||
Corrected help text of cdrskin static compile script
|
||||
|
||||
2009.11.18.122713 [2913]
|
||||
libburn/drive.c
|
||||
libburn/spc.c
|
||||
libburn/mmc.h
|
||||
libburn/mmc.c
|
||||
Split automatic drive start function from mmc_function_spy()
|
||||
|
||||
2009.11.18.185733 [2914]
|
||||
libburn/write.c
|
||||
Reserving enough track space for 64 kB write chunks
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.11.18.190403
|
||||
|
||||
|
||||
2009.11.20.134952 [2915]
|
||||
libburn/libburn.h
|
||||
libburn/write.c
|
||||
libburn/sg-linux.c
|
||||
Experiment about SG_FLAG_DIRECT_IO
|
||||
|
||||
2009.11.20.175854 [2916]
|
||||
cdrskin/cdrfifo.c
|
||||
Avoided use of uninitialized variable
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.11.21.122202
|
||||
|
||||
|
||||
2009.11.21.191516 [2917]
|
||||
libburn/write.c
|
||||
Longer READ BUFFER CAPACITY interval with DVD/BD writing
|
||||
|
||||
2009.11.21.191717 [2918]
|
||||
cdrskin/cdrskin.c
|
||||
Enabled cdrskin O_DIRECT with fs=0
|
||||
|
||||
2009.11.22.115227 [2919]
|
||||
libburn/write.c
|
||||
Bug fix: DVD DAO track size was rounded up much too generously
|
||||
|
||||
2009.11.23.185725 [2920]
|
||||
configure.ac
|
||||
Makefile.am
|
||||
README
|
||||
libburn/libburn.h
|
||||
libburn/file.h
|
||||
libburn/file.c
|
||||
libburn/async.c
|
||||
libburn/write.c
|
||||
libburn/sg-linux.c
|
||||
libburn/sg-freebsd.c
|
||||
libburn/sg-freebsd-port.c
|
||||
libburn/sg-dummy.c
|
||||
New API calls burn_os_open_track_src() , burn_os_alloc_buffer()
|
||||
|
||||
2009.11.23.193252 [2921]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrfifo.c
|
||||
cdrskin/compile_cdrskin.sh
|
||||
cdrskin/README
|
||||
Gave up cdrskin specific O_DIRECT compile option
|
||||
|
||||
2009.11.25.122233 [2920]
|
||||
libburn/libburn.h
|
||||
libburn/sg-linux.c
|
||||
libburn/sg-freebsd.c
|
||||
libburn/sg-freebsd-port.c
|
||||
libburn/sg-dummy.c
|
||||
Gave up call burn_os_close_track_src() introduced by rev 2920
|
||||
|
||||
2009.11.25.160153 [2923]
|
||||
libburn/libburn.h
|
||||
libburn/file.c
|
||||
libburn/libdax_msgs.h
|
||||
New API call burn_fifo_fill()
|
||||
|
||||
2009.11.26.144452 [2924]
|
||||
libburn/libburn.h
|
||||
libburn/file.h
|
||||
libburn/file.c
|
||||
New API calls burn_fifo_get_statistics(), burn_fifo_next_interval()
|
||||
|
||||
2009.11.26.211418 [2925]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/compile_cdrskin.sh
|
||||
Compiler option -use_libburn_fifo to switch non-CD from cdrfifo to libburn fifo
|
||||
|
||||
2009.11.28.122436 [2926]
|
||||
libburn/sg-linux.c
|
||||
Using mmap() by default for allocating read buffers
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.11.28.165658
|
||||
* Bug fix: DVD DAO track size was rounded up much too generously
|
||||
* New API call burn_fifo_fill()
|
||||
* New API calls burn_fifo_get_statistics(), burn_fifo_next_interval()
|
||||
* Configure option --enable-track-src-odirect
|
||||
|
||||
|
||||
2009.11.30.100152 [2929]
|
||||
libburn/sbc.c
|
||||
Documented meaning of START/STOP UNIT bits
|
||||
|
||||
2009.12.02.103036 [2930]
|
||||
libburn/write.c
|
||||
Gave up CLOSE TRACK with CD TAO burn runs
|
||||
|
||||
2009.12.05.111822 [2931]
|
||||
libburn/mmc.c
|
||||
Bug fix: SIGSEGV with LG GH22LS30 when inquiring media product id
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.3 - 2009.12.05.112623
|
||||
* Bug fix: SIGSEGV from NULL pointer with media product id inquiry on LG GH22LS30
|
||||
|
||||
|
||||
2009.12.05.142309 [2932]
|
||||
libburn/libburn.h
|
||||
libburn/write.c
|
||||
Made effect of macro Libburn_pioneer_dvr_216d_read_buf_caP unconditional
|
||||
|
||||
2009.12.05.143707 [2933]
|
||||
libburn/mmc.c
|
||||
libburn/sg-linux.c
|
||||
Converted stderr experiment messages to DEBUG messages
|
||||
|
||||
2009.12.06.073404 [2934]
|
||||
libburn/mmc.c
|
||||
Some clarifications about the GH22LS30 problem
|
||||
|
||||
2009.12.06.074622 [2935]
|
||||
libburn/write.c
|
||||
Some clarifications about the Linux throughput problem
|
||||
|
||||
2009.12.06.093847 [2936]
|
||||
cdrskin/compile_cdrskin.sh
|
||||
Now default in cdrskin: use of libburn fifo with DVD and BD single track
|
||||
|
||||
06 Dec 2009 [2937]
|
||||
svn copy -m Branching for libburn release 0.7.4
|
||||
http://svn.libburnia-project.org/libburn/trunk
|
||||
http://svn.libburnia-project.org/libburn/branches/ZeroSevenFour
|
||||
|
||||
|
||||
2009.12.06.160001 [2938]
|
||||
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 0.7.4
|
||||
|
||||
06 Dec 2009 [2939]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_7_2
|
||||
- cdrskin/add_ts_changes_to_libburn_0_7_3
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_4
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_7_5
|
||||
Updated cdrskin tarball generator
|
||||
|
||||
[]
|
||||
cdrskin/changelog.txt
|
||||
Documented changes and release timestamp
|
||||
|
||||
------------------------------ release - cdrskin-0.7.4.pl00 - 2009.12.06.160001
|
||||
* Configure options --enable-dvd-obs-64k, --enable-track-src-odirect
|
||||
* New API calls burn_write_opts_set_dvd_obs(), burn_write_opts_set_stdio_fsync()
|
||||
* New API call burn_set_scsi_logging()
|
||||
* New API calls burn_fifo_get_statistics(), burn_fifo_next_interval(), burn_fifo_fill()
|
||||
* Re-implemented ECMA-130 P-parity, Q-parity and scrambling for BURN_WRITE_RAW
|
||||
* Workaround for Pioneer DVR-216D which got stuck on DVD-R burns
|
||||
* Workaround for Pioneer DVR-216D refusal to eject
|
||||
* Bug fix: SIGSEGV from NULL pointer with media product id inquiry on LG GH22LS30
|
||||
* Bug fix: DVD DAO track size was rounded up much too generously
|
||||
* cdrskin option -V for logging of SCSI commands
|
||||
* New cdrskin options dvd_obs= and stdio_fsync=
|
||||
* New compile_cdrskin.sh option -dvd_obs_64k
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.6.7 -
|
||||
------------------------------------ cycle - cdrskin-0.6.7 -
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.7.5 -
|
||||
------------------------------------ cycle - cdrskin-0.7.5 -
|
||||
|
||||
===============================================================================
|
||||
TODO
|
||||
@ -6651,6 +7601,8 @@ Documented changes and release timestamp
|
||||
|
||||
--------------------------------- bugs -------------------------------------
|
||||
|
||||
- handle HD DVD profiles 0x50 "HD DVD-ROM", 0x51 "HD DVD-R", 0x52 "HD DVD-RAM"
|
||||
as readable.
|
||||
|
||||
- Do something about drive->buffer asynchronous race conditions
|
||||
and dangerous use of local heap memory.
|
||||
@ -6672,6 +7624,9 @@ READ TRACK INFORMATION[#5]:
|
||||
|
||||
------------------------------ end of bugs ---------------------------------
|
||||
|
||||
|
||||
- Make Libburn_stdio_flush_limiT adjustable
|
||||
|
||||
Support for BD-R SRM+POW
|
||||
|
||||
? Provide an option to open track source file O_DIRECT ?
|
||||
|
@ -1,16 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
# compile_cdrskin.sh
|
||||
# Copyright 2005 - 2008 Thomas Schmitt, scdbackup@gmx.net, GPL version 2
|
||||
# Copyright 2005 - 2009 Thomas Schmitt, scdbackup@gmx.net, GPL version 2
|
||||
# to be executed within ./libburn-* resp ./cdrskin-*
|
||||
|
||||
debug_opts="-O2"
|
||||
def_opts=
|
||||
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
|
||||
libvers="-DCdrskin_libburn_0_6_7"
|
||||
cleanup_src_or_obj="libburn/cleanup.o"
|
||||
libdax_msgs_o="libburn/libdax_msgs.o"
|
||||
libdax_audioxtr_o="libburn/libdax_audioxtr.o"
|
||||
fifo_opts="-DCdrskin_use_libburn_fifO"
|
||||
libvers="-DCdrskin_libburn_0_7_4"
|
||||
|
||||
# To be used if Makefile.am uses libburn_libburn_la_CFLAGS
|
||||
# burn="libburn/libburn_libburn_la-"
|
||||
burn="libburn/"
|
||||
|
||||
cleanup_src_or_obj="$burn"cleanup.o
|
||||
libdax_msgs_o="$burn"libdax_msgs.o
|
||||
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
||||
do_strip=0
|
||||
static_opts=
|
||||
warn_opts="-Wall"
|
||||
@ -31,20 +37,20 @@ do
|
||||
then
|
||||
libvers="-DCdrskin_libburn_cvs_A60220_tS"
|
||||
libdax_audioxtr_o=
|
||||
libdax_msgs_o="libburn/message.o"
|
||||
libdax_msgs_o="$burn"message.o
|
||||
cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
|
||||
elif test "$i" = "-libburn_0_6_6"
|
||||
elif test "$i" = "-libburn_0_7_4"
|
||||
then
|
||||
libvers="-DCdrskin_libburn_0_6_6"
|
||||
libdax_audioxtr_o="libburn/libdax_audioxtr.o"
|
||||
libdax_msgs_o="libburn/libdax_msgs.o"
|
||||
cleanup_src_or_obj="libburn/cleanup.o"
|
||||
libvers="-DCdrskin_libburn_0_7_4"
|
||||
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_0_6_7"
|
||||
libdax_audioxtr_o="libburn/libdax_audioxtr.o"
|
||||
libdax_msgs_o="libburn/libdax_msgs.o"
|
||||
cleanup_src_or_obj="libburn/cleanup.o"
|
||||
libvers="-DCdrskin_libburn_0_7_5"
|
||||
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
||||
libdax_msgs_o="$burn"libdax_msgs.o
|
||||
cleanup_src_or_obj="$burn"cleanup.o
|
||||
elif test "$i" = "-newapi" -o "$i" = "-experimental"
|
||||
then
|
||||
def_opts="$def_opts -DCdrskin_new_api_tesT"
|
||||
@ -55,6 +61,9 @@ do
|
||||
elif test "$i" = "-no_largefile"
|
||||
then
|
||||
largefile_opts=
|
||||
elif test "$i" = "-dvd_obs_64k"
|
||||
then
|
||||
def_opts="$def_opts -DCdrskin_dvd_obs_default_64K"
|
||||
elif test "$i" = "-do_not_compile_cdrskin"
|
||||
then
|
||||
compile_cdrskin=0
|
||||
@ -66,6 +75,16 @@ do
|
||||
elif test "$i" = "-do_strip"
|
||||
then
|
||||
do_strip=1
|
||||
elif test "$i" = "-use_libburn_fifo"
|
||||
then
|
||||
fifo_opts="-DCdrskin_use_libburn_fifO"
|
||||
elif test "$i" = "-use_no_libburn_fifo"
|
||||
then
|
||||
fifo_opts=""
|
||||
elif test "$i" = "-use_no_cdrfifo"
|
||||
then
|
||||
fifo_source=
|
||||
fifo_opts="-DCdrskin_use_libburn_fifO -DCdrskin_no_cdrfifO"
|
||||
elif test "$i" = "-g"
|
||||
then
|
||||
debug_opts="-g"
|
||||
@ -75,9 +94,12 @@ do
|
||||
echo "Options:"
|
||||
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
|
||||
echo " -compile_dewav compile program test/dewav without libburn."
|
||||
echo " -libburn_0_6_6 set macro to match libburn-0.6.6"
|
||||
echo " -libburn_0_7_4 set macro to match libburn-0.7.4"
|
||||
echo " -libburn_svn set macro to match current libburn-SVN."
|
||||
echo " -dvd_obs_64k 64 KB default size for DVD/BD writing."
|
||||
echo " -do_not_compile_cdrskin omit compilation of cdrskin/cdrskin."
|
||||
echo " -use_no_libburn_fifo use cdrfifo even for single track non-CD"
|
||||
echo " -use_no_cdrfifo always use fifo of libburn and never cdrfifo"
|
||||
echo " -experimental use newly introduced libburn features."
|
||||
echo " -oldfashioned use pre-0.2.2 libburn features only."
|
||||
echo " -do_diet produce capability reduced lean version."
|
||||
@ -98,13 +120,14 @@ echo "Build timestamp : $timestamp"
|
||||
|
||||
if test "$compile_cdrskin"
|
||||
then
|
||||
echo "compiling program cdrskin/cdrskin.c $static_opts $debug_opts $libvers $def_opts $cleanup_src_or_obj"
|
||||
echo "compiling program cdrskin/cdrskin.c $fifo_source $static_opts $debug_opts $libvers $fifo_opts $def_opts $cleanup_src_or_obj"
|
||||
cc -I. \
|
||||
$warn_opts \
|
||||
$static_opts \
|
||||
$debug_opts \
|
||||
$libvers \
|
||||
$largefile_opts \
|
||||
$fifo_opts \
|
||||
$def_opts \
|
||||
\
|
||||
-DCdrskin_build_timestamP='"'"$timestamp"'"' \
|
||||
@ -116,31 +139,31 @@ then
|
||||
\
|
||||
$cleanup_src_or_obj \
|
||||
\
|
||||
libburn/async.o \
|
||||
libburn/debug.o \
|
||||
libburn/drive.o \
|
||||
libburn/file.o \
|
||||
libburn/init.o \
|
||||
libburn/options.o \
|
||||
libburn/source.o \
|
||||
libburn/structure.o \
|
||||
"$burn"async.o \
|
||||
"$burn"debug.o \
|
||||
"$burn"drive.o \
|
||||
"$burn"file.o \
|
||||
"$burn"init.o \
|
||||
"$burn"options.o \
|
||||
"$burn"source.o \
|
||||
"$burn"structure.o \
|
||||
\
|
||||
libburn/sg.o \
|
||||
libburn/write.o \
|
||||
libburn/read.o \
|
||||
"$burn"sg.o \
|
||||
"$burn"write.o \
|
||||
"$burn"read.o \
|
||||
$libdax_audioxtr_o \
|
||||
$libdax_msgs_o \
|
||||
\
|
||||
libburn/mmc.o \
|
||||
libburn/sbc.o \
|
||||
libburn/spc.o \
|
||||
libburn/util.o \
|
||||
"$burn"mmc.o \
|
||||
"$burn"sbc.o \
|
||||
"$burn"spc.o \
|
||||
"$burn"util.o \
|
||||
\
|
||||
libburn/sector.o \
|
||||
libburn/toc.o \
|
||||
"$burn"sector.o \
|
||||
"$burn"toc.o \
|
||||
\
|
||||
libburn/crc.o \
|
||||
libburn/lec.o \
|
||||
"$burn"crc.o \
|
||||
"$burn"ecma130ab.o \
|
||||
\
|
||||
-lpthread
|
||||
|
||||
@ -183,8 +206,8 @@ then
|
||||
-DDewav_without_libburN \
|
||||
-o test/dewav \
|
||||
test/dewav.c \
|
||||
libburn/libdax_audioxtr.o \
|
||||
libburn/libdax_msgs.o \
|
||||
"$burn"libdax_audioxtr.o \
|
||||
"$burn"libdax_msgs.o \
|
||||
\
|
||||
-lpthread
|
||||
|
||||
|
56
configure.ac
56
configure.ac
@ -1,4 +1,4 @@
|
||||
AC_INIT([libburn], [0.6.7], [http://libburnia-project.org])
|
||||
AC_INIT([libburn], [0.7.4], [http://libburnia-project.org])
|
||||
AC_PREREQ([2.50])
|
||||
dnl AC_CONFIG_HEADER([config.h])
|
||||
|
||||
@ -7,7 +7,7 @@ AC_CANONICAL_TARGET
|
||||
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
|
||||
dnl Notes by ts A71207 - A90507 :
|
||||
dnl Notes by ts A71207 - A91012 :
|
||||
dnl
|
||||
dnl Regrettably the meaning of the various version types was misunderstood
|
||||
dnl before version 0.4.1.
|
||||
@ -72,6 +72,10 @@ dnl 0.6.0 = libburn.so.4.25.0
|
||||
dnl 0.6.2 = libburn.so.4.27.0
|
||||
dnl 0.6.4 = libburn.so.4.29.0
|
||||
dnl 0.6.6 = libburn.so.4.31.0
|
||||
dnl 0.6.8 = libburn.so.4.33.0
|
||||
dnl 0.7.0 = libburn.so.4.35.0
|
||||
dnl 0.7.2 = libburn.so.4.37.0
|
||||
dnl 0.7.4 = libburn.so.4.39.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.
|
||||
@ -96,8 +100,8 @@ dnl If BURN_*_VERSION changes, be sure to change AC_INIT above to match.
|
||||
dnl
|
||||
dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
|
||||
BURN_MAJOR_VERSION=0
|
||||
BURN_MINOR_VERSION=6
|
||||
BURN_MICRO_VERSION=7
|
||||
BURN_MINOR_VERSION=7
|
||||
BURN_MICRO_VERSION=4
|
||||
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
|
||||
|
||||
AC_SUBST(BURN_MAJOR_VERSION)
|
||||
@ -108,15 +112,15 @@ AC_SUBST(BURN_VERSION)
|
||||
dnl Libtool versioning
|
||||
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
|
||||
dnl
|
||||
dnl ts A90507
|
||||
dnl ### This is the release version libburn-0.6.6 = libburn.so.4.31.0
|
||||
dnl This is the development version after above release version
|
||||
dnl ts A91206
|
||||
dnl This is the release version libburn-0.7.4 = libburn.so.4.39.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 = 35 - 31 = 4 . Linux library name = libburn.so.4.31.0
|
||||
LT_CURRENT=35
|
||||
LT_AGE=31
|
||||
dnl SONAME = 43 - 39 = 4 . Linux library name = libburn.so.4.39.0
|
||||
LT_CURRENT=43
|
||||
LT_AGE=39
|
||||
LT_REVISION=0
|
||||
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
|
||||
|
||||
@ -176,6 +180,37 @@ dnl If this would be done more specifically in Makefile.am
|
||||
dnl via libburn_libburn_la_CFLAGS then undesired .o file names would emerge
|
||||
CFLAGS="$CFLAGS $STATVFS_DEF"
|
||||
|
||||
dnl ts A91122
|
||||
AC_ARG_ENABLE(track-src-odirect,
|
||||
[ --enable-track-src-odirect Enable use of O_DIRECT with track input, default=no],
|
||||
, enable_track_src_odirect=no)
|
||||
if test x$enable_track_src_odirect = xyes; then
|
||||
LIBBURN_O_DIRECT_DEF="-DLibburn_read_o_direcT"
|
||||
echo "enabled use of O_DIRECT with track input"
|
||||
else
|
||||
LIBBURN_O_DIRECT_DEF=
|
||||
echo "disabled use of O_DIRECT with track input"
|
||||
fi
|
||||
dnl Avoid the need for libburn_libburn_la_CFLAGS in Makefile.am (ugly .o names)
|
||||
dnl ### AC_SUBST(LIBBURN_O_DIRECT_DEF)
|
||||
CFLAGS="$CFLAGS $LIBBURN_O_DIRECT_DEF"
|
||||
|
||||
dnl ts A91116
|
||||
AC_ARG_ENABLE(dvd-obs-64k,
|
||||
[ --enable-dvd-obs-64k 64 KB default size for DVD/BD writing, default=no],
|
||||
, enable_fifo_odirect=no)
|
||||
if test x$enable_dvd_obs_64k = xyes; then
|
||||
LIBBURN_DVD_OBS_64K="-DLibburn_dvd_obs_default_64K"
|
||||
echo "enabled write size default 64 KB on DVD and BD"
|
||||
else
|
||||
LIBBURN_DVD_OBS_64K=
|
||||
echo "disabled write size default 64 KB on DVD and BD"
|
||||
fi
|
||||
dnl Avoid the need for libburn_libburn_la_CFLAGS in Makefile.am (ugly .o names)
|
||||
dnl ### AC_SUBST(LIBBURN_DVD_OBS_64K)
|
||||
CFLAGS="$CFLAGS $LIBBURN_DVD_OBS_64K"
|
||||
|
||||
|
||||
dnl Add compiler-specific flags
|
||||
|
||||
dnl See if the user wants aggressive optimizations of the code
|
||||
@ -195,7 +230,6 @@ else
|
||||
CFLAGS="$CFLAGS -DDEBUG"
|
||||
fi
|
||||
|
||||
|
||||
dnl Determine target directory for libburn-*.pc
|
||||
dnl Important: Must be performed _after_ TARGET_SHIZZLE
|
||||
dnl
|
||||
|
1198
doc/mediainfo.txt
Normal file
1198
doc/mediainfo.txt
Normal file
File diff suppressed because it is too large
Load Diff
@ -627,7 +627,8 @@ int burn_fifo_start(struct burn_source *source, int flag)
|
||||
fs->is_started = -1;
|
||||
|
||||
/* create and set up ring buffer */;
|
||||
fs->buf = calloc(fs->chunksize, fs->chunks);
|
||||
fs->buf = burn_os_alloc_buffer(
|
||||
((size_t) fs->chunksize) * (size_t) fs->chunks, 0);
|
||||
if (fs->buf == NULL) {
|
||||
/* >>> could not start ring buffer */;
|
||||
return -1;
|
||||
|
168
libburn/drive.c
168
libburn/drive.c
@ -40,6 +40,9 @@
|
||||
/* A70903 : for burn_scsi_setup_drive() */
|
||||
#include "spc.h"
|
||||
|
||||
/* A90815 : for mmc_obtain_profile_name() */
|
||||
#include "mmc.h"
|
||||
|
||||
#include "libdax_msgs.h"
|
||||
extern struct libdax_msgs *libdax_messenger;
|
||||
|
||||
@ -421,10 +424,6 @@ struct burn_drive *burn_drive_finish_enum(struct burn_drive *d)
|
||||
char msg[BURN_DRIVE_ADR_LEN + 160];
|
||||
int ret;
|
||||
|
||||
/* ts A60821
|
||||
<<< debug: for tracing calls which might use open drive fds */
|
||||
int mmc_function_spy(struct burn_drive *d, char * text);
|
||||
|
||||
d->drive_role = 1; /* MMC drive */
|
||||
|
||||
t = burn_drive_register(d);
|
||||
@ -518,6 +517,7 @@ int burn_drive_release_fl(struct burn_drive *d, int flag)
|
||||
d->unlock(d);
|
||||
if ((flag & 7) == 1)
|
||||
d->eject(d);
|
||||
burn_drive_snooze(d, 0);
|
||||
d->release(d);
|
||||
}
|
||||
|
||||
@ -530,6 +530,22 @@ int burn_drive_release_fl(struct burn_drive *d, int flag)
|
||||
}
|
||||
|
||||
|
||||
/* API */
|
||||
/* ts A90824
|
||||
@param flag bit0= wake up (else start snoozing)
|
||||
*/
|
||||
int burn_drive_snooze(struct burn_drive *d, int flag)
|
||||
{
|
||||
if (d->drive_role != 1)
|
||||
return 0;
|
||||
if (flag & 1)
|
||||
d->start_unit(d);
|
||||
else
|
||||
d->stop_unit(d);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* API */
|
||||
void burn_drive_release(struct burn_drive *d, int le)
|
||||
{
|
||||
@ -890,6 +906,22 @@ static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out)
|
||||
out->write_simulate = !!d->mdata->simulate;
|
||||
out->c2_errors = !!d->mdata->c2_pointers;
|
||||
out->drive = d;
|
||||
|
||||
#ifdef Libburn_pioneer_dvr_216d_dummy_probe_wM
|
||||
|
||||
/* ts A91112 */
|
||||
/* Set default block types. The call d->probe_write_modes() is quite
|
||||
obtrusive. It may be performed explicitely by new API call
|
||||
burn_drive_probe_cd_write_modes().
|
||||
*/
|
||||
out->tao_block_types = d->block_types[BURN_WRITE_TAO] =
|
||||
BURN_BLOCK_MODE1 | BURN_BLOCK_RAW0;
|
||||
out->sao_block_types = d->block_types[BURN_WRITE_SAO] = BURN_BLOCK_SAO;
|
||||
out->raw_block_types = d->block_types[BURN_WRITE_RAW] = 0;
|
||||
out->packet_block_types = 0;
|
||||
|
||||
#else /* Libburn_pioneer_dvr_216d_dummy_probe_wM */
|
||||
|
||||
/* update available block types for burners */
|
||||
if (out->write_dvdram || out->write_dvdr ||
|
||||
out->write_cdrw || out->write_cdr)
|
||||
@ -898,10 +930,37 @@ static int drive_getcaps(struct burn_drive *d, struct burn_drive_info *out)
|
||||
out->sao_block_types = d->block_types[BURN_WRITE_SAO];
|
||||
out->raw_block_types = d->block_types[BURN_WRITE_RAW];
|
||||
out->packet_block_types = d->block_types[BURN_WRITE_PACKET];
|
||||
|
||||
#endif /* ! Libburn_pioneer_dvr_216d_dummy_probe_wM */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef Libburn_pioneer_dvr_216d_dummy_probe_wM
|
||||
|
||||
/* ts A91112 candidate for API */
|
||||
/* Probe available CD write modes and block types.
|
||||
*/
|
||||
int burn_drive_probe_cd_write_modes(struct burn_drive_info *dinfo)
|
||||
{
|
||||
struct burn_drive *d = dinfo->drive;
|
||||
|
||||
if (d == NULL)
|
||||
return 0;
|
||||
if (dinfo->write_dvdram || dinfo->write_dvdr ||
|
||||
dinfo->write_cdrw || dinfo->write_cdr)
|
||||
d->probe_write_modes(d);
|
||||
dinfo->tao_block_types = d->block_types[BURN_WRITE_TAO];
|
||||
dinfo->sao_block_types = d->block_types[BURN_WRITE_SAO];
|
||||
dinfo->raw_block_types = d->block_types[BURN_WRITE_RAW];
|
||||
dinfo->packet_block_types = d->block_types[BURN_WRITE_PACKET];
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* Libburn_pioneer_dvr_216d_dummy_probe_wM */
|
||||
|
||||
|
||||
/* ts A70907 : added parameter flag */
|
||||
/* @param flag bit0= reset global drive list */
|
||||
int burn_drive_scan_sync(struct burn_drive_info *drives[],
|
||||
@ -1260,6 +1319,7 @@ int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
|
||||
int ret = -1, fd = -1, role = 0;
|
||||
/* divided by 512 it needs to fit into a signed long integer */
|
||||
off_t size = ((off_t) (512 * 1024 * 1024 - 1) * (off_t) 2048);
|
||||
off_t read_size = -1;
|
||||
struct burn_drive *d= NULL, *regd_d;
|
||||
struct stat stbuf;
|
||||
|
||||
@ -1272,6 +1332,16 @@ int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
|
||||
ret = fstat(fd, &stbuf);
|
||||
else
|
||||
ret = stat(fname, &stbuf);
|
||||
if (ret != -1) {
|
||||
if (S_ISREG(stbuf.st_mode))
|
||||
read_size = stbuf.st_size;
|
||||
else if (S_ISBLK(stbuf.st_mode)) {
|
||||
ret = burn_os_stdio_capacity(fname,
|
||||
&read_size);
|
||||
if (ret <= 0)
|
||||
read_size = -1;
|
||||
}
|
||||
}
|
||||
if (ret == -1 || S_ISBLK(stbuf.st_mode) ||
|
||||
S_ISREG(stbuf.st_mode)) {
|
||||
ret = burn_os_stdio_capacity(fname, &size);
|
||||
@ -1330,6 +1400,10 @@ int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
|
||||
d->current_is_supported_profile = 1;
|
||||
d->block_types[BURN_WRITE_TAO] = BURN_BLOCK_MODE1;
|
||||
d->block_types[BURN_WRITE_SAO] = BURN_BLOCK_SAO;
|
||||
if (read_size >= 0)
|
||||
/* despite its name : last valid address, not size */
|
||||
d->media_read_capacity =
|
||||
read_size / 2048 - !(read_size % 2048);
|
||||
burn_drive_set_media_capacity_remaining(d, size);
|
||||
|
||||
/* >>> ? open file for a test ? (>>> beware of "-" = stdin) */;
|
||||
@ -1889,11 +1963,16 @@ int burn_disc_read_atip(struct burn_drive *d)
|
||||
}
|
||||
if(d->drive_role != 1)
|
||||
return 0;
|
||||
if (d->current_profile == -1 || d->current_is_cd_profile) {
|
||||
if ((d->current_profile == -1 || d->current_is_cd_profile)
|
||||
&& (d->mdata->cdrw_write || d->current_profile != 0x08)) {
|
||||
d->read_atip(d);
|
||||
/* >>> some control of success would be nice :) */
|
||||
} else {
|
||||
/* mmc5r03c.pdf 6.26.3.6.3 : ATIP is undefined for non-CD */;
|
||||
/* mmc5r03c.pdf 6.26.3.6.3 : ATIP is undefined for non-CD
|
||||
(and it seems meaningless for non-burners).
|
||||
ts A90823: Pseudo-CD U3 memory stick stalls with ATIP.
|
||||
It is !cdrw_write and profile is 0x08.
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
@ -2001,6 +2080,30 @@ int burn_disc_get_profile(struct burn_drive *d, int *pno, char name[80])
|
||||
}
|
||||
|
||||
|
||||
/* ts A90815 : New API function */
|
||||
int burn_drive_get_all_profiles(struct burn_drive *d, int *num_profiles,
|
||||
int profiles[64], char is_current[64])
|
||||
{
|
||||
int i;
|
||||
|
||||
*num_profiles = d->num_profiles;
|
||||
for (i = 0; i < d->num_profiles; i++) {
|
||||
profiles[i] = (d->all_profiles[i * 4] << 8) |
|
||||
d->all_profiles[i * 4 + 1];
|
||||
is_current[i] = d->all_profiles[i * 4 + 2] & 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A90815 : New API function */
|
||||
int burn_obtain_profile_name(int profile_number, char name[80])
|
||||
{
|
||||
strcpy(name, mmc_obtain_profile_name(profile_number));
|
||||
return(name[0] != 0);
|
||||
}
|
||||
|
||||
|
||||
/* ts A61223 : New API function */
|
||||
int burn_drive_wrote_well(struct burn_drive *d)
|
||||
{
|
||||
@ -2573,7 +2676,58 @@ int burn_drive_set_media_capacity_remaining(struct burn_drive *d, off_t value)
|
||||
/* ts A81215 : API */
|
||||
int burn_get_read_capacity(struct burn_drive *d, int *capacity, int flag)
|
||||
{
|
||||
*capacity = d->media_read_capacity;
|
||||
*capacity = d->media_read_capacity + 1;
|
||||
return (d->media_read_capacity != 0x7fffffff);
|
||||
}
|
||||
|
||||
|
||||
/* ts A90903 : API */
|
||||
int burn_disc_get_media_id(struct burn_drive *d,
|
||||
char **product_id, char **media_code1, char **media_code2,
|
||||
char **book_type, int flag)
|
||||
{
|
||||
int ret;
|
||||
|
||||
*product_id = *media_code1 = *media_code2 = *book_type = NULL;
|
||||
if (burn_drive_get_drive_role(d) != 1)
|
||||
return 0;
|
||||
ret = mmc_get_media_product_id(d,
|
||||
product_id, media_code1, media_code2, book_type,
|
||||
flag & 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* ts A90909 : API */
|
||||
/**
|
||||
@param valid Replies bits which indicate the validity of other reply
|
||||
parameters or the state of certain CD info bits:
|
||||
bit0= disc_type valid
|
||||
bit1= disc_id valid
|
||||
bit2= bar_code valid
|
||||
bit3= disc_app_code valid
|
||||
bit4= Disc is unrestricted (URU bit)
|
||||
bit5= Disc is nominally erasable (Erasable bit)
|
||||
This will be set with overwriteable media which
|
||||
libburn normally considers to be unerasable blank.
|
||||
*/
|
||||
int burn_disc_get_cd_info(struct burn_drive *d, char disc_type[80],
|
||||
unsigned int *disc_id, char bar_code[9], int *app_code,
|
||||
int *valid)
|
||||
{
|
||||
if (d->disc_type == 0x00) {
|
||||
strcpy(disc_type, "CD-DA or CD-ROM");
|
||||
} else if (d->disc_type == 0x10) {
|
||||
strcpy(disc_type, "CD-I");
|
||||
} else if (d->disc_type == 0x20) {
|
||||
strcpy(disc_type, "CD-ROM XA");
|
||||
} else {
|
||||
strcpy(disc_type, "undefined");
|
||||
}
|
||||
*disc_id = d->disc_id;
|
||||
memcpy(bar_code, d->disc_bar_code, 8);
|
||||
bar_code[9]= 0;
|
||||
*app_code = d->disc_app_code;
|
||||
*valid = d->disc_info_valid;
|
||||
return 1;
|
||||
}
|
||||
|
850
libburn/ecma130ab.c
Normal file
850
libburn/ecma130ab.c
Normal file
@ -0,0 +1,850 @@
|
||||
|
||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||
|
||||
/* ts A91016 : libburn/ecma130ab.c is the replacement for old libburn/lec.c
|
||||
|
||||
Copyright 2009, Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||
|
||||
This code module implements the production of RSPC parity bytes (P- and Q-
|
||||
parity) and the scrambling of raw CD-ROM sectors as specified in ECMA-130:
|
||||
http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-130.pdf
|
||||
|
||||
The following statements about Galois Fields have been learned mostly from
|
||||
http://www.cs.utk.edu/~plank/plank/papers/CS-96-332.pdf
|
||||
by James S. Plank after an e-mail exchange with Norbert Preining.
|
||||
|
||||
The output has been compared with the output of the old code of libburn
|
||||
which was labeled "borrowed HEAVILY from cdrdao" and claimed by Joerg
|
||||
Schilling to stem from code by Heiko Eissfeldt.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
Note: In this text, "^" denotes exponentiation and not the binary exor
|
||||
operation. Confusingly in the C code "^" is said exor.
|
||||
Note: This is not C1, C2 which is rather mentioned in ECMA-130 Annex C and
|
||||
always performed inside the drive.
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
RSPC resp. P- and Q-Parity
|
||||
|
||||
ECMA-130 Annex A prescribes to compute the parity bytes for P-columns and
|
||||
Q-diagonals by RSPC based on a Galois Field GF(2^8) with enumerating
|
||||
polynomials x^8+x^4+x^3+x^2+1 (i.e. 0x11d) and x^1 (i.e. 0x02).
|
||||
Bytes 12 to 2075 of a audio-sized sector get ordered in two byte words
|
||||
as 24 rows and 43 columns. Then this matrix is split into a LSB matrix
|
||||
and a MSB matrix of the same layout. Parity bytes are to be computed
|
||||
from these 8-bit values.
|
||||
2 P-bytes cover each column of 24 bytes. They get appended to the matrix
|
||||
as rows 24 and 25.
|
||||
2 Q-bytes cover each the 26 diagonals of the extended matrix.
|
||||
|
||||
Both parity byte pairs have to be computed so that extended rows or
|
||||
diagonals match this linear equation:
|
||||
H x V = (0,0)
|
||||
H is a 2-row matrix of size n matching the length of the V ectors
|
||||
[ 1 1 ... 1 1 ]
|
||||
[ x^(n-1) x^(n-2) x^1 1 ]
|
||||
Vp represents a P-row. It is a byte vector consisting of row bytes at
|
||||
position 0 to 23 and the two parity bytes which shall be determined
|
||||
at position 24 and 25. So Hp has 26 columns.
|
||||
Vq represents a Q-diagonal. It is a byte vector consisting of diagonal
|
||||
bytes at position 0 to 42 and the two parity bytes at position 43 and 44.
|
||||
So Hq has 45 columns. The Q-diagonals cover P-parity bytes.
|
||||
|
||||
By applying some high school algebra one gets the parity bytes b0, b1 of
|
||||
vector V = (n_payload_bytes, b0 , b1) as
|
||||
|
||||
b0 = ( H[n] * SUM(n_payload_bytes) - H[0..(n-1)] x n_payload_bytes )
|
||||
/ (H[n+1] - H[n])
|
||||
b1 = - SUM(n_payload_bytes) - b0
|
||||
|
||||
H[i] is the i-the element of the second row of matrix H. E.g. H[0] = x^(n-1)
|
||||
The result has to be computed by Galois field arithmetics. See below.
|
||||
|
||||
The P-parity bytes of each column get reunited as LSB and MSB of two words.
|
||||
word1 gets written to positions 1032 to 1074, word0 to 1075 to 1117.
|
||||
The Q-parity bytes of each diagonal get reunited too. word1 goes to 1118
|
||||
to 1143, word0 to 1144 to 1169.
|
||||
>>> I do not read this swap of word1 and word0 from ECMA-130 Annex A.
|
||||
>>> But the new output matches the old output only if it is done that way.
|
||||
>>> See correctness reservation below.
|
||||
|
||||
Algebra on Galois fields is the same as on Rational Numbers.
|
||||
But arithmetics is defined by operations on polynomials rather than the
|
||||
usual integer arithmetics on binary numbers.
|
||||
Addition and subtraction are identical with the binary exor operator.
|
||||
Multiplication and division would demand polynomial division, e.g. by the
|
||||
euclidian algorithm. The computing path over logarithms and powers follows
|
||||
algebra and allows to reduce the arithmetic task to table lookups, additions
|
||||
modulo 255, and exor operations. Note that the logarithms are natural
|
||||
numbers, not polynomials. They get added or subtracted by the usual addition
|
||||
(not by exor) and their polynomial power depends on their value modulo 255.
|
||||
|
||||
Needed are a logarithm table and a power table (or inverse logarithm table)
|
||||
for Galois Field GF(2^8) which will serve to perform the peculiar
|
||||
multiplication and division operation of Galois fields.
|
||||
|
||||
The power table is simply an enumeration of x^n accorting to
|
||||
GF-multiplication. It also serves as second line of matrix H for the parity
|
||||
equations:
|
||||
Hp[i] = gfpow[25-i] , i out of {0,..,25}
|
||||
Hq[i] = gfpow[44-i] , i out of {0,..,44}
|
||||
|
||||
The logarithm table is the inverse permutation of the power table.
|
||||
|
||||
Some simplifications apply to the implementation:
|
||||
In the world of Galois fields there is no difference between - and +.
|
||||
The term (H[n+1] - H[n]) is constant: 3.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
Scrambling
|
||||
|
||||
ECMA-130 Annex B prescribes to exor the byte stream of an audio-sized sector
|
||||
with a sequence of pseudo random bytes. It mentions polynomial x^15+x+1 and
|
||||
a 15-bit register.
|
||||
It shows a diagram of a Feedback Shift Register with 16 bit boxes, though.
|
||||
|
||||
Comparing this with explanations in
|
||||
http://www.newwaveinstruments.com/resources/articles/m_sequence_linear_feedback_shift_register_lfsr.htm
|
||||
one can recognize the diagram as a Fibonacci Implementation. But there seems
|
||||
really to be one bit box too many.
|
||||
|
||||
The difference of both lengths is expressed in function next_bit() by
|
||||
the constants 0x3fff,0x4000 for 15 bit versus 0x7fff,0x8000 for 16 bits.
|
||||
Comparing the output of both alternatives with the old scrambler output
|
||||
lets 15 bit win for now.
|
||||
|
||||
So the prescription is to start with 15 bit value 1, to use the lowest bit
|
||||
as output, to shift the bits down by one, to exor the output bit with the
|
||||
next lowest bit, and to put that exor result into bit 14 of the register.
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
|
||||
|
||||
Correctness Reservation
|
||||
|
||||
In both cases, parity and scrambling, the goal for now is to replicate the
|
||||
output of the dismissed old lec.c by output which is based on published
|
||||
specs and own implementation code. Whether they comply to ECMA-130 is a
|
||||
different question which can only be answered by real test cases for
|
||||
raw CD recording.
|
||||
|
||||
Of course this implementation will be corrected so that it really complies
|
||||
to ECMA-130 as soon as evidence emerges that it does not yet.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* Power and logarithm tables for GF(2^8), parity matrices for ECMA-130.
|
||||
Generated by burn_rspc_setup_tables() and burn_rspc_print_tables().
|
||||
|
||||
The highest possible sum of gflog[] values is is 508. So the table gfpow[]
|
||||
with period 255 was manually unrolled to 509 elements to avoid one modulo
|
||||
255 operation in burn_rspc_mult().
|
||||
Proposed by D. Hugh Redelmeier.
|
||||
|
||||
*/
|
||||
|
||||
static unsigned char gfpow[509] = {
|
||||
1, 2, 4, 8, 16, 32, 64, 128, 29, 58,
|
||||
116, 232, 205, 135, 19, 38, 76, 152, 45, 90,
|
||||
180, 117, 234, 201, 143, 3, 6, 12, 24, 48,
|
||||
96, 192, 157, 39, 78, 156, 37, 74, 148, 53,
|
||||
106, 212, 181, 119, 238, 193, 159, 35, 70, 140,
|
||||
5, 10, 20, 40, 80, 160, 93, 186, 105, 210,
|
||||
185, 111, 222, 161, 95, 190, 97, 194, 153, 47,
|
||||
94, 188, 101, 202, 137, 15, 30, 60, 120, 240,
|
||||
253, 231, 211, 187, 107, 214, 177, 127, 254, 225,
|
||||
223, 163, 91, 182, 113, 226, 217, 175, 67, 134,
|
||||
17, 34, 68, 136, 13, 26, 52, 104, 208, 189,
|
||||
103, 206, 129, 31, 62, 124, 248, 237, 199, 147,
|
||||
59, 118, 236, 197, 151, 51, 102, 204, 133, 23,
|
||||
46, 92, 184, 109, 218, 169, 79, 158, 33, 66,
|
||||
132, 21, 42, 84, 168, 77, 154, 41, 82, 164,
|
||||
85, 170, 73, 146, 57, 114, 228, 213, 183, 115,
|
||||
230, 209, 191, 99, 198, 145, 63, 126, 252, 229,
|
||||
215, 179, 123, 246, 241, 255, 227, 219, 171, 75,
|
||||
150, 49, 98, 196, 149, 55, 110, 220, 165, 87,
|
||||
174, 65, 130, 25, 50, 100, 200, 141, 7, 14,
|
||||
28, 56, 112, 224, 221, 167, 83, 166, 81, 162,
|
||||
89, 178, 121, 242, 249, 239, 195, 155, 43, 86,
|
||||
172, 69, 138, 9, 18, 36, 72, 144, 61, 122,
|
||||
244, 245, 247, 243, 251, 235, 203, 139, 11, 22,
|
||||
44, 88, 176, 125, 250, 233, 207, 131, 27, 54,
|
||||
108, 216, 173, 71, 142,
|
||||
1, 2, 4, 8, 16, 32, 64, 128, 29, 58,
|
||||
116, 232, 205, 135, 19, 38, 76, 152, 45, 90,
|
||||
180, 117, 234, 201, 143, 3, 6, 12, 24, 48,
|
||||
96, 192, 157, 39, 78, 156, 37, 74, 148, 53,
|
||||
106, 212, 181, 119, 238, 193, 159, 35, 70, 140,
|
||||
5, 10, 20, 40, 80, 160, 93, 186, 105, 210,
|
||||
185, 111, 222, 161, 95, 190, 97, 194, 153, 47,
|
||||
94, 188, 101, 202, 137, 15, 30, 60, 120, 240,
|
||||
253, 231, 211, 187, 107, 214, 177, 127, 254, 225,
|
||||
223, 163, 91, 182, 113, 226, 217, 175, 67, 134,
|
||||
17, 34, 68, 136, 13, 26, 52, 104, 208, 189,
|
||||
103, 206, 129, 31, 62, 124, 248, 237, 199, 147,
|
||||
59, 118, 236, 197, 151, 51, 102, 204, 133, 23,
|
||||
46, 92, 184, 109, 218, 169, 79, 158, 33, 66,
|
||||
132, 21, 42, 84, 168, 77, 154, 41, 82, 164,
|
||||
85, 170, 73, 146, 57, 114, 228, 213, 183, 115,
|
||||
230, 209, 191, 99, 198, 145, 63, 126, 252, 229,
|
||||
215, 179, 123, 246, 241, 255, 227, 219, 171, 75,
|
||||
150, 49, 98, 196, 149, 55, 110, 220, 165, 87,
|
||||
174, 65, 130, 25, 50, 100, 200, 141, 7, 14,
|
||||
28, 56, 112, 224, 221, 167, 83, 166, 81, 162,
|
||||
89, 178, 121, 242, 249, 239, 195, 155, 43, 86,
|
||||
172, 69, 138, 9, 18, 36, 72, 144, 61, 122,
|
||||
244, 245, 247, 243, 251, 235, 203, 139, 11, 22,
|
||||
44, 88, 176, 125, 250, 233, 207, 131, 27, 54,
|
||||
108, 216, 173, 71,
|
||||
};
|
||||
|
||||
static unsigned char gflog[256] = {
|
||||
0, 0, 1, 25, 2, 50, 26, 198, 3, 223,
|
||||
51, 238, 27, 104, 199, 75, 4, 100, 224, 14,
|
||||
52, 141, 239, 129, 28, 193, 105, 248, 200, 8,
|
||||
76, 113, 5, 138, 101, 47, 225, 36, 15, 33,
|
||||
53, 147, 142, 218, 240, 18, 130, 69, 29, 181,
|
||||
194, 125, 106, 39, 249, 185, 201, 154, 9, 120,
|
||||
77, 228, 114, 166, 6, 191, 139, 98, 102, 221,
|
||||
48, 253, 226, 152, 37, 179, 16, 145, 34, 136,
|
||||
54, 208, 148, 206, 143, 150, 219, 189, 241, 210,
|
||||
19, 92, 131, 56, 70, 64, 30, 66, 182, 163,
|
||||
195, 72, 126, 110, 107, 58, 40, 84, 250, 133,
|
||||
186, 61, 202, 94, 155, 159, 10, 21, 121, 43,
|
||||
78, 212, 229, 172, 115, 243, 167, 87, 7, 112,
|
||||
192, 247, 140, 128, 99, 13, 103, 74, 222, 237,
|
||||
49, 197, 254, 24, 227, 165, 153, 119, 38, 184,
|
||||
180, 124, 17, 68, 146, 217, 35, 32, 137, 46,
|
||||
55, 63, 209, 91, 149, 188, 207, 205, 144, 135,
|
||||
151, 178, 220, 252, 190, 97, 242, 86, 211, 171,
|
||||
20, 42, 93, 158, 132, 60, 57, 83, 71, 109,
|
||||
65, 162, 31, 45, 67, 216, 183, 123, 164, 118,
|
||||
196, 23, 73, 236, 127, 12, 111, 246, 108, 161,
|
||||
59, 82, 41, 157, 85, 170, 251, 96, 134, 177,
|
||||
187, 204, 62, 90, 203, 89, 95, 176, 156, 169,
|
||||
160, 81, 11, 245, 22, 235, 122, 117, 44, 215,
|
||||
79, 174, 213, 233, 230, 231, 173, 232, 116, 214,
|
||||
244, 234, 168, 80, 88, 175
|
||||
};
|
||||
|
||||
|
||||
#define Libburn_use_h_matriceS 1
|
||||
|
||||
#ifdef Libburn_use_h_matriceS
|
||||
|
||||
/* On my AMD 2x64 bit 3000 MHz processor h[i] costs about 7 % more time
|
||||
than using gfpow[25-i] resp. gfpow[44-1]. I blame this on the more
|
||||
condensed data representation which slightly increases the rate of cache
|
||||
hits.
|
||||
Nevertheless this effect is very likely depending on the exact cache
|
||||
size and architecture. In general, using h[] saves more than 8000
|
||||
subtractions per sector.
|
||||
*/
|
||||
|
||||
/* Parity matrices H as prescribed by ECMA-130 Annex A.
|
||||
Actually just reverted order start pieces of gfpow[].
|
||||
*/
|
||||
static unsigned char h26[26] = {
|
||||
3, 143, 201, 234, 117, 180, 90, 45, 152, 76,
|
||||
38, 19, 135, 205, 232, 116, 58, 29, 128, 64,
|
||||
32, 16, 8, 4, 2, 1,
|
||||
};
|
||||
|
||||
static unsigned char h45[45] = {
|
||||
238, 119, 181, 212, 106, 53, 148, 74, 37, 156,
|
||||
78, 39, 157, 192, 96, 48, 24, 12, 6, 3,
|
||||
143, 201, 234, 117, 180, 90, 45, 152, 76, 38,
|
||||
19, 135, 205, 232, 116, 58, 29, 128, 64, 32,
|
||||
16, 8, 4, 2, 1,
|
||||
};
|
||||
|
||||
#endif /* Libburn_use_h_matriceS */
|
||||
|
||||
|
||||
/* Pseudo-random bytes which of course are exactly the same as with the
|
||||
previously used code.
|
||||
Generated by function print_ecma_130_scrambler().
|
||||
*/
|
||||
static unsigned char ecma_130_annex_b[2340] = {
|
||||
1, 128, 0, 96, 0, 40, 0, 30, 128, 8,
|
||||
96, 6, 168, 2, 254, 129, 128, 96, 96, 40,
|
||||
40, 30, 158, 136, 104, 102, 174, 170, 252, 127,
|
||||
1, 224, 0, 72, 0, 54, 128, 22, 224, 14,
|
||||
200, 4, 86, 131, 126, 225, 224, 72, 72, 54,
|
||||
182, 150, 246, 238, 198, 204, 82, 213, 253, 159,
|
||||
1, 168, 0, 126, 128, 32, 96, 24, 40, 10,
|
||||
158, 135, 40, 98, 158, 169, 168, 126, 254, 160,
|
||||
64, 120, 48, 34, 148, 25, 175, 74, 252, 55,
|
||||
1, 214, 128, 94, 224, 56, 72, 18, 182, 141,
|
||||
182, 229, 182, 203, 54, 215, 86, 222, 190, 216,
|
||||
112, 90, 164, 59, 59, 83, 83, 125, 253, 225,
|
||||
129, 136, 96, 102, 168, 42, 254, 159, 0, 104,
|
||||
0, 46, 128, 28, 96, 9, 232, 6, 206, 130,
|
||||
212, 97, 159, 104, 104, 46, 174, 156, 124, 105,
|
||||
225, 238, 200, 76, 86, 181, 254, 247, 0, 70,
|
||||
128, 50, 224, 21, 136, 15, 38, 132, 26, 227,
|
||||
75, 9, 247, 70, 198, 178, 210, 245, 157, 135,
|
||||
41, 162, 158, 249, 168, 66, 254, 177, 128, 116,
|
||||
96, 39, 104, 26, 174, 139, 60, 103, 81, 234,
|
||||
188, 79, 49, 244, 20, 71, 79, 114, 180, 37,
|
||||
183, 91, 54, 187, 86, 243, 126, 197, 224, 83,
|
||||
8, 61, 198, 145, 146, 236, 109, 141, 237, 165,
|
||||
141, 187, 37, 179, 91, 53, 251, 87, 3, 126,
|
||||
129, 224, 96, 72, 40, 54, 158, 150, 232, 110,
|
||||
206, 172, 84, 125, 255, 97, 128, 40, 96, 30,
|
||||
168, 8, 126, 134, 160, 98, 248, 41, 130, 158,
|
||||
225, 168, 72, 126, 182, 160, 118, 248, 38, 194,
|
||||
154, 209, 171, 28, 127, 73, 224, 54, 200, 22,
|
||||
214, 142, 222, 228, 88, 75, 122, 183, 99, 54,
|
||||
169, 214, 254, 222, 192, 88, 80, 58, 188, 19,
|
||||
49, 205, 212, 85, 159, 127, 40, 32, 30, 152,
|
||||
8, 106, 134, 175, 34, 252, 25, 129, 202, 224,
|
||||
87, 8, 62, 134, 144, 98, 236, 41, 141, 222,
|
||||
229, 152, 75, 42, 183, 95, 54, 184, 22, 242,
|
||||
142, 197, 164, 83, 59, 125, 211, 97, 157, 232,
|
||||
105, 142, 174, 228, 124, 75, 97, 247, 104, 70,
|
||||
174, 178, 252, 117, 129, 231, 32, 74, 152, 55,
|
||||
42, 150, 159, 46, 232, 28, 78, 137, 244, 102,
|
||||
199, 106, 210, 175, 29, 188, 9, 177, 198, 244,
|
||||
82, 199, 125, 146, 161, 173, 184, 125, 178, 161,
|
||||
181, 184, 119, 50, 166, 149, 186, 239, 51, 12,
|
||||
21, 197, 207, 19, 20, 13, 207, 69, 148, 51,
|
||||
47, 85, 220, 63, 25, 208, 10, 220, 7, 25,
|
||||
194, 138, 209, 167, 28, 122, 137, 227, 38, 201,
|
||||
218, 214, 219, 30, 219, 72, 91, 118, 187, 102,
|
||||
243, 106, 197, 239, 19, 12, 13, 197, 197, 147,
|
||||
19, 45, 205, 221, 149, 153, 175, 42, 252, 31,
|
||||
1, 200, 0, 86, 128, 62, 224, 16, 72, 12,
|
||||
54, 133, 214, 227, 30, 201, 200, 86, 214, 190,
|
||||
222, 240, 88, 68, 58, 179, 83, 53, 253, 215,
|
||||
1, 158, 128, 104, 96, 46, 168, 28, 126, 137,
|
||||
224, 102, 200, 42, 214, 159, 30, 232, 8, 78,
|
||||
134, 180, 98, 247, 105, 134, 174, 226, 252, 73,
|
||||
129, 246, 224, 70, 200, 50, 214, 149, 158, 239,
|
||||
40, 76, 30, 181, 200, 119, 22, 166, 142, 250,
|
||||
228, 67, 11, 113, 199, 100, 82, 171, 125, 191,
|
||||
97, 176, 40, 116, 30, 167, 72, 122, 182, 163,
|
||||
54, 249, 214, 194, 222, 209, 152, 92, 106, 185,
|
||||
239, 50, 204, 21, 149, 207, 47, 20, 28, 15,
|
||||
73, 196, 54, 211, 86, 221, 254, 217, 128, 90,
|
||||
224, 59, 8, 19, 70, 141, 242, 229, 133, 139,
|
||||
35, 39, 89, 218, 186, 219, 51, 27, 85, 203,
|
||||
127, 23, 96, 14, 168, 4, 126, 131, 96, 97,
|
||||
232, 40, 78, 158, 180, 104, 119, 110, 166, 172,
|
||||
122, 253, 227, 1, 137, 192, 102, 208, 42, 220,
|
||||
31, 25, 200, 10, 214, 135, 30, 226, 136, 73,
|
||||
166, 182, 250, 246, 195, 6, 209, 194, 220, 81,
|
||||
153, 252, 106, 193, 239, 16, 76, 12, 53, 197,
|
||||
215, 19, 30, 141, 200, 101, 150, 171, 46, 255,
|
||||
92, 64, 57, 240, 18, 196, 13, 147, 69, 173,
|
||||
243, 61, 133, 209, 163, 28, 121, 201, 226, 214,
|
||||
201, 158, 214, 232, 94, 206, 184, 84, 114, 191,
|
||||
101, 176, 43, 52, 31, 87, 72, 62, 182, 144,
|
||||
118, 236, 38, 205, 218, 213, 155, 31, 43, 72,
|
||||
31, 118, 136, 38, 230, 154, 202, 235, 23, 15,
|
||||
78, 132, 52, 99, 87, 105, 254, 174, 192, 124,
|
||||
80, 33, 252, 24, 65, 202, 176, 87, 52, 62,
|
||||
151, 80, 110, 188, 44, 113, 221, 228, 89, 139,
|
||||
122, 231, 99, 10, 169, 199, 62, 210, 144, 93,
|
||||
172, 57, 189, 210, 241, 157, 132, 105, 163, 110,
|
||||
249, 236, 66, 205, 241, 149, 132, 111, 35, 108,
|
||||
25, 237, 202, 205, 151, 21, 174, 143, 60, 100,
|
||||
17, 235, 76, 79, 117, 244, 39, 7, 90, 130,
|
||||
187, 33, 179, 88, 117, 250, 167, 3, 58, 129,
|
||||
211, 32, 93, 216, 57, 154, 146, 235, 45, 143,
|
||||
93, 164, 57, 187, 82, 243, 125, 133, 225, 163,
|
||||
8, 121, 198, 162, 210, 249, 157, 130, 233, 161,
|
||||
142, 248, 100, 66, 171, 113, 191, 100, 112, 43,
|
||||
100, 31, 107, 72, 47, 118, 156, 38, 233, 218,
|
||||
206, 219, 20, 91, 79, 123, 116, 35, 103, 89,
|
||||
234, 186, 207, 51, 20, 21, 207, 79, 20, 52,
|
||||
15, 87, 68, 62, 179, 80, 117, 252, 39, 1,
|
||||
218, 128, 91, 32, 59, 88, 19, 122, 141, 227,
|
||||
37, 137, 219, 38, 219, 90, 219, 123, 27, 99,
|
||||
75, 105, 247, 110, 198, 172, 82, 253, 253, 129,
|
||||
129, 160, 96, 120, 40, 34, 158, 153, 168, 106,
|
||||
254, 175, 0, 124, 0, 33, 192, 24, 80, 10,
|
||||
188, 7, 49, 194, 148, 81, 175, 124, 124, 33,
|
||||
225, 216, 72, 90, 182, 187, 54, 243, 86, 197,
|
||||
254, 211, 0, 93, 192, 57, 144, 18, 236, 13,
|
||||
141, 197, 165, 147, 59, 45, 211, 93, 157, 249,
|
||||
169, 130, 254, 225, 128, 72, 96, 54, 168, 22,
|
||||
254, 142, 192, 100, 80, 43, 124, 31, 97, 200,
|
||||
40, 86, 158, 190, 232, 112, 78, 164, 52, 123,
|
||||
87, 99, 126, 169, 224, 126, 200, 32, 86, 152,
|
||||
62, 234, 144, 79, 44, 52, 29, 215, 73, 158,
|
||||
182, 232, 118, 206, 166, 212, 122, 223, 99, 24,
|
||||
41, 202, 158, 215, 40, 94, 158, 184, 104, 114,
|
||||
174, 165, 188, 123, 49, 227, 84, 73, 255, 118,
|
||||
192, 38, 208, 26, 220, 11, 25, 199, 74, 210,
|
||||
183, 29, 182, 137, 182, 230, 246, 202, 198, 215,
|
||||
18, 222, 141, 152, 101, 170, 171, 63, 63, 80,
|
||||
16, 60, 12, 17, 197, 204, 83, 21, 253, 207,
|
||||
1, 148, 0, 111, 64, 44, 48, 29, 212, 9,
|
||||
159, 70, 232, 50, 206, 149, 148, 111, 47, 108,
|
||||
28, 45, 201, 221, 150, 217, 174, 218, 252, 91,
|
||||
1, 251, 64, 67, 112, 49, 228, 20, 75, 79,
|
||||
119, 116, 38, 167, 90, 250, 187, 3, 51, 65,
|
||||
213, 240, 95, 4, 56, 3, 82, 129, 253, 160,
|
||||
65, 184, 48, 114, 148, 37, 175, 91, 60, 59,
|
||||
81, 211, 124, 93, 225, 249, 136, 66, 230, 177,
|
||||
138, 244, 103, 7, 106, 130, 175, 33, 188, 24,
|
||||
113, 202, 164, 87, 59, 126, 147, 96, 109, 232,
|
||||
45, 142, 157, 164, 105, 187, 110, 243, 108, 69,
|
||||
237, 243, 13, 133, 197, 163, 19, 57, 205, 210,
|
||||
213, 157, 159, 41, 168, 30, 254, 136, 64, 102,
|
||||
176, 42, 244, 31, 7, 72, 2, 182, 129, 182,
|
||||
224, 118, 200, 38, 214, 154, 222, 235, 24, 79,
|
||||
74, 180, 55, 55, 86, 150, 190, 238, 240, 76,
|
||||
68, 53, 243, 87, 5, 254, 131, 0, 97, 192,
|
||||
40, 80, 30, 188, 8, 113, 198, 164, 82, 251,
|
||||
125, 131, 97, 161, 232, 120, 78, 162, 180, 121,
|
||||
183, 98, 246, 169, 134, 254, 226, 192, 73, 144,
|
||||
54, 236, 22, 205, 206, 213, 148, 95, 47, 120,
|
||||
28, 34, 137, 217, 166, 218, 250, 219, 3, 27,
|
||||
65, 203, 112, 87, 100, 62, 171, 80, 127, 124,
|
||||
32, 33, 216, 24, 90, 138, 187, 39, 51, 90,
|
||||
149, 251, 47, 3, 92, 1, 249, 192, 66, 208,
|
||||
49, 156, 20, 105, 207, 110, 212, 44, 95, 93,
|
||||
248, 57, 130, 146, 225, 173, 136, 125, 166, 161,
|
||||
186, 248, 115, 2, 165, 193, 187, 16, 115, 76,
|
||||
37, 245, 219, 7, 27, 66, 139, 113, 167, 100,
|
||||
122, 171, 99, 63, 105, 208, 46, 220, 28, 89,
|
||||
201, 250, 214, 195, 30, 209, 200, 92, 86, 185,
|
||||
254, 242, 192, 69, 144, 51, 44, 21, 221, 207,
|
||||
25, 148, 10, 239, 71, 12, 50, 133, 213, 163,
|
||||
31, 57, 200, 18, 214, 141, 158, 229, 168, 75,
|
||||
62, 183, 80, 118, 188, 38, 241, 218, 196, 91,
|
||||
19, 123, 77, 227, 117, 137, 231, 38, 202, 154,
|
||||
215, 43, 30, 159, 72, 104, 54, 174, 150, 252,
|
||||
110, 193, 236, 80, 77, 252, 53, 129, 215, 32,
|
||||
94, 152, 56, 106, 146, 175, 45, 188, 29, 177,
|
||||
201, 180, 86, 247, 126, 198, 160, 82, 248, 61,
|
||||
130, 145, 161, 172, 120, 125, 226, 161, 137, 184,
|
||||
102, 242, 170, 197, 191, 19, 48, 13, 212, 5,
|
||||
159, 67, 40, 49, 222, 148, 88, 111, 122, 172,
|
||||
35, 61, 217, 209, 154, 220, 107, 25, 239, 74,
|
||||
204, 55, 21, 214, 143, 30, 228, 8, 75, 70,
|
||||
183, 114, 246, 165, 134, 251, 34, 195, 89, 145,
|
||||
250, 236, 67, 13, 241, 197, 132, 83, 35, 125,
|
||||
217, 225, 154, 200, 107, 22, 175, 78, 252, 52,
|
||||
65, 215, 112, 94, 164, 56, 123, 82, 163, 125,
|
||||
185, 225, 178, 200, 117, 150, 167, 46, 250, 156,
|
||||
67, 41, 241, 222, 196, 88, 83, 122, 189, 227,
|
||||
49, 137, 212, 102, 223, 106, 216, 47, 26, 156,
|
||||
11, 41, 199, 94, 210, 184, 93, 178, 185, 181,
|
||||
178, 247, 53, 134, 151, 34, 238, 153, 140, 106,
|
||||
229, 239, 11, 12, 7, 69, 194, 179, 17, 181,
|
||||
204, 119, 21, 230, 143, 10, 228, 7, 11, 66,
|
||||
135, 113, 162, 164, 121, 187, 98, 243, 105, 133,
|
||||
238, 227, 12, 73, 197, 246, 211, 6, 221, 194,
|
||||
217, 145, 154, 236, 107, 13, 239, 69, 140, 51,
|
||||
37, 213, 219, 31, 27, 72, 11, 118, 135, 102,
|
||||
226, 170, 201, 191, 22, 240, 14, 196, 4, 83,
|
||||
67, 125, 241, 225, 132, 72, 99, 118, 169, 230,
|
||||
254, 202, 192, 87, 16, 62, 140, 16, 101, 204,
|
||||
43, 21, 223, 79, 24, 52, 10, 151, 71, 46,
|
||||
178, 156, 117, 169, 231, 62, 202, 144, 87, 44,
|
||||
62, 157, 208, 105, 156, 46, 233, 220, 78, 217,
|
||||
244, 90, 199, 123, 18, 163, 77, 185, 245, 178,
|
||||
199, 53, 146, 151, 45, 174, 157, 188, 105, 177,
|
||||
238, 244, 76, 71, 117, 242, 167, 5, 186, 131,
|
||||
51, 33, 213, 216, 95, 26, 184, 11, 50, 135,
|
||||
85, 162, 191, 57, 176, 18, 244, 13, 135, 69,
|
||||
162, 179, 57, 181, 210, 247, 29, 134, 137, 162,
|
||||
230, 249, 138, 194, 231, 17, 138, 140, 103, 37,
|
||||
234, 155, 15, 43, 68, 31, 115, 72, 37, 246,
|
||||
155, 6, 235, 66, 207, 113, 148, 36, 111, 91,
|
||||
108, 59, 109, 211, 109, 157, 237, 169, 141, 190,
|
||||
229, 176, 75, 52, 55, 87, 86, 190, 190, 240,
|
||||
112, 68, 36, 51, 91, 85, 251, 127, 3, 96,
|
||||
1, 232, 0, 78, 128, 52, 96, 23, 104, 14,
|
||||
174, 132, 124, 99, 97, 233, 232, 78, 206, 180,
|
||||
84, 119, 127, 102, 160, 42, 248, 31, 2, 136,
|
||||
1, 166, 128, 122, 224, 35, 8, 25, 198, 138,
|
||||
210, 231, 29, 138, 137, 167, 38, 250, 154, 195,
|
||||
43, 17, 223, 76, 88, 53, 250, 151, 3, 46,
|
||||
129, 220, 96, 89, 232, 58, 206, 147, 20, 109,
|
||||
207, 109, 148, 45, 175, 93, 188, 57, 177, 210,
|
||||
244, 93, 135, 121, 162, 162, 249, 185, 130, 242,
|
||||
225, 133, 136, 99, 38, 169, 218, 254, 219, 0,
|
||||
91, 64, 59, 112, 19, 100, 13, 235, 69, 143,
|
||||
115, 36, 37, 219, 91, 27, 123, 75, 99, 119,
|
||||
105, 230, 174, 202, 252, 87, 1, 254, 128, 64,
|
||||
96, 48, 40, 20, 30, 143, 72, 100, 54, 171,
|
||||
86, 255, 126, 192, 32, 80, 24, 60, 10, 145,
|
||||
199, 44, 82, 157, 253, 169, 129, 190, 224, 112,
|
||||
72, 36, 54, 155, 86, 235, 126, 207, 96, 84,
|
||||
40, 63, 94, 144, 56, 108, 18, 173, 205, 189,
|
||||
149, 177, 175, 52, 124, 23, 97, 206, 168, 84,
|
||||
126, 191, 96, 112, 40, 36, 30, 155, 72, 107,
|
||||
118, 175, 102, 252, 42, 193, 223, 16, 88, 12,
|
||||
58, 133, 211, 35, 29, 217, 201, 154, 214, 235,
|
||||
30, 207, 72, 84, 54, 191, 86, 240, 62, 196,
|
||||
16, 83, 76, 61, 245, 209, 135, 28, 98, 137,
|
||||
233, 166, 206, 250, 212, 67, 31, 113, 200, 36,
|
||||
86, 155, 126, 235, 96, 79, 104, 52, 46, 151,
|
||||
92, 110, 185, 236, 114, 205, 229, 149, 139, 47,
|
||||
39, 92, 26, 185, 203, 50, 215, 85, 158, 191,
|
||||
40, 112, 30, 164, 8, 123, 70, 163, 114, 249,
|
||||
229, 130, 203, 33, 151, 88, 110, 186, 172, 115,
|
||||
61, 229, 209, 139, 28, 103, 73, 234, 182, 207,
|
||||
54, 212, 22, 223, 78, 216, 52, 90, 151, 123,
|
||||
46, 163, 92, 121, 249, 226, 194, 201, 145, 150,
|
||||
236, 110, 205, 236, 85, 141, 255, 37, 128, 27,
|
||||
32, 11, 88, 7, 122, 130, 163, 33, 185, 216,
|
||||
114, 218, 165, 155, 59, 43, 83, 95, 125, 248,
|
||||
33, 130, 152, 97, 170, 168, 127, 62, 160, 16,
|
||||
120, 12, 34, 133, 217, 163, 26, 249, 203, 2,
|
||||
215, 65, 158, 176, 104, 116, 46, 167, 92, 122,
|
||||
185, 227, 50, 201, 213, 150, 223, 46, 216, 28,
|
||||
90, 137, 251, 38, 195, 90, 209, 251, 28, 67,
|
||||
73, 241, 246, 196, 70, 211, 114, 221, 229, 153
|
||||
};
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* This is the new implementation of P- and Q-parity generation.
|
||||
It needs about the same computing time as the old implementation (both
|
||||
with gcc -O2 on AMD 64 bit). Measurements indicate that about 280 MIPS
|
||||
are needed for 48x CD speed (7.1 MB/s).
|
||||
*/
|
||||
|
||||
static unsigned char burn_rspc_mult(unsigned char a, unsigned char b)
|
||||
{
|
||||
if (a == 0 || b == 0)
|
||||
return 0;
|
||||
/* Optimization of (a == 0 || b == 0) by D. Hugh Redelmeier
|
||||
if((((int)a - 1) | ((int)b - 1)) < 0)
|
||||
return 0;
|
||||
*/
|
||||
|
||||
return gfpow[gflog[a] + gflog[b]];
|
||||
/* % 255 not necessary because gfpow is unrolled up to index 510 */
|
||||
}
|
||||
|
||||
|
||||
/* Divide by polynomial 0x03. Derived from burn_rspc_div() and using the
|
||||
unrolled size of the gfpow[] array.
|
||||
*/
|
||||
static unsigned char burn_rspc_div_3(unsigned char a)
|
||||
{
|
||||
if (a == 0)
|
||||
return 0;
|
||||
return gfpow[230 + gflog[a]];
|
||||
}
|
||||
|
||||
|
||||
static void burn_rspc_p0p1(unsigned char *sector, int col,
|
||||
unsigned char *p0_lsb, unsigned char *p0_msb,
|
||||
unsigned char *p1_lsb, unsigned char *p1_msb)
|
||||
{
|
||||
unsigned char *start, b;
|
||||
unsigned int i, sum_v_lsb = 0, sum_v_msb = 0;
|
||||
unsigned int hxv_lsb = 0, hxv_msb = 0;
|
||||
|
||||
start = sector + 12 + 2 * col;
|
||||
for(i = 0; i < 24; i++) {
|
||||
b = *start;
|
||||
sum_v_lsb ^= b;
|
||||
|
||||
#ifdef Libburn_use_h_matriceS
|
||||
hxv_lsb ^= burn_rspc_mult(b, h26[i]);
|
||||
#else
|
||||
hxv_lsb ^= burn_rspc_mult(b, gfpow[25 - i]);
|
||||
#endif
|
||||
|
||||
b = *(start + 1);
|
||||
sum_v_msb ^= b;
|
||||
|
||||
#ifdef Libburn_use_h_matriceS
|
||||
hxv_msb ^= burn_rspc_mult(b, h26[i]);
|
||||
#else
|
||||
hxv_msb ^= burn_rspc_mult(b, gfpow[25 - i]);
|
||||
#endif
|
||||
|
||||
start += 86;
|
||||
}
|
||||
|
||||
/* 3 = gfpow[1] ^ gfpow[0] , 2 = gfpow[1] */
|
||||
*p0_lsb = burn_rspc_div_3(burn_rspc_mult(2, sum_v_lsb) ^ hxv_lsb);
|
||||
*p0_msb = burn_rspc_div_3(burn_rspc_mult(2, sum_v_msb) ^ hxv_msb);
|
||||
*p1_lsb = sum_v_lsb ^ *p0_lsb;
|
||||
*p1_msb = sum_v_msb ^ *p0_msb;
|
||||
}
|
||||
|
||||
|
||||
void burn_rspc_parity_p(unsigned char *sector)
|
||||
{
|
||||
int i;
|
||||
unsigned char p0_lsb, p0_msb, p1_lsb, p1_msb;
|
||||
|
||||
/* Loop over P columns */
|
||||
for(i = 0; i < 43; i++) {
|
||||
burn_rspc_p0p1(sector, i, &p0_lsb, &p0_msb, &p1_lsb, &p1_msb);
|
||||
sector[2162 + 2 * i] = p0_lsb;
|
||||
sector[2162 + 2 * i + 1] = p0_msb;
|
||||
sector[2076 + 2 * i] = p1_lsb;
|
||||
sector[2076 + 2 * i + 1] = p1_msb;
|
||||
|
||||
#ifdef Libburn_with_lec_generatoR
|
||||
if(verbous) {
|
||||
printf("p %2d : %2.2X %2.2X ", i,
|
||||
(unsigned int) p0_lsb, (unsigned int) p0_msb);
|
||||
printf("%2.2X %2.2X ",
|
||||
(unsigned int) p1_lsb, (unsigned int) p1_msb);
|
||||
printf("-> %d,%d\n", 2162 + 2 * i, 2076 + 2 * i);
|
||||
}
|
||||
#endif /* Libburn_with_lec_generatoR */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void burn_rspc_q0q1(unsigned char *sector, int diag,
|
||||
unsigned char *q0_lsb, unsigned char *q0_msb,
|
||||
unsigned char *q1_lsb, unsigned char *q1_msb)
|
||||
{
|
||||
unsigned char *start, b;
|
||||
unsigned int i, idx, sum_v_lsb = 0, sum_v_msb = 0;
|
||||
unsigned int hxv_lsb = 0, hxv_msb = 0;
|
||||
|
||||
start = sector + 12;
|
||||
idx = 2 * 43 * diag;
|
||||
for(i = 0; i < 43; i++) {
|
||||
if (idx >= 2236)
|
||||
idx -= 2236;
|
||||
b = start[idx];
|
||||
sum_v_lsb ^= b;
|
||||
|
||||
#ifdef Libburn_use_h_matriceS
|
||||
hxv_lsb ^= burn_rspc_mult(b, h45[i]);
|
||||
#else
|
||||
hxv_lsb ^= burn_rspc_mult(b, gfpow[44 - i]);
|
||||
#endif
|
||||
|
||||
b = start[idx + 1];
|
||||
sum_v_msb ^= b;
|
||||
|
||||
#ifdef Libburn_use_h_matriceS
|
||||
hxv_msb ^= burn_rspc_mult(b, h45[i]);
|
||||
#else
|
||||
hxv_msb ^= burn_rspc_mult(b, gfpow[44 - i]);
|
||||
#endif
|
||||
|
||||
idx += 88;
|
||||
}
|
||||
/* 3 = gfpow[1] ^ gfpow[0] , 2 = gfpow[1] */
|
||||
*q0_lsb = burn_rspc_div_3(burn_rspc_mult(2, sum_v_lsb) ^ hxv_lsb);
|
||||
*q0_msb = burn_rspc_div_3(burn_rspc_mult(2, sum_v_msb) ^ hxv_msb);
|
||||
*q1_lsb = sum_v_lsb ^ *q0_lsb;
|
||||
*q1_msb = sum_v_msb ^ *q0_msb;
|
||||
}
|
||||
|
||||
|
||||
void burn_rspc_parity_q(unsigned char *sector)
|
||||
{
|
||||
int i;
|
||||
unsigned char q0_lsb, q0_msb, q1_lsb, q1_msb;
|
||||
|
||||
/* Loop over Q diagonals */
|
||||
for(i = 0; i < 26; i++) {
|
||||
burn_rspc_q0q1(sector, i, &q0_lsb, &q0_msb, &q1_lsb, &q1_msb);
|
||||
sector[2300 + 2 * i] = q0_lsb;
|
||||
sector[2300 + 2 * i + 1] = q0_msb;
|
||||
sector[2248 + 2 * i] = q1_lsb;
|
||||
sector[2248 + 2 * i + 1] = q1_msb;
|
||||
|
||||
#ifdef Libburn_with_lec_generatoR
|
||||
if(verbous) {
|
||||
printf("q %2d : %2.2X %2.2X ", i,
|
||||
(unsigned int) q0_lsb, (unsigned int) q0_msb);
|
||||
printf("%2.2X %2.2X ",
|
||||
(unsigned int) q1_lsb, (unsigned int) q1_msb);
|
||||
printf("-> %d,%d\n", 2300 + 2 * i, 2248 + 2 * i);
|
||||
}
|
||||
#endif /* Libburn_with_lec_generatoR */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* The new implementation of the ECMA-130 Annex B scrambler.
|
||||
It is totally unoptimized. One should make use of larger word operations.
|
||||
Measurements indicate that about 50 MIPS are needed for 48x CD speed.
|
||||
*/
|
||||
|
||||
void burn_ecma130_scramble(unsigned char *sector)
|
||||
{
|
||||
int i;
|
||||
unsigned char *s;
|
||||
|
||||
s = sector + 12;
|
||||
for (i = 0; i < 2340; i++)
|
||||
s[i] ^= ecma_130_annex_b[i];
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/* The following code is not needed for libburn but rather documents the
|
||||
origin of the tables above. In libburn it will not be compiled.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef Libburn_with_lec_generatoR
|
||||
|
||||
|
||||
/* This function produced the content of gflog[] and gfpow[]
|
||||
*/
|
||||
static int burn_rspc_setup_tables(void)
|
||||
{
|
||||
unsigned int b, l;
|
||||
|
||||
memset(gflog, 0, sizeof(gflog));
|
||||
memset(gfpow, 0, sizeof(gfpow));
|
||||
b = 1;
|
||||
for (l = 0; l < 255; l++) {
|
||||
gfpow[l] = (unsigned char) b;
|
||||
gflog[b] = (unsigned char) l;
|
||||
b = b << 1;
|
||||
if (b & 256)
|
||||
b = b ^ 0x11d;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* This function printed the content of gflog[] and gfpow[] as C code
|
||||
and compared the content with the tables of the old implementation.
|
||||
h26[] and h45[] are reverted order copies of gfpow[]
|
||||
*/
|
||||
static int burn_rspc_print_tables(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
printf("static unsigned char gfpow[255] = {");
|
||||
printf("\n\t");
|
||||
for(i= 0; i < 255; i++) {
|
||||
printf("%3u, ", gfpow[i]);
|
||||
|
||||
#ifdef Libburn_with_old_lec_comparisoN
|
||||
if(gfpow[i] != gf8_ilog[i])
|
||||
fprintf(stderr, "*** ILOG %d : %d != %d ***\n", i, gfpow[i], gf8_ilog[i]);
|
||||
#endif
|
||||
|
||||
if((i % 10) == 9)
|
||||
printf("\n\t");
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
printf("static unsigned char gflog[256] = {");
|
||||
printf("\n\t");
|
||||
for(i= 0; i < 256; i++) {
|
||||
printf(" %3u,", gflog[i]);
|
||||
|
||||
#ifdef Libburn_with_old_lec_comparisoN
|
||||
if(gflog[i] != gf8_log[i])
|
||||
fprintf(stderr, "*** LOG %d : %d != %d ***\n", i, gflog[i], gf8_log[i]);
|
||||
#endif
|
||||
|
||||
if((i % 10) == 9)
|
||||
printf("\n\t");
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
printf("static unsigned char h26[26] = {");
|
||||
printf("\n\t");
|
||||
for(i= 0; i < 26; i++) {
|
||||
printf(" %3u,", gfpow[25 - i]);
|
||||
if((i % 10) == 9)
|
||||
printf("\n\t");
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
printf("static unsigned char h45[45] = {");
|
||||
printf("\n\t");
|
||||
for(i= 0; i < 45; i++) {
|
||||
printf(" %3u,",gfpow[44 - i]);
|
||||
if((i % 10) == 9)
|
||||
printf("\n\t");
|
||||
}
|
||||
printf("\n};\n\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* This code was used to generate the content of array ecma_130_annex_b[].
|
||||
*/
|
||||
static unsigned short ecma_130_fsr = 1;
|
||||
|
||||
static int next_bit(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ecma_130_fsr & 1;
|
||||
ecma_130_fsr = (ecma_130_fsr >> 1) & 0x3fff;
|
||||
if (ret ^ (ecma_130_fsr & 1))
|
||||
ecma_130_fsr |= 0x4000;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
static int print_ecma_130_scrambler(void)
|
||||
{
|
||||
int i, j, b;
|
||||
|
||||
ecma_130_fsr = 1;
|
||||
printf("static unsigned char ecma_130_annex_b[2340] = {");
|
||||
printf("\n\t");
|
||||
for (i = 0; i < 2340; i++) {
|
||||
b = 0;
|
||||
for (j = 0; j < 8; j++)
|
||||
b |= next_bit() << j;
|
||||
|
||||
printf("%3u, ", b);
|
||||
if ((i % 10) == 9)
|
||||
printf("\n\t");
|
||||
}
|
||||
printf("\n};\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef Libburn_with_general_rspc_diV
|
||||
|
||||
/* This is a general polynomial division function.
|
||||
burn_rspc_div_3() has been derived from this by setting b to constant 3.
|
||||
*/
|
||||
static unsigned char burn_rspc_div(unsigned char a, unsigned char b)
|
||||
{
|
||||
int d;
|
||||
|
||||
if (a == 0)
|
||||
return 0;
|
||||
if (b == 0)
|
||||
return -1;
|
||||
d = gflog[a] - gflog[b];
|
||||
if (d < 0)
|
||||
d += 255;
|
||||
return gfpow[d];
|
||||
}
|
||||
|
||||
#endif /* Libburn_with_general_rspc_diV */
|
||||
|
||||
|
||||
#endif /* Libburn_with_lec_generatoR */
|
||||
|
23
libburn/ecma130ab.h
Normal file
23
libburn/ecma130ab.h
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||
|
||||
/* ts A91016 : libburn/ecma130ab.h is the replacement for old libburn/lec.h
|
||||
|
||||
Copyright 2009, Thomas Schmitt <scdbackup@gmx.net>, libburnia-project.org
|
||||
|
||||
This code module implements the computations prescribed in ECMA-130 Annex A
|
||||
and B. For explanations of the underlying mathematics see ecma130ab.c .
|
||||
|
||||
*/
|
||||
|
||||
#ifndef Libburn_ecma130ab_includeD
|
||||
#define Libburn_ecma130ab_includeD 1
|
||||
|
||||
void burn_rspc_parity_p(unsigned char *sector);
|
||||
|
||||
void burn_rspc_parity_q(unsigned char *sector);
|
||||
|
||||
void burn_ecma130_scramble(unsigned char *sector);
|
||||
|
||||
#endif /* ! Libburn_ecma130ab_includeD */
|
||||
|
189
libburn/file.c
189
libburn/file.c
@ -1,5 +1,6 @@
|
||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
@ -27,8 +28,6 @@ an unreadable disc */
|
||||
/* This is a generic OS oriented function wrapper which compensates
|
||||
shortcommings of read() in respect to a guaranteed amount of return data.
|
||||
See man 2 read , paragraph "RETURN VALUE".
|
||||
Possibly libburn/file.c is not the right storage location for this.
|
||||
To make it ready for a move, this function is not declared static.
|
||||
*/
|
||||
static int read_full_buffer(int fd, unsigned char *buffer, int size)
|
||||
{
|
||||
@ -211,7 +210,7 @@ static int fifo_read(struct burn_source *source,
|
||||
int size)
|
||||
{
|
||||
struct burn_source_fifo *fs = source->data;
|
||||
int ret, todo, rpos, bufsize, diff;
|
||||
int ret, todo, rpos, bufsize, diff, counted = 0;
|
||||
|
||||
if (fs->end_of_consumption) {
|
||||
/* ??? msg: reading has been ended already */;
|
||||
@ -256,6 +255,9 @@ static int fifo_read(struct burn_source *source,
|
||||
"Forwarded input error ends output", 0, 0);
|
||||
return -1;
|
||||
}
|
||||
if (!counted)
|
||||
fs->empty_counter++;
|
||||
counted = 1;
|
||||
fifo_sleep(0);
|
||||
}
|
||||
diff = fs->buf_writepos - rpos; /* read volatile only once */
|
||||
@ -285,6 +287,7 @@ static int fifo_read(struct burn_source *source,
|
||||
(size - todo), fs->buf_readpos, (double) fs->out_counter);
|
||||
*/
|
||||
|
||||
fs->get_counter++;
|
||||
return (size - todo);
|
||||
}
|
||||
|
||||
@ -312,8 +315,10 @@ static void fifo_free(struct burn_source *source)
|
||||
burn_fifo_abort(fs, 0);
|
||||
if (fs->inp != NULL)
|
||||
burn_source_free(fs->inp);
|
||||
|
||||
if (fs->buf != NULL)
|
||||
free(fs->buf);
|
||||
burn_os_free_buffer(fs->buf,
|
||||
((size_t) fs->chunksize) * (size_t) fs->chunks, 0);
|
||||
free((char *) fs);
|
||||
}
|
||||
|
||||
@ -321,7 +326,8 @@ static void fifo_free(struct burn_source *source)
|
||||
int burn_fifo_source_shoveller(struct burn_source *source, int flag)
|
||||
{
|
||||
struct burn_source_fifo *fs = source->data;
|
||||
int ret, bufsize, diff, wpos, rpos, trans_end, free_bytes;
|
||||
int ret, bufsize, diff, wpos, rpos, trans_end, free_bytes, fill;
|
||||
int counted;
|
||||
char *bufpt;
|
||||
pthread_t thread_handle_storage;
|
||||
|
||||
@ -335,6 +341,7 @@ int burn_fifo_source_shoveller(struct burn_source *source, int flag)
|
||||
|
||||
/* wait for enough buffer space available */
|
||||
wpos = fs->buf_writepos;
|
||||
counted = 0;
|
||||
while (1) {
|
||||
rpos = fs->buf_readpos;
|
||||
diff = rpos - wpos;
|
||||
@ -345,18 +352,28 @@ int burn_fifo_source_shoveller(struct burn_source *source, int flag)
|
||||
free_bytes = diff - 1;
|
||||
else {
|
||||
free_bytes = (bufsize - wpos) + rpos - 1;
|
||||
if (bufsize - wpos < fs->chunksize)
|
||||
if (bufsize - wpos < fs->inp_read_size)
|
||||
trans_end = 1;
|
||||
}
|
||||
if (free_bytes >= fs->chunksize)
|
||||
if (free_bytes >= fs->inp_read_size)
|
||||
break;
|
||||
if (!counted)
|
||||
fs->full_counter++;
|
||||
counted = 1;
|
||||
fifo_sleep(0);
|
||||
}
|
||||
|
||||
fill = bufsize - free_bytes - 1;
|
||||
if (fill < fs->total_min_fill)
|
||||
fs->total_min_fill = fill;
|
||||
if (fill < fs->interval_min_fill)
|
||||
fs->interval_min_fill = fill;
|
||||
|
||||
/* prepare the receiving memory */
|
||||
bufpt = fs->buf + wpos;
|
||||
if (trans_end) {
|
||||
bufpt = calloc(fs->chunksize, 1);
|
||||
bufpt = burn_os_alloc_buffer(
|
||||
(size_t) fs->inp_read_size, 0);
|
||||
if (bufpt == NULL) {
|
||||
libdax_msgs_submit(libdax_messenger, -1,
|
||||
0x00000003,
|
||||
@ -370,15 +387,13 @@ int burn_fifo_source_shoveller(struct burn_source *source, int flag)
|
||||
/* Obtain next chunk */
|
||||
if (fs->inp->read != NULL)
|
||||
ret = fs->inp->read(fs->inp,
|
||||
(unsigned char *) bufpt, fs->chunksize);
|
||||
(unsigned char *) bufpt, fs->inp_read_size);
|
||||
else
|
||||
ret = fs->inp->read_xt( fs->inp,
|
||||
(unsigned char *) bufpt, fs->chunksize);
|
||||
if (ret > 0)
|
||||
fs->in_counter += ret;
|
||||
else if (ret == 0)
|
||||
(unsigned char *) bufpt, fs->inp_read_size);
|
||||
if (ret == 0)
|
||||
break; /* EOF */
|
||||
else {
|
||||
else if (ret < 0) {
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x00020153,
|
||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Read error on fifo input", errno, 0);
|
||||
@ -387,17 +402,21 @@ int burn_fifo_source_shoveller(struct burn_source *source, int flag)
|
||||
fs->input_error = EIO;
|
||||
break;
|
||||
}
|
||||
fs->in_counter += ret;
|
||||
fs->put_counter++;
|
||||
|
||||
/* activate read chunk */
|
||||
if (ret > fs->chunksize) /* beware of ill custom burn_source */
|
||||
ret = fs->chunksize;
|
||||
if (ret > fs->inp_read_size)
|
||||
/* beware of ill custom burn_source */
|
||||
ret = fs->inp_read_size;
|
||||
if (trans_end) {
|
||||
/* copy to end of buffer */
|
||||
memcpy(fs->buf + wpos, bufpt, bufsize - wpos);
|
||||
/* copy to start of buffer */
|
||||
memcpy(fs->buf, bufpt + (bufsize - wpos),
|
||||
fs->chunksize - (bufsize - wpos));
|
||||
free(bufpt);
|
||||
fs->inp_read_size - (bufsize - wpos));
|
||||
burn_os_free_buffer(bufpt, (size_t) fs->inp_read_size,
|
||||
0);
|
||||
if (ret >= bufsize - wpos)
|
||||
fs->buf_writepos = ret - (bufsize - wpos);
|
||||
else
|
||||
@ -433,7 +452,9 @@ int burn_fifo_source_shoveller(struct burn_source *source, int flag)
|
||||
So in both cases the consumer is aware that reading is futile
|
||||
or even fatal.
|
||||
*/
|
||||
free(fs->buf); /* Give up fifo buffer. Next fifo might start soon. */
|
||||
if(fs->buf != NULL)
|
||||
burn_os_free_buffer(fs->buf,
|
||||
((size_t) fs->chunksize) * (size_t) fs->chunks, 0);
|
||||
fs->buf = NULL;
|
||||
|
||||
fs->thread_handle= NULL;
|
||||
@ -450,7 +471,9 @@ int burn_fifo_cancel(struct burn_source *source)
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@param flag bit0= allow larger read chunks
|
||||
*/
|
||||
struct burn_source *burn_fifo_source_new(struct burn_source *inp,
|
||||
int chunksize, int chunks, int flag)
|
||||
{
|
||||
@ -477,6 +500,10 @@ struct burn_source *burn_fifo_source_new(struct burn_source *inp,
|
||||
fs->thread_pid = 0;
|
||||
fs->thread_is_valid = 0;
|
||||
fs->inp = NULL; /* set later */
|
||||
if (flag & 1)
|
||||
fs->inp_read_size = 32 * 1024;
|
||||
else
|
||||
fs->inp_read_size = chunksize;
|
||||
fs->chunksize = chunksize;
|
||||
fs->chunks = chunks;
|
||||
fs->buf = NULL;
|
||||
@ -485,6 +512,9 @@ struct burn_source *burn_fifo_source_new(struct burn_source *inp,
|
||||
fs->input_error = 0;
|
||||
fs->end_of_consumption = 0;
|
||||
fs->in_counter = fs->out_counter = 0;
|
||||
fs->total_min_fill = fs->interval_min_fill = 0;
|
||||
fs->put_counter = fs->get_counter = 0;
|
||||
fs->empty_counter = fs->full_counter = 0;
|
||||
|
||||
src = burn_source_new();
|
||||
if (src == NULL) {
|
||||
@ -550,34 +580,89 @@ int burn_fifo_inquire_status(struct burn_source *source,
|
||||
}
|
||||
|
||||
|
||||
int burn_fifo_peek_data(struct burn_source *source, char *buf, int bufsize,
|
||||
/* ts A91125 : API */
|
||||
void burn_fifo_get_statistics(struct burn_source *source,
|
||||
int *total_min_fill, int *interval_min_fill,
|
||||
int *put_counter, int *get_counter,
|
||||
int *empty_counter, int *full_counter)
|
||||
{
|
||||
struct burn_source_fifo *fs = source->data;
|
||||
|
||||
*total_min_fill = fs->total_min_fill;
|
||||
*interval_min_fill = fs->interval_min_fill;
|
||||
*put_counter = fs->put_counter;
|
||||
*get_counter = fs->get_counter;
|
||||
*empty_counter = fs->empty_counter;
|
||||
*full_counter = fs->full_counter;
|
||||
}
|
||||
|
||||
|
||||
/* ts A91125 : API */
|
||||
void burn_fifo_next_interval(struct burn_source *source,
|
||||
int *interval_min_fill)
|
||||
{
|
||||
struct burn_source_fifo *fs = source->data;
|
||||
int size, free_bytes, ret;
|
||||
char *status_text;
|
||||
|
||||
*interval_min_fill = fs->interval_min_fill;
|
||||
ret = burn_fifo_inquire_status(source,
|
||||
&size, &free_bytes, &status_text);
|
||||
fs->interval_min_fill = size - free_bytes - 1;
|
||||
}
|
||||
|
||||
|
||||
/* @param flag bit0= do not copy to buf but only wait until the fifo has read
|
||||
bufsize or input ended.
|
||||
The same happens if buf is NULL.
|
||||
bit1= fill to max fifo size
|
||||
*/
|
||||
int burn_fifo_fill_data(struct burn_source *source, char *buf, int bufsize,
|
||||
int flag)
|
||||
{
|
||||
int size, free_bytes, ret, wait_count= 0;
|
||||
char *status_text;
|
||||
struct burn_source_fifo *fs = source->data;
|
||||
|
||||
if (buf == NULL)
|
||||
flag |= 1;
|
||||
|
||||
/* Eventually start fifo thread by reading 0 bytes */
|
||||
ret = fifo_read(source, (unsigned char *) NULL, 0);
|
||||
if (ret<0)
|
||||
return 0;
|
||||
{ret = 0; goto ex;}
|
||||
|
||||
/* wait for at least bufsize bytes being ready */
|
||||
while (1) {
|
||||
ret= burn_fifo_inquire_status(source,
|
||||
&size, &free_bytes, &status_text);
|
||||
if (size < bufsize) {
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x0002015c,
|
||||
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Fifo size is smaller than desired peek buffer", 0, 0);
|
||||
return -1;
|
||||
if (flag & 2) {
|
||||
bufsize = size - (size % fs->inp_read_size) -
|
||||
fs->inp_read_size;
|
||||
if (bufsize <= 0)
|
||||
{ret = 0; goto ex;}
|
||||
}
|
||||
if (size - fs->inp_read_size < bufsize) {
|
||||
if (flag & 1) {
|
||||
bufsize = size - (size % fs->inp_read_size) -
|
||||
fs->inp_read_size;
|
||||
if (bufsize <= 0)
|
||||
{ret = 0; goto ex;}
|
||||
} else {
|
||||
libdax_msgs_submit(libdax_messenger, -1,
|
||||
0x0002015c, LIBDAX_MSGS_SEV_FAILURE,
|
||||
LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Fifo size too small for desired peek buffer",
|
||||
0, 0);
|
||||
{ret = -1; goto ex;}
|
||||
}
|
||||
}
|
||||
if (fs->out_counter > 0 || (ret & 4) || fs->buf == NULL) {
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x0002015e,
|
||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Fifo is already under consumption when peeking is desired",
|
||||
0, 0);
|
||||
return -1;
|
||||
{ret = -1; goto ex;}
|
||||
}
|
||||
if(size - free_bytes >= bufsize) {
|
||||
|
||||
@ -586,17 +671,33 @@ int burn_fifo_peek_data(struct burn_source *source, char *buf, int bufsize,
|
||||
"libburn_DEBUG: after waiting cycle %d : fifo %s , %d bytes\n",
|
||||
wait_count, status_text, size - free_bytes);
|
||||
*/
|
||||
|
||||
memcpy(buf, fs->buf, bufsize);
|
||||
return 1;
|
||||
if(!(flag & 1))
|
||||
memcpy(buf, fs->buf, bufsize);
|
||||
{ret = 1; goto ex;}
|
||||
}
|
||||
if (ret&2) { /* input has ended, not enough data arrived */
|
||||
|
||||
if (ret & 2) {
|
||||
/* input has ended, not enough data arrived */
|
||||
if (flag & 1)
|
||||
{ret = 0; goto ex;}
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x0002015d,
|
||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Fifo input ended short of desired peek buffer size",
|
||||
0, 0);
|
||||
return 0;
|
||||
{ret = 0; goto ex;}
|
||||
}
|
||||
|
||||
if (free_bytes < fs->inp_read_size) {
|
||||
/* Usable fifo size filled, not enough data arrived */
|
||||
if (flag & 1)
|
||||
{ret = 0; goto ex;}
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x00020174,
|
||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Fifo alignment does not allow desired read size",
|
||||
0, 0);
|
||||
{ret = 0; goto ex;}
|
||||
}
|
||||
|
||||
usleep(100000);
|
||||
wait_count++;
|
||||
|
||||
@ -608,5 +709,25 @@ int burn_fifo_peek_data(struct burn_source *source, char *buf, int bufsize,
|
||||
*/
|
||||
|
||||
}
|
||||
return(0);
|
||||
ret = 0;
|
||||
ex:;
|
||||
fs->total_min_fill = fs->interval_min_fill = fs->buf_writepos;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
/* ts A80713 : API */
|
||||
int burn_fifo_peek_data(struct burn_source *source, char *buf, int bufsize,
|
||||
int flag)
|
||||
{
|
||||
return burn_fifo_fill_data(source, buf, bufsize, 0);
|
||||
}
|
||||
|
||||
|
||||
/* ts A91125 : API */
|
||||
int burn_fifo_fill(struct burn_source *source, int bufsize, int flag)
|
||||
{
|
||||
return burn_fifo_fill_data(source, NULL, bufsize,
|
||||
1 | ((flag & 1) << 1));
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ struct burn_source_fifo {
|
||||
|
||||
/* the burn_source for which this fifo is acting as proxy */
|
||||
struct burn_source *inp;
|
||||
int inp_read_size;
|
||||
|
||||
/* <<< up to now it was only a pipe. This is on its way out. */
|
||||
int outlet[2];
|
||||
@ -51,6 +52,14 @@ struct burn_source_fifo {
|
||||
|
||||
off_t in_counter;
|
||||
off_t out_counter;
|
||||
|
||||
int total_min_fill;
|
||||
int interval_min_fill;
|
||||
int put_counter;
|
||||
int get_counter;
|
||||
int empty_counter;
|
||||
int full_counter;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
@ -75,6 +75,13 @@ burn_abort_handler_t burn_global_signal_handler = NULL;
|
||||
/* ts A70223 : wether implemented untested profiles are supported */
|
||||
int burn_support_untested_profiles = 0;
|
||||
|
||||
/* ts A91111 :
|
||||
whether to log SCSI commands (to be implemented in sg-*.c)
|
||||
bit0= log in /tmp/libburn_sg_command_log
|
||||
bit1= log to stderr
|
||||
bit2= flush every line
|
||||
*/
|
||||
int burn_sg_log_scsi = 0;
|
||||
|
||||
/* ts A60925 : ticket 74 */
|
||||
/** Create the messenger object for libburn. */
|
||||
@ -414,3 +421,9 @@ int burn_set_messenger(void *messenger)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A91111 API */
|
||||
void burn_set_scsi_logging(int flag)
|
||||
{
|
||||
burn_sg_log_scsi = flag & 7;
|
||||
}
|
||||
|
451
libburn/lec.c
451
libburn/lec.c
@ -1,451 +0,0 @@
|
||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||
|
||||
/* borrowed HEAVILY from cdrdao */
|
||||
|
||||
#include <string.h>
|
||||
#include "lec.h"
|
||||
|
||||
#define LEC_HEADER_OFFSET 12
|
||||
#define LEC_MODE1_P_PARITY_OFFSET 2076
|
||||
#define LEC_MODE1_Q_PARITY_OFFSET 2248
|
||||
|
||||
static unsigned char gf8_ilog[255] = {
|
||||
1, 2, 4, 8, 16, 32, 64, 128, 29, 58, 116, 232, 205, 135, 19, 38, 76,
|
||||
152, 45, 90, 180, 117, 234, 201, 143, 3, 6, 12, 24, 48, 96,
|
||||
192, 157, 39, 78, 156, 37, 74, 148, 53, 106, 212, 181, 119,
|
||||
238, 193, 159, 35, 70, 140, 5, 10, 20, 40, 80, 160, 93, 186,
|
||||
105, 210, 185, 111, 222, 161, 95, 190, 97, 194, 153, 47, 94,
|
||||
188, 101, 202, 137, 15, 30, 60, 120, 240, 253, 231, 211, 187,
|
||||
107, 214, 177, 127, 254, 225, 223, 163, 91, 182, 113, 226, 217,
|
||||
175, 67, 134, 17, 34, 68, 136, 13, 26, 52, 104, 208, 189, 103,
|
||||
206, 129, 31, 62, 124, 248, 237, 199, 147, 59, 118, 236, 197,
|
||||
151, 51, 102, 204, 133, 23, 46, 92, 184, 109, 218, 169, 79,
|
||||
158, 33, 66, 132, 21, 42, 84, 168, 77, 154, 41, 82, 164, 85,
|
||||
170, 73, 146, 57, 114, 228, 213, 183, 115, 230, 209, 191, 99,
|
||||
198, 145, 63, 126, 252, 229, 215, 179, 123, 246, 241, 255, 227,
|
||||
219, 171, 75, 150, 49, 98, 196, 149, 55, 110, 220, 165, 87,
|
||||
174, 65, 130, 25, 50, 100, 200, 141, 7, 14, 28, 56, 112, 224,
|
||||
221, 167, 83, 166, 81, 162, 89, 178, 121, 242, 249, 239, 195,
|
||||
155, 43, 86, 172, 69, 138, 9, 18, 36, 72, 144, 61, 122, 244,
|
||||
245, 247, 243, 251, 235, 203, 139, 11, 22, 44, 88, 176, 125,
|
||||
250, 233, 207, 131, 27, 54, 108, 216, 173, 71, 142,
|
||||
};
|
||||
static unsigned char gf8_log[256] = {
|
||||
0, 0, 1, 25, 2, 50, 26, 198, 3, 223, 51, 238, 27, 104, 199, 75, 4, 100,
|
||||
224, 14, 52, 141, 239, 129, 28, 193, 105, 248, 200, 8, 76, 113,
|
||||
5, 138, 101, 47, 225, 36, 15, 33, 53, 147, 142, 218, 240, 18,
|
||||
130, 69, 29, 181, 194, 125, 106, 39, 249, 185, 201, 154, 9,
|
||||
120, 77, 228, 114, 166, 6, 191, 139, 98, 102, 221, 48, 253,
|
||||
226, 152, 37, 179, 16, 145, 34, 136, 54, 208, 148, 206, 143,
|
||||
150, 219, 189, 241, 210, 19, 92, 131, 56, 70, 64, 30, 66, 182,
|
||||
163, 195, 72, 126, 110, 107, 58, 40, 84, 250, 133, 186, 61,
|
||||
202, 94, 155, 159, 10, 21, 121, 43, 78, 212, 229, 172, 115,
|
||||
243, 167, 87, 7, 112, 192, 247, 140, 128, 99, 13, 103, 74, 222,
|
||||
237, 49, 197, 254, 24, 227, 165, 153, 119, 38, 184, 180, 124,
|
||||
17, 68, 146, 217, 35, 32, 137, 46, 55, 63, 209, 91, 149, 188,
|
||||
207, 205, 144, 135, 151, 178, 220, 252, 190, 97, 242, 86, 211,
|
||||
171, 20, 42, 93, 158, 132, 60, 57, 83, 71, 109, 65, 162, 31,
|
||||
45, 67, 216, 183, 123, 164, 118, 196, 23, 73, 236, 127, 12,
|
||||
111, 246, 108, 161, 59, 82, 41, 157, 85, 170, 251, 96, 134,
|
||||
177, 187, 204, 62, 90, 203, 89, 95, 176, 156, 169, 160, 81, 11,
|
||||
245, 22, 235, 122, 117, 44, 215, 79, 174, 213, 233, 230, 231,
|
||||
173, 232, 116, 214, 244, 234, 168, 80, 88, 175,
|
||||
};
|
||||
static unsigned char gf8_q_coeffs[2][45] = {
|
||||
{97, 251, 133, 60, 82, 160, 155, 201, 8, 112, 246, 11, 21, 42, 157,
|
||||
169, 80, 174, 232, 230, 172, 211, 241, 18, 68, 216, 44, 121, 9, 200,
|
||||
75, 103, 221, 252, 96, 176, 88, 167, 114, 76, 199, 26, 1, 0, 0},
|
||||
{190, 96, 250, 132, 59, 81, 159, 154, 200, 7, 111, 245, 10, 20, 41,
|
||||
156, 168, 79, 173, 231, 229, 171, 210, 240, 17, 67, 215, 43, 120, 8,
|
||||
199, 74, 102, 220, 251, 95, 175, 87, 166, 113, 75, 198, 25, 0, 0}
|
||||
};
|
||||
static unsigned char gf8_p_coeffs[2][26] = {
|
||||
{230, 172, 211, 241, 18, 68, 216, 44, 121, 9, 200, 75, 103, 221, 252,
|
||||
96, 176, 88, 167, 114, 76, 199, 26, 1, 0, 0},
|
||||
{231, 229, 171, 210, 240, 17, 67, 215, 43, 120, 8, 199, 74, 102, 220,
|
||||
251, 95, 175, 87, 166, 113, 75, 198, 25, 0, 0}
|
||||
};
|
||||
|
||||
static unsigned char yellowbook_scrambler[2340] = {
|
||||
1, 128, 0, 96, 0, 40, 0, 30, 128, 8, 96, 6, 168, 2, 254, 129, 128, 96,
|
||||
96, 40, 40, 30, 158,
|
||||
136, 104, 102, 174, 170, 252, 127, 1, 224, 0, 72, 0, 54, 128, 22, 224,
|
||||
14, 200, 4, 86, 131, 126, 225,
|
||||
224, 72, 72, 54, 182, 150, 246, 238, 198, 204, 82, 213, 253, 159, 1,
|
||||
168, 0, 126, 128, 32, 96, 24, 40,
|
||||
10, 158, 135, 40, 98, 158, 169, 168, 126, 254, 160, 64, 120, 48, 34,
|
||||
148, 25, 175, 74, 252, 55, 1, 214,
|
||||
128, 94, 224, 56, 72, 18, 182, 141, 182, 229, 182, 203, 54, 215, 86,
|
||||
222, 190, 216, 112, 90, 164, 59, 59,
|
||||
83, 83, 125, 253, 225, 129, 136, 96, 102, 168, 42, 254, 159, 0, 104, 0,
|
||||
46, 128, 28, 96, 9, 232, 6,
|
||||
206, 130, 212, 97, 159, 104, 104, 46, 174, 156, 124, 105, 225, 238,
|
||||
200, 76, 86, 181, 254, 247, 0, 70, 128,
|
||||
50, 224, 21, 136, 15, 38, 132, 26, 227, 75, 9, 247, 70, 198, 178, 210,
|
||||
245, 157, 135, 41, 162, 158, 249,
|
||||
168, 66, 254, 177, 128, 116, 96, 39, 104, 26, 174, 139, 60, 103, 81,
|
||||
234, 188, 79, 49, 244, 20, 71, 79,
|
||||
114, 180, 37, 183, 91, 54, 187, 86, 243, 126, 197, 224, 83, 8, 61, 198,
|
||||
145, 146, 236, 109, 141, 237, 165,
|
||||
141, 187, 37, 179, 91, 53, 251, 87, 3, 126, 129, 224, 96, 72, 40, 54,
|
||||
158, 150, 232, 110, 206, 172, 84,
|
||||
125, 255, 97, 128, 40, 96, 30, 168, 8, 126, 134, 160, 98, 248, 41, 130,
|
||||
158, 225, 168, 72, 126, 182, 160,
|
||||
118, 248, 38, 194, 154, 209, 171, 28, 127, 73, 224, 54, 200, 22, 214,
|
||||
142, 222, 228, 88, 75, 122, 183, 99,
|
||||
54, 169, 214, 254, 222, 192, 88, 80, 58, 188, 19, 49, 205, 212, 85,
|
||||
159, 127, 40, 32, 30, 152, 8, 106,
|
||||
134, 175, 34, 252, 25, 129, 202, 224, 87, 8, 62, 134, 144, 98, 236, 41,
|
||||
141, 222, 229, 152, 75, 42, 183,
|
||||
95, 54, 184, 22, 242, 142, 197, 164, 83, 59, 125, 211, 97, 157, 232,
|
||||
105, 142, 174, 228, 124, 75, 97, 247,
|
||||
104, 70, 174, 178, 252, 117, 129, 231, 32, 74, 152, 55, 42, 150, 159,
|
||||
46, 232, 28, 78, 137, 244, 102, 199,
|
||||
106, 210, 175, 29, 188, 9, 177, 198, 244, 82, 199, 125, 146, 161, 173,
|
||||
184, 125, 178, 161, 181, 184, 119, 50,
|
||||
166, 149, 186, 239, 51, 12, 21, 197, 207, 19, 20, 13, 207, 69, 148, 51,
|
||||
47, 85, 220, 63, 25, 208, 10,
|
||||
220, 7, 25, 194, 138, 209, 167, 28, 122, 137, 227, 38, 201, 218, 214,
|
||||
219, 30, 219, 72, 91, 118, 187, 102,
|
||||
243, 106, 197, 239, 19, 12, 13, 197, 197, 147, 19, 45, 205, 221, 149,
|
||||
153, 175, 42, 252, 31, 1, 200, 0,
|
||||
86, 128, 62, 224, 16, 72, 12, 54, 133, 214, 227, 30, 201, 200, 86, 214,
|
||||
190, 222, 240, 88, 68, 58, 179,
|
||||
83, 53, 253, 215, 1, 158, 128, 104, 96, 46, 168, 28, 126, 137, 224,
|
||||
102, 200, 42, 214, 159, 30, 232, 8,
|
||||
78, 134, 180, 98, 247, 105, 134, 174, 226, 252, 73, 129, 246, 224, 70,
|
||||
200, 50, 214, 149, 158, 239, 40, 76,
|
||||
30, 181, 200, 119, 22, 166, 142, 250, 228, 67, 11, 113, 199, 100, 82,
|
||||
171, 125, 191, 97, 176, 40, 116, 30,
|
||||
167, 72, 122, 182, 163, 54, 249, 214, 194, 222, 209, 152, 92, 106, 185,
|
||||
239, 50, 204, 21, 149, 207, 47, 20,
|
||||
28, 15, 73, 196, 54, 211, 86, 221, 254, 217, 128, 90, 224, 59, 8, 19,
|
||||
70, 141, 242, 229, 133, 139, 35,
|
||||
39, 89, 218, 186, 219, 51, 27, 85, 203, 127, 23, 96, 14, 168, 4, 126,
|
||||
131, 96, 97, 232, 40, 78, 158,
|
||||
180, 104, 119, 110, 166, 172, 122, 253, 227, 1, 137, 192, 102, 208, 42,
|
||||
220, 31, 25, 200, 10, 214, 135, 30,
|
||||
226, 136, 73, 166, 182, 250, 246, 195, 6, 209, 194, 220, 81, 153, 252,
|
||||
106, 193, 239, 16, 76, 12, 53, 197,
|
||||
215, 19, 30, 141, 200, 101, 150, 171, 46, 255, 92, 64, 57, 240, 18,
|
||||
196, 13, 147, 69, 173, 243, 61, 133,
|
||||
209, 163, 28, 121, 201, 226, 214, 201, 158, 214, 232, 94, 206, 184, 84,
|
||||
114, 191, 101, 176, 43, 52, 31, 87,
|
||||
72, 62, 182, 144, 118, 236, 38, 205, 218, 213, 155, 31, 43, 72, 31,
|
||||
118, 136, 38, 230, 154, 202, 235, 23,
|
||||
15, 78, 132, 52, 99, 87, 105, 254, 174, 192, 124, 80, 33, 252, 24, 65,
|
||||
202, 176, 87, 52, 62, 151, 80,
|
||||
110, 188, 44, 113, 221, 228, 89, 139, 122, 231, 99, 10, 169, 199, 62,
|
||||
210, 144, 93, 172, 57, 189, 210, 241,
|
||||
157, 132, 105, 163, 110, 249, 236, 66, 205, 241, 149, 132, 111, 35,
|
||||
108, 25, 237, 202, 205, 151, 21, 174, 143,
|
||||
60, 100, 17, 235, 76, 79, 117, 244, 39, 7, 90, 130, 187, 33, 179, 88,
|
||||
117, 250, 167, 3, 58, 129, 211,
|
||||
32, 93, 216, 57, 154, 146, 235, 45, 143, 93, 164, 57, 187, 82, 243,
|
||||
125, 133, 225, 163, 8, 121, 198, 162,
|
||||
210, 249, 157, 130, 233, 161, 142, 248, 100, 66, 171, 113, 191, 100,
|
||||
112, 43, 100, 31, 107, 72, 47, 118, 156,
|
||||
38, 233, 218, 206, 219, 20, 91, 79, 123, 116, 35, 103, 89, 234, 186,
|
||||
207, 51, 20, 21, 207, 79, 20, 52,
|
||||
15, 87, 68, 62, 179, 80, 117, 252, 39, 1, 218, 128, 91, 32, 59, 88, 19,
|
||||
122, 141, 227, 37, 137, 219,
|
||||
38, 219, 90, 219, 123, 27, 99, 75, 105, 247, 110, 198, 172, 82, 253,
|
||||
253, 129, 129, 160, 96, 120, 40, 34,
|
||||
158, 153, 168, 106, 254, 175, 0, 124, 0, 33, 192, 24, 80, 10, 188, 7,
|
||||
49, 194, 148, 81, 175, 124, 124,
|
||||
33, 225, 216, 72, 90, 182, 187, 54, 243, 86, 197, 254, 211, 0, 93, 192,
|
||||
57, 144, 18, 236, 13, 141, 197,
|
||||
165, 147, 59, 45, 211, 93, 157, 249, 169, 130, 254, 225, 128, 72, 96,
|
||||
54, 168, 22, 254, 142, 192, 100, 80,
|
||||
43, 124, 31, 97, 200, 40, 86, 158, 190, 232, 112, 78, 164, 52, 123, 87,
|
||||
99, 126, 169, 224, 126, 200, 32,
|
||||
86, 152, 62, 234, 144, 79, 44, 52, 29, 215, 73, 158, 182, 232, 118,
|
||||
206, 166, 212, 122, 223, 99, 24, 41,
|
||||
202, 158, 215, 40, 94, 158, 184, 104, 114, 174, 165, 188, 123, 49, 227,
|
||||
84, 73, 255, 118, 192, 38, 208, 26,
|
||||
220, 11, 25, 199, 74, 210, 183, 29, 182, 137, 182, 230, 246, 202, 198,
|
||||
215, 18, 222, 141, 152, 101, 170, 171,
|
||||
63, 63, 80, 16, 60, 12, 17, 197, 204, 83, 21, 253, 207, 1, 148, 0, 111,
|
||||
64, 44, 48, 29, 212, 9,
|
||||
159, 70, 232, 50, 206, 149, 148, 111, 47, 108, 28, 45, 201, 221, 150,
|
||||
217, 174, 218, 252, 91, 1, 251, 64,
|
||||
67, 112, 49, 228, 20, 75, 79, 119, 116, 38, 167, 90, 250, 187, 3, 51,
|
||||
65, 213, 240, 95, 4, 56, 3,
|
||||
82, 129, 253, 160, 65, 184, 48, 114, 148, 37, 175, 91, 60, 59, 81, 211,
|
||||
124, 93, 225, 249, 136, 66, 230,
|
||||
177, 138, 244, 103, 7, 106, 130, 175, 33, 188, 24, 113, 202, 164, 87,
|
||||
59, 126, 147, 96, 109, 232, 45, 142,
|
||||
157, 164, 105, 187, 110, 243, 108, 69, 237, 243, 13, 133, 197, 163, 19,
|
||||
57, 205, 210, 213, 157, 159, 41, 168,
|
||||
30, 254, 136, 64, 102, 176, 42, 244, 31, 7, 72, 2, 182, 129, 182, 224,
|
||||
118, 200, 38, 214, 154, 222, 235,
|
||||
24, 79, 74, 180, 55, 55, 86, 150, 190, 238, 240, 76, 68, 53, 243, 87,
|
||||
5, 254, 131, 0, 97, 192, 40,
|
||||
80, 30, 188, 8, 113, 198, 164, 82, 251, 125, 131, 97, 161, 232, 120,
|
||||
78, 162, 180, 121, 183, 98, 246, 169,
|
||||
134, 254, 226, 192, 73, 144, 54, 236, 22, 205, 206, 213, 148, 95, 47,
|
||||
120, 28, 34, 137, 217, 166, 218, 250,
|
||||
219, 3, 27, 65, 203, 112, 87, 100, 62, 171, 80, 127, 124, 32, 33, 216,
|
||||
24, 90, 138, 187, 39, 51, 90,
|
||||
149, 251, 47, 3, 92, 1, 249, 192, 66, 208, 49, 156, 20, 105, 207, 110,
|
||||
212, 44, 95, 93, 248, 57, 130,
|
||||
146, 225, 173, 136, 125, 166, 161, 186, 248, 115, 2, 165, 193, 187, 16,
|
||||
115, 76, 37, 245, 219, 7, 27, 66,
|
||||
139, 113, 167, 100, 122, 171, 99, 63, 105, 208, 46, 220, 28, 89, 201,
|
||||
250, 214, 195, 30, 209, 200, 92, 86,
|
||||
185, 254, 242, 192, 69, 144, 51, 44, 21, 221, 207, 25, 148, 10, 239,
|
||||
71, 12, 50, 133, 213, 163, 31, 57,
|
||||
200, 18, 214, 141, 158, 229, 168, 75, 62, 183, 80, 118, 188, 38, 241,
|
||||
218, 196, 91, 19, 123, 77, 227, 117,
|
||||
137, 231, 38, 202, 154, 215, 43, 30, 159, 72, 104, 54, 174, 150, 252,
|
||||
110, 193, 236, 80, 77, 252, 53, 129,
|
||||
215, 32, 94, 152, 56, 106, 146, 175, 45, 188, 29, 177, 201, 180, 86,
|
||||
247, 126, 198, 160, 82, 248, 61, 130,
|
||||
145, 161, 172, 120, 125, 226, 161, 137, 184, 102, 242, 170, 197, 191,
|
||||
19, 48, 13, 212, 5, 159, 67, 40, 49,
|
||||
222, 148, 88, 111, 122, 172, 35, 61, 217, 209, 154, 220, 107, 25, 239,
|
||||
74, 204, 55, 21, 214, 143, 30, 228,
|
||||
8, 75, 70, 183, 114, 246, 165, 134, 251, 34, 195, 89, 145, 250, 236,
|
||||
67, 13, 241, 197, 132, 83, 35, 125,
|
||||
217, 225, 154, 200, 107, 22, 175, 78, 252, 52, 65, 215, 112, 94, 164,
|
||||
56, 123, 82, 163, 125, 185, 225, 178,
|
||||
200, 117, 150, 167, 46, 250, 156, 67, 41, 241, 222, 196, 88, 83, 122,
|
||||
189, 227, 49, 137, 212, 102, 223, 106,
|
||||
216, 47, 26, 156, 11, 41, 199, 94, 210, 184, 93, 178, 185, 181, 178,
|
||||
247, 53, 134, 151, 34, 238, 153, 140,
|
||||
106, 229, 239, 11, 12, 7, 69, 194, 179, 17, 181, 204, 119, 21, 230,
|
||||
143, 10, 228, 7, 11, 66, 135, 113,
|
||||
162, 164, 121, 187, 98, 243, 105, 133, 238, 227, 12, 73, 197, 246, 211,
|
||||
6, 221, 194, 217, 145, 154, 236, 107,
|
||||
13, 239, 69, 140, 51, 37, 213, 219, 31, 27, 72, 11, 118, 135, 102, 226,
|
||||
170, 201, 191, 22, 240, 14, 196,
|
||||
4, 83, 67, 125, 241, 225, 132, 72, 99, 118, 169, 230, 254, 202, 192,
|
||||
87, 16, 62, 140, 16, 101, 204, 43,
|
||||
21, 223, 79, 24, 52, 10, 151, 71, 46, 178, 156, 117, 169, 231, 62, 202,
|
||||
144, 87, 44, 62, 157, 208, 105,
|
||||
156, 46, 233, 220, 78, 217, 244, 90, 199, 123, 18, 163, 77, 185, 245,
|
||||
178, 199, 53, 146, 151, 45, 174, 157,
|
||||
188, 105, 177, 238, 244, 76, 71, 117, 242, 167, 5, 186, 131, 51, 33,
|
||||
213, 216, 95, 26, 184, 11, 50, 135,
|
||||
85, 162, 191, 57, 176, 18, 244, 13, 135, 69, 162, 179, 57, 181, 210,
|
||||
247, 29, 134, 137, 162, 230, 249, 138,
|
||||
194, 231, 17, 138, 140, 103, 37, 234, 155, 15, 43, 68, 31, 115, 72, 37,
|
||||
246, 155, 6, 235, 66, 207, 113,
|
||||
148, 36, 111, 91, 108, 59, 109, 211, 109, 157, 237, 169, 141, 190, 229,
|
||||
176, 75, 52, 55, 87, 86, 190, 190,
|
||||
240, 112, 68, 36, 51, 91, 85, 251, 127, 3, 96, 1, 232, 0, 78, 128, 52,
|
||||
96, 23, 104, 14, 174, 132,
|
||||
124, 99, 97, 233, 232, 78, 206, 180, 84, 119, 127, 102, 160, 42, 248,
|
||||
31, 2, 136, 1, 166, 128, 122, 224,
|
||||
35, 8, 25, 198, 138, 210, 231, 29, 138, 137, 167, 38, 250, 154, 195,
|
||||
43, 17, 223, 76, 88, 53, 250, 151,
|
||||
3, 46, 129, 220, 96, 89, 232, 58, 206, 147, 20, 109, 207, 109, 148, 45,
|
||||
175, 93, 188, 57, 177, 210, 244,
|
||||
93, 135, 121, 162, 162, 249, 185, 130, 242, 225, 133, 136, 99, 38, 169,
|
||||
218, 254, 219, 0, 91, 64, 59, 112,
|
||||
19, 100, 13, 235, 69, 143, 115, 36, 37, 219, 91, 27, 123, 75, 99, 119,
|
||||
105, 230, 174, 202, 252, 87, 1,
|
||||
254, 128, 64, 96, 48, 40, 20, 30, 143, 72, 100, 54, 171, 86, 255, 126,
|
||||
192, 32, 80, 24, 60, 10, 145,
|
||||
199, 44, 82, 157, 253, 169, 129, 190, 224, 112, 72, 36, 54, 155, 86,
|
||||
235, 126, 207, 96, 84, 40, 63, 94,
|
||||
144, 56, 108, 18, 173, 205, 189, 149, 177, 175, 52, 124, 23, 97, 206,
|
||||
168, 84, 126, 191, 96, 112, 40, 36,
|
||||
30, 155, 72, 107, 118, 175, 102, 252, 42, 193, 223, 16, 88, 12, 58,
|
||||
133, 211, 35, 29, 217, 201, 154, 214,
|
||||
235, 30, 207, 72, 84, 54, 191, 86, 240, 62, 196, 16, 83, 76, 61, 245,
|
||||
209, 135, 28, 98, 137, 233, 166,
|
||||
206, 250, 212, 67, 31, 113, 200, 36, 86, 155, 126, 235, 96, 79, 104,
|
||||
52, 46, 151, 92, 110, 185, 236, 114,
|
||||
205, 229, 149, 139, 47, 39, 92, 26, 185, 203, 50, 215, 85, 158, 191,
|
||||
40, 112, 30, 164, 8, 123, 70, 163,
|
||||
114, 249, 229, 130, 203, 33, 151, 88, 110, 186, 172, 115, 61, 229, 209,
|
||||
139, 28, 103, 73, 234, 182, 207, 54,
|
||||
212, 22, 223, 78, 216, 52, 90, 151, 123, 46, 163, 92, 121, 249, 226,
|
||||
194, 201, 145, 150, 236, 110, 205, 236,
|
||||
85, 141, 255, 37, 128, 27, 32, 11, 88, 7, 122, 130, 163, 33, 185, 216,
|
||||
114, 218, 165, 155, 59, 43, 83,
|
||||
95, 125, 248, 33, 130, 152, 97, 170, 168, 127, 62, 160, 16, 120, 12,
|
||||
34, 133, 217, 163, 26, 249, 203, 2,
|
||||
215, 65, 158, 176, 104, 116, 46, 167, 92, 122, 185, 227, 50, 201, 213,
|
||||
150, 223, 46, 216, 28, 90, 137, 251,
|
||||
38, 195, 90, 209, 251, 28, 67, 73, 241, 246, 196, 70, 211, 114, 221,
|
||||
229, 153,
|
||||
};
|
||||
|
||||
void scramble(unsigned char *inout)
|
||||
{
|
||||
unsigned char *r = inout + 12;
|
||||
unsigned char *s = yellowbook_scrambler;
|
||||
unsigned int i;
|
||||
|
||||
for (i = 2340; i; i--) {
|
||||
*r++ ^= *s++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Calculate the P parities for the sector.
|
||||
* The 43 P vectors of length 24 are combined with the GF8_P_COEFFS.
|
||||
*/
|
||||
void parity_p(unsigned char *sector)
|
||||
{
|
||||
int i, j;
|
||||
unsigned char p0_msb, p1_msb;
|
||||
unsigned char p0_lsb, p1_lsb;
|
||||
unsigned char *p_msb_start, *p_lsb_start;
|
||||
unsigned char *p_msb, *p_lsb;
|
||||
unsigned char *coeffs0, *coeffs1;
|
||||
unsigned char *p0, *p1;
|
||||
unsigned char d;
|
||||
unsigned short c;
|
||||
|
||||
p_lsb_start = sector + LEC_HEADER_OFFSET;
|
||||
p_msb_start = sector + LEC_HEADER_OFFSET + 1;
|
||||
|
||||
p1 = sector + LEC_MODE1_P_PARITY_OFFSET;
|
||||
p0 = sector + LEC_MODE1_P_PARITY_OFFSET + 2 * 43;
|
||||
|
||||
for (i = 0; i <= 42; i++) {
|
||||
p_lsb = p_lsb_start;
|
||||
p_msb = p_msb_start;
|
||||
|
||||
coeffs0 = gf8_p_coeffs[0];
|
||||
coeffs1 = gf8_p_coeffs[1];
|
||||
|
||||
p0_lsb = p1_lsb = p0_msb = p1_msb = 0;
|
||||
|
||||
for (j = 0; j <= 23; j++) {
|
||||
d = *p_lsb;
|
||||
|
||||
if (d != 0) {
|
||||
c = gf8_log[d] + *coeffs0;
|
||||
if (c >= 255)
|
||||
c -= 255;
|
||||
p0_lsb ^= gf8_ilog[c];
|
||||
|
||||
c = gf8_log[d] + *coeffs1;
|
||||
if (c >= 255)
|
||||
c -= 255;
|
||||
p1_lsb ^= gf8_ilog[c];
|
||||
}
|
||||
|
||||
d = *p_msb;
|
||||
|
||||
if (d != 0) {
|
||||
c = gf8_log[d] + *coeffs0;
|
||||
if (c >= 255)
|
||||
c -= 255;
|
||||
p0_msb ^= gf8_ilog[c];
|
||||
|
||||
c = gf8_log[d] + *coeffs1;
|
||||
if (c >= 255)
|
||||
c -= 255;
|
||||
p1_msb ^= gf8_ilog[c];
|
||||
}
|
||||
|
||||
coeffs0++;
|
||||
coeffs1++;
|
||||
|
||||
p_lsb += 2 * 43;
|
||||
p_msb += 2 * 43;
|
||||
}
|
||||
|
||||
*p0 = p0_lsb;
|
||||
*(p0 + 1) = p0_msb;
|
||||
|
||||
*p1 = p1_lsb;
|
||||
*(p1 + 1) = p1_msb;
|
||||
|
||||
p0 += 2;
|
||||
p1 += 2;
|
||||
|
||||
p_lsb_start += 2;
|
||||
p_msb_start += 2;
|
||||
}
|
||||
}
|
||||
|
||||
/* Calculate the Q parities for the sector.
|
||||
* The 26 Q vectors of length 43 are combined with the GF8_Q_COEFFS.
|
||||
*/
|
||||
void parity_q(unsigned char *sector)
|
||||
{
|
||||
int i, j;
|
||||
unsigned char q0_msb, q1_msb;
|
||||
unsigned char q0_lsb, q1_lsb;
|
||||
unsigned char *q_msb_start, *q_lsb_start;
|
||||
unsigned char *q_msb, *q_lsb;
|
||||
unsigned char *coeffs0, *coeffs1;
|
||||
unsigned char *q0, *q1, *q_start;
|
||||
unsigned char d;
|
||||
unsigned short c;
|
||||
|
||||
q_lsb_start = sector + LEC_HEADER_OFFSET;
|
||||
q_msb_start = sector + LEC_HEADER_OFFSET + 1;
|
||||
|
||||
q_start = sector + LEC_MODE1_Q_PARITY_OFFSET;
|
||||
q1 = sector + LEC_MODE1_Q_PARITY_OFFSET;
|
||||
q0 = sector + LEC_MODE1_Q_PARITY_OFFSET + 2 * 26;
|
||||
|
||||
for (i = 0; i <= 25; i++) {
|
||||
q_lsb = q_lsb_start;
|
||||
q_msb = q_msb_start;
|
||||
|
||||
coeffs0 = gf8_q_coeffs[0];
|
||||
coeffs1 = gf8_q_coeffs[1];
|
||||
|
||||
q0_lsb = q1_lsb = q0_msb = q1_msb = 0;
|
||||
|
||||
for (j = 0; j <= 42; j++) {
|
||||
d = *q_lsb;
|
||||
|
||||
if (d != 0) {
|
||||
c = gf8_log[d] + *coeffs0;
|
||||
if (c >= 255)
|
||||
c -= 255;
|
||||
q0_lsb ^= gf8_ilog[c];
|
||||
|
||||
c = gf8_log[d] + *coeffs1;
|
||||
if (c >= 255)
|
||||
c -= 255;
|
||||
q1_lsb ^= gf8_ilog[c];
|
||||
}
|
||||
|
||||
d = *q_msb;
|
||||
|
||||
if (d != 0) {
|
||||
c = gf8_log[d] + *coeffs0;
|
||||
if (c >= 255)
|
||||
c -= 255;
|
||||
q0_msb ^= gf8_ilog[c];
|
||||
|
||||
c = gf8_log[d] + *coeffs1;
|
||||
if (c >= 255)
|
||||
c -= 255;
|
||||
q1_msb ^= gf8_ilog[c];
|
||||
}
|
||||
|
||||
coeffs0++;
|
||||
coeffs1++;
|
||||
|
||||
q_lsb += 2 * 44;
|
||||
q_msb += 2 * 44;
|
||||
|
||||
if (q_lsb >= q_start) {
|
||||
q_msb -= 2 * 1118;
|
||||
q_lsb -= 2 * 1118;
|
||||
}
|
||||
}
|
||||
|
||||
*q0 = q0_lsb;
|
||||
*(q0 + 1) = q0_msb;
|
||||
|
||||
*q1 = q1_lsb;
|
||||
*(q1 + 1) = q1_msb;
|
||||
|
||||
q0 += 2;
|
||||
q1 += 2;
|
||||
|
||||
q_lsb_start += 2 * 43;
|
||||
q_msb_start += 2 * 43;
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||
|
||||
#ifndef __LEC
|
||||
#define __LEC
|
||||
|
||||
#define RS_L12_BITS 8
|
||||
|
||||
void scramble(unsigned char *);
|
||||
void parity_p(unsigned char *in);
|
||||
void parity_q(unsigned char *in);
|
||||
|
||||
#endif /* __LEC */
|
@ -119,7 +119,8 @@ enum burn_write_types
|
||||
2s gaps between tracks, no fonky lead-ins
|
||||
|
||||
With sequential DVD-R[W]: Incremental Streaming
|
||||
With DVD-RAM/+RW: Random Writeable (used sequentially)
|
||||
With DVD+R and BD-R: Track of open size
|
||||
With DVD-RAM, DVD+RW, BD-RE: Random Writeable (used sequentially)
|
||||
With overwriteable DVD-RW: Rigid Restricted Overwrite
|
||||
*/
|
||||
BURN_WRITE_TAO,
|
||||
@ -130,19 +131,32 @@ enum burn_write_types
|
||||
|
||||
With sequential DVD-R[W]: Disc-at-once, DAO
|
||||
Single session, single track, fixed size mandatory, (-dvd-compat)
|
||||
With other DVD or BD media: same as BURN_WRITE_TAO but may demand
|
||||
that track size is known in advance.
|
||||
*/
|
||||
BURN_WRITE_SAO,
|
||||
|
||||
/** With CD: Raw disc at once recording.
|
||||
all subcodes must be provided by lib or user
|
||||
only raw block types are supported
|
||||
With DVD and BD media: not supported.
|
||||
|
||||
ts A90901: This had been disabled because its implementation
|
||||
relied on code from cdrdao which is not understood
|
||||
currently.
|
||||
A burn run will abort with "FATAL" error message
|
||||
if this mode is attempted.
|
||||
@since 0.7.2
|
||||
ts A91016: Re-implemented according to ECMA-130 Annex A and B.
|
||||
Now understood, explained and not stemming from cdrdao.
|
||||
@since 0.7.4
|
||||
*/
|
||||
BURN_WRITE_RAW,
|
||||
|
||||
/** In replies this indicates that not any writing will work.
|
||||
As parameter for inquiries it indicates that no particular write
|
||||
mode shall is specified.
|
||||
Do not use for setting a write mode for burning. It won't work.
|
||||
Do not use for setting a write mode for burning. It will not work.
|
||||
*/
|
||||
BURN_WRITE_NONE
|
||||
};
|
||||
@ -338,7 +352,7 @@ struct burn_toc_entry
|
||||
*/
|
||||
unsigned char extensions_valid;
|
||||
|
||||
/* ts A70201 : DVD extension.
|
||||
/* ts A70201 : DVD extension. extensions_valid:bit0
|
||||
If invalid the members are guaranteed to be 0. */
|
||||
/* @since 0.3.2 */
|
||||
/* Tracks and session numbers are 16 bit. Here are the high bytes. */
|
||||
@ -349,6 +363,13 @@ struct burn_toc_entry
|
||||
/* min, sec, and frame may be too small if DVD extension is valid */
|
||||
int track_blocks;
|
||||
|
||||
/* ts A90909 : LRA extension. extensions_valid:bit1 */
|
||||
/* @since 0.7.2 */
|
||||
/* MMC-5 6.27.3.18 : The Last Recorded Address is valid for DVD-R,
|
||||
DVD-R DL when LJRS = 00b, DVD-RW, HD DVD-R, and BD-R.
|
||||
This would mean profiles: 0x11, 0x15, 0x13, 0x14, 0x51, 0x41, 0x42
|
||||
*/
|
||||
int last_recorded_address;
|
||||
};
|
||||
|
||||
|
||||
@ -741,6 +762,19 @@ int burn_abort_pacifier(void *handle, int patience, int elapsed);
|
||||
*/
|
||||
void burn_set_verbosity(int level);
|
||||
|
||||
/* ts A91111 */
|
||||
/** Enable resp. disable logging of SCSI commands (currently Linux only).
|
||||
This call can be made at any time - even before burn_initialize().
|
||||
It is in effect for all active drives and currently not very thread
|
||||
safe for multiple drives.
|
||||
@param flag Bitfield for control purposes. The default is 0.
|
||||
bit0= log to file /tmp/libburn_sg_command_log
|
||||
bit1= log to stderr
|
||||
bit2= flush output after each line
|
||||
@since 0.7.4
|
||||
*/
|
||||
void burn_set_scsi_logging(int flag);
|
||||
|
||||
/* ts A60813 */
|
||||
/** Set parameters for behavior on opening device files. To be called early
|
||||
after burn_initialize() and before any bus scan. But not mandatory at all.
|
||||
@ -1029,6 +1063,23 @@ int burn_drive_obtain_scsi_adr(char *path, int *bus_no, int *host_no,
|
||||
int burn_drive_grab(struct burn_drive *drive, int load);
|
||||
|
||||
|
||||
/* ts A90824 */
|
||||
/** Calm down or alert a drive. Some drives stay alert after reading for
|
||||
quite some time. This saves time with the startup for the next read
|
||||
operation but also causes noise and consumes extra energy. It makes
|
||||
sense to calm down the drive if no read operation is expected for the
|
||||
next few seconds. The drive will get alert automatically if operations
|
||||
are required.
|
||||
@param drive The drive to influence.
|
||||
@param flag Bitfield for control purposes
|
||||
bit0= become alert (else start snoozing)
|
||||
This is not mandatory to allow further drive operations
|
||||
@return 1= success , 0= drive role not suitable for calming
|
||||
@since 0.7.0
|
||||
*/
|
||||
int burn_drive_snooze(struct burn_drive *d, int flag);
|
||||
|
||||
|
||||
/** Release a drive. This should not be done until the drive is no longer
|
||||
busy (see burn_drive_get_status).
|
||||
Linux: The drive device file is not reserved afterwards. (O_EXCL, F_SETLK).
|
||||
@ -1108,6 +1159,61 @@ int burn_disc_read_atip(struct burn_drive *drive);
|
||||
int burn_drive_get_start_end_lba(struct burn_drive *drive,
|
||||
int *start_lba, int *end_lba, int flag);
|
||||
|
||||
|
||||
/* ts A90902 */
|
||||
/** Guess the manufacturer name of CD media from the ATIP addresses of lead-in
|
||||
and lead-out. (Currently only lead-in is interpreted. Lead-out may in
|
||||
future be used to identify the media type in more detail.)
|
||||
The parameters of this call should be obtained by burn_disc_read_atip(d),
|
||||
burn_drive_get_start_end_lba(d, &start_lba, &end_lba, 0),
|
||||
burn_lba_to_msf(start_lba, &m_li, &s_li, &f_li) and
|
||||
burn_lba_to_msf(end_lba, &m_lo, &s_lo, &f_lo).
|
||||
@param m_li "minute" part of ATIP lead-in resp. start_lba
|
||||
@param s_li "second" of lead-in resp. start_lba
|
||||
@param f_li "frame" of lead-in
|
||||
@param m_lo "minute" part of ATIP lead-out
|
||||
@param s_lo "second" of lead-out
|
||||
@param f_lo "frame" of lead-out
|
||||
@param flag Bitfield for control purposes,
|
||||
bit0= append a text "(aka ...)" to reply if other brands or
|
||||
vendor names are known.
|
||||
@return Printable text or NULL on memory shortage.
|
||||
Dispose by free() when no longer needed.
|
||||
@since 0.7.2
|
||||
*/
|
||||
char *burn_guess_cd_manufacturer(int m_li, int s_li, int f_li,
|
||||
int m_lo, int s_lo, int f_lo, int flag);
|
||||
|
||||
/* ts A90909 */
|
||||
/** Retrieve some media information which is mainly specific to CD. For other
|
||||
media only the bits in reply parameter valid are supposed to be meaningful.
|
||||
@param drive The drive to query.
|
||||
@param disc_type A string saying either "CD-DA or CD-ROM", or "CD-I",
|
||||
or ""CD-ROM XA", or "undefined".
|
||||
@param disc_id A 32 bit number read from the media. (Meaning unclear yet)
|
||||
@param bar_code 8 hex digits from a barcode on media read by the drive
|
||||
(if the drive has a bar code reader built in).
|
||||
@param app_code The Host Application Code which must be set in the Write
|
||||
Parameters Page if the media is not unrestricted (URU==0).
|
||||
@param valid Replies bits which indicate the validity of other reply
|
||||
parameters or the state of certain CD info bits:
|
||||
bit0= disc_type is valid
|
||||
bit1= disc_id is valid
|
||||
bit2= bar_code is valid
|
||||
bit3= disc_app_code is valid
|
||||
bit4= Disc is unrestricted (URU bit, 51h READ DISC INFO)
|
||||
This seems to be broken with my drives. The bit is
|
||||
0 and the validity bit for disc_app_code is 0 too.
|
||||
bit5= Disc is nominally erasable (Erasable bit)
|
||||
This will be set with overwriteable media which
|
||||
libburn normally considers to be unerasable blank.
|
||||
@since 0.7.2
|
||||
*/
|
||||
int burn_disc_get_cd_info(struct burn_drive *d, char disc_type[80],
|
||||
unsigned int *disc_id, char bar_code[9], int *app_code,
|
||||
int *valid);
|
||||
|
||||
|
||||
/* ts A61110 */
|
||||
/** Read start lba and Next Writeable Address of a track from media.
|
||||
Usually a track lba is obtained from the result of burn_track_get_entry().
|
||||
@ -1183,6 +1289,59 @@ off_t burn_disc_available_space(struct burn_drive *d,
|
||||
*/
|
||||
int burn_disc_get_profile(struct burn_drive *d, int *pno, char name[80]);
|
||||
|
||||
|
||||
/* ts A90903 : API */
|
||||
/** Obtain product id and standards defined media codes.
|
||||
The product id is a printable string which is supposed to be the same
|
||||
for identical media but should vary with non-identical media. Some media
|
||||
do not allow to obtain such an id at all.
|
||||
The pair (profile_number, product_id) should be the best id to identify
|
||||
media with identical product specifications.
|
||||
The reply parameters media_code1 and media_code2 can be used with
|
||||
burn_guess_manufacturer()
|
||||
The reply parameters have to be disposed by free() when no longer needed.
|
||||
@param d The drive where the media is inserted.
|
||||
@param product_id Reply: Printable text depicting manufacturer and
|
||||
eventually media id.
|
||||
@param media_code1 Reply: The eventual manufacturer identification as read
|
||||
from DVD/BD media or a text "XXmYYsZZf" from CD media
|
||||
ATIP lead-in.
|
||||
@param media_code2 The eventual media id as read from DVD+/BD media or a
|
||||
text "XXmYYsZZf" from CD ATIP lead-out.
|
||||
@param book_type Book type text for DVD and BD.
|
||||
Caution: is NULL with CD, even if return value says ok.
|
||||
@param flag Bitfield for control purposes
|
||||
bit0= do not escape " _/" (not suitable for
|
||||
burn_guess_manufacturer())
|
||||
@return 1= ok, product_id and media codes are valid,
|
||||
0= no product id_available, reply parameters are NULL
|
||||
<0= error
|
||||
@since 0.7.2
|
||||
*/
|
||||
int burn_disc_get_media_id(struct burn_drive *d,
|
||||
char **product_id, char **media_code1, char **media_code2,
|
||||
char **book_type, int flag);
|
||||
|
||||
|
||||
/* ts A90904 */
|
||||
/** Guess the name of a manufacturer by profile number, manufacturer code
|
||||
and media code. The profile number can be obtained by
|
||||
burn_disc_get_profile(), the other two parameters can be obtained as
|
||||
media_code1 and media_code2 by burn_get_media_product_id().
|
||||
@param profile_no Profile number (submit -1 if not known)
|
||||
@param manuf_code Manufacturer code from media (e.g. "RICOHJPN")
|
||||
@param media_code Media ID code from media (e.g. "W11")
|
||||
@param flag Bitfield for control purposes, submit 0
|
||||
@return Printable text or NULL on memory shortage.
|
||||
If the text begins with "Unknown " then no item of the
|
||||
manufacturer list matched the codes.
|
||||
Dispose by free() when no longer needed.
|
||||
@since 0.7.2
|
||||
*/
|
||||
char *burn_guess_manufacturer(int profile_no,
|
||||
char *manuf_code, char *media_code, int flag);
|
||||
|
||||
|
||||
/** Tells whether a disc can be erased or not
|
||||
@param d The drive to inquire.
|
||||
@return Non-zero means erasable
|
||||
@ -1419,9 +1578,11 @@ void burn_drive_cancel(struct burn_drive *drive);
|
||||
|
||||
|
||||
/* ts A61223 */
|
||||
/** Inquire whether the most recent write run was successful. Reasons for
|
||||
non-success may be: rejection of burn parameters, abort during fatal errors
|
||||
during write, a call to burn_drive_cancel() by the application thread.
|
||||
/** Inquire whether the most recent asynchronous media job was successful.
|
||||
This applies to burn_disc_erase(), burn_disc_format(), burn_disc_write().
|
||||
Reasons for non-success may be: rejection of burn parameters, abort due to
|
||||
fatal errors during write, blank or format, a call to burn_drive_cancel()
|
||||
by the application thread.
|
||||
@param d The drive to inquire.
|
||||
@return 1=burn seems to have went well, 0=burn failed
|
||||
@since 0.2.6
|
||||
@ -1546,6 +1707,22 @@ void burn_track_define_data(struct burn_track *t, int offset, int tail,
|
||||
int burn_track_set_byte_swap(struct burn_track *t, int swap_source_bytes);
|
||||
|
||||
|
||||
/* ts A90910 */
|
||||
/** Activates CD XA compatibility modes.
|
||||
libburn currently writes data only in CD mode 1. Some programs insist in
|
||||
sending data with additional management bytes. These bytes have to be
|
||||
stripped in order to make the input suitable for BURN_MODE1.
|
||||
@param t The track to manipulate
|
||||
@param value 0= no conversion
|
||||
1= strip 8 byte sector headers of CD-ROM XA mode 2 form 1
|
||||
see MMC-5 4.2.3.8.5.3 Block Format for Mode 2 form 1 Data
|
||||
all other values are reserved
|
||||
@return 1=success , 0=unacceptable value
|
||||
@since 0.7.2
|
||||
*/
|
||||
int burn_track_set_cdxa_conv(struct burn_track *t, int value);
|
||||
|
||||
|
||||
/** Set the ISRC details for a track
|
||||
@param t The track to change
|
||||
@param country the 2 char country code. Each character must be
|
||||
@ -1613,6 +1790,58 @@ void burn_source_free(struct burn_source *s);
|
||||
struct burn_source *burn_file_source_new(const char *path,
|
||||
const char *subpath);
|
||||
|
||||
|
||||
/* ts A91122 : An interface to open(O_DIRECT) or similar OS tricks. */
|
||||
|
||||
/** Opens a file with eventual acceleration preparations which may depend
|
||||
on the operating system and on compile time options of libburn.
|
||||
You may use this call instead of open(2) for opening file descriptors
|
||||
which shall be handed to burn_fd_source_new().
|
||||
This should only be done for tracks with BURN_BLOCK_MODE1 (2048 bytes
|
||||
per block).
|
||||
|
||||
If you use this call then you MUST allocate the buffers which you use
|
||||
with read(2) by call burn_os_alloc_buffer(). Read sizes MUST be a multiple
|
||||
of a safe buffer amount. Else you risk that track data get altered during
|
||||
transmission.
|
||||
burn_disk_write() will allocate a suitable read/write buffer for its own
|
||||
operations. A fifo created by burn_fifo_source_new() will allocate
|
||||
suitable memory for its buffer if called with flag bit0 and a multiple
|
||||
of a safe buffer amount.
|
||||
@param path The file address to open
|
||||
@param open_flags The flags as of man 2 open. Normally just O_RDONLY.
|
||||
@param flag Bitfield for control purposes (unused yet, submit 0).
|
||||
@return A file descriptor as of open(2). Finally to be disposed
|
||||
by close(2).
|
||||
-1 indicates failure.
|
||||
@since 0.7.4
|
||||
*/
|
||||
int burn_os_open_track_src(char *path, int open_flags, int flag);
|
||||
|
||||
/** Allocate a memory area that is suitable for reading with a file descriptor
|
||||
opened by burn_os_open_track_src().
|
||||
@param amount Number of bytes to allocate. This should be a multiple
|
||||
of the operating system's i/o block size. 32 KB is
|
||||
guaranteed by libburn to be safe.
|
||||
@param flag Bitfield for control purposes (unused yet, submit 0).
|
||||
@return The address of the allocated memory, or NULL on failure.
|
||||
A non-NULL return value has finally to be disposed via
|
||||
burn_os_free_buffer().
|
||||
@since 0.7.4
|
||||
*/
|
||||
void *burn_os_alloc_buffer(size_t amount, int flag);
|
||||
|
||||
/** Dispose a memory area which was obtained by burn_os_alloc_buffer(),
|
||||
@param buffer Memory address to be freed.
|
||||
@param amount The number of bytes which was allocated at that
|
||||
address.
|
||||
@param flag Bitfield for control purposes (unused yet, submit 0).
|
||||
@return 1 success , <=0 failure
|
||||
@since 0.7.4
|
||||
*/
|
||||
int burn_os_free_buffer(void *buffer, size_t amount, int flag);
|
||||
|
||||
|
||||
/** Creates a data source for an image file (a track) from an open
|
||||
readable filedescriptor, an eventually open readable subcodes file
|
||||
descriptor and eventually a fixed size in bytes.
|
||||
@ -1642,14 +1871,26 @@ struct burn_source *burn_fd_source_new(int datafd, int subfd, off_t size);
|
||||
@param inp The burn_source for which the fifo shall act as proxy.
|
||||
It can be disposed by burn_source_free() immediately
|
||||
after this call.
|
||||
@param chunksize The size in bytes of a chunk. Use 2048 for sources
|
||||
suitable for BURN_BLOCK_MODE1 and 2352 for sources
|
||||
which deliver for BURN_BLOCK_AUDIO.
|
||||
@param chunksize The size in bytes of a chunk.
|
||||
Use 2048 for sources suitable for BURN_BLOCK_MODE1,
|
||||
2352 for sources which deliver for BURN_BLOCK_AUDIO,
|
||||
2056 for sources which shall get treated by
|
||||
burn_track_set_cdxa_conv(track, 1).
|
||||
Some variations of burn_source might work only with
|
||||
a particular chunksize. E.g. libisofs demands 2048.
|
||||
@param chunks The number of chunks to be allocated in ring buffer.
|
||||
This value must be >= 2.
|
||||
@param flag Bitfield for control purposes (unused yet, submit 0).
|
||||
@param flag Bitfield for control purposes:
|
||||
bit0= The read method of inp is capable of delivering
|
||||
arbitrary amounts of data per call. Not only one
|
||||
sector.
|
||||
Suitable for inp from burn_file_source_new()
|
||||
and burn_fd_source_new() if not the fd has
|
||||
exotic limitations on read size.
|
||||
You MUST use this on inp which uses an fd opened
|
||||
with burn_os_open_track_src().
|
||||
Better do not use with other inp types.
|
||||
@since 0.7.4
|
||||
@return A pointer to the newly created burn_source.
|
||||
Later both burn_sources, inp and the returned fifo, have
|
||||
to be disposed by calling burn_source_free() for each.
|
||||
@ -1682,12 +1923,43 @@ struct burn_source *burn_fifo_source_new(struct burn_source *inp,
|
||||
int burn_fifo_inquire_status(struct burn_source *fifo, int *size,
|
||||
int *free_bytes, char **status_text);
|
||||
|
||||
/* ts A91125 */
|
||||
/** Inquire various counters which reflect the fifo operation.
|
||||
@param fifo The fifo object to inquire
|
||||
@param total_min_fill The minimum number of bytes in the fifo. Beginning
|
||||
from the moment when fifo consumption is enabled.
|
||||
@param interval_min_fill The minimum byte number beginning from the moment
|
||||
when fifo consumption is enabled or from the
|
||||
most recent moment when burn_fifo_next_interval()
|
||||
was called.
|
||||
@param put_counter The number of data transactions into the fifo.
|
||||
@param get_counter The number of data transactions out of the fifo.
|
||||
@param empty_counter The number of times the fifo was empty.
|
||||
@param full_counter The number of times the fifo was full.
|
||||
@since 0.7.4
|
||||
*/
|
||||
void burn_fifo_get_statistics(struct burn_source *source,
|
||||
int *total_min_fill, int *interval_min_fill,
|
||||
int *put_counter, int *get_counter,
|
||||
int *empty_counter, int *full_counter);
|
||||
|
||||
/* ts A91125 */
|
||||
/** Inquire the fifo minimum fill counter for intervals and reset that counter.
|
||||
@param fifo The fifo object to inquire
|
||||
@param interval_min_fill The minimum number of bytes in the fifo. Beginning
|
||||
from the moment when fifo consumption is enabled
|
||||
or from the most recent moment when
|
||||
burn_fifo_next_interval() was called.
|
||||
@since 0.7.4
|
||||
*/
|
||||
void burn_fifo_next_interval(struct burn_source *source,
|
||||
int *interval_min_fill);
|
||||
|
||||
/* ts A80713 */
|
||||
/** Obtain a preview of the first input data of a fifo which was created
|
||||
by burn_fifo_source_new(). The data will later be delivered normally to
|
||||
the consumer track of the fifo.
|
||||
bufsize may not be larger than the fifo size (chunk_size * chunks).
|
||||
bufsize may not be larger than the fifo size (chunk_size * chunks) - 32k.
|
||||
This call will succeed only if data consumption by the track has not
|
||||
started yet, i.e. best before the call to burn_disc_write().
|
||||
It will start the worker thread of the fifo with the expectable side
|
||||
@ -1695,9 +1967,9 @@ int burn_fifo_inquire_status(struct burn_source *fifo, int *size,
|
||||
data have arrived or until it becomes clear that this will not happen.
|
||||
The call may be repeated with increased bufsize. It will always yield
|
||||
the bytes beginning from the first one in the fifo.
|
||||
@param fifo The fifo object to inquire
|
||||
@param fifo The fifo object to inquire resp. start
|
||||
@param buf Pointer to memory of at least bufsize bytes where to
|
||||
deliver the peeked data
|
||||
deliver the peeked data.
|
||||
@param bufsize Number of bytes to peek from the start of the fifo data
|
||||
@param flag Bitfield for control purposes (unused yet, submit 0).
|
||||
@return <0 on severe error, 0 if not enough data, 1 if bufsize bytes read
|
||||
@ -1706,6 +1978,22 @@ int burn_fifo_inquire_status(struct burn_source *fifo, int *size,
|
||||
int burn_fifo_peek_data(struct burn_source *source, char *buf, int bufsize,
|
||||
int flag);
|
||||
|
||||
/* ts A91125 */
|
||||
/** Start the fifo worker thread and wait either until the requested number
|
||||
of bytes have arrived or until it becomes clear that this will not happen.
|
||||
Filling will go on asynchronously after burn_fifo_fill() returned.
|
||||
This call and burn_fifo_peek_data() do not disturb each other.
|
||||
@param fifo The fifo object to start
|
||||
@param fill Number of bytes desired. Expect to get return 1 if
|
||||
at least fifo size - 32k were read.
|
||||
@param flag Bitfield for control purposes.
|
||||
bit0= fill fifo to maximum size
|
||||
@return <0 on severe error, 0 if not enough data,
|
||||
1 if desired amount or fifo full
|
||||
@since 0.7.4
|
||||
*/
|
||||
int burn_fifo_fill(struct burn_source *source, int bufsize, int flag);
|
||||
|
||||
|
||||
/* ts A70328 */
|
||||
/** Sets a fixed track size after the data source object has already been
|
||||
@ -1942,6 +2230,32 @@ void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force);
|
||||
void burn_write_opts_set_stream_recording(struct burn_write_opts *opts,
|
||||
int value);
|
||||
|
||||
/* ts A91115 */
|
||||
/** Overrides the write chunk size for DVD and BD media which is normally
|
||||
determined according to media type and setting of stream recording.
|
||||
A chunk size of 64 KB may improve throughput with bus systems which show
|
||||
latency problems.
|
||||
@param opts The write opts to change
|
||||
@param obs Number of bytes which shall be sent by a single write command.
|
||||
0 means automatic size, 32768 and 65336 are the only other
|
||||
accepted sizes for now.
|
||||
@since 0.7.4
|
||||
*/
|
||||
void burn_write_opts_set_dvd_obs(struct burn_write_opts *opts, int obs);
|
||||
|
||||
/* 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
|
||||
from being clogged with lots of pending data for slow devices.
|
||||
@param opts The write opts to change
|
||||
@param rythm Number of 2KB output blocks after which fsync(2) is
|
||||
performed. -1 means no fsync(), 0 means default,
|
||||
elsewise the value must be >= 32.
|
||||
Default is currently 8192 = 16 MB.
|
||||
@since 0.7.4
|
||||
*/
|
||||
void burn_write_opts_set_stdio_fsync(struct burn_write_opts *opts, int rythm);
|
||||
|
||||
|
||||
/** Sets whether to read in raw mode or not
|
||||
@param opts The read opts to change
|
||||
@ -1998,6 +2312,34 @@ void burn_read_opts_transfer_damaged_blocks(struct burn_read_opts *opts,
|
||||
void burn_read_opts_set_hardware_error_retries(struct burn_read_opts *opts,
|
||||
unsigned char hardware_error_retries);
|
||||
|
||||
|
||||
/* ts A90815 */
|
||||
/** Gets the list of profile codes supported by the drive.
|
||||
Profiles depict the feature sets which constitute media types. For
|
||||
known profile codes and names see burn_disc_get_profile().
|
||||
@param d is the drive to query
|
||||
@param num_profiles returns the number of supported profiles
|
||||
@param profiles returns the profile codes
|
||||
@param is_current returns the status of the corresponding profile code:
|
||||
1= current, i.e. the matching media is loaded
|
||||
0= not current, i.e. the matching media is not loaded
|
||||
@return always 1 for now
|
||||
@since 0.7.0
|
||||
*/
|
||||
int burn_drive_get_all_profiles(struct burn_drive *d, int *num_profiles,
|
||||
int profiles[64], char is_current[64]);
|
||||
|
||||
|
||||
/* ts A90815 */
|
||||
/** Obtains the profile name associated with a profile code.
|
||||
@param profile_code the profile code to be translated
|
||||
@param name returns the profile name (e.g. "DVD+RW")
|
||||
@return 1= known profile code , 0= unknown profile code
|
||||
@since 0.7.0
|
||||
*/
|
||||
int burn_obtain_profile_name(int profile_code, char name[80]);
|
||||
|
||||
|
||||
/** Gets the maximum write speed for a drive and eventually loaded media.
|
||||
The return value might change by the media type of already loaded media,
|
||||
again by call burn_drive_grab() and again by call burn_disc_read_atip().
|
||||
@ -2259,8 +2601,8 @@ void burn_version(int *major, int *minor, int *micro);
|
||||
|
||||
*/
|
||||
#define burn_header_version_major 0
|
||||
#define burn_header_version_minor 6
|
||||
#define burn_header_version_micro 7
|
||||
#define burn_header_version_minor 7
|
||||
#define burn_header_version_micro 4
|
||||
/** Note:
|
||||
Above version numbers are also recorded in configure.ac because libtool
|
||||
wants them as parameters at build time.
|
||||
@ -2551,11 +2893,44 @@ int burn_drive_get_drive_role(struct burn_drive *d);
|
||||
int burn_drive_equals_adr(struct burn_drive *d1, char *adr2, int drive_role2);
|
||||
|
||||
|
||||
|
||||
#ifndef DOXYGEN
|
||||
|
||||
BURN_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* ts A91205 */
|
||||
/* The following experiments may be interesting in future:
|
||||
*/
|
||||
|
||||
/* Perform OPC explicitely.
|
||||
# define Libburn_pioneer_dvr_216d_with_opC 1
|
||||
*/
|
||||
|
||||
/* Load mode page 5 and modify it rather than composing from scratch.
|
||||
# define Libburn_pioneer_dvr_216d_load_mode5 1
|
||||
*/
|
||||
|
||||
/* Inquire drive events and react by reading configuration or starting unit.
|
||||
# define Libburn_pioneer_dvr_216d_get_evenT 1
|
||||
*/
|
||||
|
||||
/* ts A91112 */
|
||||
/* Do not probe CD modes but declare only data and audio modes supported.
|
||||
For other modes resp. real probing one has to call
|
||||
burn_drive_probe_cd_write_modes().
|
||||
|
||||
# define Libburn_pioneer_dvr_216d_dummy_probe_wM 1
|
||||
*/
|
||||
#ifdef Libburn_pioneer_dvr_216d_dummy_probe_wM
|
||||
|
||||
/* Probe available CD write modes and block types.
|
||||
@param drive_info drive object to be inquired
|
||||
*/
|
||||
int burn_drive_probe_cd_write_modes(struct burn_drive_info *drive_info)
|
||||
|
||||
#endif /* Libburn_pioneer_dvr_216d_dummy_probe_wM */
|
||||
|
||||
|
||||
#endif /*LIBBURN_H*/
|
||||
|
@ -528,7 +528,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
|
||||
0x00020159 (DEBUG,HIGH) = TOC Format 0 returns inconsistent data
|
||||
0x0002015a (NOTE,HIGH) = Could not examine busy device
|
||||
0x0002015b (HINT,HIGH) = Busy '...' seems to be a hard disk, as '...1' exists
|
||||
0x0002015c (FAILURE,HIGH) = Fifo size is smaller than desired peek buffer
|
||||
0x0002015c (FAILURE,HIGH) = Fifo size too small for desired peek buffer
|
||||
0x0002015d (FAILURE,HIGH) = Fifo input ended short of desired peek buffer size
|
||||
0x0002015e (FATAL,HIGH) = Fifo is already under consumption when peeking
|
||||
0x0002015f (MISHAP,HIGH) = Damaged CD table-of-content detected and truncated
|
||||
@ -549,6 +549,9 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
|
||||
0x0002016f (DEBUG,HIGH) = Unable to grab scanned drive
|
||||
0x00020170 (NOTE,HIGH) = Closing open session before writing new one
|
||||
0x00020171 (NOTE,HIGH) = Closing BD-R with accidently open session
|
||||
0x00020172 (SORRY,HIGH) = Read start address larger than number of readable blocks
|
||||
0x00020173 (FAILURE,HIGH) = Drive tells NWA smaller than last written address
|
||||
0x00020174 (SORRY,HIGH) = Fifo alignment does not allow desired read size
|
||||
|
||||
|
||||
libdax_audioxtr:
|
||||
|
671
libburn/mmc.c
671
libburn/mmc.c
File diff suppressed because it is too large
Load Diff
@ -68,6 +68,9 @@ int mmc_compose_mode_page_5(struct burn_drive *d,
|
||||
const struct burn_write_opts *o,
|
||||
unsigned char *pd);
|
||||
|
||||
/* ts A70201 */
|
||||
int mmc_four_char_to_int(unsigned char *data);
|
||||
|
||||
/* ts A70812 : return 0 = ok , return BE_CANCELLED = error occured */
|
||||
int mmc_read_10(struct burn_drive *d, int start, int amount,
|
||||
struct buffer *buf);
|
||||
@ -75,8 +78,27 @@ int mmc_read_10(struct burn_drive *d, int start, int amount,
|
||||
/* ts A81210 : Determine the upper limit of readable data size */
|
||||
int mmc_read_capacity(struct burn_drive *d);
|
||||
|
||||
/* ts A61201 */
|
||||
char *mmc_obtain_profile_name(int profile_number);
|
||||
|
||||
|
||||
/* mmc5r03c.pdf 4.3.4.4.1 d) "The maximum number of RZones is 2 302." */
|
||||
#define BURN_MMC_FAKE_TOC_MAX_SIZE 2302
|
||||
|
||||
|
||||
/* ts A90903 */
|
||||
/* MMC backend of API call burn_get_media_product_id()
|
||||
*/
|
||||
int mmc_get_media_product_id(struct burn_drive *d,
|
||||
char **product_id, char **media_code1, char **media_code2,
|
||||
char **book_type, int flag);
|
||||
|
||||
|
||||
/* ts A60910 (estimated) */
|
||||
int mmc_function_spy(struct burn_drive *d, char * text);
|
||||
|
||||
/* ts A91118 */
|
||||
int mmc_start_if_needed(struct burn_drive *d, int flag);
|
||||
|
||||
|
||||
#endif /*__MMC*/
|
||||
|
@ -39,6 +39,8 @@ struct burn_write_opts *burn_write_opts_new(struct burn_drive *drive)
|
||||
opts->fill_up_media = 0;
|
||||
opts->force_is_set = 0;
|
||||
opts->do_stream_recording = 0;
|
||||
opts->dvd_obs_override = 0;
|
||||
opts->stdio_fsync_size = Libburn_stdio_fsync_limiT;
|
||||
opts->has_mediacatalog = 0;
|
||||
opts->format = BURN_CDROM;
|
||||
opts->multi = 0;
|
||||
@ -389,6 +391,25 @@ void burn_write_opts_set_stream_recording(struct burn_write_opts *opts,
|
||||
}
|
||||
|
||||
|
||||
/* ts A91115: API */
|
||||
void burn_write_opts_set_dvd_obs(struct burn_write_opts *opts, int obs)
|
||||
{
|
||||
if (obs != 0 && obs != 32 * 1024 && obs != 64 * 1024)
|
||||
return;
|
||||
opts->dvd_obs_override = obs;
|
||||
}
|
||||
|
||||
|
||||
/* ts A91115: API */
|
||||
void burn_write_opts_set_stdio_fsync(struct burn_write_opts *opts, int rythm)
|
||||
{
|
||||
if (rythm == -1)
|
||||
opts->stdio_fsync_size = 0;
|
||||
else if (rythm == 0)
|
||||
opts->stdio_fsync_size = Libburn_stdio_fsync_limiT;
|
||||
else if (rythm >= 32)
|
||||
opts->stdio_fsync_size = rythm;
|
||||
}
|
||||
|
||||
|
||||
/* ts A70901: API */
|
||||
|
@ -51,9 +51,19 @@ struct burn_write_opts
|
||||
|
||||
/* ts A80412 : whether to use WRITE12 with Streaming bit set
|
||||
rather than WRITE10. Speeds up DVD-RAM. Might help with BD-RE.
|
||||
This gets transferred to burn_drive.do_stream_recording */
|
||||
This gets transferred to burn_drive.do_stream_recording
|
||||
*/
|
||||
int do_stream_recording;
|
||||
|
||||
/* ts A91115 : override value for .obs on DVD media.
|
||||
Only values 0, 32K and 64K are allowed for now. */
|
||||
int dvd_obs_override;
|
||||
|
||||
/* ts A91115 : size of the fsync() interval for stdio writing.
|
||||
Values 0 or >= 32 counted in 2 KB blocks. */
|
||||
int stdio_fsync_size;
|
||||
|
||||
|
||||
/** A disc can have a media catalog number */
|
||||
int has_mediacatalog;
|
||||
unsigned char mediacatalog[13];
|
||||
@ -64,6 +74,11 @@ struct burn_write_opts
|
||||
unsigned char multi;
|
||||
};
|
||||
|
||||
/* Default value for burn_write_opts.stdio_flush_size
|
||||
*/
|
||||
#define Libburn_stdio_fsync_limiT 8192
|
||||
|
||||
|
||||
/** Options for disc reading operations. This should be created with
|
||||
burn_read_opts_new() and freed with burn_read_opts_free(). */
|
||||
struct burn_read_opts
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "crc.h"
|
||||
#include "debug.h"
|
||||
#include "init.h"
|
||||
#include "lec.h"
|
||||
#include "toc.h"
|
||||
#include "util.h"
|
||||
#include "sg.h"
|
||||
@ -371,6 +370,20 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
|
||||
msg, 0, 0);
|
||||
return 0;
|
||||
}
|
||||
if (d->media_read_capacity != 0x7fffffff && byte_address >=
|
||||
((off_t) d->media_read_capacity + (off_t) 1) * (off_t) 2048) {
|
||||
if (!(flag & 2)) {
|
||||
sprintf(msg,
|
||||
"Read start address %ds larger than number of readable blocks %d",
|
||||
(int) (byte_address / 2048 + !!(byte_address % 2048)),
|
||||
d->media_read_capacity);
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||
0x00020172,
|
||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||
msg, 0, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (d->busy != BURN_DRIVE_IDLE) {
|
||||
libdax_msgs_submit(libdax_messenger,
|
||||
|
102
libburn/sbc.c
102
libburn/sbc.c
@ -17,10 +17,31 @@
|
||||
int mmc_function_spy(struct burn_drive *d, char * text);
|
||||
|
||||
|
||||
/* spc command set */
|
||||
/* START STOP UNIT as of SBC-1 and SBC-2
|
||||
0: Opcode 0x1B
|
||||
1: bit0= Immed
|
||||
bit1-7= reserved
|
||||
2: reserved
|
||||
3: reserved
|
||||
4: bit0= Start (else Stop unit)
|
||||
bit1= Load/Eject (according to Start resp. Stop)
|
||||
bit2-3= reserved
|
||||
bit4-7= Power Condition
|
||||
0= Start Valid: process Start and Load/Eject bits
|
||||
1= assume Active state
|
||||
2= assume Idle state
|
||||
3= assume Stanby state
|
||||
(5= SBC-1 only: assume Sleep state)
|
||||
7= transfer control of power conditions to logical unit
|
||||
10= force idle condition timer to 0
|
||||
11= force standby condition timer to 0
|
||||
All others are reserved.
|
||||
5: Control (set to 0)
|
||||
*/
|
||||
static unsigned char SBC_LOAD[] = { 0x1b, 0, 0, 0, 3, 0 };
|
||||
static unsigned char SBC_UNLOAD[] = { 0x1b, 0, 0, 0, 2, 0 };
|
||||
static unsigned char SBC_START_UNIT[] = { 0x1b, 0, 0, 0, 1, 0 };
|
||||
static unsigned char SBC_STOP_UNIT[] = { 0x1b, 0, 0, 0, 0, 0 };
|
||||
|
||||
void sbc_load(struct burn_drive *d)
|
||||
{
|
||||
@ -30,11 +51,6 @@ void sbc_load(struct burn_drive *d)
|
||||
return;
|
||||
|
||||
scsi_init_command(&c, SBC_LOAD, sizeof(SBC_LOAD));
|
||||
/*
|
||||
memcpy(c.opcode, SBC_LOAD, sizeof(SBC_LOAD));
|
||||
c.oplen = sizeof(SBC_LOAD);
|
||||
c.page = NULL;
|
||||
*/
|
||||
c.retry = 1;
|
||||
|
||||
/* ts A70921 : Had to revoke Immed because of LG GSA-4082B */
|
||||
@ -58,14 +74,7 @@ void sbc_eject(struct burn_drive *d)
|
||||
return;
|
||||
|
||||
scsi_init_command(&c, SBC_UNLOAD, sizeof(SBC_UNLOAD));
|
||||
/*
|
||||
memcpy(c.opcode, SBC_UNLOAD, sizeof(SBC_UNLOAD));
|
||||
c.oplen = sizeof(SBC_UNLOAD);
|
||||
c.page = NULL;
|
||||
*/
|
||||
|
||||
c.opcode[1] |= 1; /* ts A70918 : Immed */
|
||||
|
||||
c.page = NULL;
|
||||
c.dir = NO_TRANSFER;
|
||||
d->issue_command(d, &c);
|
||||
@ -75,33 +84,74 @@ void sbc_eject(struct burn_drive *d)
|
||||
spc_wait_unit_attention(d, 1800, "STOP UNIT (+ EJECT)", 0);
|
||||
}
|
||||
|
||||
/* ts A61118 : is it necessary to tell the drive to get ready for use ? */
|
||||
int sbc_start_unit(struct burn_drive *d)
|
||||
|
||||
/* ts A91112 : Now with flag */
|
||||
/* @param flag bit0= asynchronous waiting
|
||||
*/
|
||||
int sbc_start_unit_flag(struct burn_drive *d, int flag)
|
||||
{
|
||||
struct command c;
|
||||
int ret;
|
||||
|
||||
if (mmc_function_spy(d, "start_unit") <= 0)
|
||||
return 0;
|
||||
|
||||
scsi_init_command(&c, SBC_START_UNIT, sizeof(SBC_START_UNIT));
|
||||
/*
|
||||
memcpy(c.opcode, SBC_START_UNIT, sizeof(SBC_START_UNIT));
|
||||
c.oplen = sizeof(SBC_START_UNIT);
|
||||
c.page = NULL;
|
||||
*/
|
||||
c.retry = 1;
|
||||
|
||||
c.opcode[1] |= 1; /* ts A70918 : Immed */
|
||||
|
||||
c.opcode[1] |= (flag & 1); /* ts A70918 : Immed */
|
||||
c.dir = NO_TRANSFER;
|
||||
d->issue_command(d, &c);
|
||||
if (c.error)
|
||||
return 0;
|
||||
/* ts A70918 : now asynchronous */
|
||||
return spc_wait_unit_attention(d, 1800, "START UNIT", 0);
|
||||
if (!(flag & 1))
|
||||
return 1;
|
||||
/* ts A70918 : asynchronous */
|
||||
ret = spc_wait_unit_attention(d, 1800, "START UNIT", 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
int sbc_start_unit(struct burn_drive *d)
|
||||
{
|
||||
int ret;
|
||||
|
||||
d->is_stopped = 0; /* no endless starting attempts */
|
||||
|
||||
/* Asynchronous, not to block controller by waiting */
|
||||
ret = sbc_start_unit_flag(d, 1);
|
||||
if (ret <= 0)
|
||||
return ret;
|
||||
/* Synchronous to catch Pioneer DVR-216D which is ready too early.
|
||||
A pending START UNIT can prevent ejecting of the tray.
|
||||
*/
|
||||
ret = sbc_start_unit_flag(d, 0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* ts A90824 : Trying to reduce drive noise */
|
||||
int sbc_stop_unit(struct burn_drive *d)
|
||||
{
|
||||
struct command c;
|
||||
int ret;
|
||||
|
||||
if (mmc_function_spy(d, "stop_unit") <= 0)
|
||||
return 0;
|
||||
|
||||
scsi_init_command(&c, SBC_STOP_UNIT, sizeof(SBC_STOP_UNIT));
|
||||
c.retry = 0;
|
||||
c.opcode[1] |= 1; /* Immed */
|
||||
c.dir = NO_TRANSFER;
|
||||
d->issue_command(d, &c);
|
||||
if (c.error)
|
||||
return 0;
|
||||
ret = spc_wait_unit_attention(d, 1800, "STOP UNIT", 0);
|
||||
d->is_stopped = 1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ts A61021 : the sbc specific part of sg.c:enumerate_common()
|
||||
*/
|
||||
int sbc_setup_drive(struct burn_drive *d)
|
||||
@ -109,6 +159,8 @@ int sbc_setup_drive(struct burn_drive *d)
|
||||
d->eject = sbc_eject;
|
||||
d->load = sbc_load;
|
||||
d->start_unit = sbc_start_unit;
|
||||
d->stop_unit = sbc_stop_unit;
|
||||
d->is_stopped = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
104
libburn/sector.c
104
libburn/sector.c
@ -15,10 +15,14 @@
|
||||
#include "sector.h"
|
||||
#include "crc.h"
|
||||
#include "debug.h"
|
||||
#include "lec.h"
|
||||
#include "toc.h"
|
||||
#include "write.h"
|
||||
|
||||
#include "libdax_msgs.h"
|
||||
extern struct libdax_msgs *libdax_messenger;
|
||||
|
||||
#include "ecma130ab.h"
|
||||
|
||||
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
/* <<< ts A61031 */
|
||||
@ -206,8 +210,7 @@ static unsigned char *get_sector(struct burn_write_opts *opts,
|
||||
{
|
||||
struct burn_drive *d = opts->drive;
|
||||
struct buffer *out = d->buffer;
|
||||
int outmode;
|
||||
int seclen;
|
||||
int outmode, seclen;
|
||||
unsigned char *ret;
|
||||
|
||||
outmode = get_outmode(opts);
|
||||
@ -223,6 +226,7 @@ static unsigned char *get_sector(struct burn_write_opts *opts,
|
||||
seclen += burn_subcode_length(outmode);
|
||||
|
||||
/* ts A61219 : opts->obs is eventually a 32k trigger for DVD */
|
||||
/* (there is enough buffer size reserve for track->cdxa_conversion) */
|
||||
if (out->bytes + seclen > BUFFER_SIZE ||
|
||||
(opts->obs > 0 && out->bytes + seclen > opts->obs)) {
|
||||
int err;
|
||||
@ -242,7 +246,6 @@ static unsigned char *get_sector(struct burn_write_opts *opts,
|
||||
out->bytes = 0;
|
||||
out->sectors = 0;
|
||||
}
|
||||
|
||||
ret = out->data + out->bytes;
|
||||
out->bytes += seclen;
|
||||
out->sectors++;
|
||||
@ -299,7 +302,17 @@ static int convert_data(struct burn_write_opts *o, struct burn_track *track,
|
||||
return 0;
|
||||
|
||||
if ((outmode & BURN_MODE_BITS) == (inmode & BURN_MODE_BITS)) {
|
||||
/* see MMC-5 4.2.3.8.5.3 Block Format for Mode 2 form 1 Data
|
||||
Table 24 Mode 2 Formed Sector Sub-header Format */
|
||||
if (track != NULL)
|
||||
if (track->cdxa_conversion == 1)
|
||||
inlen += 8;
|
||||
|
||||
get_bytes(track, inlen, data);
|
||||
|
||||
if (track != NULL)
|
||||
if (track->cdxa_conversion == 1)
|
||||
memmove(data, data + 8, inlen - 8);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -413,7 +426,8 @@ int sector_toc(struct burn_write_opts *o, int mode)
|
||||
return 0;
|
||||
subcode_toc(d, mode, subs);
|
||||
convert_subs(o, mode, subs, data);
|
||||
sector_headers(o, data, mode, 1);
|
||||
if (sector_headers(o, data, mode, 1) <= 0)
|
||||
return 0;
|
||||
sector_common(++)
|
||||
return 1;
|
||||
}
|
||||
@ -433,7 +447,8 @@ int sector_pregap(struct burn_write_opts *o,
|
||||
return 0;
|
||||
subcode_user(o, subs, tno, control, 0, NULL, 1);
|
||||
convert_subs(o, mode, subs, data);
|
||||
sector_headers(o, data, mode, 0);
|
||||
if (sector_headers(o, data, mode, 0) <= 0)
|
||||
return 0;
|
||||
sector_common(--)
|
||||
return 1;
|
||||
}
|
||||
@ -450,11 +465,12 @@ int sector_postgap(struct burn_write_opts *o,
|
||||
return 0;
|
||||
/* ts A61010 */
|
||||
if (convert_data(o, NULL, mode, data) <= 0)
|
||||
return 0;;
|
||||
return 0;
|
||||
/* use last index in track */
|
||||
subcode_user(o, subs, tno, control, 1, NULL, 1);
|
||||
convert_subs(o, mode, subs, data);
|
||||
sector_headers(o, data, mode, 0);
|
||||
if (sector_headers(o, data, mode, 0) <= 0)
|
||||
return 0;
|
||||
sector_common(++)
|
||||
return 1;
|
||||
}
|
||||
@ -625,7 +641,8 @@ int sector_lout(struct burn_write_opts *o, unsigned char control, int mode)
|
||||
return 0;
|
||||
subcode_lout(o, control, subs);
|
||||
convert_subs(o, mode, subs, data);
|
||||
sector_headers(o, data, mode, 0);
|
||||
if (sector_headers(o, data, mode, 0) <= 0)
|
||||
return 0;
|
||||
sector_common(++)
|
||||
return 1;
|
||||
}
|
||||
@ -660,7 +677,8 @@ int sector_data(struct burn_write_opts *o, struct burn_track *t, int psub)
|
||||
t->entry->control, 1, &t->isrc, psub);
|
||||
convert_subs(o, t->mode, subs, data);
|
||||
|
||||
sector_headers(o, data, t->mode, 0);
|
||||
if (sector_headers(o, data, t->mode, 0) <= 0)
|
||||
return 0;
|
||||
sector_common(++)
|
||||
return 1;
|
||||
}
|
||||
@ -711,42 +729,27 @@ int sector_headers_is_ok(struct burn_write_opts *o, int mode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void sector_headers(struct burn_write_opts *o, unsigned char *out,
|
||||
/* ts A90830 : changed return type to int
|
||||
@return 0= failure
|
||||
1= success
|
||||
*/
|
||||
int sector_headers(struct burn_write_opts *o, unsigned char *out,
|
||||
int mode, int leadin)
|
||||
{
|
||||
|
||||
#ifdef Libburn_ecma130ab_includeD
|
||||
|
||||
struct burn_drive *d = o->drive;
|
||||
unsigned int crc;
|
||||
int min, sec, frame;
|
||||
int modebyte = -1;
|
||||
|
||||
/* ts A61009 */
|
||||
#if 1
|
||||
int ret;
|
||||
|
||||
ret = sector_headers_is_ok(o, mode);
|
||||
if (ret != 2)
|
||||
return;
|
||||
return !!ret;
|
||||
modebyte = 1;
|
||||
|
||||
#else
|
||||
|
||||
if (mode & BURN_AUDIO) /* no headers for "audio" */
|
||||
return;
|
||||
if (o->write_type == BURN_WRITE_SAO)
|
||||
return;
|
||||
|
||||
/* ts A61031 */
|
||||
if (o->write_type == BURN_WRITE_TAO)
|
||||
return;
|
||||
|
||||
if (mode & BURN_MODE1)
|
||||
modebyte = 1;
|
||||
|
||||
#endif
|
||||
|
||||
/* ts A61009 : now ensured by burn_disc_write_is_ok() */
|
||||
/* a ssert(modebyte == 1); */
|
||||
|
||||
out[0] = 0;
|
||||
memset(out + 1, 0xFF, 10); /* sync */
|
||||
out[11] = 0;
|
||||
@ -776,10 +779,33 @@ void sector_headers(struct burn_write_opts *o, unsigned char *out,
|
||||
}
|
||||
if (mode & BURN_MODE1) {
|
||||
memset(out + 2068, 0, 8);
|
||||
parity_p(out);
|
||||
parity_q(out);
|
||||
burn_rspc_parity_p(out);
|
||||
burn_rspc_parity_q(out);
|
||||
}
|
||||
scramble(out);
|
||||
burn_ecma130_scramble(out);
|
||||
return 1;
|
||||
|
||||
#else /* Libburn_ecma130ab_includeD */
|
||||
|
||||
int ret;
|
||||
|
||||
ret = sector_headers_is_ok(o, mode);
|
||||
if (ret != 2)
|
||||
return (!! ret);
|
||||
|
||||
/* ts A90830 : lec.c is copied from cdrdao.
|
||||
I have no idea yet how lec.c implements the Reed-Solomon encoding
|
||||
which is described in ECMA-130 for CD-ROM.
|
||||
So this got removed for now.
|
||||
*/
|
||||
libdax_msgs_submit(libdax_messenger, o->drive->global_index,
|
||||
0x0002010a,
|
||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Raw CD write modes are not supported", 0, 0);
|
||||
return 0;
|
||||
|
||||
#endif /* ! Libburn_ecma130ab_includeD */
|
||||
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -835,12 +861,14 @@ void process_q(struct burn_drive *d, unsigned char *q)
|
||||
*/
|
||||
int sector_identify(unsigned char *data)
|
||||
{
|
||||
scramble(data);
|
||||
|
||||
/*
|
||||
burn_ecma130_scramble(data);
|
||||
check mode byte for 1 or 2
|
||||
test parity to see if it's a valid sector
|
||||
if invalid, return BURN_MODE_AUDIO;
|
||||
else return mode byte (what about mode 2 formless? heh)
|
||||
*/
|
||||
|
||||
return BURN_MODE1;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ int sector_data(struct burn_write_opts *, struct burn_track *t, int psub);
|
||||
/* ts A61009 */
|
||||
int sector_headers_is_ok(struct burn_write_opts *o, int mode);
|
||||
|
||||
void sector_headers(struct burn_write_opts *, unsigned char *,
|
||||
int sector_headers(struct burn_write_opts *, unsigned char *,
|
||||
int mode, int leadin);
|
||||
void subcode_user(struct burn_write_opts *, unsigned char *s,
|
||||
unsigned char tno, unsigned char control,
|
||||
|
@ -19,6 +19,7 @@ Present implementation: default dummy which enables libburn only to work
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef Libburn_os_has_statvfS
|
||||
#include <sys/statvfs.h>
|
||||
@ -227,3 +228,39 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A91122 : an interface to open(O_DIRECT) or similar OS tricks. */
|
||||
|
||||
#ifdef Libburn_read_o_direcT
|
||||
|
||||
/* No special O_DIRECT-like precautions are implemented here */
|
||||
|
||||
#endif /* Libburn_read_o_direcT */
|
||||
|
||||
|
||||
int burn_os_open_track_src(char *path, int open_flags, int flag)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = open(path, open_flags);
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
void *burn_os_alloc_buffer(size_t amount, int flag)
|
||||
{
|
||||
void *buf = NULL;
|
||||
|
||||
buf = calloc(1, amount);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
int burn_os_free_buffer(void *buffer, size_t amount, int flag)
|
||||
{
|
||||
if (buffer == NULL)
|
||||
return 0;
|
||||
free(buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -629,3 +629,39 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A91122 : an interface to open(O_DIRECT) or similar OS tricks. */
|
||||
|
||||
#ifdef Libburn_read_o_direcT
|
||||
|
||||
/* No special O_DIRECT-like precautions are implemented here */
|
||||
|
||||
#endif /* Libburn_read_o_direcT */
|
||||
|
||||
|
||||
int burn_os_open_track_src(char *path, int open_flags, int flag)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = open(path, open_flags);
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
void *burn_os_alloc_buffer(size_t amount, int flag)
|
||||
{
|
||||
void *buf = NULL;
|
||||
|
||||
buf = calloc(1, amount);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
int burn_os_free_buffer(void *buffer, size_t amount, int flag)
|
||||
{
|
||||
if (buffer == NULL)
|
||||
return 0;
|
||||
free(buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,8 @@ static int sg_init_enumerator(burn_drive_enumerator_t *idx_)
|
||||
|
||||
if ((idx->fd = open(XPT_DEVICE, O_RDWR)) == -1) {
|
||||
warn("couldn't open %s", XPT_DEVICE);
|
||||
free(idx);
|
||||
idx = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -686,3 +688,39 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A91122 : an interface to open(O_DIRECT) or similar OS tricks. */
|
||||
|
||||
#ifdef Libburn_read_o_direcT
|
||||
|
||||
/* No special O_DIRECT-like precautions are implemented here */
|
||||
|
||||
#endif /* Libburn_read_o_direcT */
|
||||
|
||||
|
||||
int burn_os_open_track_src(char *path, int open_flags, int flag)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = open(path, open_flags);
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
void *burn_os_alloc_buffer(size_t amount, int flag)
|
||||
{
|
||||
void *buf = NULL;
|
||||
|
||||
buf = calloc(1, amount);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
int burn_os_free_buffer(void *buffer, size_t amount, int flag)
|
||||
{
|
||||
if (buffer == NULL)
|
||||
return 0;
|
||||
free(buffer);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,11 @@
|
||||
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
|
||||
|
||||
|
||||
/* <<< ts A91112 : experiments to get better speed with USB
|
||||
#define Libburn_sgio_as_growisofS 1
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
This is the main operating system dependent SCSI part of libburn. It implements
|
||||
@ -48,8 +54,23 @@ sg_issue_command() sends a SCSI command to the drive, receives reply,
|
||||
|
||||
sg_obtain_scsi_adr() tries to obtain SCSI address parameters.
|
||||
|
||||
|
||||
burn_os_stdio_capacity() estimates the emulated media space of stdio-drives.
|
||||
|
||||
burn_os_open_track_src() opens a disk file in a way that allows best
|
||||
throughput with file reading and/or SCSI write command
|
||||
transmission.
|
||||
|
||||
burn_os_close_track_src() closes a filedescriptor obtained by
|
||||
burn_os_open_track_src().
|
||||
|
||||
burn_os_alloc_buffer() allocates a memory area that is suitable for file
|
||||
descriptors issued by burn_os_open_track_src().
|
||||
The buffer size may be rounded up for alignment
|
||||
reasons.
|
||||
|
||||
burn_os_free_buffer() delete a buffer obtained by burn_os_alloc_buffer().
|
||||
|
||||
|
||||
Porting hints are marked by the text "PORTING:".
|
||||
Send feedback to libburn-hackers@pykix.org .
|
||||
@ -62,6 +83,13 @@ Hint: You should also look into sg-freebsd-port.c, which is a younger and
|
||||
|
||||
/** PORTING : ------- OS dependent headers and definitions ------ */
|
||||
|
||||
|
||||
#ifdef Libburn_read_o_direcT
|
||||
# ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE
|
||||
# endif
|
||||
#endif /* Libburn_read_o_direcT */
|
||||
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
@ -80,6 +108,9 @@ Hint: You should also look into sg-freebsd-port.c, which is a younger and
|
||||
/* for ioctl(BLKGETSIZE) */
|
||||
#include <linux/fs.h>
|
||||
|
||||
/* for mmap() */
|
||||
#include <sys/mman.h>
|
||||
|
||||
|
||||
#include <scsi/sg.h>
|
||||
/* Values within sg_io_hdr_t indicating success after ioctl(SG_IO) : */
|
||||
@ -158,9 +189,17 @@ static char linux_ata_device_family[80] = {"/dev/hd%c"};
|
||||
static int linux_ata_enumerate_verbous = 0;
|
||||
|
||||
|
||||
/* The waiting time before eventually retrying a failed SCSI command.
|
||||
Before each retry wait Libburn_sg_linux_retry_incR longer than with
|
||||
the previous one.
|
||||
*/
|
||||
#define Libburn_sg_linux_retry_usleeP 100000
|
||||
#define Libburn_sg_linux_retry_incR 100000
|
||||
|
||||
|
||||
/** PORTING : ------ libburn portable headers and definitions ----- */
|
||||
|
||||
#include "libburn.h"
|
||||
#include "transport.h"
|
||||
#include "drive.h"
|
||||
#include "sg.h"
|
||||
@ -189,17 +228,25 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
|
||||
|
||||
|
||||
/* ts A60813 : storage objects are in libburn/init.c
|
||||
wether to use O_EXCL with open(2) of devices
|
||||
wether to use fcntl(,F_SETLK,) after open(2) of devices
|
||||
whether to use O_EXCL with open(2) of devices
|
||||
whether to use fcntl(,F_SETLK,) after open(2) of devices
|
||||
what device family to use : 0=default, 1=sr, 2=scd, (3=st), 4=sg
|
||||
wether to use O_NOBLOCK with open(2) on devices
|
||||
wether to take O_EXCL rejection as fatal error */
|
||||
whether to use O_NOBLOCK with open(2) on devices
|
||||
whether to take O_EXCL rejection as fatal error
|
||||
*/
|
||||
extern int burn_sg_open_o_excl;
|
||||
extern int burn_sg_fcntl_f_setlk;
|
||||
extern int burn_sg_use_family;
|
||||
extern int burn_sg_open_o_nonblock;
|
||||
extern int burn_sg_open_abort_busy;
|
||||
|
||||
/* ts A91111 :
|
||||
whether to log SCSI commands:
|
||||
bit0= log in /tmp/libburn_sg_command_log
|
||||
bit1= log to stderr
|
||||
bit2= flush every line
|
||||
*/
|
||||
extern int burn_sg_log_scsi;
|
||||
|
||||
/* ts A60821
|
||||
debug: for tracing calls which might use open drive fds
|
||||
@ -1635,6 +1682,7 @@ int sg_release(struct burn_drive *d)
|
||||
}
|
||||
|
||||
|
||||
/* <<< ts A91111: on its way out */
|
||||
/** ts A70518:
|
||||
Debugging log facility. Controlled by existence of macros:
|
||||
Libburn_log_sg_commandS enables logging to file
|
||||
@ -1643,29 +1691,29 @@ int sg_release(struct burn_drive *d)
|
||||
Libburn_log_sg_command_stderR enables additional log to stderr
|
||||
*/
|
||||
/*
|
||||
ts A91111: now enabled by default and controlled burn_sg_log_scsi
|
||||
*/
|
||||
#define Libburn_log_sg_commandS 1
|
||||
#define Libburn_fflush_log_sg_commandS 1
|
||||
#define Libburn_log_sg_command_stderR 1
|
||||
*/
|
||||
|
||||
|
||||
#ifdef Libburn_log_sg_commandS
|
||||
|
||||
/** Logs command (before execution) */
|
||||
static int sg_log_cmd(struct command *c, FILE *fp, int flag)
|
||||
{
|
||||
int i;
|
||||
if (fp != NULL && (fp == stderr || (burn_sg_log_scsi & 1))) {
|
||||
scsi_show_cmd_text(c, fp, 0);
|
||||
|
||||
if (fp != NULL) {
|
||||
for(i = 0; i < 16 && i < c->oplen; i++)
|
||||
fprintf(fp,"%2.2x ", c->opcode[i]);
|
||||
fprintf(fp, "\n");
|
||||
#ifdef Libburn_fflush_log_sg_commandS
|
||||
fflush(fp);
|
||||
if (burn_sg_log_scsi & 4)
|
||||
fflush(fp);
|
||||
#endif
|
||||
}
|
||||
if (fp == stderr)
|
||||
return 1;
|
||||
#ifdef Libburn_log_sg_command_stderR
|
||||
if (fp == stderr || !(burn_sg_log_scsi & 2))
|
||||
return 1;
|
||||
sg_log_cmd(c, stderr, flag);
|
||||
#endif
|
||||
return 1;
|
||||
@ -1677,20 +1725,23 @@ static int sg_log_err(struct command *c, FILE *fp,
|
||||
sg_io_hdr_t *s,
|
||||
int flag)
|
||||
{
|
||||
if(fp!=NULL) {
|
||||
if(flag & 1)
|
||||
if(fp != NULL && (fp == stderr || (burn_sg_log_scsi & 1))) {
|
||||
if(flag & 1) {
|
||||
fprintf(fp,
|
||||
"+++ key=%X asc=%2.2Xh ascq=%2.2Xh (%6d ms)\n",
|
||||
s->sbp[2], s->sbp[12], s->sbp[13],s->duration);
|
||||
else
|
||||
} else {
|
||||
scsi_show_cmd_reply(c, fp, 0);
|
||||
fprintf(fp,"%6d ms\n", s->duration);
|
||||
}
|
||||
#ifdef Libburn_fflush_log_sg_commandS
|
||||
fflush(fp);
|
||||
if (burn_sg_log_scsi & 4)
|
||||
fflush(fp);
|
||||
#endif
|
||||
}
|
||||
if (fp == stderr)
|
||||
return 1;
|
||||
#ifdef Libburn_log_sg_command_stderR
|
||||
if (fp == stderr || !(burn_sg_log_scsi & 2))
|
||||
return 1;
|
||||
sg_log_err(c, stderr, s, flag);
|
||||
#endif
|
||||
return 1;
|
||||
@ -1711,8 +1762,9 @@ static int sg_log_err(struct command *c, FILE *fp,
|
||||
*/
|
||||
int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
{
|
||||
int done = 0, no_c_page = 0;
|
||||
int done = 0, no_c_page = 0, usleep_time, i;
|
||||
int err;
|
||||
time_t start_time;
|
||||
sg_io_hdr_t s;
|
||||
|
||||
#ifdef Libburn_log_sg_commandS
|
||||
@ -1729,11 +1781,15 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
|
||||
#ifdef Libburn_log_sg_commandS
|
||||
/* ts A61030 */
|
||||
if(fp==NULL) {
|
||||
fp= fopen("/tmp/libburn_sg_command_log","a");
|
||||
fprintf(fp,"\n-----------------------------------------\n");
|
||||
if (burn_sg_log_scsi & 1) {
|
||||
if (fp == NULL) {
|
||||
fp= fopen("/tmp/libburn_sg_command_log", "a");
|
||||
fprintf(fp,
|
||||
"\n-----------------------------------------\n");
|
||||
}
|
||||
}
|
||||
sg_log_cmd(c,fp,0);
|
||||
if (burn_sg_log_scsi & 3)
|
||||
sg_log_cmd(c,fp,0);
|
||||
#endif /* Libburn_log_sg_commandS */
|
||||
|
||||
|
||||
@ -1748,6 +1804,13 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
|
||||
s.interface_id = 'S';
|
||||
|
||||
#ifdef Libburn_sgio_as_growisofS
|
||||
/* ??? ts A91112 : does this speed up USB ? (from growisofs)
|
||||
--- did not help
|
||||
*/
|
||||
s.flags = SG_FLAG_DIRECT_IO;
|
||||
#endif /* Libburn_sgio_as_growisofS */
|
||||
|
||||
if (c->dir == TO_DRIVE)
|
||||
s.dxfer_direction = SG_DXFER_TO_DEV;
|
||||
else if (c->dir == FROM_DRIVE)
|
||||
@ -1796,7 +1859,8 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
}
|
||||
s.usr_ptr = c;
|
||||
|
||||
do {
|
||||
start_time = time(NULL);
|
||||
for(i = 0; !done; i++) {
|
||||
err = ioctl(d->fd, SG_IO, &s);
|
||||
|
||||
/* ts A61010 */
|
||||
@ -1830,10 +1894,22 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
c->error = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* ts A90921 :
|
||||
Calming down retries and breaking up endless cycle
|
||||
*/
|
||||
usleep_time = Libburn_sg_linux_retry_usleeP +
|
||||
i * Libburn_sg_linux_retry_incR;
|
||||
if (time(NULL) + usleep_time / 1000000 - start_time >
|
||||
s.timeout / 1000 + 1) {
|
||||
c->error = 1;
|
||||
goto ex;
|
||||
}
|
||||
usleep(usleep_time);
|
||||
} else {
|
||||
done = 1;
|
||||
}
|
||||
} while (!done);
|
||||
}
|
||||
|
||||
/* ts A61106 */
|
||||
ex:;
|
||||
@ -1857,7 +1933,8 @@ ex:;
|
||||
}
|
||||
|
||||
#ifdef Libburn_log_sg_commandS
|
||||
sg_log_err(c, fp, &s, c->error != 0);
|
||||
if (burn_sg_log_scsi & 3)
|
||||
sg_log_err(c, fp, &s, c->error != 0);
|
||||
#endif /* Libburn_log_sg_commandS */
|
||||
|
||||
return 1;
|
||||
@ -1878,6 +1955,8 @@ int sg_obtain_scsi_adr(char *path, int *bus_no, int *host_no, int *channel_no,
|
||||
};
|
||||
struct my_scsi_idlun idlun;
|
||||
|
||||
/* valgrind called idlun unitialized because it is blind for ioctl */
|
||||
memset(&idlun, 0, sizeof(struct my_scsi_idlun));
|
||||
|
||||
l = strlen(linux_ata_device_family) - 2;
|
||||
if (l > 0 && strncmp(path, linux_ata_device_family, l) == 0
|
||||
@ -2010,3 +2089,80 @@ int burn_os_stdio_capacity(char *path, off_t *bytes)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A91122 : an interface to open(O_DIRECT) or similar OS tricks. */
|
||||
|
||||
#ifdef PROT_READ
|
||||
#ifdef PROT_WRITE
|
||||
#ifdef MAP_SHARED
|
||||
#ifdef MAP_ANONYMOUS
|
||||
#ifdef MAP_FAILED
|
||||
#define Libburn_linux_do_mmaP 1
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef Libburn_read_o_direcT
|
||||
#ifdef O_DIRECT
|
||||
#define Libburn_linux_do_o_direcT 1
|
||||
#endif
|
||||
#endif /* Libburn_read_o_direcT */
|
||||
|
||||
|
||||
int burn_os_open_track_src(char *path, int open_flags, int flag)
|
||||
{
|
||||
int fd;
|
||||
|
||||
#ifdef Libburn_linux_do_o_direcT
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Opening track source with O_DIRECT" , 0, 0);
|
||||
fd = open(path, open_flags | O_DIRECT);
|
||||
#else
|
||||
fd = open(path, open_flags);
|
||||
#endif
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
||||
void *burn_os_alloc_buffer(size_t amount, int flag)
|
||||
{
|
||||
void *buf = NULL;
|
||||
|
||||
#ifdef Libburn_linux_do_mmaP
|
||||
|
||||
/* >>> check whether size is suitable */;
|
||||
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Allocating buffer via mmap()" , 0, 0);
|
||||
buf = mmap(NULL, amount, PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED | MAP_ANONYMOUS, -1, (off_t) 0);
|
||||
if (buf == MAP_FAILED)
|
||||
buf = NULL;
|
||||
else
|
||||
memset(buf, 0, amount);
|
||||
#else
|
||||
buf = calloc(1, amount);
|
||||
#endif /* ! Libburn_linux_do_mmaP */
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
int burn_os_free_buffer(void *buffer, size_t amount, int flag)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
if (buffer == NULL)
|
||||
return 0;
|
||||
#ifdef Libburn_linux_do_mmaP
|
||||
ret = munmap(buffer, amount);
|
||||
#else
|
||||
free(buffer);
|
||||
#endif
|
||||
return (ret == 0);
|
||||
}
|
||||
|
||||
|
198
libburn/spc.c
198
libburn/spc.c
@ -27,11 +27,6 @@
|
||||
#include "libdax_msgs.h"
|
||||
extern struct libdax_msgs *libdax_messenger;
|
||||
|
||||
/* ts A70910
|
||||
debug: for tracing calls which might use open drive fds
|
||||
or for catching SCSI usage of emulated drives. */
|
||||
int mmc_function_spy(struct burn_drive *d, char * text);
|
||||
|
||||
|
||||
/* spc command set */
|
||||
/* ts A70519 : allocation length byte 3+4 was 0,255 */
|
||||
@ -98,7 +93,9 @@ int spc_test_unit_ready(struct burn_drive *d)
|
||||
|
||||
|
||||
/* ts A70315 */
|
||||
/** @param flag bit0=do not wait 0.1 seconds before first test unit ready */
|
||||
/** @param flag bit0=do not wait 0.1 seconds before first test unit ready
|
||||
bit1=do not issue success message
|
||||
*/
|
||||
/** Wait until the drive state becomes clear or until max_usec elapsed */
|
||||
int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
|
||||
int flag)
|
||||
@ -112,13 +109,6 @@ int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
|
||||
usleep(100000);
|
||||
for(i = !(flag & 1); i < max_sec * 10; i++) {
|
||||
ret = spc_test_unit_ready_r(d, &key, &asc, &ascq);
|
||||
|
||||
/* <<<
|
||||
fprintf(stderr,
|
||||
"libburn_EXPERIMENTAL: i= %d ret= %d key= %X asc= %2.2X ascq= %2.2X\n",
|
||||
i, ret, (unsigned) key, (unsigned) asc, (unsigned) ascq);
|
||||
*/
|
||||
|
||||
if (ret > 0) /* ready */
|
||||
break;
|
||||
if (key!=0x2 || asc!=0x4) {
|
||||
@ -140,24 +130,14 @@ int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
|
||||
/* media change notice = try again */
|
||||
goto slumber;
|
||||
|
||||
#ifdef NIX
|
||||
sprintf(msg,
|
||||
"Asynchromous SCSI error on %s: key=%X asc=%2.2Xh ascq=%2.2Xh",
|
||||
cmd_text, (unsigned) key, (unsigned) asc,
|
||||
(unsigned) ascq);
|
||||
#else
|
||||
|
||||
/* ts A90213 */
|
||||
sprintf(msg,
|
||||
"Asynchromous SCSI error on %s: ", cmd_text);
|
||||
"Asynchronous SCSI error on %s: ", cmd_text);
|
||||
sense[2] = key;
|
||||
sense[12] = asc;
|
||||
sense[13] = ascq;
|
||||
resp = scsi_error_msg(d, sense, 14, msg + strlen(msg),
|
||||
&key, &asc, &ascq);
|
||||
|
||||
#endif /* ! NIX */
|
||||
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||
0x0002014d,
|
||||
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
|
||||
@ -168,11 +148,14 @@ int spc_wait_unit_attention(struct burn_drive *d, int max_sec, char *cmd_text,
|
||||
slumber:;
|
||||
usleep(100000);
|
||||
}
|
||||
|
||||
sprintf(msg, "Async %s %s after %d.%d seconds",
|
||||
cmd_text, (ret > 0 ? "succeeded" : "failed"), i / 10, i % 10);
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00020150,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_LOW, msg, 0, 0);
|
||||
if (ret <= 0 || !(flag & 2)) {
|
||||
sprintf(msg, "Async %s %s after %d.%d seconds",
|
||||
cmd_text, (ret > 0 ? "succeeded" : "failed"),
|
||||
i / 10, i % 10);
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||
0x00020150, LIBDAX_MSGS_SEV_DEBUG,
|
||||
LIBDAX_MSGS_PRIO_LOW, msg, 0, 0);
|
||||
}
|
||||
|
||||
if (i < max_sec * 10)
|
||||
return (ret > 0);
|
||||
@ -262,14 +245,14 @@ void spc_prevent(struct burn_drive *d)
|
||||
return;
|
||||
|
||||
scsi_init_command(&c, SPC_PREVENT, sizeof(SPC_PREVENT));
|
||||
/*
|
||||
memcpy(c.opcode, SPC_PREVENT, sizeof(SPC_PREVENT));
|
||||
c.oplen = sizeof(SPC_PREVENT);
|
||||
c.page = NULL;
|
||||
*/
|
||||
c.retry = 1;
|
||||
c.dir = NO_TRANSFER;
|
||||
d->issue_command(d, &c);
|
||||
|
||||
#ifdef Libburn_pioneer_dvr_216d_get_evenT
|
||||
mmc_get_event(d);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void spc_allow(struct burn_drive *d)
|
||||
@ -463,12 +446,24 @@ static int spc_sense_caps_al(struct burn_drive *d, int *alloc_len, int flag)
|
||||
m->min_write_speed, m->max_write_speed);
|
||||
|
||||
try_mmc_get_performance:;
|
||||
ret = mmc_get_write_performance(d);
|
||||
|
||||
if (ret > 0 && speed_debug)
|
||||
fprintf(stderr,
|
||||
if (m->cdrw_write || page_length >= 32) {
|
||||
/* ts A90823:
|
||||
One has to avoid U3 enhanced memory sticks here. On my
|
||||
SuSE 10.2 a SanDisk Cruzer 4GB stalls at the second occasion
|
||||
of ACh GET PERFORMANCE. (The first one is obviously called
|
||||
by the OS at plug time.)
|
||||
This pseudo drive returns no write capabilities and a page
|
||||
length of 28. MMC-3 describes page length 32. Regrettably
|
||||
MMC-2 prescribes a page length of 26. Here i have to trust
|
||||
m->cdrw_write to reliably indicate any MMC-2 burner.
|
||||
*/
|
||||
ret = mmc_get_write_performance(d);
|
||||
if (ret > 0 && speed_debug)
|
||||
fprintf(stderr,
|
||||
"LIBBURN_DEBUG: ACh min_write_speed = %d , max_write_speed = %d\n",
|
||||
m->min_write_speed, m->max_write_speed);
|
||||
m->min_write_speed, m->max_write_speed);
|
||||
}
|
||||
|
||||
return !was_error;
|
||||
}
|
||||
|
||||
@ -477,6 +472,7 @@ void spc_sense_caps(struct burn_drive *d)
|
||||
{
|
||||
int alloc_len, start_len = 30, ret;
|
||||
|
||||
mmc_start_if_needed(d, 1);
|
||||
if (mmc_function_spy(d, "sense_caps") <= 0)
|
||||
return;
|
||||
|
||||
@ -501,6 +497,7 @@ void spc_sense_error_params(struct burn_drive *d)
|
||||
unsigned char *page;
|
||||
struct command c;
|
||||
|
||||
mmc_start_if_needed(d, 1);
|
||||
if (mmc_function_spy(d, "sense_error_params") <= 0)
|
||||
return;
|
||||
|
||||
@ -534,6 +531,7 @@ void spc_select_error_params(struct burn_drive *d,
|
||||
struct buffer buf;
|
||||
struct command c;
|
||||
|
||||
mmc_start_if_needed(d, 1);
|
||||
if (mmc_function_spy(d, "select_error_params") <= 0)
|
||||
return;
|
||||
|
||||
@ -575,6 +573,7 @@ void spc_sense_write_params(struct burn_drive *d)
|
||||
unsigned char *page;
|
||||
struct command c;
|
||||
|
||||
mmc_start_if_needed(d, 1);
|
||||
if (mmc_function_spy(d, "sense_write_params") <= 0)
|
||||
return;
|
||||
|
||||
@ -638,7 +637,9 @@ void spc_select_write_params(struct burn_drive *d,
|
||||
{
|
||||
struct buffer buf;
|
||||
struct command c;
|
||||
int alloc_len;
|
||||
|
||||
mmc_start_if_needed(d, 1);
|
||||
if (mmc_function_spy(d, "select_write_params") <= 0)
|
||||
return;
|
||||
|
||||
@ -652,13 +653,33 @@ void spc_select_write_params(struct burn_drive *d,
|
||||
o->block_type,spc_block_type(o->block_type));
|
||||
*/
|
||||
|
||||
scsi_init_command(&c, SPC_MODE_SELECT, sizeof(SPC_MODE_SELECT));
|
||||
/*
|
||||
memcpy(c.opcode, SPC_MODE_SELECT, sizeof(SPC_MODE_SELECT));
|
||||
c.oplen = sizeof(SPC_MODE_SELECT);
|
||||
*/
|
||||
alloc_len = 8 + 2 + d->mdata->write_page_length;
|
||||
memset(&(buf.data), 0, alloc_len);
|
||||
|
||||
#ifdef Libburn_pioneer_dvr_216d_load_mode5
|
||||
|
||||
scsi_init_command(&c, SPC_MODE_SENSE, sizeof(SPC_MODE_SENSE));
|
||||
c.dxfer_len = alloc_len;
|
||||
c.opcode[7] = (alloc_len >> 8) & 0xff;
|
||||
c.opcode[8] = alloc_len & 0xff;
|
||||
c.retry = 1;
|
||||
c.opcode[8] = 8 + 2 + d->mdata->write_page_length;
|
||||
c.opcode[2] = 0x05;
|
||||
c.page = &buf;
|
||||
c.page->bytes = 0;
|
||||
c.page->sectors = 0;
|
||||
c.dir = FROM_DRIVE;
|
||||
d->issue_command(d, &c);
|
||||
|
||||
if (c.error)
|
||||
memset(&(buf.data), 0,
|
||||
8 + 2 + d->mdata->write_page_length);
|
||||
|
||||
#endif /* Libburn_pioneer_dvr_216d_load_mode5 */
|
||||
|
||||
scsi_init_command(&c, SPC_MODE_SELECT, sizeof(SPC_MODE_SELECT));
|
||||
c.retry = 1;
|
||||
c.opcode[7] = (alloc_len >> 8) & 0xff;
|
||||
c.opcode[8] = alloc_len & 0xff;
|
||||
c.page = &buf;
|
||||
c.page->bytes = 0;
|
||||
c.page->sectors = 0;
|
||||
@ -666,8 +687,7 @@ void spc_select_write_params(struct burn_drive *d,
|
||||
/* ts A61007 : moved up to burn_disc_write() */
|
||||
/* a ssert(d->mdata->valid); */
|
||||
|
||||
memset(c.page->data, 0, 8 + 2 + d->mdata->write_page_length);
|
||||
c.page->bytes = 8 + 2 + d->mdata->write_page_length;
|
||||
c.page->bytes = alloc_len;
|
||||
|
||||
burn_print(12, "using write page length %d (valid %d)\n",
|
||||
d->mdata->write_page_length, d->mdata->write_page_valid);
|
||||
@ -704,6 +724,7 @@ void spc_probe_write_modes(struct burn_drive *d)
|
||||
int last_try = 0;
|
||||
struct command c;
|
||||
|
||||
mmc_start_if_needed(d, 1);
|
||||
if (mmc_function_spy(d, "spc_probe_write_modes") <= 0)
|
||||
return;
|
||||
|
||||
@ -721,11 +742,8 @@ void spc_probe_write_modes(struct burn_drive *d)
|
||||
try_block_type = useable_block_type;
|
||||
last_try= 1;
|
||||
}
|
||||
|
||||
scsi_init_command(&c, SPC_MODE_SELECT,sizeof(SPC_MODE_SELECT));
|
||||
/*
|
||||
memcpy(c.opcode, SPC_MODE_SELECT, sizeof(SPC_MODE_SELECT));
|
||||
c.oplen = sizeof(SPC_MODE_SELECT);
|
||||
*/
|
||||
c.retry = 1;
|
||||
c.opcode[8] = 8 + 2 + 0x32;
|
||||
c.page = &buf;
|
||||
@ -754,7 +772,6 @@ void spc_probe_write_modes(struct burn_drive *d)
|
||||
key = c.sense[2];
|
||||
asc = c.sense[12];
|
||||
ascq = c.sense[13];
|
||||
|
||||
if (key)
|
||||
burn_print(7, "%d not supported\n", try_block_type);
|
||||
else {
|
||||
@ -800,6 +817,7 @@ void spc_probe_write_modes(struct burn_drive *d)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ( ts A61229 : shouldn't this go to mmc.c too ?) */
|
||||
@ -1130,6 +1148,11 @@ enum response scsi_error_msg(struct burn_drive *d, unsigned char *sense,
|
||||
sprintf(msg, "Medium not present");
|
||||
d->status = BURN_DISC_EMPTY;
|
||||
return FAIL;
|
||||
case 0x57:
|
||||
if (*key != 3 || *ascq != 0)
|
||||
break;
|
||||
sprintf(msg, "Unable to recover Table-of-Content");
|
||||
return FAIL;
|
||||
case 0x63:
|
||||
if (*key != 5)
|
||||
break;
|
||||
@ -1217,10 +1240,14 @@ static char *scsi_command_name(unsigned int c, int flag)
|
||||
return "FORMAT UNIT";
|
||||
case 0x1b:
|
||||
return "START/STOP UNIT";
|
||||
case 0x12:
|
||||
return "INQUIRY";
|
||||
case 0x1e:
|
||||
return "PREVENT/ALLOW MEDIA REMOVAL";
|
||||
case 0x23:
|
||||
return "READ FORMAT CAPACITIES";
|
||||
case 0x25:
|
||||
return "READ CAPACITY";
|
||||
case 0x28:
|
||||
return "READ(10)";
|
||||
case 0x2a:
|
||||
@ -1244,7 +1271,7 @@ static char *scsi_command_name(unsigned int c, int flag)
|
||||
case 0x55:
|
||||
return "MODE SELECT";
|
||||
case 0x5a:
|
||||
return "SEND OPC INFORMATION";
|
||||
return "MODE SENSE";
|
||||
case 0x5b:
|
||||
return "CLOSE TRACK/SESSION";
|
||||
case 0x5c:
|
||||
@ -1257,6 +1284,8 @@ static char *scsi_command_name(unsigned int c, int flag)
|
||||
return "WRITE(12)";
|
||||
case 0xac:
|
||||
return "GET PERFORMANCE";
|
||||
case 0xad:
|
||||
return "READ DISC STRUCTURE";
|
||||
case 0xb6:
|
||||
return "SET STREAMING";
|
||||
case 0xbb:
|
||||
@ -1320,3 +1349,66 @@ int scsi_notify_error(struct burn_drive *d, struct command *c,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* ts A91106 */
|
||||
/* @param flag bit0= do not show eventual data payload sent to the drive
|
||||
(never with WRITE commands)
|
||||
bit1= show write length and target LBA in decimal
|
||||
*/
|
||||
int scsi_show_cmd_text(struct command *c, void *fp_in, int flag)
|
||||
{
|
||||
int i;
|
||||
FILE *fp = fp_in;
|
||||
|
||||
fprintf(fp, "\n%s\n",
|
||||
scsi_command_name((unsigned int) c->opcode[0], 0));
|
||||
for(i = 0; i < 16 && i < c->oplen; i++)
|
||||
fprintf(fp, "%2.2x ", c->opcode[i]);
|
||||
if (i > 0)
|
||||
fprintf(fp, "\n");
|
||||
if (flag & 1)
|
||||
return 1;
|
||||
if (c->opcode[0] == 0x2A) { /* WRITE 10 */
|
||||
if (flag & 2)
|
||||
fprintf(fp, "%d -> %d\n",
|
||||
(c->opcode[7] << 8) | c->opcode[8],
|
||||
mmc_four_char_to_int(c->opcode + 2));
|
||||
} else if (c->opcode[0] == 0xAA) { /* WRITE 12 */
|
||||
if (flag & 2)
|
||||
fprintf(fp, "%d -> %d\n",
|
||||
mmc_four_char_to_int(c->opcode + 6),
|
||||
mmc_four_char_to_int(c->opcode + 2));
|
||||
} else if (c->dir == TO_DRIVE) {
|
||||
fprintf(fp, "To drive: %db\n", c->page->bytes);
|
||||
for (i = 0; i < c->page->bytes; i++)
|
||||
fprintf(fp, "%2.2x%c", c->page->data[i],
|
||||
((i % 20) == 19 ? '\n' : ' '));
|
||||
if (i % 20)
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ts A91106 */
|
||||
int scsi_show_cmd_reply(struct command *c, void *fp_in, int flag)
|
||||
{
|
||||
int i;
|
||||
FILE *fp = fp_in;
|
||||
|
||||
if (c->dir != FROM_DRIVE)
|
||||
return 2;
|
||||
if (c->opcode[0] == 0x28 || c->opcode[0] == 0x3C ||
|
||||
c->opcode[0] == 0xA8 || c->opcode[0] == 0xBE) {
|
||||
/* READ commands */
|
||||
/* >>> report amount of data */;
|
||||
|
||||
return 2;
|
||||
}
|
||||
fprintf(fp, "From drive: %db\n", c->dxfer_len);
|
||||
for (i = 0; i < c->dxfer_len; i++)
|
||||
fprintf(fp, "%2.2x%c", c->page->data[i],
|
||||
((i % 20) == 19 ? '\n' : ' '));
|
||||
if (i % 20)
|
||||
fprintf(fp, "\n");
|
||||
return 1;
|
||||
}
|
||||
|
@ -59,4 +59,11 @@ int scsi_notify_error(struct burn_drive *, struct command *c,
|
||||
/* ts A70519 */
|
||||
int scsi_init_command(struct command *c, unsigned char *opcode, int oplen);
|
||||
|
||||
/* ts A91106 */
|
||||
int scsi_show_cmd_text(struct command *c, void *fp, int flag);
|
||||
|
||||
/* ts A91106 */
|
||||
int scsi_show_cmd_reply(struct command *c, void *fp, int flag);
|
||||
|
||||
|
||||
#endif /*__SPC*/
|
||||
|
@ -281,13 +281,23 @@ void burn_track_define_data(struct burn_track *t, int offset, int tail,
|
||||
/* ts A61024 */
|
||||
int burn_track_set_byte_swap(struct burn_track *t, int swap_source_bytes)
|
||||
{
|
||||
if(swap_source_bytes!=0 && swap_source_bytes!=1)
|
||||
if (swap_source_bytes != 0 && swap_source_bytes != 1)
|
||||
return 0;
|
||||
t->swap_source_bytes = swap_source_bytes;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A90911 : API */
|
||||
int burn_track_set_cdxa_conv(struct burn_track *t, int value)
|
||||
{
|
||||
if (value < 0 || value > 1)
|
||||
return 0;
|
||||
t->cdxa_conversion = value;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void burn_track_set_isrc(struct burn_track *t, char *country, char *owner,
|
||||
unsigned char year, unsigned int serial)
|
||||
{
|
||||
@ -358,6 +368,11 @@ int burn_track_get_sectors(struct burn_track *t)
|
||||
int sectors, seclen;
|
||||
|
||||
seclen = burn_sector_length(t->mode);
|
||||
|
||||
if (t->cdxa_conversion == 1)
|
||||
/* ts A90911 : will read blocks of 2056 bytes and write 2048 */
|
||||
seclen += 8;
|
||||
|
||||
if (t->source != NULL) /* ts A80808 : mending sigsegv */
|
||||
size = t->offset + t->source->get_size(t->source) + t->tail;
|
||||
else if(t->entry != NULL) {
|
||||
|
@ -64,6 +64,10 @@ struct burn_track
|
||||
/* ts A61024 */
|
||||
/** Byte swapping on source data stream : 0=none , 1=pairwise */
|
||||
int swap_source_bytes;
|
||||
|
||||
/* ts A90910 : conversions from CD XA prepared input */
|
||||
int cdxa_conversion; /* 0=none, 1=remove -xa1 headers (first 8 bytes)*/
|
||||
|
||||
};
|
||||
|
||||
struct burn_session
|
||||
|
@ -40,7 +40,9 @@ struct buffer
|
||||
Added 4096 bytes reserve against possible buffer overflows.
|
||||
(Changed in sector.c buffer flush test from >= to > BUFFER_SIZE .
|
||||
This can at most cause a 1 sector overlap. Sometimes an offset
|
||||
of 16 byte is applied to the output data (in some RAW mode). ) */
|
||||
of 16 byte is applied to the output data (in some RAW mode). )
|
||||
burn_write_opts.cdxa_conversion can imply an offset of 8 bytes.
|
||||
*/
|
||||
unsigned char data[BUFFER_SIZE + 4096];
|
||||
int sectors;
|
||||
int bytes;
|
||||
@ -163,6 +165,9 @@ struct burn_drive
|
||||
int current_is_supported_profile;
|
||||
/* ts A90603 */
|
||||
int current_is_guessed_profile;
|
||||
/* ts A90815 */
|
||||
unsigned char all_profiles[256];
|
||||
int num_profiles;
|
||||
|
||||
/* ts A70128 : MMC-to-MMC feature info from 46h for DVD-RW.
|
||||
Quite internal. Regard as opaque :)
|
||||
@ -213,7 +218,19 @@ struct burn_drive
|
||||
int stream_recording_start;
|
||||
|
||||
/* ts A61218 from 51h READ DISC INFORMATION */
|
||||
int last_lead_in;
|
||||
int last_lead_out;
|
||||
int num_opc_tables; /* ts A91104: -1= not yet known */
|
||||
int bg_format_status; /* 0=needs format start, 1=needs format restart*/
|
||||
int disc_type; /* 0="CD-DA or CD-ROM", 0x10="CD-I", 0x20="CD-ROM XA" */
|
||||
unsigned int disc_id; /* a "32 bit binary integer" */
|
||||
char disc_bar_code[9];
|
||||
int disc_app_code;
|
||||
int disc_info_valid; /* bit0= disc_type , bit1= disc_id ,
|
||||
bit2= disc_bar_code , bit3= disc_app_code
|
||||
bit4= URU bit is set (= unrestricted use)
|
||||
bit5= Erasable bit was set in reply
|
||||
*/
|
||||
|
||||
/* ts A70108 from 23h READ FORMAT CAPACITY mmc5r03c.pdf 6.24 */
|
||||
int format_descr_type; /* 1=unformatted, 2=formatted, 3=unclear */
|
||||
@ -314,6 +331,11 @@ struct burn_drive
|
||||
void (*eject) (struct burn_drive *);
|
||||
void (*load) (struct burn_drive *);
|
||||
int (*start_unit) (struct burn_drive *);
|
||||
|
||||
/* ts A90824 : Calming down noisy drives */
|
||||
int (*stop_unit) (struct burn_drive *);
|
||||
int is_stopped;
|
||||
|
||||
void (*read_disc_info) (struct burn_drive *);
|
||||
void (*read_sectors) (struct burn_drive *,
|
||||
int start,
|
||||
|
262
libburn/util.c
262
libburn/util.c
@ -4,6 +4,7 @@
|
||||
/* #include <a ssert.h> */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/* ts A80914 : This is unneeded. Version info comes from libburn.h.
|
||||
#include "v ersion.h"
|
||||
@ -56,3 +57,264 @@ void burn_version(int *major, int *minor, int *micro)
|
||||
*minor = burn_header_version_minor;
|
||||
*micro = burn_header_version_micro;
|
||||
}
|
||||
|
||||
|
||||
struct cd_mid_record {
|
||||
char *manufacturer;
|
||||
int m_li;
|
||||
int s_li;
|
||||
int f_li;
|
||||
int m_lo;
|
||||
int s_lo;
|
||||
int f_lo;
|
||||
char *other_brands;
|
||||
};
|
||||
typedef struct cd_mid_record cd_mid_record_t;
|
||||
|
||||
|
||||
/* ts A90902 */
|
||||
/** API
|
||||
@param flag Bitfield for control purposes,
|
||||
bit0= append "(aka %s)",other_brands to reply
|
||||
*/
|
||||
char *burn_guess_cd_manufacturer(int m_li, int s_li, int f_li,
|
||||
int m_lo, int s_lo, int f_lo, int flag)
|
||||
{
|
||||
static cd_mid_record_t mid_list[]= {
|
||||
{"SKC", 96, 40, 0, 0, 0, 0, ""},
|
||||
{"Ritek Corp" , 96, 43, 30, 0, 0, 0, ""},
|
||||
{"TDK / Ritek" , 97, 10, 0, 0, 0, 0, "TRAXDATA"},
|
||||
{"TDK Corporation" , 97, 15, 0, 0, 0, 0, ""},
|
||||
{"Ritek Corp" , 97, 15, 10, 0, 0, 0, "7-plus, Aopen, PONY, Power Source, TDK, TRAXDATA, HiCO, PHILIPS, Primdisc, Victor.JVC, OPTI STORAGE, Samsung"},
|
||||
{"Mitsubishi Chemical Corporation" , 97, 15, 20, 0, 0, 0, ""},
|
||||
{"Nan-Ya Plastics Corporation" , 97, 15, 30, 0, 0, 0, "Hatron, MMore, Acer, LITEON"},
|
||||
{"Delphi" , 97, 15, 50, 0, 0, 0, ""},
|
||||
{"Shenzhen SG&SAST" , 97, 16, 20, 0, 0, 0, ""},
|
||||
{"Moser Baer India Limited" , 97, 17, 0, 0, 0, 0, "EMTEC, Intenso, YAKUMO, PLATINUM, Silver Circle"},
|
||||
{"SKY media Manufacturing SA" , 97, 17, 10, 0, 0, 0, ""},
|
||||
{"Wing" , 97, 18, 10, 0, 0, 0, ""},
|
||||
{"DDT" , 97, 18, 20, 0, 0, 0, ""},
|
||||
{"Daxon Technology Inc. / Acer" , 97, 22, 60, 0, 0, 0, "Maxmax, Diamond Data, BenQ, gold, SONY"},
|
||||
{"Taiyo Yuden Company Limited" , 97, 24, 0, 0, 0, 0, "Maxell, FUJIFILM, SONY"},
|
||||
{"Sony Corporation" , 97, 24, 10, 0, 0, 0, "LeadData, Imation"},
|
||||
{"Computer Support Italcard s.r.l" , 97, 24, 20, 0, 0, 0, ""},
|
||||
{"Unitech Japan Inc." , 97, 24, 30, 0, 0, 0, ""},
|
||||
{"MPO, France" , 97, 25, 0, 0, 0, 0, "TDK"},
|
||||
{"Hitachi Maxell Ltd." , 97, 25, 20, 0, 0, 0, ""},
|
||||
{"Infodisc Technology Co,Ltd." , 97, 25, 30, 0, 0, 0, "MEMOREX, SPEEDA, Lead data"},
|
||||
{"Xcitec" , 97, 25, 60, 0, 0, 0, ""},
|
||||
{"Fornet International Pte Ltd" , 97, 26, 0, 0, 0, 0, "COMPUSA, Cdhouse"},
|
||||
{"Postech Corporation" , 97, 26, 10, 0, 0, 0, "Mr.Platinum"},
|
||||
{"SKC Co Ltd." , 97, 26, 20, 0, 0, 0, "Infinite"},
|
||||
{"Fuji Photo Film Co,Ltd." , 97, 26, 40, 0, 0, 0, ""},
|
||||
{"Lead Data Inc." , 97, 26, 50, 0, 0, 0, "SONY, Gigastorage, MIRAGE"},
|
||||
{"CMC Magnetics Corporation" , 97, 26, 60, 0, 0, 0, "Daxon, Verbatim, Memorex, Bi-Winner, PLEXTOR, YAMAHA, Melody, Office DEPOT, Philips, eMARK, imation, HyperMedia, Samsung, Shintaro, Techworks"},
|
||||
{"Ricoh Company Limited" , 97, 27, 0, 0, 0, 0, "Sony, Digital Storage, Csita"},
|
||||
{"Plasmon Data Systems Ltd" , 97, 27, 10, 0, 0, 0, "Ritek, TDK, EMTEC, ALPHAPET, MANIA"},
|
||||
{"Princo Corporation" , 97, 27, 20, 0, 0, 0, ""},
|
||||
{"Pioneer" , 97, 27, 30, 0, 0, 0, ""},
|
||||
{"Eastman Kodak Company" , 97, 27, 40, 0, 0, 0, ""},
|
||||
{"Mitsui Chemicals Inc." , 97, 27, 50, 0, 0, 0, "MAM-A, TDK"},
|
||||
{"Ricoh Company Limited" , 97, 27, 60, 0, 0, 0, "Ritek"},
|
||||
{"Gigastorage Corporation" , 97, 28, 10, 0, 0, 0, "MaxMax, Nan-Ya"},
|
||||
{"Multi Media Masters&Machinary SA" , 97, 28, 20, 0, 0, 0, "King, Mmirex"},
|
||||
{"Ritek Corp" , 97, 31, 0, 0, 0, 0, "TDK"},
|
||||
{"Grand Advance Technology Sdn. Bhd." , 97, 31, 30, 0, 0, 0, ""},
|
||||
{"TDK Corporation" , 97, 32, 00, 0, 0, 0, ""},
|
||||
{"Prodisc Technology Inc." , 97, 32, 10, 0, 0, 0, "Smartbuy, Mitsubishi, Digmaster, LG, Media Market"},
|
||||
{"Mitsubishi Chemical Corporation" , 97, 34, 20, 0, 0, 0, "YAMAHA, Verbatim"},
|
||||
{"Mitsui Chemicals Inc." , 97, 48, 50, 0, 0, 0, ""},
|
||||
{"TDK Corporation" , 97, 49, 0, 0, 0, 0, ""},
|
||||
{"", 0, 0, 0, 0, 0, 0, ""}
|
||||
};
|
||||
|
||||
int i, f_li_0;
|
||||
char buf[1024];
|
||||
char *result = NULL;
|
||||
|
||||
f_li_0 = f_li - (f_li % 10);
|
||||
for (i = 0; mid_list[i].manufacturer[0]; i++) {
|
||||
if (m_li == mid_list[i].m_li &&
|
||||
s_li == mid_list[i].s_li &&
|
||||
(f_li_0 == mid_list[i].f_li || f_li == mid_list[i].f_li))
|
||||
break;
|
||||
}
|
||||
if (mid_list[i].manufacturer[0] == 0) {
|
||||
sprintf(buf, "Unknown CD manufacturer. Please report code '%2.2dm%2.2ds%2.2df/%2.2dm%2.2ds%2.2df', the human readable brand, size, and speed to scdbackup@gmx.net.", m_li, s_li, f_li, m_lo, s_lo, f_lo);
|
||||
result = strdup(buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Compose, allocate and copy result */
|
||||
if ((flag & 1) && mid_list[i].other_brands[0]) {
|
||||
sprintf(buf, "%s (aka %s)",
|
||||
mid_list[i].manufacturer, mid_list[i].other_brands);
|
||||
result = strdup(buf);
|
||||
} else
|
||||
result = strdup(mid_list[i].manufacturer);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* ts A90904 */
|
||||
struct dvd_mid_record {
|
||||
char *mc1;
|
||||
char *mc2;
|
||||
int mc1_sig_len;
|
||||
char *manufacturer;
|
||||
};
|
||||
typedef struct dvd_mid_record dvd_mid_record_t;
|
||||
|
||||
/* ts A90904 */
|
||||
char *burn_guess_manufacturer(int prf,
|
||||
char *media_code1, char *media_code2, int flag)
|
||||
{
|
||||
int i, l = 0, m_li, s_li, f_li, m_lo, s_lo, f_lo;
|
||||
char buf[1024];
|
||||
char *result = NULL, *cpt;
|
||||
|
||||
/* Important Note: media_code1 and media_code2 are supposed to be
|
||||
encoded by burn_util_make_printable_word().
|
||||
Especially: ' ' -> '_' , {"_%/" unprintables -> %XY)
|
||||
*/
|
||||
static dvd_mid_record_t mid_list[]= {
|
||||
{"AML", "", 8, "UML"},
|
||||
{"BeAll", "", 5, "BeAll Developers, Inc."},
|
||||
{"CMC", "", 3, "CMC Magnetics Corporation"},
|
||||
{"DAXON", "", 5, "Daxon Technology Inc. / Acer"},
|
||||
{"Daxon", "", 5, "Daxon Technology Inc. / Acer"},
|
||||
{"FUJI", "", 4, "Fujifilm Holdings Corporation"},
|
||||
{"INFODISC", "", 8, "New Star Digital Co., Ltd."},
|
||||
{"INFOME", "", 6, "InfoMedia Inc."},
|
||||
{"ISMMBD", "", 6, "Info Source Multi Media Ltd."},
|
||||
{"JVC", "", 3, "JVC Limited"},
|
||||
{"KIC01RG", "", 7, "AMC"},
|
||||
{"LD", "", 8, "Lead Data Inc."},
|
||||
{"LGE", "", 3, "LG Electronics"},
|
||||
{"MAM", "", 8, "Mitsui Advanced Media, Inc. Europe"},
|
||||
{"MAXELL", "", 6, "Hitachi Maxell Ltd."},
|
||||
{"MBI", "", 3, "Moser Baer India Limited"},
|
||||
{"MCC", "", 8, "Mitsubishi Chemical Corporation"},
|
||||
{"MCI", "", 8, "Mitsui Chemicals Inc."},
|
||||
{"MEI", "", 3, "Panasonic Corporation"},
|
||||
{"MKM", "", 3, "Mitsubishi Kagaku Media Co."},
|
||||
{"MMC", "", 8, "Mitsubishi Kagaku Media Co."},
|
||||
{"MXL", "", 8, "Hitachi Maxell Ltd."},
|
||||
{"NANYA", "", 5, "Nan-Ya Plastics Corporation"},
|
||||
{"NSD", "", 8, "NESA International Inc."},
|
||||
{"OPTODISC", "", 8, "Optodisc Technology Corporation"},
|
||||
{"OTCBDR", "", 8, "Optodisc Technology Corporation"},
|
||||
{"PHILIP", "", 8, "Moser Baer India Limited"},
|
||||
{"PHILIPS", "", 8, "Philips"},
|
||||
{"PRINCO", "", 6, "Princo Corporation"},
|
||||
{"PRODISC", "", 7, "Prodisc Technology Inc."},
|
||||
{"Prodisc", "", 7, "Prodisc Technology Inc."},
|
||||
{"PVC", "", 3, "Pioneer"},
|
||||
{"RICOHJPN", "", 8, "Ricoh Company Limited"},
|
||||
{"RITEK", "", 5, "Ritek Corp"},
|
||||
{"SONY", "", 4, "Sony Corporation"},
|
||||
{"TDK", "", 3, "TDK Corporation"},
|
||||
{"TT", "", 8, "TDK Corporation"},
|
||||
{"TY", "", 8, "Taiyo Yuden Company Limited"},
|
||||
{"TYG", "", 3, "Taiyo Yuden Company Limited"},
|
||||
{"UTJR001", "", 7, "Unifino Inc."},
|
||||
{"VERBAT", "", 5, "Mitsubishi Kagaku Media Co."},
|
||||
{"YUDEN", "", 5, "Taiyo Yuden Company Limited"},
|
||||
{"", "", 0, ""}
|
||||
};
|
||||
|
||||
if (media_code2 != NULL &&
|
||||
(prf == -1 || prf == 0x09 || prf == 0x0A)) {
|
||||
if (strlen(media_code2) == 9 && media_code1[0] == '9' &&
|
||||
media_code1[2] == 'm' && media_code1[5] == 's' &&
|
||||
media_code1[8] == 'f' &&
|
||||
strchr(media_code1, '%') == NULL) {
|
||||
sscanf(media_code1, "%dm%ds%df", &m_li, &s_li, &f_li);
|
||||
sscanf(media_code2, "%dm%ds%df", &m_lo, &s_lo, &f_lo);
|
||||
if (m_li >= 96 && m_li <= 97 && m_lo > 0) {
|
||||
result = burn_guess_cd_manufacturer(
|
||||
m_li, s_li, f_li, m_lo, s_lo, f_lo, 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* DVD-R do not keep manufacturer id apart from media id.
|
||||
Some manufacturers use a blank as separator which would now be '_'.
|
||||
*/
|
||||
cpt = strchr(media_code1, '_');
|
||||
if (cpt != NULL && (prf == -1 || prf == 0x11 || prf == 0x13 ||
|
||||
prf == 0x14 || prf == 0x15))
|
||||
l = cpt - media_code1;
|
||||
|
||||
for (i = 0; mid_list[i].mc1[0]; i++) {
|
||||
if (strncmp(mid_list[i].mc1, media_code1,
|
||||
mid_list[i].mc1_sig_len) == 0)
|
||||
break;
|
||||
if (l > 0)
|
||||
if (strncmp(mid_list[i].mc1, media_code1, l) == 0)
|
||||
break;
|
||||
}
|
||||
if (mid_list[i].mc1[0] == 0) {
|
||||
sprintf(buf, "Unknown DVD/BD manufacturer. Please report code '%s/%s', the human readable brand, size, and speed to scdbackup@gmx.net.",
|
||||
media_code1, media_code2);
|
||||
result = strdup(buf);
|
||||
return result;
|
||||
}
|
||||
result = strdup(mid_list[i].manufacturer);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/* ts A90905 */
|
||||
/* Make *text a single printable word */
|
||||
/* IMPORTANT: text must be freeable memory !
|
||||
@param flag bit0=escape '/' too
|
||||
bit1=(overrides bit0) do not escape " _/"
|
||||
*/
|
||||
int burn_util_make_printable_word(char **text, int flag)
|
||||
{
|
||||
int i, esc_add = 0, ret;
|
||||
char *wpt, *rpt, *new_text = NULL;
|
||||
|
||||
if (flag & 2)
|
||||
flag &= ~1;
|
||||
|
||||
for (i = 0; (*text)[i]; i++) {
|
||||
rpt = (*text) + i;
|
||||
if (*rpt < 32 || *rpt > 126 || *rpt == 96 ||
|
||||
((*rpt == '_' || *rpt == '%') && (!(flag & 2))) ||
|
||||
(*rpt == '/' && (flag & 1)))
|
||||
esc_add += 2;
|
||||
}
|
||||
if (esc_add) {
|
||||
new_text = calloc(strlen(*text) + esc_add + 1, 1);
|
||||
if (new_text == NULL) {
|
||||
ret = -1;
|
||||
goto ex;
|
||||
}
|
||||
wpt = new_text;
|
||||
for (i = 0; (*text)[i]; i++) {
|
||||
rpt = (*text) + i;
|
||||
if (*rpt < 32 || *rpt > 126 || *rpt == 96 ||
|
||||
((*rpt == '_' || *rpt == '%') && (!(flag & 2))) ||
|
||||
(*rpt == '/' && (flag & 1))) {
|
||||
sprintf(wpt, "%%%2.2X",
|
||||
(unsigned int) *((unsigned char *) rpt));
|
||||
wpt+= 3;
|
||||
} else
|
||||
*(wpt++) = *rpt;
|
||||
}
|
||||
*wpt = 0;
|
||||
free(*text);
|
||||
*text = new_text;
|
||||
}
|
||||
if (!(flag & 2))
|
||||
for (i = 0; (*text)[i]; i++)
|
||||
if ((*text)[i] == ' ')
|
||||
(*text)[i] = '_';
|
||||
ret = 1;
|
||||
ex:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -5,4 +5,7 @@ char *burn_strdup(char *s);
|
||||
|
||||
char *burn_strndup(char *s, int n);
|
||||
|
||||
/* ts A90905 */
|
||||
int burn_util_make_printable_word(char **text, int flag);
|
||||
|
||||
#endif
|
||||
|
263
libburn/write.c
263
libburn/write.c
@ -36,7 +36,6 @@
|
||||
#include "crc.h"
|
||||
#include "debug.h"
|
||||
#include "init.h"
|
||||
#include "lec.h"
|
||||
#include "toc.h"
|
||||
#include "util.h"
|
||||
#include "sg.h"
|
||||
@ -44,11 +43,19 @@
|
||||
#include "options.h"
|
||||
#include "structure.h"
|
||||
#include "source.h"
|
||||
#include "mmc.h"
|
||||
#include "spc.h"
|
||||
|
||||
#include "libdax_msgs.h"
|
||||
extern struct libdax_msgs *libdax_messenger;
|
||||
|
||||
|
||||
/* ts A91120 : <<< experimental */
|
||||
#ifdef Libburn_mmap_write_buffeR
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* The maximum output size to be used with CD media. This is also curbed
|
||||
by BURN_OS_TRANSPORT_BUFFER_SIZE. The smaller number gets into effect.
|
||||
*/
|
||||
@ -770,8 +777,18 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index, 0x000002,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
|
||||
msg, 0, 0);
|
||||
if (nwa > d->nwa)
|
||||
d->nwa = nwa;
|
||||
|
||||
/* ts A91003 */
|
||||
if (nwa < d->nwa) {
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||
0x00020173,
|
||||
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Drive tells NWA smaller than last written address",
|
||||
0, 0);
|
||||
d->sync_cache(d);
|
||||
return 0;
|
||||
}
|
||||
d->nwa = nwa;
|
||||
|
||||
}
|
||||
|
||||
@ -868,8 +885,19 @@ ex:;
|
||||
d->sync_cache(d);
|
||||
|
||||
/* ts A61030 */
|
||||
if (burn_write_close_track(o, s, tnum) <= 0)
|
||||
ret = 0;
|
||||
/* ts A91003 :
|
||||
At least in simulation mode this causes NWA=0 for the
|
||||
next track. cdrecord does not use CLOSE TRACK at all but
|
||||
ends the tracks by SYNCHRONIZE CACHE alone.
|
||||
*/
|
||||
/* ts A91202 :
|
||||
Peng Shao reports that his LG GH22LS30 issues an SCSI error
|
||||
on CLOSE TRACK even in non-dummy mode. So i better give up
|
||||
this gesture which seems not be needed by any drive.
|
||||
if (!o->simulate)
|
||||
if (burn_write_close_track(o, s, tnum) <= 0)
|
||||
ret = 0;
|
||||
*/
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
@ -884,8 +912,8 @@ int burn_disc_write_is_ok(struct burn_write_opts *o, struct burn_disc *disc,
|
||||
|
||||
for (i = 0; i < disc->sessions; i++)
|
||||
for (t = 0; t < disc->session[i]->tracks; t++)
|
||||
if (!sector_headers_is_ok(
|
||||
o, disc->session[i]->track[t]->mode))
|
||||
if (sector_headers_is_ok(
|
||||
o, disc->session[i]->track[t]->mode) != 1)
|
||||
goto bad_track_mode_found;
|
||||
return 1;
|
||||
bad_track_mode_found:;
|
||||
@ -1065,11 +1093,25 @@ int burn_disc_open_track_dvd_minus_r(struct burn_write_opts *o,
|
||||
/* ts A70214 : eventually adjust already expanded size of track */
|
||||
burn_track_apply_fillup(s->track[tnum], d->media_capacity_remaining,1);
|
||||
|
||||
#ifdef Libburn_pioneer_dvr_216d_with_opC
|
||||
fprintf(stderr, "libburn_DEBUG: Libburn_pioneer_dvr_216d_with_opC : num_opc_tables = %d\n", d->num_opc_tables);
|
||||
if (d->num_opc_tables <= 0 && !o->simulate) {
|
||||
fprintf(stderr, "libburn_DEBUG: Libburn_pioneer_dvr_216d_with_opC : performing OPC\n");
|
||||
d->perform_opc(d);
|
||||
fprintf(stderr, "libburn_DEBUG: Libburn_pioneer_dvr_216d_with_opC : done\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef Libburn_pioneer_dvr_216d_get_evenT
|
||||
mmc_get_event(d);
|
||||
#endif
|
||||
|
||||
if (o->write_type == BURN_WRITE_SAO) { /* DAO */
|
||||
/* Round track size up to 32 KiB and reserve track */
|
||||
/* Round track size up to write chunk size and reserve track */
|
||||
size = ((off_t) burn_track_get_sectors(s->track[tnum]))
|
||||
* (off_t) 2048;
|
||||
size = (size + (off_t) 0x7fff) & ~((off_t) 0x7fff);
|
||||
* (off_t) 2048;
|
||||
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",
|
||||
@ -1107,14 +1149,11 @@ 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])) {
|
||||
/* Round track size up to 32 KiB and reserve track */
|
||||
|
||||
/* ts A81208 */
|
||||
/* >>> ??? round to 64 KiB for BD-R ? (It is not mandatory) */
|
||||
|
||||
/* Round track size up to write chunk size and reserve track */
|
||||
size = ((off_t) burn_track_get_sectors(s->track[tnum]))
|
||||
* (off_t) 2048;
|
||||
size = (size + (off_t) 0x7fff) & ~((off_t) 0x7fff);
|
||||
* (off_t) 2048;
|
||||
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",
|
||||
@ -1216,6 +1255,132 @@ int burn_disc_close_track_dvd_plus_r(struct burn_write_opts *o,
|
||||
}
|
||||
|
||||
|
||||
/* <<<
|
||||
#define Libburn_simplified_dvd_chunk_transactioN 1
|
||||
*/
|
||||
|
||||
#ifdef Libburn_simplified_dvd_chunk_transactioN
|
||||
|
||||
/* ts A91114 : EXPERIMENTAL, NOT COMPLETELY IMPLEMENTED
|
||||
|
||||
Simplified data transmission for DVD. libburn via Linux USB is 30 % slower
|
||||
than growisofs or cdrecord when transmitting 32 KB chunks.
|
||||
With 64 KB chunks it is 20% faster than the competitors.
|
||||
No heavy CPU load is visible but there might be subtle race conditions in
|
||||
the USB driver which work better with shorter time gaps between WRITE
|
||||
commands.
|
||||
|
||||
Insight: It is actually about the interference of track source reading
|
||||
with SCSI writing via USB. growisofs reads with O_DIRECT into a
|
||||
mmap()ed buffer. When doing the same, libburn with 32 KB chunks
|
||||
reaches similar write speed.
|
||||
On the other hand, 64 KB chunks are 20% faster than that and
|
||||
are not improved by reading O_DIRECT.
|
||||
|
||||
O_DIRECT is a property of the input fd of struct burn_source.
|
||||
It can only be done with properly aligned memory and with aligned
|
||||
read size. Alignment size is file system system specific.
|
||||
System call
|
||||
mmap(NULL, (size_t) buffer_size, PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED | MAP_ANONYMOUS, -1, (off_t) 0);
|
||||
is supposed to allocate a properly aligned buffer.
|
||||
64 KB is supposed to be a safe size.
|
||||
Actually mmap() seems to be the main cause for a positive effect
|
||||
of O_DIRECT.
|
||||
|
||||
This simplified transmission function did not bring visible benefit.
|
||||
So for now it is not worth to teach it all applicable details of old
|
||||
CD sector oriented transmission.
|
||||
|
||||
@return 1= ok, go on , 2= no input with track->open_ended = nothing written
|
||||
<= 0 = error
|
||||
*/
|
||||
static int transact_dvd_chunk(struct burn_write_opts *opts,
|
||||
struct burn_track *track)
|
||||
{
|
||||
int curr = 0, valid, err;
|
||||
struct burn_drive *d = opts->drive;
|
||||
struct buffer *out = d->buffer;
|
||||
unsigned char *data = out->data;
|
||||
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
/* <<< ts A61031 */
|
||||
static int tee_fd= -1;
|
||||
if(tee_fd==-1)
|
||||
tee_fd= open("/tmp/libburn_sg_readin",
|
||||
O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR);
|
||||
#endif /* Libburn_log_in_and_out_streaM */
|
||||
|
||||
|
||||
/* Read a chunk full of data */
|
||||
|
||||
/* ??? Do we have offset padding ? >>> First produce offset padding */;
|
||||
|
||||
/* <<<< */
|
||||
if (0 && !track->eos) {
|
||||
for (curr = 0; curr < opts->obs; curr += 2048) {
|
||||
if (track->source->read != NULL)
|
||||
valid = track->source->read(track->source,
|
||||
data + curr, 2048);
|
||||
else
|
||||
valid = track->source->read_xt(track->source,
|
||||
data + curr, 2048);
|
||||
if (valid <= 0) {
|
||||
track->eos = 1;
|
||||
break;
|
||||
}
|
||||
track->sourcecount += valid;
|
||||
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
if(tee_fd!=-1 && valid>0) {
|
||||
write(tee_fd, data + curr, valid);
|
||||
}
|
||||
#endif /* Libburn_log_in_and_out_streaM */
|
||||
|
||||
}
|
||||
} else if (!track->eos){
|
||||
valid = track->source->read(track->source, data, opts->obs);
|
||||
if (valid <= 0) {
|
||||
track->eos = 1;
|
||||
} else {
|
||||
track->sourcecount += valid;
|
||||
curr = valid;
|
||||
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
if(tee_fd!=-1 && valid>0) {
|
||||
write(tee_fd, data, valid);
|
||||
}
|
||||
#endif /* Libburn_log_in_and_out_streaM */
|
||||
}
|
||||
}
|
||||
if (curr == 0 && track->open_ended) {
|
||||
|
||||
/* >>> allow tail padding */;
|
||||
|
||||
return 2;
|
||||
}
|
||||
if (curr < opts->obs)
|
||||
memset(data + curr , 0, opts->obs - curr);
|
||||
|
||||
/* Write chunk */
|
||||
out->bytes = opts->obs;
|
||||
out->sectors = out->bytes / 2048;
|
||||
err = d->write(d, d->nwa, out);
|
||||
if (err == BE_CANCELLED)
|
||||
return 0;
|
||||
track->writecount += out->bytes;
|
||||
track->written_sectors += out->sectors;
|
||||
d->progress.buffered_bytes += out->bytes;
|
||||
d->nwa += out->sectors;
|
||||
out->bytes = 0;
|
||||
out->sectors = 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* Libburn_simplified_dvd_chunk_transactioN */
|
||||
|
||||
|
||||
/* ts A61218 - A81208 */
|
||||
int burn_dvd_write_track(struct burn_write_opts *o,
|
||||
struct burn_session *s, int tnum, int is_last_track)
|
||||
@ -1225,6 +1390,7 @@ int burn_dvd_write_track(struct burn_write_opts *o,
|
||||
struct buffer *out = d->buffer;
|
||||
int sectors;
|
||||
int i, open_ended = 0, ret= 0, is_flushed = 0;
|
||||
int first_buf_cap = 0, further_cap = 0, buf_cap_step = 1024;
|
||||
|
||||
/* ts A70213 : eventually expand size of track to max */
|
||||
burn_track_apply_fillup(t, d->media_capacity_remaining, 0);
|
||||
@ -1235,6 +1401,11 @@ int burn_dvd_write_track(struct burn_write_opts *o,
|
||||
ret = burn_disc_open_track_dvd_minus_r(o, s, tnum);
|
||||
if (ret <= 0)
|
||||
goto ex;
|
||||
/* Pioneer DVR-216D rev 1.09 hates multiple buffer inquiries
|
||||
before the drive buffer is full.
|
||||
*/
|
||||
first_buf_cap = 0;
|
||||
further_cap = -1;
|
||||
} else if (d->current_profile == 0x1b || d->current_profile == 0x2b) {
|
||||
/* DVD+R , DVD+R/DL */
|
||||
ret = burn_disc_open_track_dvd_plus_r(o, s, tnum);
|
||||
@ -1270,12 +1441,30 @@ int burn_dvd_write_track(struct burn_write_opts *o,
|
||||
for (i = 0; open_ended || i < sectors; i++) {
|
||||
|
||||
/* From time to time inquire drive buffer */
|
||||
if ((i%256)==0)
|
||||
/* ts A91110: Eventually avoid to do this more than once
|
||||
before the drive buffer is full. See above DVD-
|
||||
*/
|
||||
if (i == first_buf_cap ||
|
||||
((i % buf_cap_step) == 0 &&
|
||||
(i >= further_cap || further_cap < 0))) {
|
||||
d->read_buffer_capacity(d);
|
||||
if (further_cap < 0)
|
||||
further_cap =
|
||||
d->progress.buffer_capacity / 2048 + 128;
|
||||
}
|
||||
|
||||
#ifdef Libburn_simplified_dvd_chunk_transactioN
|
||||
|
||||
ret = transact_dvd_chunk(o, t);
|
||||
if (ret <= 0)
|
||||
{ret = 0; goto ex;}
|
||||
i += o->obs / 2048 - 1;
|
||||
d->progress.sector += o->obs / 2048 - 1;
|
||||
#else
|
||||
/* transact a (CD sized) sector */
|
||||
if (!sector_data(o, t, 0))
|
||||
{ ret = 0; goto ex; }
|
||||
#endif
|
||||
|
||||
if (open_ended) {
|
||||
d->progress.sectors = sectors = i;
|
||||
@ -1736,6 +1925,30 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
|
||||
o->obs_pad = 1; /* fill-up track's last 32k buffer */
|
||||
}
|
||||
|
||||
#ifdef Libburn_dvd_obs_default_64K
|
||||
o->obs = 64 * 1024;
|
||||
#endif
|
||||
|
||||
/* <<< test only : Does this increase effective speed with USB ?
|
||||
ts A90801 : 64kB: speed with 16x DVD-R is 12 rather than 8
|
||||
128kB: glibc complains about double free
|
||||
With BURN_OS_TRANSPORT_BUFFER_SIZE
|
||||
enlarged to 128 MB, the first WRITE fails
|
||||
with an i/o error.
|
||||
o->obs = 64 * 1024;
|
||||
*/
|
||||
|
||||
if (o->dvd_obs_override >= 32 * 1024)
|
||||
o->obs = o->dvd_obs_override;
|
||||
|
||||
if (o->obs > BUFFER_SIZE) {
|
||||
sprintf(msg, "Chosen write chunk size %d exceeds system dependent buffer size", o->obs);
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||
0x00000002, LIBDAX_MSGS_SEV_DEBUG,
|
||||
LIBDAX_MSGS_PRIO_ZERO, msg, 0, 0);
|
||||
o->obs = 32 * 1024; /* This size is required to work */
|
||||
}
|
||||
|
||||
sprintf(msg, "dvd/bd Profile= %2.2Xh , obs= %d , obs_pad= %d",
|
||||
d->current_profile, o->obs, o->obs_pad);
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
|
||||
@ -2022,8 +2235,9 @@ int burn_stdio_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
break;
|
||||
}
|
||||
d->progress.sector++;
|
||||
/* Flush to disk after each full MB */
|
||||
if (d->progress.sector - prev_sync_sector >= 512) {
|
||||
/* Flush to disk from time to time */
|
||||
if (d->progress.sector - prev_sync_sector >=
|
||||
o->stdio_fsync_size && o->stdio_fsync_size > 0) {
|
||||
prev_sync_sector = d->progress.sector;
|
||||
if (!o->simulate)
|
||||
burn_stdio_sync_cache(d->stdio_fd, d, 1);
|
||||
@ -2106,6 +2320,7 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
|
||||
off_t default_size;
|
||||
char msg[80];
|
||||
|
||||
|
||||
/* ts A60924 : libburn/message.c gets obsoleted
|
||||
burn_message_clear_queue();
|
||||
*/
|
||||
@ -2120,11 +2335,12 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
|
||||
else
|
||||
d->stream_recording_start = 0;
|
||||
|
||||
d->buffer = calloc(sizeof(struct buffer), 1);
|
||||
/* ts A91122 : Get buffer suitable for sources made by
|
||||
burn_os_open_track_src() */
|
||||
d->buffer = burn_os_alloc_buffer(sizeof(struct buffer), 0);
|
||||
if (d->buffer == NULL)
|
||||
goto fail_wo_sync;
|
||||
|
||||
|
||||
/* >>> ts A90321
|
||||
|
||||
memset(d->buffer, 0, sizeof(struct buffer));
|
||||
@ -2345,7 +2561,8 @@ fail_wo_sync:;
|
||||
ex:;
|
||||
d->do_stream_recording = 0;
|
||||
if (d->buffer != NULL)
|
||||
free((char *) d->buffer);
|
||||
burn_os_free_buffer((char *) d->buffer,
|
||||
sizeof(struct buffer), 0);
|
||||
d->buffer = buffer_mem;
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user