Compare commits
55 Commits
CdrskinZer
...
trunk@386
Author | SHA1 | Date | |
---|---|---|---|
7458223cc0 | |||
5a0b597e3f | |||
bf20758906 | |||
1bfd7b5a5f | |||
aa813303a4 | |||
9baf20e907 | |||
1947c3a25d | |||
6b22dadcdd | |||
4efccd15b3 | |||
496fb67c29 | |||
bc97bdfa71 | |||
68784d8703 | |||
10c01ebc83 | |||
6c22b98235 | |||
62bd5963d0 | |||
726cd2664d | |||
5378638ba7 | |||
347aa3fe0c | |||
c9478cc15e | |||
ce0d783e82 | |||
5057fe48ab | |||
fcc755a5b8 | |||
ab8127f980 | |||
dad50348db | |||
140ff9ade4 | |||
2a64a0d3b1 | |||
82983cd7c1 | |||
b31e882582 | |||
dd80b2fc88 | |||
3051fc1987 | |||
e54be83b27 | |||
448aac8880 | |||
db4522bbdc | |||
d7c34f05e4 | |||
b96fbd5bd8 | |||
25d5a2afe4 | |||
66515523c1 | |||
684cfd0cd2 | |||
a0e745c54a | |||
a239d54bd7 | |||
c98dd9b0a7 | |||
193d674852 | |||
15e37555ae | |||
d337722920 | |||
5af92d13fe | |||
114307a679 | |||
99ca953b1d | |||
b837cc134d | |||
d3ee0b72e4 | |||
6914e2f7e2 | |||
37017119b0 | |||
447d2365c7 | |||
ece61a1860 | |||
acc6bdd95c | |||
559811e8ef |
2
CONTRIBUTORS
Normal file
2
CONTRIBUTORS
Normal file
@ -0,0 +1,2 @@
|
||||
Joe Neeman
|
||||
Philippe Rouquier
|
@ -215,5 +215,9 @@ EXTRA_DIST = \
|
||||
cdrskin/changelog.txt \
|
||||
cdrskin/cdrskin_eng.html \
|
||||
cdrskin/wiki_plain.txt \
|
||||
cdrskin/cleanup.h \
|
||||
cdrskin/cleanup.c \
|
||||
libburn/sg-freebsd.c \
|
||||
libburn/sg-linux.c \
|
||||
COPYING
|
||||
|
||||
|
7
README
7
README
@ -152,6 +152,13 @@ Project history as far as known to me:
|
||||
|
||||
- 16th September 2006 feature freeze for release of libburn-0.2.2 .
|
||||
|
||||
- 20th September 2006 release of libburn-0.2.2 .
|
||||
|
||||
- 26th October 2006 feature freeze for cdrskin-0.2.4 based on libburn-0.2.3 .
|
||||
This version of cdrskin is much more cdrecord compatible in repect
|
||||
to drive addressing and audio features.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
@ -3,5 +3,8 @@
|
||||
aclocal
|
||||
libtoolize --copy --force
|
||||
autoconf
|
||||
autoheader
|
||||
|
||||
# ts A61101 : libburn is not prepared for config.h
|
||||
# autoheader
|
||||
|
||||
automake --foreign --add-missing --copy --include-deps
|
||||
|
@ -26,12 +26,12 @@ following possible.
|
||||
cdrskin. By Thomas Schmitt <scdbackup@gmx.net>
|
||||
Integrated sub project of libburn.pykix.org but also published via:
|
||||
http://scdbackup.sourceforge.net/cdrskin_eng.html
|
||||
http://scdbackup.sourceforge.net/cdrskin-0.2.3.tar.gz
|
||||
http://scdbackup.sourceforge.net/cdrskin-0.2.5.tar.gz
|
||||
Copyright (C) 2006 Thomas Schmitt
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
On top of libburn there is implemented cdrskin 0.2.3, a limited cdrecord
|
||||
On top of libburn there is implemented cdrskin 0.2.5, a limited cdrecord
|
||||
compatibility wrapper which allows to use some libburn features from
|
||||
the command line.
|
||||
Interested users of cdrecord are invited to participate in the development
|
||||
@ -59,16 +59,16 @@ systems, including 64 bit systems. (Further reports are welcome.)
|
||||
|
||||
Compilation, First Glimpse, Installation
|
||||
|
||||
Obtain cdrskin-0.2.3.tar.gz , take it to a directory of your choice and do:
|
||||
Obtain cdrskin-0.2.5.tar.gz , take it to a directory of your choice and do:
|
||||
|
||||
tar xzf cdrskin-0.2.3.tar.gz
|
||||
cd cdrskin-0.2.3
|
||||
tar xzf cdrskin-0.2.5.tar.gz
|
||||
cd cdrskin-0.2.5
|
||||
|
||||
Or obtain a libburn.pykix.org SVN snapshot,
|
||||
go into the toplevel directory of the snapshot (e.g. cd libburn_pykix ),
|
||||
and execute the autotools script ./bootstrap . Use autools version >= 1.7 .
|
||||
|
||||
Within that toplevel directory of either cdrskin-0.2.3 or libburn then execute:
|
||||
Within that toplevel directory of either cdrskin-0.2.5 or libburn then execute:
|
||||
|
||||
./configure
|
||||
make
|
||||
@ -86,7 +86,7 @@ In order to surely get a standalone binary, execute
|
||||
|
||||
cdrskin/compile_cdrskin.sh
|
||||
|
||||
Version identification an help texts available afterwards:
|
||||
Version identification and help texts available afterwards:
|
||||
cdrskin/cdrskin -version
|
||||
cdrskin/cdrskin --help
|
||||
cdrskin/cdrskin -help
|
||||
@ -169,8 +169,8 @@ Burn image file my_image.iso to CD
|
||||
-eject my_image.iso
|
||||
|
||||
Burn a compressed afio archive to CD on-the-fly
|
||||
find . | afio -oZ - | cdrskin -v dev=0,1,0 fs=32m speed=8 -sao \
|
||||
driveropts=burnfree padsize=300k tsize=650m -
|
||||
find . | afio -oZ - | cdrskin -v dev=0,1,0 fs=32m speed=8 -tao \
|
||||
driveropts=burnfree padsize=300k -
|
||||
|
||||
Burn 6 audio tracks from files with different formats to CD.
|
||||
Anything except .wav or .au files has to be converted into raw format first.
|
||||
@ -181,7 +181,7 @@ See below "Audio CD" for specifications.
|
||||
madplay -o raw:track04.cd /path/to/track4.mp3
|
||||
mppdec --raw-le /path/to/track5.mpc track05.cd
|
||||
|
||||
cdrskin dev=0,1,0 blank=fast -eject speed=48 \
|
||||
cdrskin -v dev=0,1,0 blank=fast -eject speed=48 -sao \
|
||||
-audio -swab track0[1-5].cd /path/to/track6.wav
|
||||
|
||||
|
||||
@ -198,7 +198,7 @@ or a device file address as listed by --devices with an accessible drive :
|
||||
|
||||
Set usage of cdrskin with appropriate options rather than cdrecord :
|
||||
|
||||
export SCDBACKUP_CDRECORD="cdrskin -v -v tao_to_sao_tsize=650m"
|
||||
export SCDBACKUP_CDRECORD="cdrskin -v -v"
|
||||
|
||||
Run a backup :
|
||||
|
||||
@ -207,12 +207,11 @@ Run a backup :
|
||||
|
||||
Restrictions
|
||||
|
||||
The convenient burn mode TAO is not available with libburn yet.
|
||||
Therefore it has to be defaulted to mode SAO which needs to know the track
|
||||
size in advance. non-cdrecord option tao_to_sao_tsize=650m causes each CD
|
||||
to get burned up to 650 MB regardless of the payload size.
|
||||
The major restrictions are lifted now: audio, TAO, multi-session do work.
|
||||
Many cdrecord options are still unsupported, though.
|
||||
|
||||
If you have use cases for them, please report your wishes and expectations.
|
||||
|
||||
No multi session yet ... Please report your wishes.
|
||||
|
||||
|
||||
Inspiration and Standard
|
||||
|
@ -36,7 +36,7 @@ intermediate="./libburn_pykix"
|
||||
# My changes are in libburn-0.2.3.ts.develop , mainly in ./cdrskin
|
||||
|
||||
changes="./libburn-0.2.3.ts.develop"
|
||||
skin_rev="0.2.3"
|
||||
skin_rev="0.2.4"
|
||||
|
||||
# The result directory and the name of the result tarballs
|
||||
target="./cdrskin-${skin_rev}"
|
||||
@ -108,12 +108,24 @@ fi
|
||||
cp -a "$cdrskin_dir" "$cdrskin_target"
|
||||
|
||||
# Remove copied binaries
|
||||
rm "$cdrskin_target"/*.o
|
||||
rm "$cdrskin_target"/cdrfifo
|
||||
rm "$cdrskin_target"/cdrskin
|
||||
rm "$cdrskin_target"/cleanup
|
||||
rm "$cdrskin_target"/cdrskin_std
|
||||
rm "$cdrskin_target"/cdrskin_new
|
||||
rm "$cdrskin_target"/*.o
|
||||
for i in std new make old
|
||||
do
|
||||
if test -e "$cdrskin_target"/cdrskin_"$i"
|
||||
then
|
||||
rm "$cdrskin_target"/cdrskin_"$i"
|
||||
fi
|
||||
done
|
||||
for i in .deps .dirstamp .libs
|
||||
do
|
||||
if test -e "$cdrskin_target"/"$i"
|
||||
then
|
||||
rm -rf "$cdrskin_target"/"$i"
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove unwanted SVN stuff (TODO: avoid downloading it)
|
||||
for i in "$target"/.svn "$target"/*/.svn
|
203
cdrskin/add_ts_changes_to_libburn_0_2_5
Executable file
203
cdrskin/add_ts_changes_to_libburn_0_2_5
Executable file
@ -0,0 +1,203 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
# This script documents how this cdrskin version was derived from
|
||||
# a vanilla libburn version. It is not intended nor needed for any
|
||||
# use of cdrskin but included here only to show the technical
|
||||
# relationship between both projects - which are close friends
|
||||
# and issue roughly the same software.
|
||||
#
|
||||
# Package maintainers are advised to cover rather libburn than
|
||||
# cdrskin unless they put only emphasis on the cdrecord emulation
|
||||
# provided by cdrskin. libburn contains cdrskin - cdrskin is an
|
||||
# oscillating, friendly and coordinated fork of libburn.
|
||||
#
|
||||
# Script results are a source tarball and two binaries
|
||||
# one dynamic and one static in respect to system libs.
|
||||
# Both binaries are static in respect to libburn.
|
||||
#
|
||||
# The script is to be run in the directory above the toplevel
|
||||
# directory of libburn resp. cdrskin development.
|
||||
#
|
||||
# libburn version used: http://libburn.pykix.org
|
||||
# Downloaded by:
|
||||
# $ svn co http://libburn-svn.pykix.org/trunk libburn_pykix
|
||||
# packed up in a tarball just to save it from inadverted changes by
|
||||
# $ tar czf libburn_svn.tgz libburn_pykix
|
||||
original="./libburn_svn.tgz"
|
||||
# Historic moments:
|
||||
# original="./libburn_svn_A60815.tgz"
|
||||
# original="./libburn_cdrskin_A60819.tgz"
|
||||
|
||||
# The top level directory in that snapshot is named
|
||||
intermediate="./libburn_pykix"
|
||||
|
||||
# My changes are in libburn-0.2.3.ts.develop , mainly in ./cdrskin
|
||||
|
||||
changes="./libburn-0.2.3.ts.develop"
|
||||
skin_rev="0.2.5"
|
||||
|
||||
# The result directory and the name of the result tarballs
|
||||
target="./cdrskin-${skin_rev}"
|
||||
cdrskin_tarball="./cdrskin-${skin_rev}.tar.gz"
|
||||
cdrskin_tarball_svn="./cdrskin-${skin_rev}.svn.tar.gz"
|
||||
|
||||
# (This once earned me an embarrassingly blooping source tarball)
|
||||
# compile_dir="$changes"
|
||||
|
||||
compile_dir="$target"
|
||||
compile_cmd="./cdrskin/compile_cdrskin.sh"
|
||||
compile_static_opts="-static"
|
||||
compile_result="cdrskin/cdrskin"
|
||||
|
||||
bintarget_dynamic="cdrskin_${skin_rev}-x86-suse9_0"
|
||||
bintarget_static="$bintarget_dynamic"-static
|
||||
|
||||
if test -d "$changes"
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
echo "$0 : FATAL : no directory $changes" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for i in "$target" "$intermediate"
|
||||
do
|
||||
if test -e "$i"
|
||||
then
|
||||
echo "$0 : FATAL : already existing $i" >&2
|
||||
exit 2
|
||||
fi
|
||||
done
|
||||
|
||||
if test -f "$original"
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
echo "$0 : FATAL : no file $original" >&2
|
||||
exit 3
|
||||
fi
|
||||
|
||||
|
||||
# Unpack SVN snapshot.
|
||||
tar xzf "$original"
|
||||
|
||||
|
||||
# Rename the directory to the cdrskin name
|
||||
mv "$intermediate" "$target"
|
||||
|
||||
|
||||
# Copy the changes from the development tree
|
||||
#
|
||||
cdrskin_dir="$changes"/cdrskin
|
||||
libburn_dir="$changes"/libburn
|
||||
cdrskin_target="$target"/cdrskin
|
||||
libburn_target="$target"/libburn
|
||||
|
||||
# Create version timestamp
|
||||
timestamp="$(date -u '+%Y.%m.%d.%H%M%S')"
|
||||
echo "$timestamp"
|
||||
echo '#define Cdrskin_timestamP "'"$timestamp"'"' >"$cdrskin_dir"/cdrskin_timestamp.h
|
||||
|
||||
# Add the cdrskin files
|
||||
if test -e "$cdrskin_target"
|
||||
then
|
||||
rm -rf "$cdrskin_target"
|
||||
fi
|
||||
cp -a "$cdrskin_dir" "$cdrskin_target"
|
||||
|
||||
# Remove copied binaries
|
||||
rm "$cdrskin_target"/*.o
|
||||
rm "$cdrskin_target"/cdrfifo
|
||||
rm "$cdrskin_target"/cdrskin
|
||||
rm "$cdrskin_target"/cleanup
|
||||
for i in std new make old
|
||||
do
|
||||
if test -e "$cdrskin_target"/cdrskin_"$i"
|
||||
then
|
||||
rm "$cdrskin_target"/cdrskin_"$i"
|
||||
fi
|
||||
done
|
||||
for i in .deps .dirstamp .libs
|
||||
do
|
||||
if test -e "$cdrskin_target"/"$i"
|
||||
then
|
||||
rm -rf "$cdrskin_target"/"$i"
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove unwanted SVN stuff (TODO: avoid downloading it)
|
||||
for i in "$target"/.svn "$target"/*/.svn
|
||||
do
|
||||
if test "$i" = "$target"'/*/.svn'
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
if test -e "$i"
|
||||
then
|
||||
rm -rf "$i"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
## No more : Add own libburn-README in toplevel
|
||||
# cp -a "$changes"/README "$target"
|
||||
|
||||
## No more : Add modified Makefile.am
|
||||
# cp -a "$changes"/Makefile.am "$target"
|
||||
|
||||
|
||||
# Make SVN state tarball for the libburn team
|
||||
tar czf "$cdrskin_tarball_svn" "$target"
|
||||
|
||||
|
||||
# Get over dependecy on autotools. Rely only on cc, make et. al.
|
||||
# This is not the same as "make dist" but i can do it without
|
||||
# having to evaluate the quality of said "make dist"
|
||||
#
|
||||
( cd "$target" ; ./bootstrap )
|
||||
|
||||
# Remove unwanted stuff after bootstrap
|
||||
for i in "$target"/autom4te.cache
|
||||
do
|
||||
if echo "$i" | grep '\*' >/dev/null
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
if test -e "$i"
|
||||
then
|
||||
rm -rf "$i"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Pack it up to the new libburn+cdrskin-tarball
|
||||
tar czf "$cdrskin_tarball" "$target"
|
||||
|
||||
# Produce a static and a dynamic binary
|
||||
(
|
||||
cd "$compile_dir" || exit 1
|
||||
./configure
|
||||
make
|
||||
$compile_cmd -do_strip
|
||||
cp "$compile_result" "../$bintarget_dynamic"
|
||||
if test -n "$compile_static_opts"
|
||||
then
|
||||
$compile_cmd $compile_static_opts -do_strip
|
||||
cp "$compile_result" "../$bintarget_static"
|
||||
fi
|
||||
)
|
||||
|
||||
# Remove the build area
|
||||
# Disable this for debugging the merge process
|
||||
rm -rf "$target"
|
||||
|
||||
# Show the result
|
||||
./"$bintarget_dynamic" -version
|
||||
./"$bintarget_static" -version
|
||||
ls -l "$cdrskin_tarball"
|
||||
ls -l "$bintarget_dynamic"
|
||||
ls -l "$bintarget_static"
|
||||
|
@ -48,6 +48,9 @@ struct CdrfifO {
|
||||
int source_fd;
|
||||
double in_counter;
|
||||
|
||||
double fd_in_counter;
|
||||
double fd_in_limit;
|
||||
|
||||
char *buffer;
|
||||
int buffer_size;
|
||||
int buffer_is_full;
|
||||
@ -72,17 +75,27 @@ struct CdrfifO {
|
||||
double empty_counter;
|
||||
double full_counter;
|
||||
|
||||
|
||||
/* (sequential) fd chaining */
|
||||
/* fds: 0=source, 1=dest */
|
||||
int follow_up_fds[Cdrfifo_ffd_maX][2];
|
||||
|
||||
/* index of first byte in buffer which does not belong to predecessor fd */
|
||||
int follow_up_eop[Cdrfifo_ffd_maX];
|
||||
|
||||
/* index of first byte in buffer which belongs to [this] fd pair */
|
||||
int follow_up_sod[Cdrfifo_ffd_maX];
|
||||
|
||||
/* values for fd_in_limit */
|
||||
double follow_up_in_limits[Cdrfifo_ffd_maX];
|
||||
|
||||
/* number of defined follow-ups */
|
||||
int follow_up_fd_counter;
|
||||
|
||||
/* index of currently active (i.e. reading) follow-up */
|
||||
int follow_up_fd_idx;
|
||||
|
||||
|
||||
/* (simultaneous) peer chaining */
|
||||
struct CdrfifO *next;
|
||||
struct CdrfifO *prev;
|
||||
@ -117,6 +130,8 @@ int Cdrfifo_new(struct CdrfifO **ff, int source_fd, int dest_fd,
|
||||
buffer_size+= chunk_size-(buffer_size%chunk_size);
|
||||
o->source_fd= source_fd;
|
||||
o->in_counter= 0.0;
|
||||
o->fd_in_counter= 0;
|
||||
o->fd_in_limit= -1.0;
|
||||
o->buffer= NULL;
|
||||
o->buffer_is_full= 0;
|
||||
o->buffer_size= buffer_size;
|
||||
@ -140,6 +155,7 @@ int Cdrfifo_new(struct CdrfifO **ff, int source_fd, int dest_fd,
|
||||
for(i= 0; i<Cdrfifo_ffd_maX; i++) {
|
||||
o->follow_up_fds[i][0]= o->follow_up_fds[i][1]= -1;
|
||||
o->follow_up_eop[i]= o->follow_up_sod[i]= -1;
|
||||
o->follow_up_in_limits[i]= -1.0;
|
||||
}
|
||||
o->follow_up_fd_counter= 0;
|
||||
o->follow_up_fd_idx= -1;
|
||||
@ -224,6 +240,26 @@ int Cdrfifo_set_speed_limit(struct CdrfifO *o, double bytes_per_second,
|
||||
}
|
||||
|
||||
|
||||
/** Set a fixed size for input in order to cut off any unwanted tail
|
||||
@param o The fifo object
|
||||
@param idx index for fds attached via Cdrfifo_attach_follow_up_fds(),
|
||||
first attached is 0, <0 directs limit to active fd limit
|
||||
(i.e. first track is -1, second track is 0, third is 1, ...)
|
||||
*/
|
||||
int Cdrfifo_set_fd_in_limit(struct CdrfifO *o, double fd_in_limit, int idx,
|
||||
int flag)
|
||||
{
|
||||
if(idx<0) {
|
||||
o->fd_in_limit= fd_in_limit;
|
||||
return(1);
|
||||
}
|
||||
if(idx >= o->follow_up_fd_counter)
|
||||
return(0);
|
||||
o->follow_up_in_limits[idx]= fd_in_limit;
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
int Cdrfifo_set_fds(struct CdrfifO *o, int source_fd, int dest_fd, int flag)
|
||||
{
|
||||
o->source_fd= source_fd;
|
||||
@ -244,6 +280,7 @@ int Cdrfifo_get_fds(struct CdrfifO *o, int *source_fd, int *dest_fd, int flag)
|
||||
fifo buffer when its predecessors are exhausted. Reading will start as
|
||||
soon as reading of the predecessor encounters EOF. Writing will start
|
||||
as soon as all pending predecessor data are written.
|
||||
@return index number of new item + 1, <=0 indicates error
|
||||
*/
|
||||
int Cdrfifo_attach_follow_up_fds(struct CdrfifO *o, int source_fd, int dest_fd,
|
||||
int flag)
|
||||
@ -253,7 +290,7 @@ int Cdrfifo_attach_follow_up_fds(struct CdrfifO *o, int source_fd, int dest_fd,
|
||||
o->follow_up_fds[o->follow_up_fd_counter][0]= source_fd;
|
||||
o->follow_up_fds[o->follow_up_fd_counter][1]= dest_fd;
|
||||
o->follow_up_fd_counter++;
|
||||
return(1);
|
||||
return(o->follow_up_fd_counter);
|
||||
}
|
||||
|
||||
|
||||
@ -567,7 +604,12 @@ after_write:;
|
||||
can_read= o->chunk_size;
|
||||
if(o->write_idx<o->read_idx && o->write_idx+can_read > o->read_idx)
|
||||
can_read= o->read_idx - o->write_idx;
|
||||
ret= read(o->source_fd,o->buffer+o->write_idx,can_read);
|
||||
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;
|
||||
ret= 0;
|
||||
if(can_read>0)
|
||||
ret= read(o->source_fd,o->buffer+o->write_idx,can_read);
|
||||
if(ret==-1) {
|
||||
|
||||
/* >>> handle input error */;
|
||||
@ -599,6 +641,8 @@ after_write:;
|
||||
sod= 0;
|
||||
o->follow_up_sod[idx]= sod;
|
||||
o->write_idx= sod;
|
||||
o->fd_in_counter= 0;
|
||||
o->fd_in_limit= o->follow_up_in_limits[idx];
|
||||
if(Cdrfifo_debuG || (flag&1))
|
||||
fprintf(stderr,"\ncdrfio: new fifo source fd : %d\n",o->source_fd);
|
||||
} else {
|
||||
@ -608,6 +652,7 @@ after_write:;
|
||||
did_work= 1;
|
||||
o->put_counter++;
|
||||
o->in_counter+= ret;
|
||||
o->fd_in_counter+= ret;
|
||||
o->write_idx+= ret;
|
||||
if(o->write_idx>=o->buffer_size)
|
||||
o->write_idx= 0;
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
/** The fifo buffer which will smoothen the data stream from data provider
|
||||
to data consumer. Although this is not a mandatory lifesavier for modern
|
||||
to data consumer. Although this is not a mandatory lifesaver for modern
|
||||
burners any more, a fifo can speed up burning of data which is delivered
|
||||
with varying bandwidths (e.g. compressed archives created on the fly
|
||||
or mkisofs running at its speed limit.).
|
||||
@ -64,6 +64,16 @@ int Cdrfifo_get_sizes(struct CdrfifO *o, int *chunk_size, int *buffer_size,
|
||||
int Cdrfifo_set_speed_limit(struct CdrfifO *o, double bytes_per_second,
|
||||
int flag);
|
||||
|
||||
/** Set a fixed size for input in order to cut off any unwanted tail
|
||||
@param o The fifo object
|
||||
@param idx index for fds attached via Cdrfifo_attach_follow_up_fds(),
|
||||
first attached is 0, <0 directs limit to active fd limit
|
||||
(i.e. first track is -1, second track is 0, third is 1, ...)
|
||||
*/
|
||||
int Cdrfifo_set_fd_in_limit(struct CdrfifO *o, double fd_in_limit, int idx,
|
||||
int flag);
|
||||
|
||||
|
||||
int Cdrfifo_set_fds(struct CdrfifO *o, int source_fd, int dest_fd, int flag);
|
||||
int Cdrfifo_get_fds(struct CdrfifO *o, int *source_fd, int *dest_fd, int flag);
|
||||
|
||||
@ -72,6 +82,7 @@ int Cdrfifo_get_fds(struct CdrfifO *o, int *source_fd, int *dest_fd, int flag);
|
||||
fifo buffer when its predecessors are exhausted. Reading will start as
|
||||
soon as reading of the predecessor encounters EOF. Writing will start
|
||||
as soon as all pending predecessor data are written.
|
||||
@return index number of new item + 1, <=0 indicates error
|
||||
*/
|
||||
int Cdrfifo_attach_follow_up_fds(struct CdrfifO *o, int source_fd, int dest_fd,
|
||||
int flag);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -51,7 +51,7 @@ A CD recorder suitable for
|
||||
GPL software included:<BR>
|
||||
</H2>
|
||||
<DL>
|
||||
<DT>libburn-0.2.2</DT>
|
||||
<DT>libburn-0.2.3 stabilized SVN snapshot</DT>
|
||||
<DD>(by Derek Foreman, Ben Jansens, and team of libburn.pykix.org)</DD>
|
||||
<DD>transfers data to CD</DD>
|
||||
</DL>
|
||||
@ -80,10 +80,33 @@ Ports to other usable systems are appreciated. Reports are welcome.
|
||||
This has been achieved quite sufficiently for the needs of backup tool
|
||||
<A HREF="http://scdbackup.sourceforge.net/main_eng.html">scdbackup</A>
|
||||
and for data CD projects of <A HREF="http://www.k3b.org">K3b</A>
|
||||
(see <A HREF="#examples">examples</A>).<BR>
|
||||
(see <A HREF="#examples">examples</A>).
|
||||
Suitability for audio CD frontends has been improved much and is now being
|
||||
evaluated.<BR>
|
||||
Further enhancements depend on people who can describe and discuss their
|
||||
wishes as well as on the development of libburn.</DT>
|
||||
<BR><BR>
|
||||
<DT>Get an overview of drives:</DT>
|
||||
<DD>$ cdrskin -scanbus</DD>
|
||||
<DD>$ cdrskin dev=ATA -scanbus</DD>
|
||||
<DD>$ cdrskin --devices</DD>
|
||||
<DT>Get info about a particular drive or loaded media:</DT>
|
||||
<DD>$ cdrskin dev=0,1,0 -checkdrive</DD>
|
||||
<DD>$ cdrskin dev=ATA:1,0,0 -atip</DD>
|
||||
<DD>$ cdrskin dev=/dev/hdc -toc</DD>
|
||||
<DT>Make used CD-RW writable again:</DT>
|
||||
<DD>$ cdrskin -v dev=/dev/sg1 blank=all -eject</DD>
|
||||
<DD>$ cdrskin -v dev=/dev/dvd blank=fast -eject</DD>
|
||||
<DT>Write ISO-9660 filesystem image:</DT>
|
||||
<DD>$ cdrskin -v dev=/dev/hdc speed=12 fs=8m driveropts=burnfree -sao -eject padsize=300k my_image.iso</DD>
|
||||
<DT>Write compressed afio archive on-the-fly via cdrskin-0.2.4 :</DT>
|
||||
<DD>$ find . | afio -oZ - | cdrskin -v dev=0,1,0 fs=32m speed=8 driveropts=burnfree padsize=300k -sao tsize=650m -</DD>
|
||||
<DT>Write compressed afio archive on-the-fly via cdrskin-0.2.5 :</DT>
|
||||
<DD>$ find . | afio -oZ - | cdrskin -v dev=0,1,0 fs=32m speed=8 driveropts=burnfree padsize=300k -tao -</DD>
|
||||
<DT>Write audio tracks:</DT>
|
||||
<DD>$ cdrskin -v dev=ATA:1,0,0 speed=48 driveropts=burnfree -sao track1.wav track2.au -audio -swab track3.raw
|
||||
<DD>
|
||||
<BR>
|
||||
<DT><A HREF="cdrskin_help">cdrskin -help</A></DT>
|
||||
<DD>reports the cdrecord compatible options</DD>
|
||||
<DT><A HREF="cdrskin__help">cdrskin --help</A></DT>
|
||||
@ -94,15 +117,6 @@ wishes as well as on the development of libburn.</DT>
|
||||
(Be cursed if you install cdrskin as "cdrecord" without clearly forwarding
|
||||
this "don't bother Joerg" demand.)
|
||||
</DD>
|
||||
<DT>Currently (and sparsely) supported gestures :</DT>
|
||||
<DD>$ cdrskin -scanbus</DD>
|
||||
<DD>$ cdrskin dev=1,1,0 -checkdrive</DD>
|
||||
<DD>$ cdrskin dev=1,1,0 -atip</DD>
|
||||
<DD>$ cdrskin -v dev=1,1,0 blank=all -eject</DD>
|
||||
<DD>$ cdrskin -v dev=1,1,0 blank=fast -eject</DD>
|
||||
<DD>$ cdrskin -v dev=1,1,0 speed=12 fs=8m -sao driveropts=burnfree -eject padsize=300k my_image.iso</DD>
|
||||
<DD>$ cdrskin -v dev=1,1,0 ... ... track_1.iso padsize=300k track_2.afio</DD>
|
||||
<DD>$ find . | afio -oZ - | cdrskin -v dev=1,1,0 fs=32m speed=8 -sao driveropts=burnfree padsize=300k tsize=650m -</DD>
|
||||
</DL>
|
||||
</P>
|
||||
|
||||
@ -111,17 +125,13 @@ wishes as well as on the development of libburn.</DT>
|
||||
<UL>
|
||||
<DT></DT>
|
||||
<LI>
|
||||
Option -audio is enabled but by default not advertised via option -help,
|
||||
because no beheading of .au or .wav files takes place yet.
|
||||
<BR>Note: In development version 0.2.3 there is automatic extraction of
|
||||
.wav and .au. So -audio is fully supported.
|
||||
</LI>
|
||||
<LI>
|
||||
Burns only a single closed session. No -multi option yet.
|
||||
Note: Development version 0.2.5 offers multi-session now. See below.
|
||||
</LI>
|
||||
<LI>
|
||||
No TAO mode and therefore no writing on-the-fly without a predefined
|
||||
source size.
|
||||
No TAO mode in cdrskin-0.2.4 and therefore no writing on-the-fly without
|
||||
a predefined source size.<BR>
|
||||
Note: Development version 0.2.5 offers TAO now. See below.
|
||||
</LI>
|
||||
<LI>
|
||||
cdrskin -scanbus or --devices hangs for quite a while if there is
|
||||
@ -143,8 +153,8 @@ rw-permissions and retry the bus scan as non-superuser.
|
||||
<P>
|
||||
<DL>
|
||||
<DT>Download as source code (see README):</DT>
|
||||
<DD><A HREF="cdrskin-0.2.2.tar.gz">cdrskin-0.2.2.tar.gz</A>
|
||||
(450 KB).
|
||||
<DD><A HREF="cdrskin-0.2.4.pl01.tar.gz">cdrskin-0.2.4.pl01.tar.gz</A>
|
||||
(510 KB).
|
||||
</DD>
|
||||
<DD>
|
||||
The "stable" cdrskin tarballs are source code identical with "stable"
|
||||
@ -154,19 +164,18 @@ cdrskin is part of libburn - full libburn is provided with cdrskin releases.
|
||||
</DD>
|
||||
<DD> </DD>
|
||||
<DT>Download as single x86 binaries (untar and move to /usr/bin/cdrskin):</DT>
|
||||
<DD><A HREF="cdrskin_0.2.2-x86-suse9_0.tar.gz">
|
||||
cdrskin_0.2.2-x86-suse9_0.tar.gz</A>, (60 KB),
|
||||
<DD><A HREF="cdrskin_0.2.4.pl01-x86-suse9_0.tar.gz">
|
||||
cdrskin_0.2.4.pl01-x86-suse9_0.tar.gz</A>, (60 KB),
|
||||
<DL>
|
||||
<DD>runs on SuSE 9.0 (2.4.21) , RIP-14.4 (2.6.14) ,
|
||||
Gentoo (2.6.15 x86_64 Athlon).</DD>
|
||||
</DL>
|
||||
<DD><A HREF="cdrskin_0.2.2-x86-suse9_0-static.tar.gz">
|
||||
cdrskin_0.2.2-x86-suse9_0-static.tar.gz</A>, (250 KB), -static compiled,
|
||||
<DD><A HREF="cdrskin_0.2.4.pl01-x86-suse9_0-static.tar.gz">
|
||||
cdrskin_0.2.4.pl01-x86-suse9_0-static.tar.gz</A>, (260 KB), -static compiled,
|
||||
<DL>
|
||||
<DD>runs on SuSE 7.2 (2.4.4), and on the systems above.</DD>
|
||||
</DL>
|
||||
</DD>
|
||||
<DD> </DD>
|
||||
</DL>
|
||||
<DL><DT>Documentation:</DT>
|
||||
<DD><A HREF="README_cdrskin">README</A> a short introduction</DD>
|
||||
@ -185,30 +194,52 @@ cdrskin_0.2.2-x86-suse9_0-static.tar.gz</A>, (250 KB), -static compiled,
|
||||
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
Enhancements towards previous stable version cdrskin-0.2.2:
|
||||
<UL>
|
||||
<LI>cdrecord compatibility with drive addresses of form [ATA:]Bus,Target,Lun.
|
||||
<BR>(use option --old_pseudo_scsi_adr to get back the incompatible
|
||||
Bus,Traget,Lun addressing of version 0.2.2)
|
||||
</LI>
|
||||
<LI>Drives adressable via links and device siblings (/dev/cdrom , /dev/scd0).
|
||||
</LI>
|
||||
<LI>Automatic -audio extraction with .wav files and .au files.
|
||||
</LI>
|
||||
<LI>Bug fix about failure to eject.</LI>
|
||||
<LI>Comments and empty lines allowed in startup files.</LI>
|
||||
<LI>Options -scanbus and --devices print SORRY messages about busy drives.
|
||||
</LI>
|
||||
<LI>Drive buffer fill indicator reports realistic percentage numbers.</LI>
|
||||
<LI>Option -toc is supported, drive firmware revision gets displayed.</LI>
|
||||
</UL>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
<DT>Development snapshot, version 0.2.3 :</DT>
|
||||
<DD> </DD>
|
||||
<DD>Contains non-critical bug fix about failure to eject.</DD>
|
||||
<DD> </DD>
|
||||
<DD>Enhancements towards stable version:
|
||||
<DT><H3>Development snapshot, version 0.2.5 :</H3></DT>
|
||||
<DD>Enhancements towards stable version 0.2.4:
|
||||
<UL>
|
||||
<LI>cdrecord compatibility with addresses of form [ATA:]Bus,Target,Lun.</LI>
|
||||
<LI>Drives adressable via links and device siblings (/dev/cdrom , /dev/scd0).
|
||||
<LI>Option <KBD><B>-tao</B></KBD> is fully enabled.
|
||||
With single track or with undefined size from standard input,
|
||||
default is -tao. With other multi-track sessions, default is -sao.
|
||||
(The latter is an intentional deviation from cdrecord defaults.)
|
||||
</LI>
|
||||
<LI>Automatic -audio extraction with .wav files and .au files.
|
||||
<BR> $ cdrskin -v dev=1,1,0 track1.wav track2.au -audio -swab track3.raw
|
||||
</LI>
|
||||
<LI>Comments and empty lines allowed in startup files.</LI>
|
||||
<LI>Options -scanbus and --devices print SORRY messages about busy drives.
|
||||
</LI>
|
||||
<LI>Drive buffer fill indicator reports realistic percentage numbers.</LI>
|
||||
<LI>Option -toc is supported, drive firmware revision gets displayed.</LI>
|
||||
</UL></DD>
|
||||
<LI>Status report during blank, preparation and finalization improved.</LI>
|
||||
<LI>Bug fixed: Trailing trash appended to .wav files caused error message
|
||||
and, if exceeding fifo size, could even stall a burn.
|
||||
(Workaround: disable fifo by <KBD><B>fs=0</B></KBD>)</LI>
|
||||
<LI>Bug fixed: False speed with first pacifier cycle. Potential program
|
||||
abort by floating point exception (NaN).</LI>
|
||||
<LI>multi-session CDs: <KBD><B>-multi</B></KBD>, <KBD><B>-msinfo</B></KBD>,
|
||||
writing to appendable CDs (for now restricted to write mode TAO).</LI>
|
||||
</UL>
|
||||
</DD>
|
||||
<DD> </DD>
|
||||
<DD><A HREF="README_cdrskin_devel">README 0.2.3</A>
|
||||
<DD><A HREF="cdrskin__help_devel">cdrskin_0.2.3 --help</A></DD>
|
||||
<DD><A HREF="cdrskin_help_devel">cdrskin_0.2.3 -help</A></DD>
|
||||
<DD><A HREF="README_cdrskin_devel">README 0.2.5</A>
|
||||
<DD><A HREF="cdrskin__help_devel">cdrskin_0.2.5 --help</A></DD>
|
||||
<DD><A HREF="cdrskin_help_devel">cdrskin_0.2.5 -help</A></DD>
|
||||
<DD> </DD>
|
||||
<DT>Maintainers of cdrskin unstable packages please use SVN of
|
||||
<A HREF="http://libburn.pykix.org"> libburn.pykix.org</A></DT>
|
||||
@ -228,15 +259,15 @@ admins with full system souvereignty.</DT>
|
||||
<A HREF="README_cdrskin_devel">upcoming README</A> ):
|
||||
</DD>
|
||||
<DD>
|
||||
<A HREF="cdrskin-0.2.3.tar.gz">cdrskin-0.2.3.tar.gz</A>
|
||||
<A HREF="cdrskin-0.2.5.tar.gz">cdrskin-0.2.5.tar.gz</A>
|
||||
(500 KB).
|
||||
</DD>
|
||||
<DD>Binary (untar and move to /usr/bin/cdrskin):</DD>
|
||||
<DD><A HREF="cdrskin_0.2.3-x86-suse9_0.tar.gz">
|
||||
cdrskin_0.2.3-x86-suse9_0.tar.gz</A>, (60 KB).
|
||||
<DD><A HREF="cdrskin_0.2.5-x86-suse9_0.tar.gz">
|
||||
cdrskin_0.2.5-x86-suse9_0.tar.gz</A>, (60 KB).
|
||||
</DD>
|
||||
<DD><A HREF="cdrskin_0.2.3-x86-suse9_0-static.tar.gz">
|
||||
cdrskin_0.2.3-x86-suse9_0-static.tar.gz</A>, (260 KB)
|
||||
<DD><A HREF="cdrskin_0.2.5-x86-suse9_0-static.tar.gz">
|
||||
cdrskin_0.2.5-x86-suse9_0-static.tar.gz</A>, (260 KB)
|
||||
</DD>
|
||||
</DL>
|
||||
</P>
|
||||
@ -289,36 +320,6 @@ is a GUI frontend which uses cdrecord for CD burning.)
|
||||
<DT>Example for a test session with a cdrecord based scdbackup installation:</DT>
|
||||
<DD>$ <KBD><B>cdrskin -scanbus</B></KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD>scsibus1:</KBD></DD>
|
||||
<DD><KBD> 1,0,0 0) 'TEAC' 'CD-ROM CD-532S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD><KBD>scsibus2:</KBD></DD>
|
||||
<DD><KBD> 2,2,0 1) 'LITE-ON' 'LTR-48125S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD>$ <KBD><B>export SCDBACKUP_SCSI_ADR="2,2,0"</B></KBD></DD>
|
||||
|
||||
<!-- 0.2.4
|
||||
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD> 2,0,0 0) 'TEAC' 'CD-ROM CD-532S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD>$ <KBD><B>cdrskin -scanbus dev=ATA</B></KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD> 1,0,0 1) 'LITE-ON' 'LTR-48125S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD>$ <KBD><B>export SCDBACKUP_SCSI_ADR="ATA:1,0,0"</B></KBD></DD>
|
||||
|
||||
-->
|
||||
|
||||
<DD>$ <KBD><B>export SCDBACKUP_CDRECORD="cdrskin -v -v tao_to_sao_tsize=650m"</B></KBD></DD>
|
||||
<DD>$ <KBD><B>scdbackup_home</B></KBD></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT>Example for a permanent configuration of cdrskin based scdbackup</DT>
|
||||
<DD>$ <KBD><B>cd scdbackup-0.8.6/inst</B></KBD></DD>
|
||||
<DD>$ <KBD><B>export SCDBACKUP_USE_CDRSKIN=1</B></KBD></DD>
|
||||
<DD>$ <KBD><B>export SCDBACKUP_EJECT_ADR=/dev/cdrecorder</B></KBD></DD>
|
||||
<DD>$ <KBD><B>./CONFIGURE_CD</B></KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD>cdrskin 0.2.2 : limited cdrecord compatibility wrapper for libburn</KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD> ------------------- SCSI devices. To be used like 0,0,0</KBD></DD>
|
||||
</DL>
|
||||
If your system is stricken with some ill CD device then this can stall
|
||||
and you will have to press <KBD>Ctrl+C</KBD> to abort.
|
||||
@ -327,26 +328,34 @@ In this case, you may execute
|
||||
and try again.
|
||||
<DL>
|
||||
<DT></DT>
|
||||
<DD><KBD> 1,0,0 0) 'TEAC' 'CD-ROM CD-532S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD><KBD> 2,2,0 1) 'LITE-ON' 'LTR-48125S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD><KBD>------------------- end of SCSI device list</KBD></DD>
|
||||
|
||||
<!-- 0.2.4
|
||||
|
||||
<DD><KBD> 2,0,0 0) 'TEAC' 'CD-ROM CD-532S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD>$ <KBD><B>cdrskin -scanbus dev=ATA</B></KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD> 1,0,0 1) 'LITE-ON' 'LTR-48125S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD>$ <KBD><B>export SCDBACKUP_SCSI_ADR="ATA:1,0,0"</B></KBD></DD>
|
||||
<DD>$ <KBD><B>export SCDBACKUP_CDRECORD="cdrskin -v -v tao_to_sao_tsize=650m"</B></KBD></DD>
|
||||
<DD>$ <KBD><B>scdbackup_home</B></KBD></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT>Example for a permanent configuration of cdrskin based scdbackup</DT>
|
||||
<DD>$ <KBD><B>cd scdbackup-0.8.6/inst</B></KBD></DD>
|
||||
<DD>$ <KBD><B>export SCDBACKUP_USE_CDRSKIN=1</B></KBD></DD>
|
||||
<DD>$ <KBD><B>./CONFIGURE_CD</B></KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD>cdrskin 0.2.4 : limited cdrecord compatibility wrapper for libburn</KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD> ------------------- SCSI devices. To be used like 0,0,0</KBD></DD>
|
||||
<DD><KBD> 2,0,0 0) 'TEAC' 'CD-ROM CD-532S' '?' Removable CD-ROM</KBD></DD>
|
||||
<DD><KBD> ------------------- end of SCSI device list</KBD></DD>
|
||||
<DD><KBD> ------------------- ATA devices. To be used like ATA:0,0,0
|
||||
<DD><KBD> 1,0,0 1) 'LITE-ON' 'LTR-48125S' '?' Removable CD-ROM</KBD></DD>
|
||||
|
||||
-->
|
||||
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD> * Your cdrecord offers -driveropts=burnfree with your recorder.</KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD>scdbackup for CD 0.8.6 : First stage of installation done.</KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD>Now give it a try. Run : scdbackup_home</KBD></DD>
|
||||
<DD>$ <KBD><B>unset SCDBACKUP_USE_CDRSKIN SCDBACKUP_EJECT_ADR</B></KBD></DD>
|
||||
<DD>$ <KBD><B>unset SCDBACKUP_USE_CDRSKIN</B></KBD></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT>To get back to using cdrecord :</DT>
|
||||
|
@ -1 +1 @@
|
||||
#define Cdrskin_timestamP "2006.10.24.165610"
|
||||
#define Cdrskin_timestamP "2006.11.12.185342"
|
||||
|
@ -1,5 +1,22 @@
|
||||
------------------------------------------------------------------------------
|
||||
libburn.pykix.org scdbackup.sourceforge.net/cdrskin
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Deliberate deviations of cdrskin from cdrecord compatibility:
|
||||
|
||||
+ cdrskin does drive operations (on its drive 0) without a dev= option
|
||||
|
||||
+ gracetime=0 is allowed and set by default
|
||||
|
||||
+ -pad is always set for audio tracks
|
||||
|
||||
+ -sao is default for multi-track sessions with all track lengths defined
|
||||
|
||||
+ premature end of source is not an error and leads to full announced tracksize
|
||||
|
||||
+ -msinfo pushes all other messages to stderr. It works independent of
|
||||
other options which would prevent it with cdrecord (-atip, -scanbus, ...)
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Changelog
|
||||
------------------------------------------------------------------------------
|
||||
@ -742,6 +759,7 @@ libburn/sg.h
|
||||
libburn/sg.c
|
||||
libburn/libdax_msgs.h
|
||||
cdrskin/cdrskin.c
|
||||
Disabled but did not discarded failed attempt to lock against growisofs
|
||||
|
||||
2006.09.27.120656 [234]
|
||||
libburn/drive.h
|
||||
@ -934,7 +952,6 @@ libburn/transport.h
|
||||
cdrskin/cleanup.c
|
||||
Made libburn and cdrskin build on my Linux again
|
||||
|
||||
|
||||
2006.10.13.114554 [271]
|
||||
cdrskin/cdrskin.c
|
||||
libburn/write.c
|
||||
@ -942,7 +959,6 @@ libburn/sg-linux.c
|
||||
libburn/libdax_msgs.h
|
||||
Removed bug in burn_disc_write_sync(): BURN_DRIVE_IDLE, then d->sync_cache()
|
||||
|
||||
|
||||
2006.10.14.105224 [272]
|
||||
libburn/sg.h
|
||||
libburn/sg-freebsd.c
|
||||
@ -954,7 +970,6 @@ Introduced burn_drive_enumerator_t to allow more complete sg-freebsd implementat
|
||||
cdrskin/cdrskin.c
|
||||
Changed ambigous include statement of libburn.h
|
||||
|
||||
|
||||
15 Oct 2006 2006 [275]
|
||||
Makefile.am
|
||||
libburn/libdax_msgs.h
|
||||
@ -1027,8 +1042,483 @@ cdrskin/cdrskin.c
|
||||
cdrskin/compile_cdrskin.sh
|
||||
Made cdrskin use libburn/cleanup.[oh] by default (not cdrskin/cleanup.[ch])
|
||||
|
||||
------------------------------------ cycled - cdrskin-0.2.3 - 2006.10.19
|
||||
------------------------------------ cycled - cdrskin-0.2.3 - 2006.10.19.105730
|
||||
|
||||
2006.10.19.162254 [294]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin_eng.html
|
||||
cdrskin/changelog.txt
|
||||
Updated documentation about cdrskin-0.2.3
|
||||
|
||||
2006.10.19.164742 [295]
|
||||
cdrskin/cdrskin.c
|
||||
Corrected -help text
|
||||
|
||||
2006.10.20.113421 [297]
|
||||
libburn/libburn.h
|
||||
libburn/mmc.c
|
||||
libburn/sg-linux.c
|
||||
libburn/sg-freebsd.c
|
||||
libburn/drive.c
|
||||
cdrskin/cdrskin.c
|
||||
Made cdrskin produce "ATIP start of lead" (on non-blank media for now)
|
||||
|
||||
20 Oct 2006 [298]
|
||||
doc/comments
|
||||
Updated help text of libburner
|
||||
|
||||
2006.10.20.151602 [299]
|
||||
libburn/libburn.h
|
||||
libburn/drive.c
|
||||
libburn/mmc.c
|
||||
libburn/libdax_msgs.h
|
||||
cdrskin/cdrskin.c
|
||||
Classified media with TOC read error as unsuitable (rather than as blank)
|
||||
|
||||
2006.10.21.103352 [300]
|
||||
libburn/libburn.h
|
||||
libburn/transport.h
|
||||
libburn/drive.c
|
||||
libburn/mmc.c
|
||||
libburn/spc.c
|
||||
libburn/sg-linux.c
|
||||
libburn/sg-freebsd.c
|
||||
libburn/libdax_msgs.h
|
||||
cdrskin/cdrskin.c
|
||||
Implemented some ATIP functionality
|
||||
|
||||
2006.10.21.103653 [301] [302]
|
||||
libburn/libburn.h
|
||||
Clarified relation of burn_disc_read_atip() and burn_drive_get_start_end_lba()
|
||||
|
||||
2006.10.21.185102 [303]
|
||||
libburn/sg.h
|
||||
libburn/mmc.h
|
||||
libburn/mmc.c
|
||||
libburn/sbc.h
|
||||
libburn/sbc.c
|
||||
libburn/spc.h
|
||||
libburn/spc.c
|
||||
libburn/drive.h
|
||||
libburn/drive.c
|
||||
libburn/transport.h
|
||||
libburn/sg-linux.c
|
||||
libburn/sg-freebsd.c
|
||||
Split enumerate_common() into logic-layer, command-layer, transport-layer
|
||||
|
||||
2006.10.22.130341 [304]
|
||||
libburn/libburn.h
|
||||
libburn/mmc.c
|
||||
libburn/drive.c
|
||||
libburn/cleanup.c
|
||||
cdrskin/cleanup.c
|
||||
cdrskin/cdrskin.c
|
||||
Implemented cdrskin -toc
|
||||
|
||||
2006.10.22.131452 [305]
|
||||
cdrskin/cdrskin.c
|
||||
Regulated coexistence of options -toc and -atip
|
||||
|
||||
23 Oct 2006 [306]
|
||||
libburn/mmc.c
|
||||
Made clarification in remark about atip speed conversion
|
||||
|
||||
2006.10.23.074430 [307]
|
||||
cdrskin/cdrskin.c
|
||||
Made use of burn_drive_info.revision as firmware revision text
|
||||
|
||||
2006.10.23.113116 [308]
|
||||
libburn/libburn.h
|
||||
libburn/transport.h
|
||||
libburn/mmc.h
|
||||
libburn/mmc.c
|
||||
libburn/write.c
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin_eng.html
|
||||
cdrskin/README
|
||||
Made available drive buffer fill during write
|
||||
|
||||
23 Oct 2006 [309]
|
||||
libburn/sg-freebsd.c
|
||||
Updated tangling of FreeBSD code with mmc.c :(
|
||||
|
||||
|
||||
2006.10.23.134719 [310]
|
||||
cdrskin/cdrskin.c
|
||||
Corrected -toc track counter and notified about "hidden" tracks
|
||||
|
||||
2006.10.24.075039 [311]
|
||||
libburn/libdax_audioxtr.h
|
||||
libburn/libdax_audioxtr.c
|
||||
test/dewav.c
|
||||
cdrskin/cdrskin.c
|
||||
Introduced extraction of .au (but not its usage within cdrskin)
|
||||
|
||||
2006.10.24.102107 [312]
|
||||
libburn/libburn.h
|
||||
libburn/structure.h
|
||||
libburn/structure.c
|
||||
libburn/sector.c
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/README
|
||||
Enabled byte swapping for audio track sources, added anti option -swab
|
||||
|
||||
2006.10.24.130259 [313]
|
||||
test/dewav.c
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/README
|
||||
Enabled automatic extraction of .au
|
||||
|
||||
24 Oct 2006 [314]
|
||||
Makefile.am
|
||||
+ test/fake_au.c
|
||||
Introduced temporary test program to produce SUN .au files
|
||||
|
||||
------------------------------------ cycled - cdrskin-0.2.3 - 2006.10.24.144650
|
||||
|
||||
2006.10.24.165427 [315]
|
||||
libburn/sector.c
|
||||
Closed some loopholes for byte swapping.
|
||||
|
||||
|
||||
2006.10.24.165610 [316]
|
||||
cdrskin/cdrskin.c
|
||||
Enabled audio byte swapping by default (to be disabled via option -swab)
|
||||
|
||||
------------------------------------ cycled - cdrskin-0.2.3 - 2006.10.24.173602
|
||||
|
||||
25 Oct 2006 [317]
|
||||
cdrskin/README
|
||||
cdrskin/cdrskin_eng.html
|
||||
cdrskin/wiki_plain.txt
|
||||
Announced full -audio compatibility with cdrecord
|
||||
|
||||
------------------------------------ cycled - cdrskin-0.2.3 - 2006.10.25.160540
|
||||
|
||||
2006.10.27.114326 [319 branch]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_2_3
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_2_4
|
||||
cdrskin/README
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin_eng.html
|
||||
cdrskin/changelog.txt
|
||||
README
|
||||
Performed cdrskin version leap to cdrskin-0.2.4
|
||||
|
||||
2006.10.28.093922 [320 branch]
|
||||
cdrskin/cdrskin_timestamp.h
|
||||
Set final timestamp 2006.10.28.093922
|
||||
|
||||
------------------------------------ cycled - cdrskin-0.2.4 - 2006.10.28.093922
|
||||
|
||||
2006.10.28.115213 [321 trunk] [322 trunk]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_2_3
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_2_4
|
||||
+ cdrskin/add_ts_changes_to_libburn_0_2_5
|
||||
cdrskin/README
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin_eng.html
|
||||
cdrskin/changelog.txt
|
||||
README
|
||||
Performed cdrskin version leap to cdrskin-0.2.5
|
||||
|
||||
28 Oct 2006 [323 branch]
|
||||
- cdrskin/add_ts_changes_to_libburn_0_2_3
|
||||
cdrskin/add_ts_changes_to_libburn_0_2_4
|
||||
Corrected misnaming of my development directory
|
||||
|
||||
28 Oct 2006 [324 trunk]
|
||||
cdrskin/add_ts_changes_to_libburn_0_2_4
|
||||
cdrskin/add_ts_changes_to_libburn_0_2_5
|
||||
Corrected misnaming of my development directory
|
||||
|
||||
2006.10.28.132532 [325 branch]
|
||||
cdrskin/cdrskin.c
|
||||
Corrected last-minute bug which made every track from file an audio track
|
||||
|
||||
2006.10.28.151521 [326 trunk]
|
||||
cdrskin/cdrskin.c
|
||||
Corrected bug which made every track from file an audio track
|
||||
|
||||
29 Oct 2006 [327 branch] [328 trunk]
|
||||
+ CONTRIBUTORS
|
||||
Copied missing file from libburn-0.2.2
|
||||
|
||||
29 Oct 2006 [329 branch] [330 trunk]
|
||||
Makefile.am
|
||||
Added to EXTRA_DIST cdrskin/cleanup.[ch]
|
||||
|
||||
29 Oct 2006 [331 branch] [332 trunk]
|
||||
Makefile.am
|
||||
Added to EXTRA_DIST libburn/sg-*.[ch]
|
||||
|
||||
29 Oct 2006 [333 branch] [334 trunk]
|
||||
Makefile.am
|
||||
Deleted from to EXTRA_DIST libburn/sg-*.h
|
||||
|
||||
30 Oct 2006 [337]
|
||||
libburn/transport.h
|
||||
libburn/mmc.c
|
||||
libburn/sg-freebsd.c
|
||||
Made MMC command CLOSE TRACK/SESSION available to struct burn_drive
|
||||
|
||||
2006.10.31.115606 [338]
|
||||
libburn/transport.h
|
||||
libburn/spc.c
|
||||
libburn/mmc.c
|
||||
libburn/write.h
|
||||
libburn/write.c
|
||||
libburn/sector.c
|
||||
libburn/libdax_msgs.h
|
||||
libburn/sg.h
|
||||
libburn/sg-linux.c
|
||||
cdrskin/cdrskin.c
|
||||
Made single track TAO work (sector i/o still wants fixed size, though)
|
||||
|
||||
2006.10.31.184736 [339]
|
||||
libburn/sector.c
|
||||
libburn/source.c
|
||||
libburn/structure.h
|
||||
libburn/structure.c
|
||||
libburn/write.c
|
||||
cdrskin/cdrskin.c
|
||||
Made single track TAO work without fixed size (compile -experimental)
|
||||
|
||||
2006.11.01.163934 [340]
|
||||
libburn/libburn.h
|
||||
libburn/source.c
|
||||
libburn/write.h
|
||||
libburn/write.c
|
||||
libburn/structure.c
|
||||
libburn/structure.h
|
||||
libburn/sector.c
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/compile_cdrskin.sh
|
||||
Adapted cdrskin pacifier to possibly unknown track size
|
||||
|
||||
2006.11.01.172004 [341]
|
||||
configure.ac
|
||||
bootstrap
|
||||
test/libburner.c
|
||||
Repaired broken macro settings during Linux build
|
||||
|
||||
2 Nov 2006 [342]
|
||||
cdrskin/README
|
||||
Mentioned -tao and experimental compile
|
||||
|
||||
2006.11.02.211816 [343]
|
||||
libburn/libburn.h
|
||||
libburn/write.c
|
||||
cdrskin/cdrskin.c
|
||||
Installed status communications about closing session ("Fixating")
|
||||
|
||||
3 Nov 2006 [344]
|
||||
test/libburner.c
|
||||
Changed status report during blanking (there are no "sectors")
|
||||
|
||||
2006.11.03.063307 [345]
|
||||
cdrskin/cdrskin.c
|
||||
Removed some obsolete debugging messages
|
||||
|
||||
2006.11.03.151137 [346]
|
||||
libburn/structure.h
|
||||
libburn/structure.c
|
||||
libburn/write.h
|
||||
libburn/write.c
|
||||
libburn/sector.c
|
||||
libburn/libdax_msgs.h
|
||||
Installed decent abort behavior with TAO
|
||||
|
||||
2006.11.03.202403 [347]
|
||||
libburn/write.c
|
||||
Enabled TAO for multiple -data tracks (-audio still ends after 0 bytes)
|
||||
|
||||
2006.11.04.092909 [348]
|
||||
libburn/spc.c
|
||||
libburn/sector.c
|
||||
Enabled audio tracks with TAO
|
||||
|
||||
2006.11.02.140329 (pl01) [351 tags/CdrskinZeroTwoFourPlZeroOne]
|
||||
../cdrskin-0.2.4.patch01/configure.ac
|
||||
../cdrskin-0.2.4.patch01/bootstrap
|
||||
../cdrskin-0.2.4.patch01/cdrskin/README
|
||||
../cdrskin-0.2.4.patch01/cdrskin/add_ts_changes_to_libburn_0_2_4_patch01
|
||||
../cdrskin-0.2.4.patch01/cdrskin/cdrskin_timestamp.h
|
||||
../cdrskin-0.2.4.patch01/test/libburner.c
|
||||
Revoked autotools aspect of revision 290
|
||||
|
||||
2006.11.06.073810 [352]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/cdrskin_eng.html
|
||||
cdrskin/changelog.txt
|
||||
Adapted documentation to reflect experimental TAO mode
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.2.5 - 2006.11.06.085056
|
||||
|
||||
2006.11.06.114159 [353]
|
||||
libburn/libburn.h
|
||||
libburn/spc.c
|
||||
libburn/options.c
|
||||
cdrskin/cdrskin.c
|
||||
New API burn_write_opts_set_multi(). (But libburn cannot burn next session yet)
|
||||
|
||||
2006.11.06.121409 [354]
|
||||
cdrskin/cdrskin.c
|
||||
Made -toc on multiple sessions more compatible
|
||||
|
||||
2006.11.06.155237 [355]
|
||||
libburn/libburn.h
|
||||
libburn/drive.c
|
||||
libburn/write.c
|
||||
libburn/mmc.c
|
||||
libburn/sg-linux.c
|
||||
cdrskin/cdrskin.c
|
||||
Made CD with unclosed track blankable (by -force)
|
||||
|
||||
2006.11.06.195743 [356]
|
||||
libburn/transport.h
|
||||
libburn/mmc.c
|
||||
libburn/spc.c
|
||||
libburn/write.c
|
||||
libburn/sg-linux.c
|
||||
Cared for some SCSI error conditions which were ignored up to now
|
||||
|
||||
2006.11.07.114514 [357]
|
||||
cdrskin/cdrskin.c
|
||||
Made -tao default for single track or stdin, -sao for any other multi-track
|
||||
|
||||
7 Nov 2006 [358]
|
||||
cdrskin/cdrskin_eng.html
|
||||
cdrskin/changelog.txt
|
||||
Prepared next cdrskin-0.2.5 upload cycle
|
||||
|
||||
7 Nov 2006 [359]
|
||||
cdrskin/changelog.txt
|
||||
cdrskin/README
|
||||
cdrskin/wiki_plain.txt
|
||||
Updated documentation about TAO
|
||||
|
||||
2006.11.07.152018 [360]
|
||||
cdrskin/cdrskin.c
|
||||
cdrskin/changelog.txt
|
||||
Updated documentation about TAO
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.2.5 - 2006.11.07.152018
|
||||
* Enabled TAO
|
||||
|
||||
|
||||
2006.11.08.165648 [361]
|
||||
cdrskin/cdrfifo.h
|
||||
cdrskin/cdrfifo.c
|
||||
cdrskin/cdrskin.c
|
||||
Avoided error message and nonzero exit with trailing trash on .wav
|
||||
|
||||
8 Nov 2006 [362]
|
||||
cdrskin/cdrskin_eng.html
|
||||
Mentioned bug fix about trailing trash
|
||||
|
||||
2006.11.08.172918 [363]
|
||||
libburn/write.c
|
||||
Made track write counter of SAO count rather too much than too few bytes
|
||||
|
||||
8 Nov 2006 [364]
|
||||
cdrskin/changelog.txt
|
||||
Prepared next cdrskin-0.2.5 upload cycle
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.2.5 - 2006.11.08.181016
|
||||
* Bug fixed: Trailing trash appended to .wav files caused error message
|
||||
and, if exceeding fifo size, could even stall a burn.
|
||||
|
||||
2006.11.09.112832 [365]
|
||||
cdrskin/cdrskin.c
|
||||
Check desired write and block type with burn_drive_info.*_block_types
|
||||
|
||||
2006.11.09.113729 [366]
|
||||
libburn/sg-linux.c
|
||||
Silenced SCSI error (debugging) messages about missing media
|
||||
|
||||
2006.11.09.151431 [367]
|
||||
cdrskin/cdrskin.c
|
||||
Corrected first speed measurement report in TAO mode (which was random)
|
||||
|
||||
2006.11.09.193030 [368]
|
||||
libburn/libburn.h
|
||||
libburn/write.c
|
||||
cdrskin/cdrskin.c
|
||||
Experimentally enabled burning to BURN_DISC_APPENDABLE (tested with TAO only)
|
||||
|
||||
2006.11.10.093843 [369]
|
||||
cdrskin/cdrskin.c
|
||||
doc/comments
|
||||
Expressing more self-confidence
|
||||
|
||||
2006.11.10.172212 [370]
|
||||
cdrskin/cdrskin.c
|
||||
Provisory -msinfo (very verbous on stderr)
|
||||
|
||||
2006.11.10.184047 [371]
|
||||
cdrskin/cdrskin.c
|
||||
Made it work with fifos and other non-plain files as track sources
|
||||
|
||||
2006.11.10.185209 [372]
|
||||
cdrskin/cdrskin.c
|
||||
Read -msinfo from first track of last session and not from last track
|
||||
|
||||
2006.11.11.122402 [373]
|
||||
libburn/libburn.h
|
||||
libburn/transport.h
|
||||
libburn/mmc.h
|
||||
libburn/mmc.c
|
||||
libburn/write.c
|
||||
libburn/drive.c
|
||||
libburn/libdax_msgs.h
|
||||
New API function burn_disc_track_lba_nwa()
|
||||
|
||||
2006.11.11.122907 [374] [375]
|
||||
cdrskin/cdrskin.c
|
||||
Implemented not so provisory -msinfo
|
||||
|
||||
2006.11.11.124020 [376] [377]
|
||||
cdrskin/cdrskin.c
|
||||
Reacted on some warnings of gcc -O2
|
||||
|
||||
2006.11.11.134752 [378]
|
||||
cdrskin/cdrskin.c
|
||||
Implemented handling of unsuitable disk states with -msinfo
|
||||
|
||||
2006.11.11.152037 [379]
|
||||
cdrskin/cdrskin.c
|
||||
Demanded (for now) -tao for writing to appendable CDs
|
||||
|
||||
2006.11.11.152748 [380]
|
||||
cdrskin/cdrskin.c
|
||||
Generally enabled -multi, -msinfo and writing to appendable CDs in TAO mode
|
||||
|
||||
11 Nov 2006 []
|
||||
cdrskin/changelog.txt
|
||||
Prepared next cdrskin-0.2.5 cycle
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.2.5 - 2006.11.11.
|
||||
* Bug fixed: False speed with first pacifier cycle. Potential SIGFPE by NaN.
|
||||
* multi-session CDs (for now restricted to write mode TAO) by -multi, -msinfo
|
||||
|
||||
|
||||
|
||||
------------------------------------ cycle - cdrskin-0.2.5 -
|
||||
|
||||
[]
|
||||
Enable multi-session for write modes other than TAO
|
||||
|
||||
|
||||
[]
|
||||
Liberate generic SCSI code from sg-linux.c (scsi_notify_error(), scsi_error())
|
||||
|
||||
[]
|
||||
Coordinate scsi_notify_error() and scsi_error() about harmless conditions
|
||||
|
||||
|
||||
2006 []
|
||||
-reset: ioctl(fd,CDROMRESET) ioctl(fd,SG_SCSI_RESET,SG_SCSI_RESET_DEVICE)
|
||||
|
||||
2006 []
|
||||
Open O_EXCL all devices in address resolution chain
|
||||
@ -1042,8 +1532,6 @@ Convert burn_print() into libdax_msgs_submit()
|
||||
Test unlocking of all drives by burn_drive_info_free()
|
||||
Test unlocking of single drive by burn_drive_grab(), burn_drive_release()
|
||||
|
||||
|
||||
|
||||
2006 []
|
||||
Clear outdated persistent read buffer after small CD image was read (ticket 57)
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
debug_opts=
|
||||
def_opts=
|
||||
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
|
||||
libvers="-DCdrskin_libburn_0_2_3"
|
||||
cleanup_src_or_obj="libburn/cleanup.o"
|
||||
libdax_msgs_o="libburn/libdax_msgs.o"
|
||||
@ -50,6 +51,9 @@ do
|
||||
elif test "$i" = "-oldfashioned"
|
||||
then
|
||||
def_opts="$def_opts -DCdrskin_oldfashioned_api_usE"
|
||||
elif test "$i" = "-no_largefile"
|
||||
then
|
||||
largefile_opts=
|
||||
elif test "$i" = "-do_not_compile_cdrskin"
|
||||
then
|
||||
compile_cdrskin=0
|
||||
@ -76,6 +80,7 @@ do
|
||||
echo " -cvs_A60220 set macro to match libburn-CVS of 20 Feb 2006."
|
||||
echo " -libburn_0_2_2 set macro to match libburn-0.2.2."
|
||||
echo " -libburn_0_2_3 set macro to match current libburn-SVN."
|
||||
echo " -no_largefile do not use 64 bit off_t (must match libburn)."
|
||||
echo " -do_not_compile_cdrskin omit compilation of cdrskin/cdrskin."
|
||||
echo " -experimental use newly introduced libburn features."
|
||||
echo " -oldfashioned use pre-0.2.2 libburn features only."
|
||||
@ -99,7 +104,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"
|
||||
cc $warn_opts -I. $static_opts $debug_opts $libvers $def_opts \
|
||||
cc -I. \
|
||||
$warn_opts \
|
||||
$static_opts \
|
||||
$debug_opts \
|
||||
$libvers \
|
||||
$largefile_opts \
|
||||
$def_opts \
|
||||
\
|
||||
-DCdrskin_build_timestamP='"'"$timestamp"'"' \
|
||||
\
|
||||
-o cdrskin/cdrskin \
|
||||
|
@ -2,7 +2,7 @@
|
||||
cdrskin Wiki - plain text copy
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
cdrskin-0.2.3 is the cdrecord compatibility middleware of libburn.
|
||||
cdrskin-0.2.5 is the cdrecord compatibility middleware of libburn.
|
||||
|
||||
Its paragon, cdrecord, is a powerful GPL'ed burn program included in Joerg
|
||||
Schilling's cdrtools. cdrskin strives to be a second source for the services
|
||||
@ -12,12 +12,16 @@ Its future ability to burn DVD media depends on the development of libburn.
|
||||
cdrskin does not contain any bytes copied from cdrecord's sources.
|
||||
Many bytes have been copied from the message output of cdrecord
|
||||
runs, though. The most comprehensive technical overview of cdrskin
|
||||
can be found in cdrskin/README .
|
||||
can be found in cdrskin/README . Online available as :
|
||||
http://libburn.pykix.org/browser/trunk/cdrskin/README?format=raw
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
cdrskin with CD media fails to match its paragon cdrecord on two major
|
||||
fields: convenient TAO burn mode and multi session.
|
||||
cdrskin with CD media fails to match its paragon cdrecord on one major field:
|
||||
Multi session.
|
||||
|
||||
Convenient TAO burn mode is provided in development version 0.2.5 but not in
|
||||
current "stable" release 0.2.4.
|
||||
|
||||
cdrskin does not provide DVD burning yet. See advise to use dvd+rw-tools
|
||||
at the end of this text.
|
||||
@ -125,6 +129,10 @@ tao_to_sao_tsize=<num> allows the - actually unsupported - cdrecord option
|
||||
-tao and defines a default track size to be used if - as custom with -tao -
|
||||
no option tsize=# is given.
|
||||
|
||||
Since -tao is supported in cdrskin-0.2.5 the TAO-to-SAO workaround on its way
|
||||
to obsolescence. Nevertheless, tao_to_sao_tsize= allows to preset a default
|
||||
size for SAO mode which is in effect only if no track size is available.
|
||||
|
||||
As in general with cdrskin tsize=# the data source does not have to provide
|
||||
the full annouced amount of data. Missing data will be padded up by 0-bytes.
|
||||
Surplus data is supposed to cause an error, though. The burn will then
|
||||
|
@ -7,7 +7,11 @@ AC_CANONICAL_TARGET
|
||||
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
dnl A61101 This breaks Linux build (makes 32 bit off_t)
|
||||
dnl http://sourceware.org/autobook/autobook/autobook_96.html says
|
||||
dnl one must include some config.h and this was a pitfall.
|
||||
dnl So why dig the pit at all ?
|
||||
dnl AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Making releases:
|
||||
dnl BURN_MICRO_VERSION += 1;
|
||||
|
@ -13,10 +13,10 @@ together strive to be a usable foundation for application development.
|
||||
These are libraries, language bindings, and middleware binaries which emulate
|
||||
classical (and valuable) Linux tools.
|
||||
|
||||
Our scope is currently Linux 2.4 and 2.6 and we will have a hard time to widen
|
||||
this for now, because of our history. The project could need advise from or
|
||||
membership of skilled kernel people and people who know how to talk CD/DVD
|
||||
drives into doing things.
|
||||
Our scope is currently Linux 2.4 and 2.6 only. For ports to other systems
|
||||
we would need : login on a development machine resp. a live OS on CD or DVD,
|
||||
advise from a system person about the equivalent of Linux sg or FreeBSD CAM,
|
||||
volunteers for testing of realistic use cases.
|
||||
|
||||
We do have a workable code base for burning data CDs, though. The burn API is
|
||||
quite comprehensively documented and can be used to build a presentable
|
||||
|
@ -1176,6 +1176,16 @@ int burn_disc_pretend_blank(struct burn_drive *d)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ts A61106 API function */
|
||||
int burn_disc_pretend_full(struct burn_drive *d)
|
||||
{
|
||||
if (d->status != BURN_DISC_UNREADY &&
|
||||
d->status != BURN_DISC_UNSUITABLE)
|
||||
return 0;
|
||||
d->status = BURN_DISC_FULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ts A61021: new API function */
|
||||
int burn_disc_read_atip(struct burn_drive *d)
|
||||
{
|
||||
@ -1192,3 +1202,31 @@ int burn_disc_read_atip(struct burn_drive *d)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ts A61110 : new API function */
|
||||
int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
|
||||
int trackno, int *lba, int *nwa)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (burn_drive_is_released(d)) {
|
||||
libdax_msgs_submit(libdax_messenger,
|
||||
d->global_index, 0x0002011b,
|
||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Attempt to read track info from ungrabbed drive",
|
||||
0, 0);
|
||||
return -1;
|
||||
}
|
||||
if (d->busy != BURN_DRIVE_IDLE) {
|
||||
libdax_msgs_submit(libdax_messenger,
|
||||
d->global_index, 0x0002011c,
|
||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Attempt to read track info from busy drive",
|
||||
0, 0);
|
||||
return -1;
|
||||
}
|
||||
if (o!=NULL)
|
||||
d->send_write_parameters(d, o);
|
||||
ret = d->get_nwa(d, trackno, lba, nwa);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
expressing a file or stream size.
|
||||
|
||||
XXX we should enforce 64-bitness for off_t
|
||||
ts A61101 : this is usually done by the build system (if it is not broken)
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
|
||||
@ -40,6 +41,10 @@ struct burn_session;
|
||||
/** References a single track on a disc */
|
||||
struct burn_track;
|
||||
|
||||
/* ts A61111 */
|
||||
/** References a set of write parameters */
|
||||
struct burn_write_opts;
|
||||
|
||||
/** Session format for normal audio or data discs */
|
||||
#define BURN_CDROM 0
|
||||
/** Session format for obsolete CD-I discs */
|
||||
@ -216,7 +221,16 @@ enum burn_drive_status
|
||||
/** The drive is erasing a disc */
|
||||
BURN_DRIVE_ERASING,
|
||||
/** The drive is being grabbed */
|
||||
BURN_DRIVE_GRABBING
|
||||
BURN_DRIVE_GRABBING,
|
||||
|
||||
/* ts A61102 */
|
||||
/** The drive gets written zeroes before the track payload data */
|
||||
BURN_DRIVE_WRITING_PREGAP,
|
||||
/** The drive is told to close a track (TAO only) */
|
||||
BURN_DRIVE_CLOSING_TRACK,
|
||||
/** The drive is told to close a session (TAO only) */
|
||||
BURN_DRIVE_CLOSING_SESSION
|
||||
|
||||
};
|
||||
|
||||
/** Information about a track on a disc - this is from the q sub channel of the
|
||||
@ -648,6 +662,15 @@ enum burn_disc_status burn_disc_get_status(struct burn_drive *drive);
|
||||
int burn_disc_pretend_blank(struct burn_drive *drive);
|
||||
|
||||
|
||||
/* ts A61106 */
|
||||
/** WARNING: This overrides the safety measures against unsuitable media.
|
||||
Sets the drive status to BURN_DISC_FULL if it is BURN_DISC_UNREADY
|
||||
or BURN_DISC_UNSUITABLE. Thus marking media as blankable which actually
|
||||
failed to declare themselves either blank or (partially) filled.
|
||||
*/
|
||||
int burn_disc_pretend_full(struct burn_drive *drive);
|
||||
|
||||
|
||||
/* ts A61021 */
|
||||
/** Reads ATIP information from inserted media. To be obtained via
|
||||
burn_drive_get_write_speed(), burn_drive_get_min_write_speed(),
|
||||
@ -672,6 +695,21 @@ 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 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().
|
||||
This call retrieves an updated lba, eventual nwa, and can address the
|
||||
invisible track to come.
|
||||
The drive must be grabbed for this call. One may not issue this call
|
||||
during ongoing burn_disc_write() or burn_disc_erase().
|
||||
@param d The drive to query.
|
||||
@param o If not NULL: write parameters to be set on drive before query
|
||||
@param trackno 0=next track to come, >0 number of existing track
|
||||
@return 1=nwa is valid , 0=nwa is not valid , -1=error
|
||||
*/
|
||||
int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
|
||||
int trackno, int *lba, int *nwa);
|
||||
|
||||
|
||||
/** Tells whether a disc can be erased or not
|
||||
@return Non-zero means erasable
|
||||
@ -721,6 +759,7 @@ void burn_read_opts_free(struct burn_read_opts *opts);
|
||||
*/
|
||||
void burn_disc_erase(struct burn_drive *drive, int fast);
|
||||
|
||||
/* ts A61109 : this is defunct */
|
||||
/** Read a disc from the drive and write it to an fd pair. The drive must be
|
||||
grabbed successfully BEFORE calling this function. Always ensure that the
|
||||
drive reports a status of BURN_DISC_FULL before calling this function.
|
||||
@ -729,10 +768,9 @@ void burn_disc_erase(struct burn_drive *drive, int fast);
|
||||
*/
|
||||
void burn_disc_read(struct burn_drive *drive, const struct burn_read_opts *o);
|
||||
|
||||
/** Write a disc in the drive. The drive must be grabbed successfully BEFORE
|
||||
/** Write a disc in the drive. The drive must be grabbed successfully before
|
||||
calling this function. Always ensure that the drive reports a status of
|
||||
BURN_DISC_BLANK or BURN_STATUS_FULL (to append a new session to the
|
||||
disc) before calling this function.
|
||||
BURN_DISC_BLANK before calling this function.
|
||||
@param o The options for the writing operation.
|
||||
@param disc The struct burn_disc * that described the disc to be created
|
||||
*/
|
||||
@ -917,10 +955,19 @@ struct burn_source *burn_file_source_new(const char *path,
|
||||
*/
|
||||
struct burn_source *burn_fd_source_new(int datafd, int subfd, off_t size);
|
||||
|
||||
/** Tells how long a track will be on disc */
|
||||
/** Tells how long a track will be on disc
|
||||
>>> NOTE: Not reliable with tracks of undefined length
|
||||
*/
|
||||
int burn_track_get_sectors(struct burn_track *);
|
||||
|
||||
|
||||
/* ts A61101 */
|
||||
/** Tells how many source bytes have been read and how many data bytes have
|
||||
been written by the track during burn */
|
||||
int burn_track_get_counters(struct burn_track *t,
|
||||
off_t *read_bytes, off_t *written_bytes);
|
||||
|
||||
|
||||
/** Sets drive read and write speed
|
||||
@param d The drive to set speed for
|
||||
@param read Read speed in k/s (0 is max)
|
||||
@ -985,6 +1032,15 @@ void burn_write_opts_set_has_mediacatalog(struct burn_write_opts *opts, int has_
|
||||
|
||||
void burn_write_opts_set_mediacatalog(struct burn_write_opts *opts, unsigned char mediacatalog[13]);
|
||||
|
||||
|
||||
/* ts A61106 */
|
||||
/* Sets the multi flag which eventually marks the emerging session as not being
|
||||
the last one and thus creating a BURN_DISC_APPENDABLE media.
|
||||
@param multi 1=media will be appendable, 0=media will be closed (default)
|
||||
*/
|
||||
void burn_write_opts_set_multi(struct burn_write_opts *opts, int multi);
|
||||
|
||||
|
||||
/** Sets whether to read in raw mode or not
|
||||
@param opts The read opts to change
|
||||
@param raw_mode If non-zero, reading will be done in raw mode, so that everything in the data tracks on the
|
||||
|
@ -303,7 +303,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
|
||||
0x00020006 (FATAL,HIGH) = Too many scsi siblings
|
||||
0x00020007 (NOTE,HIGH) = Closed O_EXCL scsi siblings
|
||||
|
||||
From the hunt on Assert:
|
||||
General library operations:
|
||||
|
||||
0x00020101 (WARNING,HIGH) = Cannot find given worker item
|
||||
0x00020102 (SORRY,HIGH) = A drive operation is still going on
|
||||
@ -320,7 +320,7 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
|
||||
0x0002010c (FATAL,HIGH) = Failed to transfer command to drive
|
||||
0x0002010d (DEBUG,HIGH) = Could not inquire TOC
|
||||
0x0002010e (FATAL,HIGH) = Attempt to read ATIP from ungrabbed drive
|
||||
0x0002010f
|
||||
0x0002010f (DEBUG,HIGH) = SCSI error condition on command
|
||||
0x00020110 (FATAL,HIGH) = Persistent drive address too long
|
||||
0x00020111 (FATAL,HIGH) = Could not allocate new auxiliary object
|
||||
0x00020112 (SORRY,HIGH) = Bad combination of write_type and block_type
|
||||
@ -329,6 +329,12 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
|
||||
0x00020115 (SORRY,HIGH) = Attempt to set track mode to unusable value
|
||||
0x00020116 (FATAL,HIGH) = Track mode has unusable value
|
||||
0x00020117 (FATAL,HIGH) = toc_entry of drive is already in use
|
||||
0x00020118 (DEBUG,HIGH) = Closing track
|
||||
0x00020119 (DEBUG,HIGH) = Closing session
|
||||
0x0002011a (NOTE,HIGH) = Padding up track to minimum size
|
||||
0x0002011b (FATAL,HIGH) = Attempt to read track info from ungrabbed drive
|
||||
0x0002011c (FATAL,HIGH) = Attempt to read track info from busy drive
|
||||
0x0002011d (FATAL,HIGH) = SCSI error condition on write
|
||||
|
||||
libdax_audioxtr:
|
||||
0x00020200 (SORRY,HIGH) = Cannot open audio source file
|
||||
|
@ -20,6 +20,15 @@
|
||||
#include "structure.h"
|
||||
#include "options.h"
|
||||
|
||||
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
/* <<< ts A61031 */
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#endif /* Libburn_log_in_and_out_streaM */
|
||||
|
||||
|
||||
/* ts A61005 */
|
||||
#include "libdax_msgs.h"
|
||||
extern struct libdax_msgs *libdax_messenger;
|
||||
@ -90,7 +99,9 @@ void mmc_send_cue_sheet(struct burn_drive *d, struct cue_sheet *s)
|
||||
d->issue_command(d, &c);
|
||||
}
|
||||
|
||||
int mmc_get_nwa(struct burn_drive *d)
|
||||
/* ts A61110 : added parameters trackno, lba, nwa. Redefined return value.
|
||||
@return 1=nwa is valid , 0=nwa is not valid , -1=error */
|
||||
int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
|
||||
{
|
||||
struct buffer buf;
|
||||
struct command c;
|
||||
@ -101,13 +112,27 @@ int mmc_get_nwa(struct burn_drive *d)
|
||||
c.oplen = sizeof(MMC_TRACK_INFO);
|
||||
memcpy(c.opcode, MMC_TRACK_INFO, sizeof(MMC_TRACK_INFO));
|
||||
c.opcode[1] = 1;
|
||||
c.opcode[5] = 0xFF;
|
||||
if(trackno<=0)
|
||||
c.opcode[5] = 0xFF;
|
||||
else
|
||||
c.opcode[5] = trackno;
|
||||
c.page = &buf;
|
||||
c.dir = FROM_DRIVE;
|
||||
d->issue_command(d, &c);
|
||||
data = c.page->data;
|
||||
return (data[12] << 24) + (data[13] << 16)
|
||||
|
||||
*lba = (data[8] << 24) + (data[9] << 16)
|
||||
+ (data[10] << 8) + data[11];
|
||||
*nwa = (data[12] << 24) + (data[13] << 16)
|
||||
+ (data[14] << 8) + data[15];
|
||||
/* ts A61106 : MMC-1 Table 142 : NWA_V = NWA Valid Flag */
|
||||
if (!(data[7]&1)) {
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
|
||||
"mmc_get_nwa: Track Info Block: NWA_V == 0", 0, 0);
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ts A61009 : function is obviously unused. */
|
||||
@ -158,14 +183,13 @@ void mmc_close(struct burn_drive *d, int session, int track)
|
||||
|
||||
mmc_function_spy("mmc_close");
|
||||
|
||||
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
|
||||
"HOW THAT ? mmc_close() was called", 0, 0);
|
||||
|
||||
c.retry = 1;
|
||||
c.oplen = sizeof(MMC_CLOSE);
|
||||
memcpy(c.opcode, MMC_CLOSE, sizeof(MMC_CLOSE));
|
||||
c.opcode[2] = session | !!track;
|
||||
|
||||
/* ts A61030 : shifted !!session rather than or-ing plain session */
|
||||
c.opcode[2] = ((!!session)<<1) | !!track;
|
||||
|
||||
c.opcode[4] = track >> 8;
|
||||
c.opcode[5] = track & 0xFF;
|
||||
c.page = NULL;
|
||||
@ -230,6 +254,14 @@ int mmc_write(struct burn_drive *d, int start, struct buffer *buf)
|
||||
struct command c;
|
||||
int len;
|
||||
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
/* <<< ts A61031 */
|
||||
static int tee_fd= -1;
|
||||
if(tee_fd==-1)
|
||||
tee_fd= open("/tmp/libburn_sg_written",
|
||||
O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR);
|
||||
#endif /* Libburn_log_in_and_out_streaM */
|
||||
|
||||
mmc_function_spy("mmc_write");
|
||||
pthread_mutex_lock(&d->access_lock);
|
||||
cancelled = d->cancel;
|
||||
@ -261,9 +293,35 @@ int mmc_write(struct burn_drive *d, int start, struct buffer *buf)
|
||||
burn_print(12, "%d, %d, %d, %d\n", c->opcode[6], c->opcode[7], c->opcode[8], c->opcode[9]);
|
||||
*/
|
||||
|
||||
/* write(fileno(stderr), c.page->data, c.page->bytes);*/
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
/* <<< ts A61031 */
|
||||
if(tee_fd!=-1) {
|
||||
write(tee_fd,c.page->data,len*2048);
|
||||
}
|
||||
#endif /* Libburn_log_in_and_out_streaM */
|
||||
|
||||
d->issue_command(d, &c);
|
||||
|
||||
/* ts A61112 : react on eventual error condition */
|
||||
if (c.error && c.sense[2]!=0) {
|
||||
|
||||
/* >>> make this scsi_notify_error() when liberated */
|
||||
if (c.sense[2]!=0) {
|
||||
char msg[80];
|
||||
sprintf(msg,
|
||||
"SCSI error condition on write : key=%X asc=%2.2Xh ascq=%2.2Xh",
|
||||
c.sense[2],c.sense[12],c.sense[13]);
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||
0x0002011d,
|
||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||
msg, 0, 0);
|
||||
}
|
||||
pthread_mutex_lock(&d->access_lock);
|
||||
d->cancel = 1;
|
||||
pthread_mutex_unlock(&d->access_lock);
|
||||
return BE_CANCELLED;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -291,6 +349,7 @@ void mmc_read_toc(struct burn_drive *d)
|
||||
if (c.error) {
|
||||
|
||||
/* ts A61020 : this snaps on non-blank DVD media */
|
||||
/* ts A61106 : also snaps on CD with unclosed track/session */
|
||||
/* Very unsure wether this old measure is ok.
|
||||
Obviously higher levels do not care about this.
|
||||
DVD+RW burns go on after passing through here.
|
||||
@ -634,8 +693,12 @@ void mmc_read_sectors(struct burn_drive *d,
|
||||
len >>= 8;
|
||||
c.opcode[6] = len & 0xFF;
|
||||
req = 0xF8;
|
||||
|
||||
/* ts A61106 : LG GSA-4082B dislikes this. key=5h asc=24h ascq=00h
|
||||
|
||||
if (d->busy == BURN_DRIVE_GRABBING || o->report_recovered_errors)
|
||||
req |= 2;
|
||||
*/
|
||||
|
||||
c.opcode[10] = 0;
|
||||
/* always read the subcode, throw it away later, since we don't know
|
||||
@ -721,6 +784,13 @@ void mmc_set_speed(struct burn_drive *d, int r, int w)
|
||||
{
|
||||
struct command c;
|
||||
|
||||
/* ts A61112 : MMC standards prescribe FFFFh as max speed.
|
||||
But libburn.h prescribes 0. */
|
||||
if (r<=0 || r>0xffff)
|
||||
r = 0xffff;
|
||||
if (w<=0 || w>0xffff)
|
||||
w = 0xffff;
|
||||
|
||||
mmc_function_spy("mmc_set_speed");
|
||||
memcpy(c.opcode, MMC_SET_SPEED, sizeof(MMC_SET_SPEED));
|
||||
c.retry = 1;
|
||||
@ -824,6 +894,7 @@ int mmc_setup_drive(struct burn_drive *d)
|
||||
d->get_nwa = mmc_get_nwa;
|
||||
d->close_disc = mmc_close_disc;
|
||||
d->close_session = mmc_close_session;
|
||||
d->close_track_session = mmc_close;
|
||||
d->read_buffer_capacity = mmc_read_buffer_capacity;
|
||||
|
||||
/* ts A61020 */
|
||||
|
@ -37,7 +37,11 @@ void mmc_set_speed(struct burn_drive *, int, int);
|
||||
void mmc_read_lead_in(struct burn_drive *, struct buffer *);
|
||||
void mmc_perform_opc(struct burn_drive *);
|
||||
void mmc_get_configuration(struct burn_drive *);
|
||||
int mmc_get_nwa(struct burn_drive *);
|
||||
|
||||
/* ts A61110 : added parameters trackno, lba, nwa. Redefined return value.
|
||||
@return 1=nwa is valid , 0=nwa is not valid , -1=error */
|
||||
int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa);
|
||||
|
||||
void mmc_send_cue_sheet(struct burn_drive *, struct cue_sheet *);
|
||||
|
||||
/* ts A61023 : get size and free space of drive buffer */
|
||||
|
@ -152,6 +152,14 @@ void burn_write_opts_set_mediacatalog(struct burn_write_opts *opts,
|
||||
memcpy(opts->mediacatalog, &mediacatalog, 13);
|
||||
}
|
||||
|
||||
/* ts A61106 */
|
||||
void burn_write_opts_set_multi(struct burn_write_opts *opts, int multi)
|
||||
{
|
||||
opts->multi = !!multi;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void burn_read_opts_set_raw(struct burn_read_opts *opts, int raw)
|
||||
{
|
||||
opts->raw = raw;
|
||||
@ -198,3 +206,4 @@ void burn_read_opts_set_hardware_error_retries(struct burn_read_opts *opts,
|
||||
{
|
||||
opts->hardware_error_retries = hardware_error_retries;
|
||||
}
|
||||
|
||||
|
109
libburn/sector.c
109
libburn/sector.c
@ -19,6 +19,15 @@
|
||||
#include "toc.h"
|
||||
#include "write.h"
|
||||
|
||||
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
/* <<< ts A61031 */
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#endif /* Libburn_log_in_and_out_streaM */
|
||||
|
||||
|
||||
/*static unsigned char isrc[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";*/
|
||||
|
||||
#define sector_common(X) d->alba++; d->rlba X;
|
||||
@ -44,7 +53,8 @@ static void uncook_subs(unsigned char *dest, unsigned char *source)
|
||||
int sector_get_outmode(enum burn_write_types write_type,
|
||||
enum burn_block_types block_type)
|
||||
{
|
||||
if (write_type == BURN_WRITE_SAO)
|
||||
/* ts A61103 : extended SAO condition to TAO */
|
||||
if (write_type == BURN_WRITE_SAO || write_type == BURN_WRITE_TAO)
|
||||
return 0;
|
||||
else
|
||||
switch (block_type) {
|
||||
@ -81,6 +91,15 @@ static void get_bytes(struct burn_track *track, int count, unsigned char *data)
|
||||
{
|
||||
int valid, shortage, curr, i, tr;
|
||||
|
||||
#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 */
|
||||
|
||||
|
||||
/* no track pointer means we're just generating 0s */
|
||||
if (!track) {
|
||||
memset(data, 0, count);
|
||||
@ -107,10 +126,18 @@ static void get_bytes(struct burn_track *track, int count, unsigned char *data)
|
||||
valid = track->source->read(track->source, data + curr, count - curr);
|
||||
} else valid = 0;
|
||||
|
||||
if (valid == -1) {
|
||||
if (valid <= 0) { /* ts A61031 : extended from (valid == -1) */
|
||||
track->eos = 1;
|
||||
valid = 0;
|
||||
}
|
||||
track->sourcecount += valid;
|
||||
|
||||
#ifdef Libburn_log_in_and_out_streaM
|
||||
/* <<< ts A61031 */
|
||||
if(tee_fd!=-1 && valid>0) {
|
||||
write(tee_fd, data + curr, valid);
|
||||
}
|
||||
#endif /* Libburn_log_in_and_out_streaM */
|
||||
|
||||
curr += valid;
|
||||
shortage = count - curr;
|
||||
@ -134,6 +161,12 @@ static void get_bytes(struct burn_track *track, int count, unsigned char *data)
|
||||
if (!shortage)
|
||||
goto ex;
|
||||
|
||||
/* ts A61031 */
|
||||
if (shortage >= count)
|
||||
track->track_data_done = 1;
|
||||
if (track->open_ended)
|
||||
goto ex;
|
||||
|
||||
/* If we're still short, and there's a "next" pointer, we pull from that.
|
||||
if that depletes, we'll just fill with 0s.
|
||||
*/
|
||||
@ -152,15 +185,6 @@ ex:;
|
||||
if(shortage)
|
||||
memset(data + curr, 0, shortage); /* this is old icculus.org */
|
||||
if (track->swap_source_bytes == 1) {
|
||||
|
||||
/*
|
||||
{ static int swapping_count= 0;
|
||||
fprintf(stderr,"\rlibburn_debug: swapping #%d \r",
|
||||
swapping_count);
|
||||
swapping_count++;
|
||||
}
|
||||
*/
|
||||
|
||||
for (i = 1; i < count; i += 2) {
|
||||
tr = data[i];
|
||||
data[i] = data[i-1];
|
||||
@ -171,7 +195,9 @@ ex:;
|
||||
|
||||
/* ts A61009 : seems to hand out sector start pointer in opts->drive->buffer
|
||||
and to count hand outs as well as reserved bytes */
|
||||
static unsigned char *get_sector(struct burn_write_opts *opts, int inmode)
|
||||
/* ts A61101 : added parameter track for counting written bytes */
|
||||
static unsigned char *get_sector(struct burn_write_opts *opts,
|
||||
struct burn_track *track, int inmode)
|
||||
{
|
||||
struct burn_drive *d = opts->drive;
|
||||
struct buffer *out = d->buffer;
|
||||
@ -196,6 +222,13 @@ static unsigned char *get_sector(struct burn_write_opts *opts, int inmode)
|
||||
err = d->write(d, d->nwa, out);
|
||||
if (err == BE_CANCELLED)
|
||||
return NULL;
|
||||
|
||||
/* ts A61101 */
|
||||
if(track != NULL) {
|
||||
track->writecount += out->bytes;
|
||||
track->written_sectors += out->sectors;
|
||||
}
|
||||
|
||||
d->nwa += out->sectors;
|
||||
out->bytes = 0;
|
||||
out->sectors = 0;
|
||||
@ -208,6 +241,32 @@ static unsigned char *get_sector(struct burn_write_opts *opts, int inmode)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ts A61031 */
|
||||
/* Revoke the counting of the most recent sector handed out by get_sector() */
|
||||
static void unget_sector(struct burn_write_opts *opts, int inmode)
|
||||
{
|
||||
struct burn_drive *d = opts->drive;
|
||||
struct buffer *out = d->buffer;
|
||||
int outmode;
|
||||
int seclen;
|
||||
|
||||
outmode = get_outmode(opts);
|
||||
if (outmode == 0)
|
||||
outmode = inmode;
|
||||
|
||||
/* ts A61009 : react on eventual failure of burn_sector_length()
|
||||
(should not happen if API tested properly).
|
||||
Ensures out->bytes >= out->sectors */
|
||||
seclen = burn_sector_length(outmode);
|
||||
if (seclen <= 0)
|
||||
return;
|
||||
seclen += burn_subcode_length(outmode);
|
||||
|
||||
out->bytes -= seclen;
|
||||
out->sectors--;
|
||||
}
|
||||
|
||||
|
||||
/* either inmode == outmode, or outmode == raw. anything else is bad news */
|
||||
/* ts A61010 : changed type to int in order to propagate said bad news */
|
||||
/** @return 1 is ok, <= 0 is failure */
|
||||
@ -335,7 +394,7 @@ int sector_toc(struct burn_write_opts *o, int mode)
|
||||
unsigned char *data;
|
||||
unsigned char subs[96];
|
||||
|
||||
data = get_sector(o, mode);
|
||||
data = get_sector(o, NULL, mode);
|
||||
if (data == NULL)
|
||||
return 0;
|
||||
/* ts A61010 */
|
||||
@ -355,7 +414,7 @@ int sector_pregap(struct burn_write_opts *o,
|
||||
unsigned char *data;
|
||||
unsigned char subs[96];
|
||||
|
||||
data = get_sector(o, mode);
|
||||
data = get_sector(o, NULL, mode);
|
||||
if (data == NULL)
|
||||
return 0;
|
||||
/* ts A61010 */
|
||||
@ -375,7 +434,7 @@ int sector_postgap(struct burn_write_opts *o,
|
||||
unsigned char subs[96];
|
||||
unsigned char *data;
|
||||
|
||||
data = get_sector(o, mode);
|
||||
data = get_sector(o, NULL, mode);
|
||||
if (data == NULL)
|
||||
return 0;
|
||||
/* ts A61010 */
|
||||
@ -547,7 +606,7 @@ int sector_lout(struct burn_write_opts *o, unsigned char control, int mode)
|
||||
unsigned char subs[96];
|
||||
unsigned char *data;
|
||||
|
||||
data = get_sector(o, mode);
|
||||
data = get_sector(o, NULL, mode);
|
||||
if (!data)
|
||||
return 0;
|
||||
/* ts A61010 */
|
||||
@ -566,13 +625,19 @@ int sector_data(struct burn_write_opts *o, struct burn_track *t, int psub)
|
||||
unsigned char subs[96];
|
||||
unsigned char *data;
|
||||
|
||||
data = get_sector(o, t->mode);
|
||||
data = get_sector(o, t, t->mode);
|
||||
if (!data)
|
||||
return 0;
|
||||
/* ts A61010 */
|
||||
if (convert_data(o, t, t->mode, data) <= 0)
|
||||
return 0;
|
||||
|
||||
/* ts A61031 */
|
||||
if (t->open_ended && t->track_data_done) {
|
||||
unget_sector(o, t->mode);
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (!t->source->read_sub)
|
||||
subcode_user(o, subs, t->entry->point,
|
||||
t->entry->control, 1, &t->isrc, psub);
|
||||
@ -622,6 +687,11 @@ int sector_headers_is_ok(struct burn_write_opts *o, int mode)
|
||||
return 1;
|
||||
if (o->write_type == BURN_WRITE_SAO)
|
||||
return 1;
|
||||
|
||||
/* ts A61031 */
|
||||
if (o->write_type == BURN_WRITE_TAO)
|
||||
return 1;
|
||||
|
||||
if (mode & BURN_MODE1)
|
||||
return 2;
|
||||
return 0;
|
||||
@ -650,6 +720,11 @@ void sector_headers(struct burn_write_opts *o, unsigned char *out,
|
||||
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;
|
||||
|
||||
|
@ -481,6 +481,7 @@ static void enumerate_common(char *fname, int bus_no, int host_no,
|
||||
out.get_nwa = mmc_get_nwa;
|
||||
out.close_disc = mmc_close_disc;
|
||||
out.close_session = mmc_close_session;
|
||||
out.close_track_session = mmc_close;
|
||||
out.read_buffer_capacity = mmc_read_buffer_capacity;
|
||||
out.idata = malloc(sizeof(struct burn_scsi_inquiry_data));
|
||||
out.idata->valid = 0;
|
||||
|
@ -585,19 +585,40 @@ int sg_release(struct burn_drive *d)
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
{
|
||||
int done = 0, no_c_page = 0;
|
||||
int err;
|
||||
sg_io_hdr_t s;
|
||||
|
||||
/* ts A60821
|
||||
<<< debug: for tracing calls which might use open drive fds */
|
||||
#ifdef Libburn_log_sg_commandS
|
||||
/* <<< ts A61030 */
|
||||
static FILE *fp= NULL;
|
||||
static int fpcount= 0;
|
||||
int i;
|
||||
#endif /* Libburn_log_sg_commandS */
|
||||
|
||||
/* <<< ts A60821
|
||||
debug: for tracing calls which might use open drive fds */
|
||||
char buf[161];
|
||||
sprintf(buf,"sg_issue_command d->fd= %d d->released= %d\n",
|
||||
d->fd,d->released);
|
||||
mmc_function_spy(buf);
|
||||
|
||||
#ifdef Libburn_log_sg_commandS
|
||||
/* <<< ts A61030 */
|
||||
if(fp==NULL) {
|
||||
fp= fopen("/tmp/libburn_sg_command_log","a");
|
||||
fprintf(fp,"\n-----------------------------------------\n");
|
||||
}
|
||||
for(i=0;i<10;i++)
|
||||
fprintf(fp,"%2.2x ", c->opcode[i]);
|
||||
fprintf(fp,"\n");
|
||||
fpcount++;
|
||||
#endif /* Libburn_log_sg_commandS */
|
||||
|
||||
|
||||
/* ts A61010 : with no fd there is no chance to send an ioctl */
|
||||
if (d->fd < 0) {
|
||||
c->error = 1;
|
||||
@ -670,7 +691,9 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
if (s.sb_len_wr) {
|
||||
if (!c->retry) {
|
||||
c->error = 1;
|
||||
return 1;
|
||||
|
||||
/* A61106: rather than : return 1 */
|
||||
goto ex;
|
||||
}
|
||||
switch (scsi_error(d, s.sbp, s.sb_len_wr)) {
|
||||
case RETRY:
|
||||
@ -685,9 +708,59 @@ int sg_issue_command(struct burn_drive *d, struct command *c)
|
||||
done = 1;
|
||||
}
|
||||
} while (!done);
|
||||
|
||||
/* ts A61106 */
|
||||
ex:;
|
||||
if (c->error) {
|
||||
/* >>> to become d->notify_error() */
|
||||
scsi_notify_error(d, c, s.sbp, s.sb_len_wr, 0);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A61030 - A61109 */
|
||||
/* @param flag bit0=do report conditions which are considered not an error */
|
||||
int scsi_notify_error(struct burn_drive *d, struct command *c,
|
||||
unsigned char *sense, int senselen, int flag)
|
||||
{
|
||||
int key= -1, asc= -1, ascq= -1, ret;
|
||||
char msg[160];
|
||||
|
||||
if (d->silent_on_scsi_error)
|
||||
return 1;
|
||||
|
||||
if (senselen > 2)
|
||||
key = sense[2];
|
||||
if (senselen > 13) {
|
||||
asc = sense[12];
|
||||
ascq = sense[13];
|
||||
}
|
||||
|
||||
if(!(flag & 1)) {
|
||||
/* SPC : TEST UNIT READY command */
|
||||
if (c->opcode[0] == 0)
|
||||
return 1;
|
||||
/* MMC : READ DISC INFORMATION command */
|
||||
if (c->opcode[0] == 0x51)
|
||||
if (key == 0x2 && asc == 0x3A &&
|
||||
ascq>=0 && ascq <= 0x02) /* MEDIUM NOT PRESENT */
|
||||
return 1;
|
||||
}
|
||||
|
||||
sprintf(msg,"SCSI error condition on command %2.2Xh :", c->opcode[0]);
|
||||
if (key>=0)
|
||||
sprintf(msg+strlen(msg), " key=%Xh", key);
|
||||
if (asc>=0)
|
||||
sprintf(msg+strlen(msg), " asc=%2.2Xh", asc);
|
||||
if (ascq>=0)
|
||||
sprintf(msg+strlen(msg), " ascq=%2.2Xh", ascq);
|
||||
ret = libdax_msgs_submit(libdax_messenger, d->global_index, 0x0002010f,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, msg,0,0);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
enum response scsi_error(struct burn_drive *d, unsigned char *sense,
|
||||
int senselen)
|
||||
{
|
||||
|
@ -64,5 +64,9 @@ int sg_release(struct burn_drive *);
|
||||
int sg_issue_command(struct burn_drive *, struct command *);
|
||||
enum response scsi_error(struct burn_drive *, unsigned char *, int);
|
||||
|
||||
/* ts A61030 */
|
||||
/* @param flag bit0=do also report TEST UNIT READY failures */
|
||||
int scsi_notify_error(struct burn_drive *, struct command *c,
|
||||
unsigned char *sense, int senselen, int flag);
|
||||
|
||||
#endif /* __SG */
|
||||
|
@ -22,6 +22,10 @@ enum burn_source_status burn_track_set_source(struct burn_track *t,
|
||||
return BURN_SOURCE_FAILED;
|
||||
s->refcount++;
|
||||
t->source = s;
|
||||
|
||||
/* ts A61031 */
|
||||
t->open_ended = (s->get_size(s) <= 0);
|
||||
|
||||
return BURN_SOURCE_OK;
|
||||
}
|
||||
|
||||
|
@ -274,6 +274,11 @@ void spc_sense_write_params(struct burn_drive *d)
|
||||
mmc_read_disc_info(d);
|
||||
}
|
||||
|
||||
/* remark ts A61104 :
|
||||
Although command MODE SELECT is SPC, the content of the
|
||||
Write Parameters Mode Page (05h) is MMC (Table 108 in MMC-1).
|
||||
Thus the filling of the mode page should be done by a mmc_ function.
|
||||
*/
|
||||
void spc_select_write_params(struct burn_drive *d,
|
||||
const struct burn_write_opts *o)
|
||||
{
|
||||
@ -284,6 +289,13 @@ void spc_select_write_params(struct burn_drive *d,
|
||||
/* ts A61007 : All current callers are safe. */
|
||||
/* a ssert(o->drive == d); */
|
||||
|
||||
/* <<< A61030
|
||||
fprintf(stderr,"libburn_debug: write_type=%d multi=%d control=%d\n",
|
||||
o->write_type,o->multi,o->control);
|
||||
fprintf(stderr,"libburn_debug: block_type=%d spc_block_type=%d\n",
|
||||
o->block_type,spc_block_type(o->block_type));
|
||||
*/
|
||||
|
||||
memcpy(c.opcode, SPC_MODE_SELECT, sizeof(SPC_MODE_SELECT));
|
||||
c.retry = 1;
|
||||
c.oplen = sizeof(SPC_MODE_SELECT);
|
||||
@ -307,8 +319,17 @@ void spc_select_write_params(struct burn_drive *d,
|
||||
c.page->data[10] = (bufe << 6)
|
||||
+ (sim << 4)
|
||||
+ o->write_type;
|
||||
c.page->data[11] = (o->multi << 6) | o->control;
|
||||
|
||||
/* ts A61106 : MMC-1 table 110 : multi==0 or multi==3 */
|
||||
c.page->data[11] = ((3 * !!o->multi) << 6) | o->control;
|
||||
|
||||
c.page->data[12] = spc_block_type(o->block_type);
|
||||
|
||||
/* ts A61104 */
|
||||
if(!(o->control&4)) /* audio (MMC-1 table 61) */
|
||||
if(o->write_type == BURN_WRITE_TAO) /* ??? for others too ? */
|
||||
c.page->data[12] = 0; /* Data Block Type: Raw Data */
|
||||
|
||||
c.page->data[22] = 0;
|
||||
c.page->data[23] = 150; /* audio pause length */
|
||||
/*XXX need session format! */
|
||||
@ -361,7 +382,10 @@ void spc_probe_write_modes(struct burn_drive *d)
|
||||
c.page->data[12] = try_block_type;
|
||||
c.page->data[23] = 150;
|
||||
c.dir = TO_DRIVE;
|
||||
|
||||
d->silent_on_scsi_error = 1;
|
||||
d->issue_command(d, &c);
|
||||
d->silent_on_scsi_error = 0;
|
||||
|
||||
key = c.sense[2];
|
||||
asc = c.sense[12];
|
||||
@ -470,6 +494,10 @@ int burn_scsi_setup_drive(struct burn_drive *d, int bus_no, int host_no,
|
||||
d->channel = channel_no;
|
||||
d->lun = lun_no;
|
||||
|
||||
/* ts A61106 */
|
||||
d->silent_on_scsi_error = 0;
|
||||
|
||||
|
||||
d->idata = malloc(sizeof(struct burn_scsi_inquiry_data));
|
||||
d->idata->valid = 0;
|
||||
d->mdata = malloc(sizeof(struct scsi_mode_data));
|
||||
|
@ -115,6 +115,17 @@ struct burn_track *burn_track_create(void)
|
||||
t->pad = 1;
|
||||
t->entry = NULL;
|
||||
t->source = NULL;
|
||||
t->eos = 0;
|
||||
|
||||
/* ts A61101 */
|
||||
t->sourcecount = 0;
|
||||
t->writecount = 0;
|
||||
t->written_sectors = 0;
|
||||
|
||||
/* ts A61031 */
|
||||
t->open_ended = 0;
|
||||
t->track_data_done = 0;
|
||||
|
||||
t->postgap = 0;
|
||||
t->pregap1 = 0;
|
||||
t->pregap2 = 0;
|
||||
@ -318,6 +329,31 @@ int burn_track_get_sectors(struct burn_track *t)
|
||||
return sectors;
|
||||
}
|
||||
|
||||
/* ts A61031 */
|
||||
int burn_track_is_open_ended(struct burn_track *t)
|
||||
{
|
||||
return !!t->open_ended;
|
||||
}
|
||||
|
||||
/* ts A61101 : API function */
|
||||
int burn_track_get_counters(struct burn_track *t,
|
||||
off_t *read_bytes, off_t *written_bytes)
|
||||
{
|
||||
/*
|
||||
fprintf(stderr, "libburn_experimental: sizeof(off_t)=%d\n",
|
||||
sizeof(off_t));
|
||||
*/
|
||||
*read_bytes = t->sourcecount;
|
||||
*written_bytes = t->writecount;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* ts A61031 */
|
||||
int burn_track_is_data_done(struct burn_track *t)
|
||||
{
|
||||
return !!t->track_data_done;
|
||||
}
|
||||
|
||||
int burn_track_get_shortage(struct burn_track *t)
|
||||
{
|
||||
int size;
|
||||
|
@ -31,6 +31,18 @@ struct burn_track
|
||||
struct burn_source *source;
|
||||
/** End of Source flag */
|
||||
int eos;
|
||||
|
||||
/* ts A61101 */
|
||||
off_t sourcecount;
|
||||
off_t writecount;
|
||||
off_t written_sectors;
|
||||
|
||||
/* ts A61031 */
|
||||
/** Source is of undefined length */
|
||||
int open_ended;
|
||||
/** End of open ended track flag : offset+payload+tail are delivered */
|
||||
int track_data_done;
|
||||
|
||||
/** The audio/data mode for the entry. Derived from control and
|
||||
possibly from reading the track's first sector. */
|
||||
int mode;
|
||||
@ -71,4 +83,10 @@ struct burn_disc
|
||||
|
||||
int burn_track_get_shortage(struct burn_track *t);
|
||||
|
||||
|
||||
/* ts A61031 : might go to libburn.h */
|
||||
int burn_track_is_open_ended(struct burn_track *t);
|
||||
int burn_track_is_data_done(struct burn_track *t);
|
||||
|
||||
|
||||
#endif /* BURN__STRUCTURE_H */
|
||||
|
@ -129,6 +129,10 @@ struct burn_drive
|
||||
enum burn_disc_status status;
|
||||
int erasable;
|
||||
volatile int released;
|
||||
|
||||
/* ts A61106 */
|
||||
int silent_on_scsi_error;
|
||||
|
||||
int nwa; /* next writeable address */
|
||||
int alba; /* absolute lba */
|
||||
int rlba; /* relative lba in section */
|
||||
@ -178,7 +182,7 @@ struct burn_drive
|
||||
void (*send_cue_sheet) (struct burn_drive *, struct cue_sheet *);
|
||||
void (*sync_cache) (struct burn_drive *);
|
||||
int (*get_erase_progress) (struct burn_drive *);
|
||||
int (*get_nwa) (struct burn_drive *);
|
||||
int (*get_nwa) (struct burn_drive *, int trackno, int *lba, int *nwa);
|
||||
|
||||
/* ts A61009 : removed d in favor of o->drive */
|
||||
/* void (*close_disc) (struct burn_drive * d,
|
||||
@ -189,6 +193,10 @@ struct burn_drive
|
||||
void (*close_disc) (struct burn_write_opts * o);
|
||||
void (*close_session) ( struct burn_write_opts * o);
|
||||
|
||||
/* ts A61029 */
|
||||
void (*close_track_session) ( struct burn_drive *d,
|
||||
int session, int track);
|
||||
|
||||
int (*test_unit_ready) (struct burn_drive * d);
|
||||
void (*probe_write_modes) (struct burn_drive * d);
|
||||
struct params params;
|
||||
|
272
libburn/write.c
272
libburn/write.c
@ -7,6 +7,13 @@
|
||||
/* #include <a ssert.h> */
|
||||
|
||||
|
||||
/* ts A61106 : Deliberate defect provocation macros
|
||||
DO NOT DEFINE THESE IF YOU WANT SUCCESSFUL TAO !
|
||||
#define Libburn_experimental_no_close_tracK 1
|
||||
#define Libburn_experimental_no_close_sessioN 1
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@ -99,7 +106,7 @@ void type_to_form(int mode, unsigned char *ctladr, int *form)
|
||||
*form |= 0x40;
|
||||
}
|
||||
|
||||
int burn_write_flush(struct burn_write_opts *o)
|
||||
int burn_write_flush(struct burn_write_opts *o, struct burn_track *track)
|
||||
{
|
||||
struct burn_drive *d = o->drive;
|
||||
|
||||
@ -108,13 +115,112 @@ int burn_write_flush(struct burn_write_opts *o)
|
||||
err = d->write(d, d->nwa, d->buffer);
|
||||
if (err == BE_CANCELLED)
|
||||
return 0;
|
||||
/* A61101 */
|
||||
if(track != NULL) {
|
||||
track->writecount += d->buffer->bytes;
|
||||
track->written_sectors += d->buffer->sectors;
|
||||
}
|
||||
|
||||
d->nwa += d->buffer->sectors;
|
||||
d->buffer->bytes = 0;
|
||||
d->buffer->sectors = 0;
|
||||
}
|
||||
d->sync_cache(d);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A61030 */
|
||||
int burn_write_close_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
int tnum)
|
||||
{
|
||||
char msg[81];
|
||||
struct burn_drive *d;
|
||||
struct burn_track *t;
|
||||
int todo, step, cancelled, seclen;
|
||||
|
||||
/* ts A61106 */
|
||||
#ifdef Libburn_experimental_no_close_tracK
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
d = o->drive;
|
||||
t = s->track[tnum];
|
||||
|
||||
/* ts A61103 : pad up track to minimum size of 600 sectors */
|
||||
if (t->written_sectors < 300) {
|
||||
todo = 300 - t->written_sectors;
|
||||
sprintf(msg,"Padding up track to minimum size (+ %d sectors)",
|
||||
todo);
|
||||
libdax_msgs_submit(libdax_messenger, o->drive->global_index,
|
||||
0x0002011a,
|
||||
LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_HIGH, msg,0,0);
|
||||
step = BUFFER_SIZE / 4096; /* shall fit any sector size */
|
||||
if (step <= 0)
|
||||
step = 1;
|
||||
seclen = burn_sector_length(t->mode);
|
||||
if (seclen <= 0)
|
||||
seclen = 2048;
|
||||
memset(d->buffer, 0, sizeof(struct buffer));
|
||||
cancelled = d->cancel;
|
||||
for (; todo > 0; todo -= step) {
|
||||
if (step > todo)
|
||||
step = todo;
|
||||
d->buffer->bytes = step*seclen;
|
||||
d->buffer->sectors = step;
|
||||
d->cancel = 0;
|
||||
d->write(d, d->nwa, d->buffer);
|
||||
d->nwa += d->buffer->sectors;
|
||||
t->writecount += d->buffer->bytes;
|
||||
t->written_sectors += d->buffer->sectors;
|
||||
}
|
||||
d->cancel = cancelled;
|
||||
}
|
||||
|
||||
/* ts A61102 */
|
||||
d->busy = BURN_DRIVE_CLOSING_TRACK;
|
||||
|
||||
sprintf(msg, "Closing track %2.2d", tnum+1);
|
||||
libdax_msgs_submit(libdax_messenger, o->drive->global_index,0x00020119,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, msg,0,0);
|
||||
|
||||
/* MMC-1 mentions track number 0xFF for "the incomplete track",
|
||||
MMC-3 does not. I tried both. 0xFF was in effect when other
|
||||
bugs finally gave up and made way for readable tracks. */
|
||||
d->close_track_session(o->drive, 0, 0xff); /* tnum+1); */
|
||||
|
||||
/* ts A61102 */
|
||||
d->busy = BURN_DRIVE_WRITING;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A61030 */
|
||||
int burn_write_close_session(struct burn_write_opts *o, struct burn_session *s)
|
||||
{
|
||||
|
||||
/* ts A61106 */
|
||||
#ifdef Libburn_experimental_no_close_sessioN
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
libdax_msgs_submit(libdax_messenger, o->drive->global_index,0x00020119,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"Closing session", 0, 0);
|
||||
|
||||
/* ts A61102 */
|
||||
o->drive->busy = BURN_DRIVE_CLOSING_SESSION;
|
||||
|
||||
o->drive->close_track_session(o->drive, 1, 0);
|
||||
|
||||
/* ts A61102 */
|
||||
o->drive->busy = BURN_DRIVE_WRITING;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/* ts A60819:
|
||||
This is unused since about Feb 2006, icculus.org/burn CVS.
|
||||
The compiler complains. We shall please our compiler.
|
||||
@ -228,11 +334,20 @@ struct cue_sheet *burn_create_toc_entries(struct burn_write_opts *o,
|
||||
/* ts A61009 */
|
||||
/* a ssert(d->toc_entry == NULL); */
|
||||
if (d->toc_entry != NULL) {
|
||||
|
||||
/* ts A61109 : this happens with appendable CDs
|
||||
>>> Open question: is the existing TOC needed ? */
|
||||
|
||||
/* ts A61109 : for non-SAO, this sheet is thrown away later */
|
||||
free((char *) d->toc_entry);
|
||||
|
||||
/*
|
||||
libdax_msgs_submit(libdax_messenger,
|
||||
d->global_index, 0x00020117,
|
||||
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
|
||||
"toc_entry of drive is already in use", 0, 0);
|
||||
goto failed;
|
||||
*/
|
||||
}
|
||||
|
||||
d->toc_entry = calloc(d->toc_entries, sizeof(struct burn_toc_entry));
|
||||
@ -302,8 +417,17 @@ XXX this is untested :)
|
||||
*/
|
||||
if (!tar[i]->pad) {
|
||||
rem += burn_track_get_shortage(tar[i]);
|
||||
if (i +1 != ntr)
|
||||
tar[i]->source->next = tar[i+1]->source;
|
||||
|
||||
/* ts A61101 : I doubt that linking would yield a
|
||||
desireable effect. With TAO it is
|
||||
counterproductive in any way.
|
||||
*/
|
||||
if (o->write_type == BURN_WRITE_TAO)
|
||||
tar[i]->source->next = NULL;
|
||||
else
|
||||
|
||||
if (i +1 != ntr)
|
||||
tar[i]->source->next = tar[i+1]->source;
|
||||
} else if (rem) {
|
||||
rem = 0;
|
||||
runtime++;
|
||||
@ -417,7 +541,7 @@ int burn_write_session(struct burn_write_opts *o, struct burn_session *s)
|
||||
{
|
||||
struct burn_drive *d = o->drive;
|
||||
struct burn_track *prev = NULL, *next = NULL;
|
||||
int i;
|
||||
int i, ret;
|
||||
|
||||
d->rlba = 0;
|
||||
burn_print(1, " writing a session\n");
|
||||
@ -430,9 +554,15 @@ int burn_write_session(struct burn_write_opts *o, struct burn_session *s)
|
||||
next = NULL;
|
||||
|
||||
if (!burn_write_track(o, s, i))
|
||||
return 0;
|
||||
{ ret = 0; goto ex; }
|
||||
}
|
||||
return 1;
|
||||
|
||||
/* ts A61103 */
|
||||
ret = 1;
|
||||
ex:;
|
||||
if (o->write_type == BURN_WRITE_TAO)
|
||||
burn_write_close_session(o, s);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
@ -440,13 +570,18 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
{
|
||||
struct burn_track *t = s->track[tnum];
|
||||
struct burn_drive *d = o->drive;
|
||||
int i, tmp = 0;
|
||||
int i, tmp = 0, open_ended = 0, ret, nwa, lba;
|
||||
int sectors;
|
||||
char msg[80];
|
||||
|
||||
d->rlba = -150;
|
||||
|
||||
/* XXX for tao, we don't want the pregaps but still want post? */
|
||||
if (o->write_type != BURN_WRITE_TAO) {
|
||||
|
||||
/* ts A61102 */
|
||||
d->busy = BURN_DRIVE_WRITING_PREGAP;
|
||||
|
||||
if (t->pregap1)
|
||||
d->rlba += 75;
|
||||
if (t->pregap2)
|
||||
@ -462,20 +597,36 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
for (i = 0; i < 75; i++)
|
||||
if (!sector_pregap(o, t->entry->point,
|
||||
pt->entry->control, pt->mode))
|
||||
return 0;
|
||||
{ ret = 0; goto ex; }
|
||||
}
|
||||
if (t->pregap2)
|
||||
for (i = 0; i < 150; i++)
|
||||
if (!sector_pregap(o, t->entry->point,
|
||||
t->entry->control, t->mode))
|
||||
return 0;
|
||||
{ ret = 0; goto ex; }
|
||||
} else {
|
||||
o->control = t->entry->control;
|
||||
d->send_write_parameters(d, o);
|
||||
|
||||
/* ts A61103 */
|
||||
ret = d->get_nwa(d, -1, &lba, &nwa);
|
||||
sprintf(msg,
|
||||
"pre-track %2.2d : get_nwa(%d), ret= %d , d->nwa= %d\n",
|
||||
tnum+1, nwa, ret, d->nwa);
|
||||
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;
|
||||
}
|
||||
|
||||
/* user data */
|
||||
|
||||
/* ts A61102 */
|
||||
d->busy = BURN_DRIVE_WRITING;
|
||||
|
||||
sectors = burn_track_get_sectors(t);
|
||||
open_ended = burn_track_is_open_ended(t);
|
||||
|
||||
/* Update progress */
|
||||
d->progress.start_sector = d->nwa;
|
||||
@ -488,10 +639,11 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
|
||||
burn_print(12, "track %d is %d sectors long\n", tnum, sectors);
|
||||
|
||||
/* ts A61030 : this cannot happen. tnum is alsways < s-tracks */
|
||||
if (tnum == s->tracks)
|
||||
tmp = sectors > 150 ? 150 : sectors;
|
||||
|
||||
for (i = 0; i < sectors - tmp; i++) {
|
||||
for (i = 0; open_ended || i < sectors - tmp; i++) {
|
||||
|
||||
/* ts A61023 : http://libburn.pykix.org/ticket/14
|
||||
From time to time inquire drive buffer */
|
||||
@ -499,12 +651,24 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
d->read_buffer_capacity(d);
|
||||
|
||||
if (!sector_data(o, t, 0))
|
||||
return 0;
|
||||
{ ret = 0; goto ex; }
|
||||
|
||||
/* ts A61031 */
|
||||
if (open_ended) {
|
||||
d->progress.sectors = sectors = i;
|
||||
if (burn_track_is_data_done(t))
|
||||
break;
|
||||
}
|
||||
|
||||
/* update current progress */
|
||||
d->progress.sector++;
|
||||
}
|
||||
for (; i < sectors; i++) {
|
||||
|
||||
/* ts A61030: program execution never gets to this point */
|
||||
fprintf(stderr,"LIBBURN_DEBUG: TNUM=%d TRACKS=%d TMP=%d\n",
|
||||
tnum, s->tracks, tmp);
|
||||
|
||||
burn_print(1, "last track, leadout prep\n");
|
||||
|
||||
/* ts A61023 */
|
||||
@ -512,7 +676,7 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
d->read_buffer_capacity(d);
|
||||
|
||||
if (!sector_data(o, t, 1))
|
||||
return 0;
|
||||
{ ret = 0; goto ex; }
|
||||
|
||||
/* update progress */
|
||||
d->progress.sector++;
|
||||
@ -522,23 +686,41 @@ int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
for (i = 0; i < 150; i++)
|
||||
if (!sector_postgap(o, t->entry->point, t->entry->control,
|
||||
t->mode))
|
||||
return 0;
|
||||
{ ret = 0; goto ex; }
|
||||
i = t->offset;
|
||||
if (o->write_type == BURN_WRITE_SAO) {
|
||||
if (d->buffer->bytes) {
|
||||
int err;
|
||||
err = d->write(d, d->nwa, d->buffer);
|
||||
if (err == BE_CANCELLED)
|
||||
return 0;
|
||||
{ ret = 0; goto ex; }
|
||||
|
||||
/* A61101 : probably this is not all payload data */
|
||||
/* A61108 : but audio count is short without this */
|
||||
t->writecount += d->buffer->bytes;
|
||||
|
||||
d->nwa += d->buffer->sectors;
|
||||
d->buffer->bytes = 0;
|
||||
d->buffer->sectors = 0;
|
||||
}
|
||||
}
|
||||
if (o->write_type == BURN_WRITE_TAO)
|
||||
if (!burn_write_flush(o))
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
/* ts A61103 */
|
||||
ret = 1;
|
||||
ex:;
|
||||
if (o->write_type == BURN_WRITE_TAO) {
|
||||
|
||||
/* ts A61103 */
|
||||
/* >>> if cancelled: ensure that at least 600 kB get written */
|
||||
|
||||
if (!burn_write_flush(o, t))
|
||||
ret = 0;
|
||||
|
||||
/* ts A61030 */
|
||||
if (burn_write_close_track(o, s, tnum) <= 0)
|
||||
ret = 0;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* ts A61009 */
|
||||
@ -568,8 +750,8 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
|
||||
struct burn_drive *d = o->drive;
|
||||
struct buffer buf;
|
||||
struct burn_track *lt;
|
||||
int first = 1, i;
|
||||
int res;
|
||||
int first = 1, i, ret, lba, nwa;
|
||||
char msg[80];
|
||||
|
||||
/* ts A60924 : libburn/message.c gets obsoleted
|
||||
burn_message_clear_queue();
|
||||
@ -586,15 +768,24 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
|
||||
/* Apparently some drives require this command to be sent, and a few drives
|
||||
return crap. so we send the command, then ignore the result.
|
||||
*/
|
||||
res = d->get_nwa(d);
|
||||
/* printf("ignored nwa: %d\n", res);*/
|
||||
|
||||
/* ts A61107 : moved up send_write_parameters because LG GSA-4082B
|
||||
seems to dislike get_nwa() in advance */
|
||||
d->alba = d->start_lba;
|
||||
d->nwa = d->alba;
|
||||
if (o->write_type == BURN_WRITE_TAO) {
|
||||
nwa = 0; /* get_nwa() will be called in burn_track() */
|
||||
} else {
|
||||
|
||||
if (o->write_type != BURN_WRITE_TAO)
|
||||
d->send_write_parameters(d, o);
|
||||
|
||||
ret = d->get_nwa(d, -1, &lba, &nwa);
|
||||
sprintf(msg, "Inquired nwa: %d (ret=%d)", nwa, ret);
|
||||
libdax_msgs_submit(libdax_messenger, d->global_index,
|
||||
0x00000002,
|
||||
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
|
||||
msg,0,0);
|
||||
}
|
||||
|
||||
/* init progress before showing the state */
|
||||
d->progress.session = 0;
|
||||
d->progress.sessions = disc->sessions;
|
||||
@ -636,8 +827,19 @@ return crap. so we send the command, then ignore the result.
|
||||
goto fail;
|
||||
} else {
|
||||
if (first) {
|
||||
d->nwa = -150;
|
||||
d->alba = -150;
|
||||
|
||||
/* ts A61030 : 0 made the burner take data. */
|
||||
/* ts A61103 : Meanwhile d->nwa is updated in
|
||||
burn_write_track() */
|
||||
if(o->write_type == BURN_WRITE_TAO) {
|
||||
d->nwa= d->alba = 0;
|
||||
} else {
|
||||
|
||||
d->nwa = -150;
|
||||
d->alba = -150;
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
d->nwa += 4500;
|
||||
d->alba += 4500;
|
||||
@ -652,8 +854,13 @@ return crap. so we send the command, then ignore the result.
|
||||
lt->mode))
|
||||
goto fail;
|
||||
} else {
|
||||
if (!burn_write_flush(o))
|
||||
goto fail;
|
||||
|
||||
/* ts A61030 */
|
||||
if (o->write_type != BURN_WRITE_TAO)
|
||||
|
||||
if (!burn_write_flush(o, NULL))
|
||||
goto fail;
|
||||
|
||||
d->nwa += first ? 6750 : 2250;
|
||||
d->alba += first ? 6750 : 2250;
|
||||
}
|
||||
@ -665,15 +872,18 @@ return crap. so we send the command, then ignore the result.
|
||||
d->progress.start_sector = 0;
|
||||
d->progress.sectors = 0;
|
||||
}
|
||||
if (o->write_type != BURN_WRITE_SAO)
|
||||
if (!burn_write_flush(o))
|
||||
|
||||
/* ts A61030: extended skipping of flush to TAO: session is closed */
|
||||
if (o->write_type != BURN_WRITE_SAO && o->write_type != BURN_WRITE_TAO)
|
||||
if (!burn_write_flush(o, NULL))
|
||||
goto fail;
|
||||
|
||||
sleep(1);
|
||||
|
||||
burn_print(1, "done\n");
|
||||
d->busy = BURN_DRIVE_IDLE;
|
||||
|
||||
/* ts A61012 : This return was traditionally missing, a suspect this
|
||||
/* ts A61012 : This return was traditionally missing. I suspect this
|
||||
to have caused Cdrskin_eject() failures */
|
||||
return;
|
||||
|
||||
|
@ -24,6 +24,11 @@ int burn_write_leadout(struct burn_write_opts *o,
|
||||
int burn_write_session(struct burn_write_opts *o, struct burn_session *s);
|
||||
int burn_write_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
int tnum);
|
||||
int burn_write_flush(struct burn_write_opts *o);
|
||||
int burn_write_flush(struct burn_write_opts *o, struct burn_track *track);
|
||||
|
||||
/* ts A61030 : necessary for TAO */
|
||||
int burn_write_close_track(struct burn_write_opts *o, struct burn_session *s,
|
||||
int tnum);
|
||||
int burn_write_close_session(struct burn_write_opts *o,struct burn_session *s);
|
||||
|
||||
#endif /* BURN__WRITE_H */
|
||||
|
@ -35,17 +35,10 @@
|
||||
|
||||
*/
|
||||
|
||||
/* We shall prepare for times when more than 2 GB of data are to be handled.
|
||||
This gives POSIX-ly 64 bit off_t */
|
||||
#ifndef _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE_SOURCE 1
|
||||
#endif
|
||||
#ifndef _FILE_OFFSET_BITS
|
||||
#define _FILE_OFFSET_BITS 64
|
||||
#endif
|
||||
|
||||
/** See this for the decisive API specs . libburn.h is The Original */
|
||||
#include <libburn/libburn.h>
|
||||
/* For using the installed header file : #include <libburn/libburn.h> */
|
||||
/* This program insists in the own headerfile. */
|
||||
#include "../libburn/libburn.h"
|
||||
|
||||
/* libburn is intended for Linux systems with kernel 2.4 or 2.6 for now */
|
||||
#include <stdio.h>
|
||||
@ -249,7 +242,8 @@ int libburner_aquire_by_driveno(int *driveno)
|
||||
int libburner_blank_disc(struct burn_drive *drive, int blank_fast)
|
||||
{
|
||||
enum burn_disc_status disc_state;
|
||||
struct burn_progress progress;
|
||||
struct burn_progress p;
|
||||
int percent = 1;
|
||||
|
||||
while (burn_drive_get_status(drive, NULL) != BURN_DRIVE_IDLE)
|
||||
usleep(1001);
|
||||
@ -281,11 +275,13 @@ int libburner_blank_disc(struct burn_drive *drive, int blank_fast)
|
||||
}
|
||||
printf(
|
||||
"Beginning to %s-blank CD media.\n", (blank_fast?"fast":"full"));
|
||||
printf(
|
||||
"Expect some garbage sector numbers and some zeros at first.\n");
|
||||
burn_disc_erase(drive, blank_fast);
|
||||
while (burn_drive_get_status(drive, &progress) != BURN_DRIVE_IDLE) {
|
||||
printf("Blanking sector %d\n", progress.sector);
|
||||
sleep(1);
|
||||
while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) {
|
||||
if(p.sectors>0 && p.sector>=0) /* display 1 to 99 percent */
|
||||
percent = 1.0 + ((double) p.sector+1.0)
|
||||
/ ((double) p.sectors) * 98.0;
|
||||
printf("Blanking ( %d%% done )\n", percent);
|
||||
sleep(1);
|
||||
}
|
||||
printf("Done\n");
|
||||
|
Reference in New Issue
Block a user