Branching for libburn release 0.8.0
This commit is contained in:
490
libburn/branches/ZeroEightZero/cdrskin/README
Normal file
490
libburn/branches/ZeroEightZero/cdrskin/README
Normal file
@ -0,0 +1,490 @@
|
||||
------------------------------------------------------------------------------
|
||||
libburnia-project.org scdbackup.sourceforge.net/cdrskin_eng.html
|
||||
------------------------------------------------------------------------------
|
||||
cdrskin. By Thomas Schmitt <scdbackup@gmx.net>
|
||||
Integrated sub project of libburnia-project.org but also published via:
|
||||
http://scdbackup.sourceforge.net/cdrskin_eng.html
|
||||
http://scdbackup.sourceforge.net/cdrskin-0.7.9.tar.gz
|
||||
|
||||
Copyright (C) 2006-2010 Thomas Schmitt, provided under GPL version 2 or later.
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
|
||||
cdrskin is a limited cdrecord compatibility wrapper which allows to use
|
||||
most of the libburn features from the command line.
|
||||
|
||||
Currently it is supported on Linux with kernels >= 2.4 and on FreeBSD.
|
||||
IDE drives under Linux 2.4. need kernel module ide-scsi.
|
||||
ATA and SATA drives under FreeBSD need kernel module atapicam.
|
||||
On other X/Open compliant systems there will only be emulated drives, but no
|
||||
direct MMC operation on real CD/DVD/BD drives.
|
||||
|
||||
By using this software you agree to the disclaimer at the end of this text
|
||||
"This software is provided as is. There is no warranty implied and ..."
|
||||
|
||||
|
||||
Compilation, First Glimpse, Installation
|
||||
|
||||
Obtain cdrskin-0.7.9.tar.gz, take it to a directory of your choice and do:
|
||||
|
||||
tar xzf cdrskin-0.7.9.tar.gz
|
||||
cd cdrskin-0.7.9
|
||||
|
||||
Within that directory execute:
|
||||
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
|
||||
This will already produce a cdrskin binary. But it will be necessary to
|
||||
install libburn in order to use this binary.
|
||||
|
||||
In order to surely get a standalone binary, execute
|
||||
|
||||
cdrskin/compile_cdrskin.sh
|
||||
|
||||
Version identification and help texts available afterwards:
|
||||
cdrskin/cdrskin -version
|
||||
cdrskin/cdrskin --help
|
||||
cdrskin/cdrskin -help
|
||||
man cdrskin/cdrskin.1
|
||||
|
||||
|
||||
Install (eventually as superuser) cdrskin to a directory where it can be found:
|
||||
The command for global installation of both, libburn and cdrskin is
|
||||
make install
|
||||
If the library libburn.so.4 is not found with a test run of cdrskin, then
|
||||
try whether command
|
||||
ldconfig
|
||||
makes it accessible. With the statically linked binary this should not matter.
|
||||
|
||||
With that static binary you may as well do the few necessary actions manually.
|
||||
If cdrskin was already installed by a previous version, or by "make install"
|
||||
in the course of this installation, then find out where:
|
||||
which cdrskin
|
||||
Copy your standalone binary to exactly the address which you get as reply.
|
||||
E.g.:
|
||||
|
||||
cp cdrskin/cdrskin /usr/bin/cdrskin
|
||||
|
||||
Check the version timestamps of the globally installed binary
|
||||
cdrskin -version
|
||||
|
||||
It is not necessary for the standalone cdrskin binary to have libburn
|
||||
installed, since it incorporates the necessary libburn parts at compile time.
|
||||
It will not collide with an installed version of libburn either.
|
||||
But libpthread must be installed on the system and glibc has to match. (See
|
||||
below for a way to create a totally static linked binary.)
|
||||
|
||||
To install the man page, you may do: echo $MANPATH and choose one of the
|
||||
listed directories to copy the man-page under its ./man1 directory. Like:
|
||||
cp cdrskin/cdrskin.1 /usr/share/man/man1/cdrskin.1
|
||||
|
||||
Note: The content of the cdrskin tarball is essentially the complete libburn
|
||||
of the same version number. You may thus perform above steps in a local
|
||||
SVN copy of libburn or in a unpacked libburn tarball as well.
|
||||
|
||||
|
||||
Usage
|
||||
|
||||
The user of cdrskin needs rw-permission for the CD burner device.
|
||||
A list of rw-accessible drives can be obtained by
|
||||
|
||||
cdrskin --devices
|
||||
|
||||
CD devices which offer no rw-permission are invisible to normal users.
|
||||
The superuser should be able to see any usable drive and then set the
|
||||
permissions as needed. If this hangs then there is a drive with
|
||||
unexpected problems (locked, busy, broken, whatever). You might have to
|
||||
guess the address of your (non-broken) burner by other means, then.
|
||||
On Linux 2.4 this would be some /dev/sgN and on 2.6. some /dev/srM or /dev/hdX.
|
||||
|
||||
The output of cdrskin --devices might look like
|
||||
|
||||
0 dev='/dev/sr0' rwrwr- : '_NEC' 'DVD_RW ND-4570A'
|
||||
1 dev='/dev/sr1' rwrw-- : 'HL-DT-ST' 'DVDRAM GSA-4082B'
|
||||
|
||||
So full and insecure enabling of both for everybody would look like
|
||||
|
||||
chmod a+rw /dev/sr0 /dev/sr1
|
||||
|
||||
This is equivalent to the traditional setup chmod a+x,u+s cdrecord.
|
||||
|
||||
I strongly discourage to run cdrskin with setuid root or via sudo !
|
||||
It is not checked for the necessary degree of hacker safety.
|
||||
|
||||
Consider to put all authorized users into group "floppy", to chgrp the
|
||||
device file to that group and to disallow w-access to others.
|
||||
|
||||
Helpful with Linux kernel 2.4 is a special SCSI feature:
|
||||
It is possible to address a scsi(-emulated) drive via associated device files
|
||||
which are not listed by option --devices but point to the same SCSI addresses
|
||||
as listed device files. This addressing via e.g. /dev/sr0 or /dev/scd1 is
|
||||
compatible with generic read programs like dd and with write program growisofs.
|
||||
For finding /dev/sg1 from /dev/sr0, the program needs rw-access to both files.
|
||||
|
||||
A behavioral conflict is known between any burn software and demons like hald
|
||||
which probe CD drives. This can spoil burn runs for CD-R or CD-RW.
|
||||
You may have to keep your hald away from the drive. See for example
|
||||
http://www.freebsd.org/gnome/docs/halfaq.html
|
||||
|
||||
|
||||
Usage examples
|
||||
|
||||
For options and recordable media classes see
|
||||
man 1 cdrskin
|
||||
|
||||
Get an overview of cdrecord style addresses of available devices
|
||||
cdrskin -scanbus
|
||||
cdrskin dev=ATA -scanbus
|
||||
cdrskin --devices
|
||||
|
||||
Adresses reported with dev=ATA need prefix "ATA:". Address examples:
|
||||
dev=0,1,0 dev=ATA:1,0,0 dev=/dev/sg1 dev=/dev/hdc dev=/dev/sr0
|
||||
See also "Drive Addressing" below.
|
||||
|
||||
Obtain some info about the drive
|
||||
cdrskin dev=0,1,0 -checkdrive
|
||||
|
||||
Obtain some info about the drive and the inserted media
|
||||
cdrskin dev=0,1,0 -atip -v -minfo
|
||||
|
||||
Prepare CD-RW or DVD-RW for re-use, DVD-RAM or BD-RE for first use
|
||||
cdrskin -v dev=/dev/sg1 blank=as_needed -eject
|
||||
|
||||
Format DVD-RW to avoid need for blanking before re-use
|
||||
cdrskin -v dev=0,1,0 blank=format_overwrite
|
||||
|
||||
De-format DVD-RW to make it capable of multi-session again
|
||||
cdrskin -v dev=/dev/sr0 blank=deformat_sequential
|
||||
|
||||
Burn image file my_image.iso to media
|
||||
cdrskin -v dev=0,1,0 speed=12 fs=8m driveropts=burnfree padsize=300k \
|
||||
-eject my_image.iso
|
||||
|
||||
Write multi-session to the same CD , DVD-R[W] or DVD+R[/DL]
|
||||
cdrskin dev=/dev/hdc padsize=300k -multi 1.iso
|
||||
cdrskin dev=/dev/hdc padsize=300k -multi 2.iso
|
||||
cdrskin dev=/dev/hdc padsize=300k -multi 3.iso
|
||||
cdrskin dev=/dev/hdc padsize=300k 4.iso
|
||||
|
||||
Get multi-session info for option -C of program mkisofs:
|
||||
c_values=$(cdrskin dev=/dev/hdc -msinfo 2>/dev/null)
|
||||
mkisofs ... -C "$c_values" ...
|
||||
|
||||
Burn a compressed afio archive to media on-the-fly
|
||||
find . | afio -oZ - | cdrskin -v dev=0,1,0 fs=32m speed=8 \
|
||||
driveropts=burnfree padsize=300k -
|
||||
|
||||
Burn 6 audio tracks from files with different formats to CD (not to any DVD).
|
||||
Anything except .wav or .au files has to be converted into raw format first.
|
||||
See below "Audio CD" for specifications.
|
||||
ogg123 -d raw -f track01.cd /path/to/track1.ogg
|
||||
oggdec -R -o track02.cd /path/to/track2.ogg
|
||||
lame --decode -t /path/to/track3.mp3 track03.cd
|
||||
madplay -o raw:track04.cd /path/to/track4.mp3
|
||||
mppdec --raw-le /path/to/track5.mpc track05.cd
|
||||
|
||||
cdrskin -v dev=0,1,0 blank=fast -eject speed=48 -sao \
|
||||
-audio -swab track0[1-5].cd /path/to/track6.wav
|
||||
|
||||
|
||||
Restrictions
|
||||
|
||||
Several advanced CD related options of cdrecord are still unsupported.
|
||||
See output of command
|
||||
cdrskin --list_ignored_options
|
||||
If you have use cases for them, please report your wishes and expectations.
|
||||
|
||||
On the other hand, the capability of multi-session and of writing streams
|
||||
of unpredicted lenght surpass the current DVD capabilities of cdrecord.
|
||||
|
||||
|
||||
Inspiration and Standard
|
||||
|
||||
cdrskin combines the command line interface standard set by cdrecord with
|
||||
libburn, which is a control software for optical drives according to standard
|
||||
MMC-5. For particular CD legacy commands, standards MMC-3 and MMC-1 apply.
|
||||
|
||||
For the original meaning of cdrecord options see :
|
||||
man cdrecord
|
||||
(http://cdrecord.berlios.de/old/private/man/cdrecord-2.0.html)
|
||||
Do not bother Joerg Schilling with any cdrskin problems.
|
||||
(Be cursed if you install cdrskin as "cdrecord" without clearly forwarding
|
||||
this "don't bother Joerg" demand.)
|
||||
|
||||
cdrskin does not contain any bytes copied from cdrecord's sources. Many bytes
|
||||
have been copied from the message output of cdrecord runs, though. I am
|
||||
thankful to Joerg Schilling for every single one of them.
|
||||
I have the hope that Joerg feels more flattered than annoyed by cdrskin.
|
||||
|
||||
Many thanks to Andy Polyakov for his dvd+rw-tools
|
||||
http://fy.chalmers.se/~appro/linux/DVD+RW/tools
|
||||
which provide me with examples and pointers into MMC specs for DVD writing.
|
||||
|
||||
|
||||
Startup Files
|
||||
|
||||
If not --no_rc is the first argument then cdrskin attempts on startup to read
|
||||
arguments from the following three files:
|
||||
/etc/default/cdrskin
|
||||
/etc/opt/cdrskin/rc
|
||||
/etc/cdrskin/cdrskin.conf
|
||||
$HOME/.cdrskinrc
|
||||
The files are read in the sequence given above.
|
||||
Each readable line is treated as one single argument. No extra blanks.
|
||||
A first character '#' marks a comment, empty lines are ignored.
|
||||
|
||||
Example content of a startup file:
|
||||
# This is the default device
|
||||
dev=0,1,0
|
||||
|
||||
# Some more options
|
||||
fifo_start_at=0
|
||||
fs=16m
|
||||
|
||||
|
||||
Audio CD
|
||||
|
||||
Lorenzo Taylor enabled option -audio in cdrskin (thanks !) and reports neat
|
||||
results with audio data files which are :
|
||||
headerless PCM (i.e. uncompressed)
|
||||
44100 Hz sampling rate
|
||||
16 bits per sample
|
||||
stereo (2 channels)
|
||||
little-endian byte order with option -swab, or big-endian without -swab
|
||||
|
||||
Files with name extension .wav get examined wether they are in Microsoft WAVE
|
||||
format with above parameters and eventually get extracted by cdrskin itself.
|
||||
In the same way files with name extension .au get examined wether they are
|
||||
in SUN's audio format. For both formats, track format -audio and eventual
|
||||
endianness option -swab are enabled automatically.
|
||||
|
||||
Any other formats are to be converted to format .wav with above parameters
|
||||
or to be extracted as raw CD track data by commands like those given above
|
||||
under "Usage examples". Those raw files need option -audio and in most cases
|
||||
option -swab to mark them as little-endian/Intel/LSB-first 16-bit data.
|
||||
Incorrect endianness setting results in random noise on CD.
|
||||
|
||||
I myself am not into audio. So libburn-hackers@pykix.org might be the
|
||||
best address for suggestions, requests and bug reports.
|
||||
|
||||
|
||||
DVD+RW , DVD-RAM , BD-RE
|
||||
|
||||
These random access media get treated as blank media regardless wether they
|
||||
hold data or not. Options -audio and -multi are not allowed. Only one track
|
||||
is allowed. -toc does not return information about the media content.
|
||||
Speed is counted in DVD units (i.e. 1x = 1,385,000 bytes/second) or BD units
|
||||
(1x = 4,495,625 bytes/second). Currently there is no difference between -sao
|
||||
and -tao. If ever, then -tao will be the mode which preserves the current
|
||||
behavior.
|
||||
|
||||
BD-RE media need formatting before first use. cdrskin option "blank=as_needed"
|
||||
recognizes unformatted BD-RE and applies a lengthy formatting run.
|
||||
|
||||
During write operations DVD-RAM and BD-RE automatically apply Defect
|
||||
Management. This usually slows them down to half nominal speed. If drive
|
||||
and media produce flawless results anyway, then one can try to reach full
|
||||
nominal speed by option "stream_recording=on".
|
||||
In this case bad blocks are not detected during write and not even previously
|
||||
known bad blocks are avoided. So you have to make your own readability tests
|
||||
and go back to half speed as soon as the first read errors show up.
|
||||
Instead of "on" one may also set a start address for stream recording.
|
||||
Like "stream_recording=100m". This will write slowly to the first 100 MB of
|
||||
the media and accelerate when writing to higher addresses.
|
||||
|
||||
Option --grow_overwriteable_iso allows -multi (although unneeded), enables
|
||||
-msinfo and -toc, and makes blank=fast an invalidator for ISO filesystems
|
||||
on overwriteable media.
|
||||
|
||||
Initial session (equivalent to growisofs -Z):
|
||||
mkisofs ... | cdrskin --grow_overwriteable_iso blank=fast ...
|
||||
|
||||
Add-on session (equivalent to growisofs -M):
|
||||
cparms=$(cdrskin dev=/dev/sr0 --grow_overwriteable_iso -msinfo)
|
||||
mkisofs -C "$cparms" -M /dev/sr0 ... | \
|
||||
cdrskin dev=/dev/sr0 --grow_overwriteable_iso ... -
|
||||
|
||||
|
||||
DVD-RW and DVD-R
|
||||
|
||||
DVD-RW are usable if formatted to state "Restricted Overwrite" or if in state
|
||||
"Sequential Recording". DVD-R are always in sequential state.
|
||||
|
||||
"Sequential" is the state of unused media and of media previously blanked
|
||||
or written by cdrecord. dvd+rw-format -blank can also achieve this state.
|
||||
The according cdrskin option is blank=deformat_sequential .
|
||||
If "Incremental Streaming" is available, then sequential media are capable
|
||||
of multi-session like CD-R[W]. (But not capable of -audio recording.)
|
||||
This means they need option -multi to stay appendable, need to be blanked
|
||||
to be writeable from start, return useable info with -toc and -msinfo,
|
||||
eventually perform appending automatically.
|
||||
Without Incremental Streaming offered by the drive, only write mode DAO is
|
||||
available with sequential DVD-R[W]. It only works with blank media, allows only
|
||||
one single track, no -multi, and demands a fixely predicted track size.
|
||||
(growisofs uses it with DVD-R[W] if option -dvd-compat is given.)
|
||||
|
||||
Overwriteable DVD-RW behave much like DVD+RW. "Restricted" refers only to the
|
||||
granularity of random access and block size which have always to be aligned to
|
||||
full 32 kB. Sequential DVD-RW are converted into overwriteable DVD-RW by
|
||||
cdrskin dev=... -v blank=format_overwrite
|
||||
(Command dvd+rw-format -force can achieve Restricted Overwrite, too.)
|
||||
|
||||
Formatting or first use of freshly formatted DVD-RW can produce unusual noises
|
||||
from the drive and last several minutes. Depending on mutual compatibility of
|
||||
drive and media, formatting can yield unusable media. It seems that those die
|
||||
too on blanking by cdrecord, dvd+rw-format or cdrskin. Perils of DVD-RW.
|
||||
|
||||
There are three DVD-RW formatting variants with cdrskin currently:
|
||||
|
||||
blank=format_overwrite uses "DVD-RW Quick" formatting (MMC-type 15h)
|
||||
and writes a first session of 128 MiB. This leads to media which are expandable
|
||||
and random addressable by cdrskin.
|
||||
|
||||
blank=format_overwrite_quickest uses "DVD-RW Quick" formatting (type 15h) too,
|
||||
but leaves the media in "intermediate" state. In the first session of writing
|
||||
one may only write sequentially to such a DVD. After that, it gets random
|
||||
addressable by cdrskin. DVD-ROM drives might show ill behavior with them.
|
||||
|
||||
blank=format_overwrite_full uses preferrably "Full Format" (type 00h).
|
||||
This formatting lasts as long as writing a full DVD. It includes writing of
|
||||
lead-out which is said to be good for DVD ROM compatibility.
|
||||
|
||||
De-formatting options are available to make overwriteable DVD-RW sequential:
|
||||
|
||||
blank=deformat_sequential performs thorough blanking of all states of DVD-RW.
|
||||
blank=all and blank=fast perform the same thorough blanking, but refuse to do
|
||||
this with overwriteable DVD-RW, thus preserving their formatting. The specs
|
||||
allow minimal blanking but the resulting media on my drives offer no
|
||||
Incremental Streaming afterwards. So blank=fast will do full blanking.
|
||||
|
||||
blank=deformat_sequential_quickest is faster but might yield DAO-only media.
|
||||
|
||||
|
||||
DVD+R , DVD+R DL , BD-R
|
||||
|
||||
From the view of cdrskin they behave much like DVD-R. Each track gets wrapped
|
||||
into an own session, though.
|
||||
|
||||
DVD+R DL appear as extra large DVD+R. cdrskin does not allow to set the address
|
||||
of the layer break where a reading drive might show some delay while switching
|
||||
between both media layers.
|
||||
|
||||
BD-R are sold unformatted blank. If used without initial formatting then the
|
||||
drive is supposed to format them to maximum payload size with no Defect
|
||||
Management (see also above with BD-RE).
|
||||
If Defect Management is desired then BD-R need to be formatted before the
|
||||
first attempt to write a session to them.
|
||||
blank=format_if_needed will detect the situation and eventually apply
|
||||
default sized Defect Management formatting.
|
||||
blank=format_defectmgt_* will apply non-default parameters to formatting.
|
||||
|
||||
|
||||
Emulated Drives
|
||||
|
||||
cdrskin can use filesystem objects as emulated drives. Regular files or block
|
||||
devices appear similar to DVD-RAM. Other file types resemble blank DVD-R.
|
||||
Necessary precondition is option --allow_emulated_drives which is not accepted
|
||||
if cdrskin took another user identity because of the setuid bit of its access
|
||||
permissions.
|
||||
Addresses of emulated drives begin with prefix "stdio:". E.g.
|
||||
dev=stdio:/tmp/my_pseudo_drive
|
||||
|
||||
For safety reasons the superuser is only allowed to use /dev/null as emulated
|
||||
drive. See man page section FILES for a way to lift that ban.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Special compilation variations
|
||||
|
||||
All following options of ./configure and cdrskin/compile_cdrskin.sh are
|
||||
combinable. After runs of ./configure do as next:
|
||||
make clean ; make
|
||||
|
||||
In some situations Linux may deliver a better write performance to drives if
|
||||
the track input is read with O_DIRECT (see man 2 open). The API call
|
||||
burn_os_open_track_src() and the input readers of cdrskin and libburn fifo
|
||||
can be told to use this peculiar read mode by:
|
||||
--enable-track-src-odirect
|
||||
|
||||
But often cdrskin option dvd_obs=64k will yield even better performance in
|
||||
such a situation. 64k can be made default at compile time by
|
||||
cdrskin/compile_cdrskin.sh -dvd_obs_64k
|
||||
It can also be enabled at configure time by
|
||||
./configure ... --enable-dvd-obs-64k ...
|
||||
|
||||
Alternatively the transport of SCSI commands can be done via libcdio-0.83.
|
||||
You may install it and re-run libburn's ./configure with option
|
||||
--enable-libcdio
|
||||
|
||||
You may get a (super fat) statically linked binary by :
|
||||
cdrskin/compile_cdrskin.sh -static
|
||||
if your system supports static linking, at all. This will not help with kernels
|
||||
which do not properly support the necessary low-level interfaces chosen by
|
||||
your compile-time libraries.
|
||||
|
||||
A size reduced but fully functional binary may be produced by
|
||||
cdrskin/compile_cdrskin.sh -do_strip
|
||||
|
||||
An extra lean binary with reduced capabilities is created by
|
||||
cdrskin/compile_cdrskin.sh -do_diet -do_strip
|
||||
It will not read startup files, will abort on option dev_translation= ,
|
||||
will not have a fifo buffer, and will not be able to put out help texts or
|
||||
debugging messages.
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Project aspects and legal stuff
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Important Disclaimer :
|
||||
|
||||
This software is provided as is. There is no warranty implied and no
|
||||
protection against possible damages. You use this on your own risk.
|
||||
Don't blame me or other authors of libburn if anything goes wrong.
|
||||
|
||||
Actually, in case of severe trouble, nearly always the drive and the media
|
||||
are the cause. Any mistake of the burn program is supposed to be caught
|
||||
by the drive's firmware and to lead to mere misburns.
|
||||
The worst mishaps which hit the author imposed the need to reboot the
|
||||
system because of drives gnawing endlessly on ill media. Permanent hardware
|
||||
damage did not occur in 3.5 years of development. But one never knows ...
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
Interested users are invited to participate in the development of cdrskin.
|
||||
Contact: scdbackup@gmx.net or libburn-hackers@pykix.org .
|
||||
We will keep copyright narrow but will of course acknowledge valuable
|
||||
contributions in a due way.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 or later
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
Based on and sub project of:
|
||||
libburnia-project.org
|
||||
By Mario Danic <mario.danic@gmail.com> and Thomas Schmitt <scdbackup@gmx.net>
|
||||
Copyright (C) 2006-2010 Mario Danic, Thomas Schmitt
|
||||
|
||||
libburnia-project.org is inspired by and in other components still containing
|
||||
parts of
|
||||
Libburn. By Derek Foreman <derek@signalmarketing.com> and
|
||||
Ben Jansens <xor@orodu.net>
|
||||
Copyright (C) 2002-2006 Derek Foreman and Ben Jansens
|
||||
See toplevel README for an overview of the current copyright situation in
|
||||
libburnia-project.org.
|
||||
|
||||
|
245
libburn/branches/ZeroEightZero/cdrskin/add_ts_changes_to_libburn_0_7_8
Executable file
245
libburn/branches/ZeroEightZero/cdrskin/add_ts_changes_to_libburn_0_7_8
Executable file
@ -0,0 +1,245 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# The top level directory in the SVN snapshot is named
|
||||
intermediate="./libburn_pykix"
|
||||
|
||||
# libburn source used: http://libburnia.pykix.org
|
||||
# Downloaded by:
|
||||
# $ svn co http://libburnia-svn.pykix.org/libburn/tags/... $intermediate
|
||||
# packed up in a tarball just to save it from inadverted changes by
|
||||
# $ tar czf libburn_svn.tgz $intermediate
|
||||
original="./libburn_svn_release.tgz"
|
||||
# Historic moments:
|
||||
# original="./libburn_svn_A60815.tgz"
|
||||
# original="./libburn_cdrskin_A60819.tgz"
|
||||
|
||||
|
||||
# My changes are in $changes , mainly in $changes/cdrskin
|
||||
changes="./libburn-release"
|
||||
|
||||
skin_release="0.7.8"
|
||||
patch_level=".pl00"
|
||||
skin_rev="$skin_release""$patch_level"
|
||||
|
||||
# The result directory and the name of the result tarballs
|
||||
target="./cdrskin-${skin_release}"
|
||||
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"
|
||||
|
||||
man_to_html_cmd="./cdrskin/convert_man_to_html.sh"
|
||||
man_page_html="cdrskin/man_1_cdrskin.html"
|
||||
|
||||
# bintarget_dynamic="cdrskin_${skin_rev}-x86-suse9_0"
|
||||
bintarget_dynamic="cdrskin_${skin_rev}-amd64-suse10_2"
|
||||
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 vim.swp and binaries
|
||||
rm "$cdrskin_target"/.*.swp
|
||||
rm "$cdrskin_target"/.*.swo
|
||||
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
|
||||
|
||||
# Remove eventual SVN stuff from cdrskin directory
|
||||
for i in .deps .dirstamp .libs
|
||||
do
|
||||
if test -e "$cdrskin_target"/"$i"
|
||||
then
|
||||
rm -rf "$cdrskin_target"/"$i"
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove GIFs of cdrskin_eng.html
|
||||
rm "$cdrskin_target"/doener_*.gif "$cdrskin_target"/doener_*.png
|
||||
|
||||
# Remove automatically generated HTML man page
|
||||
rm "$cdrskin_target"/man_1_cdrskin.html
|
||||
|
||||
# Remove all add_ts_changes_to_libburn besides this one
|
||||
for i in "$cdrskin_target"/add_ts_changes_to_libburn*
|
||||
do
|
||||
if test $(basename "$0") = $(basename "$i")
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
rm $i
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove libcevap
|
||||
rm -rf "$target"/libcevap
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
# Repair non-portable shell code output of ./bootstrap
|
||||
(
|
||||
cd "$compile_dir" || exit 1
|
||||
sed -e 's/^for ac_header in$/test -z 1 \&\& for ac_header in dummy/' \
|
||||
< ./configure > ./configure-repaired
|
||||
if test "$?" = 0
|
||||
then
|
||||
echo "$0: Empty 'for ac_header in' found in configure." >&2
|
||||
fi
|
||||
mv ./configure-repaired ./configure
|
||||
chmod a+rx,go-w,u+w ./configure
|
||||
)
|
||||
|
||||
# Pack it up to the new libburn+cdrskin-tarball
|
||||
tar czf "$cdrskin_tarball" "$target"
|
||||
|
||||
# Produce a static and a dynamic binary, and a HTML man page
|
||||
(
|
||||
cd "$compile_dir" || exit 1
|
||||
./configure
|
||||
make
|
||||
"$compile_cmd" -O2 -do_strip
|
||||
cp "$compile_result" "../$bintarget_dynamic"
|
||||
if test -n "$compile_static_opts"
|
||||
then
|
||||
"$compile_cmd" $compile_static_opts -O2 -do_strip
|
||||
cp "$compile_result" "../$bintarget_static"
|
||||
fi
|
||||
"$man_to_html_cmd"
|
||||
mv "$man_page_html" ..
|
||||
)
|
||||
|
||||
# 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"
|
||||
ls -l $(basename "$man_page_html")
|
||||
|
246
libburn/branches/ZeroEightZero/cdrskin/add_ts_changes_to_libburn_0_7_9
Executable file
246
libburn/branches/ZeroEightZero/cdrskin/add_ts_changes_to_libburn_0_7_9
Executable file
@ -0,0 +1,246 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
# The top level directory in the SVN snapshot is named
|
||||
intermediate="./libburn_pykix"
|
||||
|
||||
# libburn source used: http://libburnia-project.org
|
||||
# Downloaded by:
|
||||
# $ svn co http://libburnia-project.org/libburn/tags/... $intermediate
|
||||
# packed up in a tarball just to save it from inadverted changes by
|
||||
# $ tar czf libburn_svn.tgz $intermediate
|
||||
original="./libburn_svn.tgz"
|
||||
# Historic moments:
|
||||
# original="./libburn_svn_A60815.tgz"
|
||||
# original="./libburn_cdrskin_A60819.tgz"
|
||||
|
||||
|
||||
# My changes are in $changes , mainly in $changes/cdrskin
|
||||
changes="./libburn-develop"
|
||||
|
||||
skin_release="0.7.9"
|
||||
patch_level=""
|
||||
skin_rev="$skin_release""$patch_level"
|
||||
|
||||
# The result directory and the name of the result tarballs
|
||||
target="./cdrskin-${skin_release}"
|
||||
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"
|
||||
|
||||
man_to_html_cmd="./cdrskin/convert_man_to_html.sh"
|
||||
man_page_html="cdrskin/man_1_cdrskin.html"
|
||||
|
||||
bintarget_dynamic="cdrskin_${skin_rev}-amd64-suse10_2"
|
||||
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 vim.swp and binaries
|
||||
rm "$cdrskin_target"/.*.swp
|
||||
rm "$cdrskin_target"/.*.swo
|
||||
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
|
||||
|
||||
# Remove eventual SVN stuff from cdrskin directory
|
||||
for i in .deps .dirstamp .libs
|
||||
do
|
||||
if test -e "$cdrskin_target"/"$i"
|
||||
then
|
||||
rm -rf "$cdrskin_target"/"$i"
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove GIFs of cdrskin_eng.html
|
||||
rm "$cdrskin_target"/doener_*.gif "$cdrskin_target"/doener_*.png
|
||||
|
||||
# Remove automatically generated HTML man page
|
||||
rm "$cdrskin_target"/man_1_cdrskin.html
|
||||
|
||||
# Remove libcevap
|
||||
rm -rf "$target"/libcevap
|
||||
|
||||
# Remove all add_ts_changes_to_libburn besides this one
|
||||
for i in "$cdrskin_target"/add_ts_changes_to_libburn*
|
||||
do
|
||||
if test $(basename "$0") = $(basename "$i")
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
rm $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
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
# Repair non-portable shell code output of ./bootstrap
|
||||
(
|
||||
cd "$compile_dir" || exit 1
|
||||
sed -e 's/^for ac_header in$/test -z 1 \&\& for ac_header in dummy/' \
|
||||
< ./configure > ./configure-repaired
|
||||
if test "$?" = 0
|
||||
then
|
||||
echo "$0: Empty 'for ac_header in' found in configure." >&2
|
||||
fi
|
||||
mv ./configure-repaired ./configure
|
||||
chmod a+rx,go-w,u+w ./configure
|
||||
)
|
||||
|
||||
|
||||
# Pack it up to the new libburn+cdrskin-tarball
|
||||
tar czf "$cdrskin_tarball" "$target"
|
||||
|
||||
# Produce a static and a dynamic binary, and a HTML man page
|
||||
(
|
||||
cd "$compile_dir" || exit 1
|
||||
./configure
|
||||
make
|
||||
"$compile_cmd" -libburn_svn -O2 -do_strip
|
||||
cp "$compile_result" "../$bintarget_dynamic"
|
||||
if test -n "$compile_static_opts"
|
||||
then
|
||||
"$compile_cmd" $compile_static_opts -libburn_svn -O2 -do_strip
|
||||
cp "$compile_result" "../$bintarget_static"
|
||||
fi
|
||||
# "$compile_cmd" -libburn_svn -O2 -do_diet -do_strip
|
||||
# cp "$compile_result" "../$bintarget_dynamic"_diet
|
||||
"$man_to_html_cmd"
|
||||
mv "$man_page_html" ..
|
||||
)
|
||||
|
||||
# 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"
|
||||
ls -l $(basename "$man_page_html")
|
||||
|
37
libburn/branches/ZeroEightZero/cdrskin/cdrecord_spy.sh
Executable file
37
libburn/branches/ZeroEightZero/cdrskin/cdrecord_spy.sh
Executable file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Spying on the call to cdrecord.
|
||||
#
|
||||
# Move $(which cdrecord) to $(dirname $(which cdrecord))/real_cdrecord .
|
||||
# Install this sript instead. (Do not forget to revoke this after the test.)
|
||||
#
|
||||
|
||||
# The report target is set in variable rt.
|
||||
# The default is this file :
|
||||
rt=/tmp/cdrecord_spy_log
|
||||
|
||||
# To use a bystanding xterm as target i find out the pty address by
|
||||
# executing in that terminal
|
||||
# sleep 12345
|
||||
# and then running in another terminal
|
||||
# ps -ef | grep 'sleep 12345'
|
||||
# which answers something like
|
||||
# thomas 21303 30518 0 14:02 pts/23 00:00:00 sleep 12345
|
||||
# thomas 21421 30523 0 14:02 pts/24 00:00:00 grep sleep 12345
|
||||
# from which i learn that pts/23 is sleeping 12345. Now sleep can be aborted.
|
||||
#
|
||||
# rt=/dev/pts/23
|
||||
|
||||
echo '------------------------------------- cdrecord_spy 0.1.0 -------' >>"$rt"
|
||||
date >>"$rt"
|
||||
echo '----------------------------------------------------------------' >>"$rt"
|
||||
echo "$0" >>"$rt"
|
||||
for i in "$@"
|
||||
do
|
||||
echo "$i" >>"$rt"
|
||||
done
|
||||
echo '------------------------------------- cdrecord_spy 0.1.0 - end -' >>"$rt"
|
||||
|
||||
real_cdrecord "$@"
|
||||
|
||||
|
1314
libburn/branches/ZeroEightZero/cdrskin/cdrfifo.c
Normal file
1314
libburn/branches/ZeroEightZero/cdrskin/cdrfifo.c
Normal file
File diff suppressed because it is too large
Load Diff
171
libburn/branches/ZeroEightZero/cdrskin/cdrfifo.h
Normal file
171
libburn/branches/ZeroEightZero/cdrskin/cdrfifo.h
Normal file
@ -0,0 +1,171 @@
|
||||
|
||||
/*
|
||||
cdrfifo.c , Copyright 2006 Thomas Schmitt <scdbackup@gmx.net>
|
||||
|
||||
A fd-to-fd or fd-to-memory fifo to be used within cdrskin or independently.
|
||||
By chaining of fifo objects, several fifos can be run simultaneously
|
||||
in fd-to-fd mode. Modes are controlled by parameter flag of
|
||||
Cdrfifo_try_to_work().
|
||||
|
||||
Provided under GPL license within cdrskin and under BSD license elsewise.
|
||||
*/
|
||||
|
||||
#ifndef Cdrfifo_headerfile_includeD
|
||||
#define Cdrfifo_headerfile_includeD
|
||||
|
||||
|
||||
/** The fifo buffer which will smoothen the data stream from data provider
|
||||
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.).
|
||||
This structure is opaque to applications and may only be used via
|
||||
the Cdrfifo*() methods described in cdrfifo.h .
|
||||
*/
|
||||
struct CdrfifO;
|
||||
|
||||
|
||||
/** Create a fifo object.
|
||||
@param ff Returns the address of the new object.
|
||||
@param source_fd Filedescriptor opened to a readable data stream.
|
||||
@param dest_fd Filedescriptor opened to a writable data stream.
|
||||
To work with libburn, it needs to be attached to a
|
||||
struct burn_source object.
|
||||
@param chunk_size Size of buffer block for a single transaction (0=default)
|
||||
@param buffer_size Size of fifo buffer
|
||||
@param flag bit0= Debugging verbosity
|
||||
@return 1 on success, <=0 on failure
|
||||
*/
|
||||
int Cdrfifo_new(struct CdrfifO **ff, int source_fd, int dest_fd,
|
||||
int chunk_size, int buffer_size, int flag);
|
||||
|
||||
/** Release from memory a fifo object previously created by Cdrfifo_new().
|
||||
@param ff The victim (gets returned as NULL, call can stand *ff==NULL)
|
||||
@param flag Bitfield for control purposes:
|
||||
bit0= do not close destination fd
|
||||
*/
|
||||
int Cdrfifo_destroy(struct CdrfifO **ff, int flag);
|
||||
|
||||
/** Close any output fds */
|
||||
int Cdrfifo_close(struct CdrfifO *o, int flag);
|
||||
|
||||
/** Close any output fds of o and its chain peers */
|
||||
int Cdrfifo_close_all(struct CdrfifO *o, int flag);
|
||||
|
||||
int Cdrfifo_get_sizes(struct CdrfifO *o, int *chunk_size, int *buffer_size,
|
||||
int flag);
|
||||
|
||||
/** Set a speed limit for buffer output.
|
||||
@param o The fifo object
|
||||
@param bytes_per_second >0 catch up slowdowns over the whole run time
|
||||
<0 catch up slowdowns only over one interval
|
||||
=0 disable speed limit
|
||||
*/
|
||||
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);
|
||||
|
||||
|
||||
/** Attach a further pair of input and output fd which will use the same
|
||||
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);
|
||||
|
||||
/** Attach a further fifo which shall be processed simultaneously with this
|
||||
one by Cdrfifo_try_to_work() in fd-to-fd mode.
|
||||
*/
|
||||
int Cdrfifo_attach_peer(struct CdrfifO *o, struct CdrfifO *next, int flag);
|
||||
|
||||
|
||||
/** Obtain buffer state.
|
||||
@param o The buffer object
|
||||
@param fill Returns the number of pending payload bytes in the buffer
|
||||
@param space Returns the number of unused buffer bytes
|
||||
@param flag unused yet
|
||||
@return -1=error , 0=inactive , 1=reading and writing ,
|
||||
2=reading ended (but still writing)
|
||||
*/
|
||||
int Cdrfifo_get_buffer_state(struct CdrfifO *o,int *fill,int *space,int flag);
|
||||
|
||||
int Cdrfifo_get_counters(struct CdrfifO *o,
|
||||
double *in_counter, double *out_counter, int flag);
|
||||
|
||||
/** reads min_fill and begins measurement interval for next min_fill */
|
||||
int Cdrfifo_next_interval(struct CdrfifO *o, int *min_fill, int flag);
|
||||
|
||||
int Cdrfifo_get_min_fill(struct CdrfifO *o, int *total_min_fill,
|
||||
int *interval_min_fill, int flag);
|
||||
|
||||
int Cdrfifo_get_cdr_counters(struct CdrfifO *o,
|
||||
double *put_counter, double *get_counter,
|
||||
double *empty_counter, double *full_counter,
|
||||
int flag);
|
||||
|
||||
/** Inquire the eventually detected size of an eventual ISO-9660 file system
|
||||
@return 0=no ISO resp. size detected, 1=size_in_bytes is valid
|
||||
*/
|
||||
int Cdrfifo_get_iso_fs_size(struct CdrfifO *o, double *size_in_bytes,int flag);
|
||||
|
||||
|
||||
/** Take over the eventually memorized blocks 16 to 31 of input (2 kB each).
|
||||
The fifo forgets the blocks by this call. I.e. a second one will return 0.
|
||||
After this call it is the responsibility of the caller to dispose the
|
||||
retrieved memory via call free().
|
||||
@param pt Will be filled either with NULL or a pointer to 32 kB of data
|
||||
@return 0=nothing is buffered, 1=pt points to valid freeable data
|
||||
*/
|
||||
int Cdrfifo_adopt_iso_fs_descr(struct CdrfifO *o, char **pt, int flag);
|
||||
|
||||
|
||||
/** Check for pending data at the fifo's source file descriptor and wether the
|
||||
fifo is ready to take them. Simultaneously check the buffer for existing
|
||||
data and the destination fd for readiness to accept some. If so, a small
|
||||
chunk of data is transfered to and/or from the fifo.
|
||||
This is done for the given fifo object and all members of its next-chain.
|
||||
The check and transactions are repeated until a given timespan has elapsed.
|
||||
libburn applications call this function in the burn loop instead of sleep().
|
||||
It may also be used instead of read(). Then it returns as soon as an output
|
||||
transaction would be performed. See flag:bit2.
|
||||
@param o The fifo object
|
||||
@param wait_usec The time in microseconds after which the function shall
|
||||
return.
|
||||
@param reply_buffer with bit2: Returns write-ready buffer chunk and must
|
||||
be able to take at least chunk_size bytes
|
||||
@param reply_count with bit2: Returns number of writeable bytes in reply_pt
|
||||
@param flag Bitfield for control purposes:
|
||||
bit0= Enable debug pacifier (same with Cdrfifo_debuG)
|
||||
bit1= Do not write, just fill buffer
|
||||
bit2= fd-to-memory mode (else fd-to-fd mode):
|
||||
Rather than writing a chunk return it and its size.
|
||||
No simultaneous processing of chained fifos.
|
||||
bit3= With bit2: do not check destination fd for readiness
|
||||
@return <0 = error , 0 = idle , 1 = did some work , 2 = all work is done
|
||||
*/
|
||||
int Cdrfifo_try_to_work(struct CdrfifO *o, int wait_usec,
|
||||
char *reply_buffer, int *reply_count, int flag);
|
||||
|
||||
/** Fill the fifo as far as possible without writing to destination fd.
|
||||
@param size if >=0 : end filling after the given number of bytes
|
||||
@return 1 on success, <=0 on failure
|
||||
*/
|
||||
int Cdrfifo_fill(struct CdrfifO *o, int size, int flag);
|
||||
|
||||
|
||||
#endif /* Cdrfifo_headerfile_includeD */
|
||||
|
1377
libburn/branches/ZeroEightZero/cdrskin/cdrskin.1
Normal file
1377
libburn/branches/ZeroEightZero/cdrskin/cdrskin.1
Normal file
File diff suppressed because it is too large
Load Diff
9265
libburn/branches/ZeroEightZero/cdrskin/cdrskin.c
Normal file
9265
libburn/branches/ZeroEightZero/cdrskin/cdrskin.c
Normal file
File diff suppressed because it is too large
Load Diff
545
libburn/branches/ZeroEightZero/cdrskin/cdrskin_eng.html
Normal file
545
libburn/branches/ZeroEightZero/cdrskin/cdrskin_eng.html
Normal file
@ -0,0 +1,545 @@
|
||||
<HTML>
|
||||
|
||||
<HEAD>
|
||||
<META NAME="description" CONTENT="cdrskin, a limited cdrecord compatibility wrapper for libburn">
|
||||
<META NAME="keywords" CONTENT="cdrskin, libburn, libburnia, burn, CD, DVD, linux, recording, burning, CD-R, CD-RW, DVD-R, DVD-RW, DVD+RW, DVD+R, DVD+R/DL, DVD-RAM, BD-RE, BD-R, cdrecord, compatible, scdbackup">
|
||||
<META NAME="robots" CONTENT="follow">
|
||||
<TITLE>cdrskin homepage english</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<BODY BGCOLOR="#F5DEB3" TEXT=#000000 LINK=#0000A0 VLINK=#800000>
|
||||
<FONT SIZE=+1>
|
||||
|
||||
<CENTER>
|
||||
<A HREF="http://en.wikipedia.org/wiki/D%C3%B6ner_kebab">
|
||||
<IMG SRC="doener_150x200_tr_octx.png" BORDER=0
|
||||
ALT="cdrskin logo: Doener mit Scharf">
|
||||
</A>
|
||||
<P><H2> Homepage of </H2>
|
||||
<H1> cdrskin </H1>
|
||||
|
||||
<H2>Limited cdrecord compatibility wrapper for libburn</H2>
|
||||
</CENTER>
|
||||
|
||||
<P>
|
||||
<H2>Purpose:</H2>
|
||||
Burns preformatted data to CD, DVD, and BD media:<BR>
|
||||
CD-R, DVD-R, DVD+R, DVD+R/DL, BD-R, CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE
|
||||
</P>
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A HREF="#download">Direct hop to download links -></A>
|
||||
|
||||
<P>
|
||||
<H2>Hardware requirements:</H2>
|
||||
About any CD, DVD, or BD recorder produced in the recent ten years.
|
||||
<BR>
|
||||
<A HREF="http://libburnia-project.org">libburn</A>
|
||||
supports recorders which are compliant to standards MMC-1 for CD and
|
||||
MMC-5 for DVD or BD. Linux and FreeBSD allow to access drives connected
|
||||
via SCSI, PATA (aka IDE, ATA), USB, or SATA.
|
||||
<BR>
|
||||
</P>
|
||||
|
||||
<P>
|
||||
<H2>Software requirements :</H2>
|
||||
<DL>
|
||||
<DT>Linux with kernel 2.4 or higher (and libc, of course) :</DT>
|
||||
<DD>With kernel 2.4 an ATA drive has to be under ide-scsi emulation.</DD>
|
||||
<DD>With kernel 2.6 the drive should not be under ide-scsi.</DD>
|
||||
<DT>or FreeBSD (with libc, of course) :</DT>
|
||||
<DD>ATA and SATA drives need atapicam running.</DD>
|
||||
<DD>libcam has to be installed.</DD>
|
||||
<DT>libpthread</DT>
|
||||
<DD>is supposed to be a standard system component.</DD>
|
||||
</DL>
|
||||
</P>
|
||||
|
||||
<P>
|
||||
<H2>
|
||||
GPL software included:<BR>
|
||||
</H2>
|
||||
<DL>
|
||||
<DT>libburn-0.7.8</DT>
|
||||
<DD>(founded by Derek Foreman and Ben Jansens,
|
||||
developed and maintained since August 2006 by
|
||||
Thomas Schmitt from team of libburnia-project.org)
|
||||
</DD>
|
||||
<DD>transfers data to CD, DVD, BD</DD>
|
||||
</DL>
|
||||
</P>
|
||||
|
||||
<P>
|
||||
This program system has been tested on Intel/AMD Linux and FreeBSD systems
|
||||
only.<BR>
|
||||
Ports to other usable systems are appreciated. Reports are welcome.
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
<H2>Special features:</H2>
|
||||
<UL>
|
||||
<LI>Source code is independent of
|
||||
<A HREF="http://cdrecord.berlios.de/old/private/cdrecord.html">cdrecord</A>
|
||||
</LI>
|
||||
</UL>
|
||||
</P>
|
||||
|
||||
<P>
|
||||
<H2>Commands:</H2>
|
||||
<DL>
|
||||
<DT>The most common options of cdrecord for data and audio on CD media
|
||||
are provided in a compatible way.<BR>
|
||||
On all DVD media except DVD-R DL, cdrskin is able to perform any recording job
|
||||
which is possible with cdrecord.
|
||||
Other than with cdrecord, option -multi is supported with many DVD types and
|
||||
BD-R. Write mode -tao works with anything but quickly blanked DVD-RW.
|
||||
</DT>
|
||||
<BR><BR>
|
||||
<DT>Get an overview of drives and their addresses</DT>
|
||||
<DD>#<KBD> cdrskin -scanbus</KBD></DD>
|
||||
<DD>#<KBD> cdrskin dev=ATA -scanbus</KBD></DD>
|
||||
<DD>#<KBD> cdrskin --devices</KBD></DD>
|
||||
<DT>Being superuser avoids permission problems with /dev/srN resp. /dev/hdX .
|
||||
</DT>
|
||||
<DT>Ordinary users should then get granted rw access to the /dev files
|
||||
as listed by option --devices.</DT>
|
||||
<DT> </DT>
|
||||
|
||||
<DT>Get info about a particular drive or loaded media:</DT>
|
||||
<DD>$<KBD> cdrskin dev=0,1,0 -checkdrive</KBD></DD>
|
||||
<DD>$<KBD> cdrskin dev=ATA:1,0,0 -v -atip</KBD></DD>
|
||||
<DD>$<KBD> cdrskin dev=/dev/hdc -minfo</KBD></DD>
|
||||
|
||||
<DT>Prepare CD-RW or DVD-RW for re-use, DVD-RAM or BD-RE for first use:</DT>
|
||||
<DD>$<KBD> cdrskin -v dev=/dev/sg1 blank=as_needed -eject</KBD></DD>
|
||||
|
||||
<DT>Format DVD-RW to avoid need for blanking before re-use:</DT>
|
||||
<DD>$<KBD> cdrskin -v dev=/dev/sr0 blank=format_overwrite</KBD></DD>
|
||||
|
||||
<DT>De-format DVD-RW to make it capable of multi-session again:</DT>
|
||||
<DD>$<KBD> cdrskin -v dev=/dev/sr0 blank=deformat_sequential</KBD></DD>
|
||||
|
||||
<DT>Write ISO-9660 filesystem image as only one to blank or formatted media:
|
||||
</DT>
|
||||
<DD>$<KBD> cdrskin -v dev=/dev/hdc speed=12 fs=8m \</KBD></DD>
|
||||
<DD><KBD> blank=as_needed -eject padsize=300k my_image.iso</KBD></DD>
|
||||
|
||||
<DT>Write compressed afio archive on-the-fly:</DT>
|
||||
<DD>$<KBD> find . | afio -oZ - | \</KBD></DD>
|
||||
<DD><KBD> cdrskin -v dev=0,1,0 fs=32m speed=8 \</KBD></DD>
|
||||
<DD><KBD> blank=as_needed padsize=300k -</KBD></DD>
|
||||
|
||||
<DT>Write several sessions to the same CD, DVD-R[W] or DVD+R[/DL]:</DT>
|
||||
<DD>$<KBD> cdrskin dev=/dev/hdc -v padsize=300k -multi 1.iso</KBD>
|
||||
</DD>
|
||||
<DD>$<KBD> cdrskin dev=/dev/hdc -v padsize=300k -multi 2.iso</KBD>
|
||||
</DD>
|
||||
<DD>$<KBD> cdrskin dev=/dev/hdc -v padsize=300k -multi 3.iso</KBD>
|
||||
</DD>
|
||||
<DD>$<KBD> cdrskin dev=/dev/hdc -v padsize=300k 4.iso</KBD></DD>
|
||||
|
||||
<DT>Get multi-session info for option -C of program mkisofs:</DT>
|
||||
<DD>$<KBD> c_values=$(cdrskin dev=/dev/sr0 -msinfo 2>/dev/null)</KBD></DD>
|
||||
<DD>$<KBD> mkisofs ... -C "$c_values" ...</KBD></DD>
|
||||
|
||||
<DT>Inquire free space on media for a -multi run:</DT>
|
||||
<DD>$<KBD> x=$(cdrskin dev=/dev/sr0 -multi \</KBD></DD>
|
||||
<DD><KBD> --tell_media_space 2>/dev/null)</KBD></DD>
|
||||
<DD>$<KBD> echo "Available: $x blocks of 2048 data bytes"</KBD></DD>
|
||||
|
||||
<DT>Accelerate BD-RE writing to full nominal speed after the first 250 MB</DT>
|
||||
<DD>$<KBD> cdrskin ... stream_recording=250m ...</KBD>
|
||||
|
||||
<DT>Write audio tracks to CD:</DT>
|
||||
<DD>$<KBD> cdrskin -v dev=ATA:1,0,0 speed=48 -sao \</KBD></DD>
|
||||
<DD><KBD> track1.wav track2.au -audio -swab track3.raw</KBD></DD>
|
||||
|
||||
<DT>Get overview of the cdrecord compatible options:</DT>
|
||||
<DD>$<KBD> <A HREF="cdrskin_help">cdrskin -help</A></KBD></DD>
|
||||
|
||||
<DT>Get overview of the non-cdrecord options:</DT>
|
||||
<DD>$<KBD> <A HREF="cdrskin__help">cdrskin --help</A></KBD></DD>
|
||||
|
||||
<DT>Read the detailed manual page:</DT>
|
||||
<DD>$<KBD> <A HREF="man_1_cdrskin.html">man cdrskin</A></KBD></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT>Read about the standard for which cdrskin is striving:</DT>
|
||||
<DD>$<KBD>
|
||||
<A HREF="http://cdrecord.berlios.de/old/private/man/cdrecord-2.0.html">
|
||||
man cdrecord</A></KBD></DD>
|
||||
<DD><B>Do not bother Joerg Schilling with any cdrskin problems.</B>
|
||||
(Be cursed if you install cdrskin as "cdrecord" without clearly forwarding
|
||||
this "don't bother Joerg" demand.)
|
||||
</DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT>Learn to know a more versatile way to burn ISO 9660 formatted data</DT>
|
||||
<DD>
|
||||
Standalone ISO 9660 multi-session CD/DVD/BD tool
|
||||
<A HREF="http://scdbackup.sourceforge.net/xorriso_eng.html">xorriso</A>.
|
||||
</DD>
|
||||
</DL>
|
||||
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="download"></A>
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
<DT>Download as source code (see README):</DT>
|
||||
<DD><A HREF="cdrskin-0.7.8.pl00.tar.gz">cdrskin-0.7.8.pl00.tar.gz</A>
|
||||
(820 KB).
|
||||
</DD>
|
||||
<DD>
|
||||
The cdrskin tarballs are source code identical with libburn releases
|
||||
of the same version number.
|
||||
They get produced via a different procedure, though.<BR>
|
||||
cdrskin is part of libburn - full libburn is provided with cdrskin releases.
|
||||
</DD>
|
||||
|
||||
<!-- This is not offered any more since spring 2008
|
||||
<DD> </DD>
|
||||
<DT>Download as single x86 binaries (untar and move to /usr/bin/cdrskin):</DT>
|
||||
<DD><A HREF="cdrskin_0.4.2.pl00-x86-suse9_0.tar.gz">
|
||||
cdrskin_0.4.2.pl00-x86-suse9_0.tar.gz</A>, (110 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.4.2.pl00-x86-suse9_0-static.tar.gz">
|
||||
cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
|
||||
<DL>
|
||||
<DD>runs on SuSE 7.2 (2.4.4), and on the systems above.</DD>
|
||||
</DL>
|
||||
</DD>
|
||||
-->
|
||||
|
||||
|
||||
</DL>
|
||||
<DL><DT>Documentation:</DT>
|
||||
<DD><A HREF="README_cdrskin">README</A> an introduction</DD>
|
||||
<DD><A HREF="cdrskin__help">cdrskin --help</A> non-cdrecord options</DD>
|
||||
<DD><A HREF="cdrskin_help">cdrskin -help</A> cdrecord compatible options</DD>
|
||||
<DD><A HREF="man_1_cdrskin.html">man cdrskin</A> the manual page</DD>
|
||||
<DD> </DD>
|
||||
</DL>
|
||||
<DL><DT>Contact:</DT>
|
||||
<DD>Thomas Schmitt, <A HREF="mailto:scdbackup@gmx.net">scdbackup@gmx.net</A></DD>
|
||||
<DD>libburn development mailing list,
|
||||
<A HREF="mailto:libburn-hackers@pykix.org">libburn-hackers@pykix.org</A></DD>
|
||||
</DL>
|
||||
<DL><DT>License:</DT>
|
||||
<DD><A HREF="COPYING_cdrskin">GPL</A>, an <A HREF="http://www.opensource.org/">Open Source</A> approved license</DD>
|
||||
<DD> </DD>
|
||||
</DL>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
Enhancements towards previous stable version cdrskin-0.7.6.pl00:
|
||||
<UL>
|
||||
<LI>
|
||||
Abort handling is more suitable for FreeBSD now.
|
||||
</LI>
|
||||
<!--
|
||||
<LI>none</LI>
|
||||
-->
|
||||
</UL>
|
||||
|
||||
Bug fixes towards cdrskin-0.7.6.pl00:
|
||||
<UL>
|
||||
<LI>
|
||||
On FreeBSD: Piped input was falsely attributed a small fixed size
|
||||
</LI>
|
||||
<LI>
|
||||
cdrskin fs=0 led to SIGSEGV. Regression introduced by version 0.7.4.
|
||||
</LI>
|
||||
<!--
|
||||
<LI>none</LI>
|
||||
-->
|
||||
</UL>
|
||||
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
<DL>
|
||||
<DT><H3>Development snapshot, version 0.7.9 :</H3></DT>
|
||||
<DD>Enhancements towards current stable version 0.7.8.pl00:
|
||||
<UL>
|
||||
<LI>none yet</LI>
|
||||
<!--
|
||||
-->
|
||||
|
||||
</UL>
|
||||
</DD>
|
||||
|
||||
<DD>Bug fixes towards cdrskin-0.7.6.pl00:
|
||||
<UL>
|
||||
<LI>none yet</LI>
|
||||
<!--
|
||||
-->
|
||||
</UL>
|
||||
</DD>
|
||||
|
||||
<DD> </DD>
|
||||
<DD><A HREF="README_cdrskin_devel">README 0.7.9</A>
|
||||
<DD><A HREF="cdrskin__help_devel">cdrskin_0.7.9 --help</A></DD>
|
||||
<DD><A HREF="cdrskin_help_devel">cdrskin_0.7.9 -help</A></DD>
|
||||
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.7.9)</A></DD>
|
||||
<DD> </DD>
|
||||
<DT>Maintainers of cdrskin unstable packages please use SVN of
|
||||
<A HREF="http://libburnia-project.org"> libburnia-project.org</A></DT>
|
||||
<DD>Download: <KBD><B>svn co http://svn.libburnia-project.org/libburn/trunk libburn</B>
|
||||
</KBD></DD>
|
||||
<DD>Build: <KBD><B>cd libburn ; ./bootstrap ; ./configure --prefix /usr ; make ; cdrskin/compile_cdrskin.sh</B>
|
||||
</KBD></DD>
|
||||
<DD>Build of SVN versions needs <A HREF="http://sources.redhat.com/autobook/">
|
||||
autotools</A> of at least version 1.7 installed.
|
||||
But after the run of <KBD>./bootstrap</KBD>, only
|
||||
vanilla tools like make and gcc are needed.</DD>
|
||||
</DD>
|
||||
<DD> </DD>
|
||||
<DT>The following download is intended for adventurous end users or
|
||||
admins with full system souvereignty.</DT>
|
||||
<DD>Source (./bootstrap is already applied, build tested, for more see
|
||||
<A HREF="README_cdrskin_devel">upcoming README</A> ):
|
||||
</DD>
|
||||
<DD>
|
||||
<A HREF="cdrskin-0.7.9.tar.gz">cdrskin-0.7.9.tar.gz</A>
|
||||
(840 KB).
|
||||
</DD>
|
||||
|
||||
<!-- This is not offered any more since spring 2008
|
||||
|
||||
<DT>The following downloads are intended for adventurous end users or
|
||||
admins with full system souvereignty.</DT>
|
||||
<DD>Binary (untar and move to /usr/bin/cdrskin):</DD>
|
||||
<DD><A HREF="cdrskin_0.4.3-x86-suse9_0.tar.gz">
|
||||
cdrskin_0.4.3-x86-suse9_0.tar.gz</A>, (110 KB).
|
||||
</DD>
|
||||
<DD><A HREF="cdrskin_0.4.3-x86-suse9_0-static.tar.gz">
|
||||
cdrskin_0.4.3-x86-suse9_0-static.tar.gz</A>, (310 KB)
|
||||
</DD>
|
||||
-->
|
||||
|
||||
</DL>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<P>
|
||||
Many thanks to Joerg Schilling for cdrecord,
|
||||
<BR>
|
||||
and to Derek Foreman and Ben Jansens for creating libburn.
|
||||
<BR>
|
||||
Historic versions based on Derek's and Ben's
|
||||
<A HREF="http://icculus.org/burn">icculus.org/burn</A> :<BR>
|
||||
<A HREF="cdrskin-0.1.2.0.2.ts.tar.gz">cdrskin-0.1.2.0.2.ts.tar.gz</A><BR>
|
||||
<A HREF="cdrskin-0.1.3.0.2.ts.tar.gz">cdrskin-0.1.3.0.2.ts.tar.gz</A>
|
||||
<BR>
|
||||
Very special thanks to Andy Polyakov whose
|
||||
<A HREF="http://fy.chalmers.se/~appro/linux/DVD+RW/tools">dvd+rw-tools</A>
|
||||
provide libburn with invaluable examples on how to deal with DVD and BD media.
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="examples">
|
||||
<P>
|
||||
<DL>
|
||||
<DT>Example for a setup of device permissions.</DT>
|
||||
<DT>
|
||||
Newer Linux distros enable rw-access for the desktop user automatically.
|
||||
So try as normal user whether all your drives are found.
|
||||
CD devices which offer no rw-permission will stay invisible.
|
||||
</DT>
|
||||
<DD>$ <KBD><B>cdrskin --devices</B></KBD></DD>
|
||||
<DT>If not all desired drives show up, become superuser and do again:</DT>
|
||||
</DT>
|
||||
<DD># <KBD><B>cdrskin --devices</B></KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD>0 dev='/dev/sr0' rwr-r- : 'TEAC' 'CD-ROM CD-532S'</KBD></DD>
|
||||
<DD><KBD>1 dev='/dev/hdc' rwrw-- : 'LITE-ON' 'LTR-48125S'</KBD></DD>
|
||||
<DT>Most simple and most insecure is this equivalent
|
||||
of the usual cdrecord permissions u+s,a+x:</DT>
|
||||
<DD># <KBD><B>chmod a+rw /dev/sr0 /dev/hdc</B></KBD></DD>
|
||||
<DT>
|
||||
More secure is to put the permitted users into a group like
|
||||
"floppy", to assign /dev/sr0 /dev/hdc to this group,
|
||||
and to allow rw-access only to group members.
|
||||
</DT>
|
||||
<DD># <KBD><B>vi /etc/group</B></KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD><KBD>floppy:x:19:thomas,scdbackup</KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD># <KBD><B>chgrp floppy /dev/sr0 /dev/hdc</B></KBD></DD>
|
||||
<DD># <KBD><B>chmod g+rw /dev/sr0 /dev/hdc</B></KBD></DD>
|
||||
</DL>
|
||||
</P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="k3b">
|
||||
<P>
|
||||
<A HREF="k3b_on_cdrskin.html">
|
||||
Example how to setup K3b to use cdrskin for burning data CD projects.
|
||||
<A><BR>
|
||||
(<A HREF="http://www.k3b.org">K3b</A>
|
||||
is a GUI frontend which uses cdrecord for CD burning.)
|
||||
</P>
|
||||
|
||||
<!--
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="scdbackup">
|
||||
<P>
|
||||
<DL>
|
||||
<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> 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"</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.3.8 : limited cdrecord compatibility wrapper for libburn</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.
|
||||
In this case, you may execute
|
||||
<KBD>export SCDBACKUP_NO_SCANBUS=1</KBD>
|
||||
and try again.
|
||||
<DL>
|
||||
<DT></DT>
|
||||
<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</B></KBD></DD>
|
||||
</DL>
|
||||
<DL>
|
||||
<DT>To get back to using cdrecord :</DT>
|
||||
<DD>$ <KBD><B>cd scdbackup-0.8.6/inst</B></KBD></DD>
|
||||
<DD>$ <KBD><B>export SCDBACKUP_USE_CDRSKIN=0</B></KBD></DD>
|
||||
<DD>$ <KBD><B>./CONFIGURE_CD</B></KBD></DD>
|
||||
<DD><KBD>...</KBD></DD>
|
||||
<DD>$ <KBD><B>unset SCDBACKUP_USE_CDRSKIN</B></KBD></DD>
|
||||
</DL>
|
||||
</P>
|
||||
|
||||
-->
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="cdrecord">
|
||||
<P>
|
||||
<CENTER><H3>About the relationship of cdrecord and cdrskin</H3></CENTER>
|
||||
First of all: this relationship is single sided, as cdrskin has to be aware of
|
||||
cdrecord but not vice versa.
|
||||
<BR>
|
||||
<BR>
|
||||
I am a long time user of cdrecord and it works fine for me.
|
||||
Especially i do appreciate its write mode -tao which allows to pipe arbitrary
|
||||
data on CD and CD-RW via stdin. cdrecord is reliable, versatile and well
|
||||
maintained. So for me - there would be no problem with it.
|
||||
<BR>
|
||||
But the author of cdrecord and the Linux kernel people foster a very hostile
|
||||
relationship. Ok, that's their business, not mine (or ours if you are with me).
|
||||
One has to be aware, though, that this relationship might lead to a situation
|
||||
where cdrecord is no longer available for certain Linux kernels.
|
||||
<BR>
|
||||
To have my own project prepared for such a time, i began to implement its
|
||||
cdrecord gestures on top of libburn.
|
||||
From now on i invite other interested users of cdrecord to teach cdrskin
|
||||
the gestures necessary for their cdrecord applications.
|
||||
Contact me. Let's see what we can achieve.
|
||||
<BR>
|
||||
<BR>
|
||||
libburn and cdrskin are now mature enough to substitute cdrecord in its
|
||||
major use cases of CD and DVD burning. It is possible to foist cdrskin on
|
||||
various software packages if it gets falsely named "cdrecord".
|
||||
I do not encourage this approach, but of course such a replacement
|
||||
opportunity is the goal of a cdrecord compatibility wrapper.
|
||||
<BR>
|
||||
<BR>
|
||||
It is very important to me that this project is not perceived as hostile
|
||||
towards Joerg Schilling and his ongoing work.
|
||||
I owe him much. For cdrecord, for mkisofs, for star. Chapeau.
|
||||
<BR>
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<CENTER><FONT SIZE=+0>
|
||||
<!-- <A NAME="bottom" HREF="main_ger.html#bottom">deutsch (german)</A>
|
||||
<BR><BR>
|
||||
-->
|
||||
<A HREF="http://en.wikipedia.org/wiki/D%C3%B6ner_kebab">
|
||||
<IMG SRC="doener_150x200_tr.png" BORDER=0
|
||||
ALT="cdrskin logo: Doener mit Scharf"></A>
|
||||
<BR><BR>
|
||||
<FONT SIZE=+0>Enjoying free Open Source hosting by <A HREF="http://www.webframe.org">www.webframe.org</A><BR>
|
||||
<A HREF="http://www.webframe.org">
|
||||
<IMG SRC="msfree.gif" ALT="100 % Microsoft free" BORDER=0></A><BR>
|
||||
and by <A HREF="http://sourceforge.net">sourceforge.net</A><BR>
|
||||
<A href="http://sourceforge.net">
|
||||
<IMG src="sflogo-88-1.png" BORDER="0" ALT="SourceForge Logo"></A>
|
||||
<!-- on sourceforge use : <IMG src="http://sourceforge.net/sflogo.php?group_id=16010" width="88" height="31" border="0" alt="SourceForge Logo"></A> -->
|
||||
<P>
|
||||
Enjoying a FreeBSD shell account with the opportunity to
|
||||
build and install cdrskin at<BR>
|
||||
<A HREF="http://www.en.free-shells.com.ar">free-shells.com.ar</A>
|
||||
</P>
|
||||
</FONT></CENTER>
|
||||
<HR>
|
||||
<DL>
|
||||
<DT>Links to my other published software projects :
|
||||
<DD><A HREF="http://scdbackup.webframe.org/xorriso_eng.html">
|
||||
xorriso, a standalone ISO 9660 multi-session CD/DVD/BD burn tool.
|
||||
No mkisofs needed.
|
||||
<DL>
|
||||
<DD>
|
||||
<A HREF="http://scdbackup.sourceforge.net/xorriso_eng.html">
|
||||
(a second source of above)</A>
|
||||
</DD>
|
||||
</DL>
|
||||
</DD>
|
||||
<DD><A HREF=http://scdbackup.webframe.org/main_eng.html>
|
||||
scdbackup, multi volume CD backup</A>
|
||||
<DL><DD><A HREF=http://scdbackup.sourceforge.net/main_eng.html>
|
||||
(a second source of above)</A></DD></DL></DD>
|
||||
<DD><A HREF=http://stic.sourceforge.net>Some Tools for Image Collectors</A>
|
||||
</DD>
|
||||
<DD><A HREF=http://scdbackup.webframe.org/pppoem>
|
||||
pppoem, a DSL throughput monitor (mainly for Linux kernel 2.4)</A>
|
||||
</DD>
|
||||
</DL>
|
||||
<BR><BR>
|
||||
Legal statement: This website does not serve any commercial purpose.<BR>
|
||||
</FONT>
|
||||
</BODY>
|
||||
</HTML>
|
@ -0,0 +1 @@
|
||||
#define Cdrskin_timestamP "2010.04.09.090645"
|
8330
libburn/branches/ZeroEightZero/cdrskin/changelog.txt
Normal file
8330
libburn/branches/ZeroEightZero/cdrskin/changelog.txt
Normal file
File diff suppressed because it is too large
Load Diff
215
libburn/branches/ZeroEightZero/cdrskin/cleanup.c
Normal file
215
libburn/branches/ZeroEightZero/cdrskin/cleanup.c
Normal file
@ -0,0 +1,215 @@
|
||||
/*
|
||||
cleanup.c , Copyright 2006 Thomas Schmitt <scdbackup@gmx.net>
|
||||
|
||||
A signal handler which cleans up an application and exits.
|
||||
|
||||
Provided under GPL license within GPL projects, BSD license elsewise.
|
||||
*/
|
||||
|
||||
/*
|
||||
cc -g -o cleanup -DCleanup_standalonE cleanup.c
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <signal.h>
|
||||
typedef void (*sighandler_t)(int);
|
||||
|
||||
|
||||
#include "cleanup.h"
|
||||
|
||||
|
||||
#ifndef Cleanup_has_no_libburn_os_H
|
||||
|
||||
|
||||
#include "../libburn/os.h"
|
||||
|
||||
/* see os.h for name of particular os-*.h where this is defined */
|
||||
static int signal_list[]= { BURN_OS_SIGNAL_MACRO_LIST , -1};
|
||||
static char *signal_name_list[]= { BURN_OS_SIGNAL_NAME_LIST , "@"};
|
||||
static int signal_list_count= BURN_OS_SIGNAL_COUNT;
|
||||
static int non_signal_list[]= { BURN_OS_NON_SIGNAL_MACRO_LIST, -1};
|
||||
static int non_signal_list_count= BURN_OS_NON_SIGNAL_COUNT;
|
||||
|
||||
|
||||
#else /* ! Cleanup_has_no_libburn_os_H */
|
||||
|
||||
|
||||
/* Outdated. Linux only. For backward compatibility with pre-libburn-0.2.3 */
|
||||
|
||||
/* Signals to be caught */
|
||||
static int signal_list[]= {
|
||||
SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT,
|
||||
SIGFPE, SIGSEGV, SIGPIPE, SIGALRM, SIGTERM,
|
||||
SIGUSR1, SIGUSR2, SIGXCPU, SIGTSTP, SIGTTIN,
|
||||
SIGTTOU,
|
||||
SIGBUS, SIGPOLL, SIGPROF, SIGSYS, SIGTRAP,
|
||||
SIGVTALRM, SIGXCPU, SIGXFSZ, -1
|
||||
};
|
||||
static char *signal_name_list[]= {
|
||||
"SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGABRT",
|
||||
"SIGFPE", "SIGSEGV", "SIGPIPE", "SIGALRM", "SIGTERM",
|
||||
"SIGUSR1", "SIGUSR2", "SIGXCPU", "SIGTSTP", "SIGTTIN",
|
||||
"SIGTTOU",
|
||||
"SIGBUS", "SIGPOLL", "SIGPROF", "SIGSYS", "SIGTRAP",
|
||||
"SIGVTALRM", "SIGXCPU", "SIGXFSZ", "@"
|
||||
};
|
||||
static int signal_list_count= 24;
|
||||
|
||||
/* Signals not to be caught */
|
||||
static int non_signal_list[]= {
|
||||
SIGKILL, SIGCHLD, SIGSTOP, SIGURG, SIGWINCH, -1
|
||||
};
|
||||
static int non_signal_list_count= 5;
|
||||
|
||||
|
||||
#endif /* Cleanup_has_no_libburn_os_H */
|
||||
|
||||
|
||||
|
||||
/* run time dynamic part */
|
||||
static char cleanup_msg[4096]= {""};
|
||||
static int cleanup_exiting= 0;
|
||||
static int cleanup_has_reported= -1234567890;
|
||||
|
||||
static void *cleanup_app_handle= NULL;
|
||||
static Cleanup_app_handler_T cleanup_app_handler= NULL;
|
||||
static int cleanup_perform_app_handler_first= 0;
|
||||
|
||||
|
||||
static int Cleanup_handler_exit(int exit_value, int signum, int flag)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if(cleanup_msg[0]!=0 && cleanup_has_reported!=signum) {
|
||||
fprintf(stderr,"\n%s\n",cleanup_msg);
|
||||
cleanup_has_reported= signum;
|
||||
}
|
||||
if(cleanup_perform_app_handler_first)
|
||||
if(cleanup_app_handler!=NULL) {
|
||||
ret= (*cleanup_app_handler)(cleanup_app_handle,signum,0);
|
||||
if(ret==2 || ret==-2)
|
||||
return(2);
|
||||
}
|
||||
if(cleanup_exiting) {
|
||||
fprintf(stderr,"cleanup: ABORT : repeat by pid=%d, signum=%d\n",
|
||||
getpid(),signum);
|
||||
return(0);
|
||||
}
|
||||
cleanup_exiting= 1;
|
||||
alarm(0);
|
||||
if(!cleanup_perform_app_handler_first)
|
||||
if(cleanup_app_handler!=NULL) {
|
||||
ret= (*cleanup_app_handler)(cleanup_app_handle,signum,0);
|
||||
if(ret==2 || ret==-2)
|
||||
return(2);
|
||||
}
|
||||
exit(exit_value);
|
||||
}
|
||||
|
||||
|
||||
static void Cleanup_handler_generic(int signum)
|
||||
{
|
||||
int i;
|
||||
|
||||
sprintf(cleanup_msg,"UNIX-SIGNAL caught: %d errno= %d",signum,errno);
|
||||
for(i= 0; i<signal_list_count; i++)
|
||||
if(signum==signal_list[i]) {
|
||||
sprintf(cleanup_msg,"UNIX-SIGNAL: %s errno= %d",
|
||||
signal_name_list[i],errno);
|
||||
break;
|
||||
}
|
||||
Cleanup_handler_exit(1,signum,0);
|
||||
}
|
||||
|
||||
|
||||
int Cleanup_set_handlers(void *handle, Cleanup_app_handler_T handler, int flag)
|
||||
/*
|
||||
bit0= set to default handlers
|
||||
bit1= set to ignore
|
||||
bit2= set cleanup_perform_app_handler_first
|
||||
bit3= set SIGABRT to handler (makes sense with bits 0 or 1)
|
||||
*/
|
||||
{
|
||||
int i,j,max_sig= -1,min_sig= 0x7fffffff;
|
||||
sighandler_t sig_handler;
|
||||
|
||||
cleanup_msg[0]= 0;
|
||||
cleanup_app_handle= handle;
|
||||
cleanup_app_handler= handler;
|
||||
|
||||
/* <<< make cleanup_exiting thread safe to get rid of this */
|
||||
if(flag&4)
|
||||
cleanup_perform_app_handler_first= 1;
|
||||
|
||||
|
||||
if(flag&1)
|
||||
sig_handler= SIG_DFL;
|
||||
else if(flag&2)
|
||||
sig_handler= SIG_IGN;
|
||||
else
|
||||
sig_handler= Cleanup_handler_generic;
|
||||
/* set all signal numbers between the lowest and highest in the list
|
||||
except those in the non-signal list */
|
||||
for(i= 0; i<signal_list_count; i++) {
|
||||
if(signal_list[i]>max_sig)
|
||||
max_sig= signal_list[i];
|
||||
if(signal_list[i]<min_sig)
|
||||
min_sig= signal_list[i];
|
||||
}
|
||||
for(i= min_sig; i<=max_sig; i++) {
|
||||
for(j= 0; j<non_signal_list_count; j++)
|
||||
if(i==non_signal_list[j])
|
||||
break;
|
||||
if(j>=non_signal_list_count) {
|
||||
if(i==SIGABRT && (flag&8))
|
||||
signal(i,Cleanup_handler_generic);
|
||||
else
|
||||
signal(i,sig_handler);
|
||||
}
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
#ifdef Cleanup_standalonE
|
||||
|
||||
struct Demo_apP {
|
||||
char *msg;
|
||||
};
|
||||
|
||||
|
||||
int Demo_app_handler(struct Demo_apP *demoapp, int signum, int flag)
|
||||
{
|
||||
printf("Handling exit of demo application on signal %d. msg=\"%s\"\n",
|
||||
signum,demoapp->msg);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
main()
|
||||
{
|
||||
struct Demo_apP demoapp;
|
||||
|
||||
demoapp.msg= "Good Bye";
|
||||
Cleanup_set_handlers(&demoapp,(Cleanup_app_handler_T) Demo_app_handler,0);
|
||||
|
||||
if(1) { /* change to 0 in order to wait for external signals */
|
||||
char *cpt= NULL,c;
|
||||
printf("Intentionally provoking SIGSEGV ...\n");
|
||||
c= *cpt;
|
||||
} else {
|
||||
printf("killme: %d\n",getpid());
|
||||
sleep(3600);
|
||||
}
|
||||
|
||||
Cleanup_set_handlers(NULL,NULL,1);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#endif /* Cleanup_standalonE */
|
34
libburn/branches/ZeroEightZero/cdrskin/cleanup.h
Normal file
34
libburn/branches/ZeroEightZero/cdrskin/cleanup.h
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
cleanup.c , Copyright 2006 Thomas Schmitt <scdbackup@gmx.net>
|
||||
|
||||
A signal handler which cleans up an application and exits.
|
||||
|
||||
Provided under GPL license within GPL projects, BSD license elsewise.
|
||||
*/
|
||||
|
||||
#ifndef Cleanup_includeD
|
||||
#define Cleanup_includeD 1
|
||||
|
||||
|
||||
/** Layout of an application provided cleanup function using an application
|
||||
provided handle as first argument and the signal number as second
|
||||
argument. The third argument is a flag bit field with no defined bits yet.
|
||||
If the handler returns 2 or -2 then it has delegated exit() to some other
|
||||
instance and the Cleanup handler shall return rather than exit.
|
||||
*/
|
||||
typedef int (*Cleanup_app_handler_T)(void *, int, int);
|
||||
|
||||
|
||||
/** Establish exiting signal handlers on (hopefully) all signals that are
|
||||
not ignored by default or non-catchable.
|
||||
@param handle Opaque object which knows how to cleanup application
|
||||
@param handler Function which uses handle to perform application cleanup
|
||||
@param flag Control Bitfield
|
||||
bit0= reset to default signal handling
|
||||
*/
|
||||
int Cleanup_set_handlers(void *handle, Cleanup_app_handler_T handler,
|
||||
int flag);
|
||||
|
||||
|
||||
#endif /* ! Cleanup_includeD */
|
||||
|
255
libburn/branches/ZeroEightZero/cdrskin/compile_cdrskin.sh
Executable file
255
libburn/branches/ZeroEightZero/cdrskin/compile_cdrskin.sh
Executable file
@ -0,0 +1,255 @@
|
||||
#!/bin/sh
|
||||
|
||||
# compile_cdrskin.sh
|
||||
# Copyright 2005 - 2010 Thomas Schmitt, scdbackup@gmx.net, GPL
|
||||
# to be executed within ./libburn-* resp ./cdrskin-*
|
||||
|
||||
debug_opts="-O2"
|
||||
def_opts=
|
||||
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
|
||||
fifo_opts=""
|
||||
libvers="-DCdrskin_libburn_0_7_9"
|
||||
|
||||
# To be used if Makefile.am uses libburn_libburn_la_CFLAGS
|
||||
# burn="libburn/libburn_libburn_la-"
|
||||
burn="libburn/"
|
||||
|
||||
cleanup_src_or_obj="$burn"cleanup.o
|
||||
libdax_msgs_o="$burn"libdax_msgs.o
|
||||
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
||||
do_strip=0
|
||||
static_opts=
|
||||
warn_opts="-Wall"
|
||||
libcdio=
|
||||
fifo_source="cdrskin/cdrfifo.c"
|
||||
compile_cdrskin=1
|
||||
compile_cdrfifo=0
|
||||
compile_dewav=0
|
||||
|
||||
libcam=
|
||||
os=$(uname -s)
|
||||
case $os in
|
||||
*FreeBSD)
|
||||
libcam="-lcam"
|
||||
esac
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
if test "$i" = "-compile_cdrfifo"
|
||||
then
|
||||
compile_cdrfifo=1
|
||||
elif test "$i" = "-compile_dewav"
|
||||
then
|
||||
compile_dewav=1
|
||||
elif test "$i" = "-cvs_A60220"
|
||||
then
|
||||
libvers="-DCdrskin_libburn_cvs_A60220_tS"
|
||||
libdax_audioxtr_o=
|
||||
libdax_msgs_o="$burn"message.o
|
||||
cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
|
||||
elif test "$i" = "-libburn_0_7_8"
|
||||
then
|
||||
libvers="-DCdrskin_libburn_0_7_8"
|
||||
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
||||
libdax_msgs_o="$burn"libdax_msgs.o
|
||||
cleanup_src_or_obj="$burn"cleanup.o
|
||||
elif test "$i" = "-libburn_svn"
|
||||
then
|
||||
libvers="-DCdrskin_libburn_0_7_9"
|
||||
libdax_audioxtr_o="$burn"libdax_audioxtr.o
|
||||
libdax_msgs_o="$burn"libdax_msgs.o
|
||||
cleanup_src_or_obj="$burn"cleanup.o
|
||||
elif test "$i" = "-newapi" -o "$i" = "-experimental"
|
||||
then
|
||||
def_opts="$def_opts -DCdrskin_new_api_tesT"
|
||||
elif test "$i" = "-oldfashioned"
|
||||
then
|
||||
def_opts="$def_opts -DCdrskin_oldfashioned_api_usE"
|
||||
cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
|
||||
elif test "$i" = "-no_largefile"
|
||||
then
|
||||
largefile_opts=
|
||||
elif test "$i" = "-dvd_obs_64k"
|
||||
then
|
||||
def_opts="$def_opts -DCdrskin_dvd_obs_default_64K"
|
||||
elif test "$i" = "-do_not_compile_cdrskin"
|
||||
then
|
||||
compile_cdrskin=0
|
||||
elif test "$i" = "-do_diet"
|
||||
then
|
||||
fifo_source=
|
||||
def_opts="$def_opts -DCdrskin_extra_leaN"
|
||||
warn_opts=
|
||||
elif test "$i" = "-do_strip"
|
||||
then
|
||||
do_strip=1
|
||||
elif test "$i" = "-use_libburn_fifo"
|
||||
then
|
||||
fifo_opts="-DCdrskin_use_libburn_fifO"
|
||||
elif test "$i" = "-use_no_libburn_fifo"
|
||||
then
|
||||
fifo_opts=""
|
||||
elif test "$i" = "-use_no_cdrfifo"
|
||||
then
|
||||
fifo_source=
|
||||
fifo_opts="-DCdrskin_use_libburn_fifO -DCdrskin_no_cdrfifO"
|
||||
elif test "$i" = "-use_libburn_cleanup"
|
||||
then
|
||||
fifo_source=
|
||||
fifo_opts="-DCdrskin_use_libburn_cleanuP -DCdrskin_use_libburn_fifO -DCdrskin_no_cdrfifO"
|
||||
elif test "$i" = "-use_libcdio"
|
||||
then
|
||||
libcdio="-lcdio"
|
||||
elif test "$i" = "-g"
|
||||
then
|
||||
debug_opts="-g"
|
||||
elif test "$i" = "-help" -o "$i" = "--help" -o "$i" = "-h"
|
||||
then
|
||||
echo "cdrskin/compile_cdrskin.sh : to be executed within top level directory"
|
||||
echo "Options:"
|
||||
echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
|
||||
echo " -compile_dewav compile program test/dewav without libburn."
|
||||
echo " -libburn_0_7_8 set macro to match libburn-0.7.8"
|
||||
echo " -libburn_svn set macro to match current libburn-SVN."
|
||||
echo " -dvd_obs_64k 64 KB default size for DVD/BD writing."
|
||||
echo " -use_libcdio link with -lcdio because libburn uses it."
|
||||
echo " -do_not_compile_cdrskin omit compilation of cdrskin/cdrskin."
|
||||
echo " -use_no_libburn_fifo use cdrfifo even for single track non-CD"
|
||||
echo " -use_no_cdrfifo always use fifo of libburn and never cdrfifo"
|
||||
echo " -experimental use newly introduced libburn features."
|
||||
echo " -oldfashioned use pre-0.2.2 libburn features only."
|
||||
echo " -do_diet produce capability reduced lean version."
|
||||
echo " -do_strip apply program strip to compiled programs."
|
||||
echo " -g produce debuggable programm."
|
||||
echo " -static compile with cc option -static."
|
||||
exit 0
|
||||
elif test "$i" = "-static"
|
||||
then
|
||||
static_opts="-static"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
timestamp="$(date -u '+%Y.%m.%d.%H%M%S')"
|
||||
echo "Version timestamp : $(sed -e 's/#define Cdrskin_timestamP "//' -e 's/"$//' cdrskin/cdrskin_timestamp.h)"
|
||||
echo "Build timestamp : $timestamp"
|
||||
|
||||
if test "$compile_cdrskin"
|
||||
then
|
||||
echo "compiling program cdrskin/cdrskin.c $fifo_source $static_opts $debug_opts $libvers $fifo_opts $def_opts $cleanup_src_or_obj $libcdio $libcam"
|
||||
cc -I. \
|
||||
$warn_opts \
|
||||
$static_opts \
|
||||
$debug_opts \
|
||||
$libvers \
|
||||
$largefile_opts \
|
||||
$fifo_opts \
|
||||
$def_opts \
|
||||
\
|
||||
-DCdrskin_build_timestamP='"'"$timestamp"'"' \
|
||||
\
|
||||
-o cdrskin/cdrskin \
|
||||
\
|
||||
cdrskin/cdrskin.c \
|
||||
$fifo_source \
|
||||
\
|
||||
$cleanup_src_or_obj \
|
||||
\
|
||||
"$burn"async.o \
|
||||
"$burn"debug.o \
|
||||
"$burn"drive.o \
|
||||
"$burn"file.o \
|
||||
"$burn"init.o \
|
||||
"$burn"options.o \
|
||||
"$burn"source.o \
|
||||
"$burn"structure.o \
|
||||
\
|
||||
"$burn"sg.o \
|
||||
"$burn"write.o \
|
||||
"$burn"read.o \
|
||||
$libdax_audioxtr_o \
|
||||
$libdax_msgs_o \
|
||||
\
|
||||
"$burn"mmc.o \
|
||||
"$burn"sbc.o \
|
||||
"$burn"spc.o \
|
||||
"$burn"util.o \
|
||||
\
|
||||
"$burn"sector.o \
|
||||
"$burn"toc.o \
|
||||
\
|
||||
"$burn"crc.o \
|
||||
"$burn"ecma130ab.o \
|
||||
\
|
||||
$libcdio \
|
||||
$libcam \
|
||||
-lpthread
|
||||
|
||||
ret=$?
|
||||
if test "$ret" = 0
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
echo >&2
|
||||
echo "+++ FATAL : Compilation of cdrskin failed" >&2
|
||||
echo >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$compile_cdrfifo" = 1
|
||||
then
|
||||
echo "compiling program cdrskin/cdrfifo.c $static_opts $debug_opts"
|
||||
cc $static_opts $debug_opts \
|
||||
-DCdrfifo_standalonE \
|
||||
-o cdrskin/cdrfifo \
|
||||
cdrskin/cdrfifo.c
|
||||
|
||||
ret=$?
|
||||
if test "$ret" = 0
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
echo >&2
|
||||
echo "+++ FATAL : Compilation of cdrfifo failed" >&2
|
||||
echo >&2
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$compile_dewav" = 1
|
||||
then
|
||||
echo "compiling program test/dewav.c -DDewav_without_libburN $static_opts $debug_opts"
|
||||
cc $static_opts $debug_opts \
|
||||
-DDewav_without_libburN \
|
||||
-o test/dewav \
|
||||
test/dewav.c \
|
||||
"$burn"libdax_audioxtr.o \
|
||||
"$burn"libdax_msgs.o \
|
||||
\
|
||||
-lpthread
|
||||
|
||||
ret=$?
|
||||
if test "$ret" = 0
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
echo >&2
|
||||
echo "+++ FATAL : Compilation of test/dewav failed" >&2
|
||||
echo >&2
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$do_strip" = 1
|
||||
then
|
||||
echo "stripping result cdrskin/cdrskin"
|
||||
strip cdrskin/cdrskin
|
||||
if test "$compile_cdrfifo" = 1
|
||||
then
|
||||
echo "stripping result cdrskin/cdrfifo"
|
||||
strip cdrskin/cdrfifo
|
||||
fi
|
||||
fi
|
||||
|
||||
echo 'done.'
|
78
libburn/branches/ZeroEightZero/cdrskin/convert_man_to_html.sh
Executable file
78
libburn/branches/ZeroEightZero/cdrskin/convert_man_to_html.sh
Executable file
@ -0,0 +1,78 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# convert_man_to_html.sh - ts A61214
|
||||
#
|
||||
# Generates a HTML version of man page cdrskin.1
|
||||
#
|
||||
# To be executed within the libburn toplevel directory (like ./libburn-0.2.7)
|
||||
#
|
||||
|
||||
# set -x
|
||||
|
||||
man_dir=$(pwd)"/cdrskin"
|
||||
export MANPATH="$man_dir"
|
||||
manpage="cdrskin"
|
||||
raw_html=$(pwd)/"cdrskin/raw_man_1_cdrskin.html"
|
||||
htmlpage=$(pwd)/"cdrskin/man_1_cdrskin.html"
|
||||
|
||||
if test -r "$man_dir"/"$manpage".1
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
echo "Cannot find readable man page source $1" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -e "$man_dir"/man1
|
||||
then
|
||||
dummy=dummy
|
||||
else
|
||||
ln -s . "$man_dir"/man1
|
||||
fi
|
||||
|
||||
if test "$1" = "-work_as_filter"
|
||||
then
|
||||
|
||||
# set -x
|
||||
|
||||
sed \
|
||||
-e 's/<meta name="generator" content="groff -Thtml, see www.gnu.org">/<meta name="generator" content="groff -Thtml, via man -H, via cdrskin\/convert_man_to_html.sh">/' \
|
||||
-e 's/<meta name="Content-Style" content="text\/css">/<meta name="Content-Style" content="text\/css"><META NAME="description" CONTENT="man page of cdrskin"><META NAME="keywords" CONTENT="man cdrskin, manual, cdrskin, CD, CD-RW, CD-R, burning, cdrecord, compatible"><META NAME="robots" CONTENT="follow">/' \
|
||||
-e 's/<title>CDRSKIN<\/title>/<title>man 1 cdrskin<\/title>/' \
|
||||
-e 's/<h1 align=center>CDRSKIN<\/h1>/<h1 align=center>man 1 cdrskin<\/h1>/' \
|
||||
-e 's/<body>/<body BGCOLOR="#F5DEB3" TEXT=#000000 LINK=#0000A0 VLINK=#800000>/' \
|
||||
-e 's/<b>Overview of features:<\/b>/\ <BR><b>Overview of features:<\/b>/' \
|
||||
-e 's/<b>General information paragraphs:<\/b>/\ <BR><b>General information paragraphs:<\/b>/' \
|
||||
-e 's/<b>Track recording model:<\/b>/\ <BR><b>Track recording model:<\/b>/' \
|
||||
-e 's/^In general there are two types of tracks: data and audio./\ <BR>In general there are two types of tracks: data and audio./' \
|
||||
-e 's/^While audio tracks just contain a given/\ <BR>While audio tracks just contain a given/' \
|
||||
-e 's/<b>Write mode selection:<\/b>/\ <BR><b>Write mode selection:<\/b>/' \
|
||||
-e 's/<b>Recordable CD Media:<\/b>/\ <BR><b>Recordable CD Media:<\/b>/' \
|
||||
-e 's/<b>Overwriteable DVD Media:<\/b>/\ <BR><b>Overwriteable DVD Media:<\/b>/' \
|
||||
-e 's/<b>Sequentially Recordable DVD Media:<\/b>/\ <BR><b>Sequentially Recordable DVD Media:<\/b>/' \
|
||||
-e 's/^The write modes for DVD+R/\ <BR>The write modes for DVD+R/' \
|
||||
-e 's/<b>Drive preparation and addressing:<\/b>/\ <BR><b>Drive preparation and addressing:<\/b>/' \
|
||||
-e 's/^If you only got one CD capable drive/\ <BR>If you only got one CD capable drive/' \
|
||||
-e 's/<b>Emulated drives:<\/b>/\ <BR><b>Emulated drives:<\/b>/' \
|
||||
-e 's/^Alphabetical list of options/\ <BR>Alphabetical list of options/' \
|
||||
-e 's/<\/body>/<BR><HR><FONT SIZE=-1><CENTER>(HTML generated from '"$manpage"'.1 on '"$(date)"' by '$(basename "$0")' )<\/CENTER><\/FONT><\/body>/' \
|
||||
-e 's/See section FILES/See section <A HREF="#FILES">FILES<\/A>/' \
|
||||
-e 's/See section EXAMPLES/See section <A HREF="#EXAMPLES">EXAMPLES<\/A>/' \
|
||||
<"$2" >"$htmlpage"
|
||||
|
||||
set +x
|
||||
|
||||
chmod u+rw,go+r,go-w "$htmlpage"
|
||||
echo "Emerged file:"
|
||||
ls -lL "$htmlpage"
|
||||
|
||||
else
|
||||
|
||||
export BROWSER='cp "%s" '"$raw_html"
|
||||
man -H "$manpage"
|
||||
"$0" -work_as_filter "$raw_html"
|
||||
rm "$raw_html"
|
||||
rm "$man_dir"/man1
|
||||
|
||||
fi
|
BIN
libburn/branches/ZeroEightZero/cdrskin/doener_150x200_tr.png
Normal file
BIN
libburn/branches/ZeroEightZero/cdrskin/doener_150x200_tr.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
9
libburn/branches/ZeroEightZero/cdrskin/make_timestamp.sh
Executable file
9
libburn/branches/ZeroEightZero/cdrskin/make_timestamp.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Create version timestamp cdrskin/cdrskin_timestamp.h
|
||||
# to be executed within ./libburn-* resp ./cdrskin-*
|
||||
|
||||
timestamp="$(date -u '+%Y.%m.%d.%H%M%S')"
|
||||
echo "Version timestamp : $timestamp"
|
||||
echo '#define Cdrskin_timestamP "'"$timestamp"'"' >cdrskin/cdrskin_timestamp.h
|
||||
|
318
libburn/branches/ZeroEightZero/cdrskin/wiki_plain.txt
Normal file
318
libburn/branches/ZeroEightZero/cdrskin/wiki_plain.txt
Normal file
@ -0,0 +1,318 @@
|
||||
--------------------------------------------------------------------------
|
||||
cdrskin Wiki - plain text copy
|
||||
--------------------------------------------------------------------------
|
||||
[[Image(source:/libburn/trunk/cdrskin/doener_150x200_tr.png)]] [http://en.wikipedia.org/wiki/D%C3%B6ner_kebab Doener]
|
||||
|
||||
'''cdrskin 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
|
||||
traditionally provided by cdrecord. Currently it does CD-R and CD-RW this way.
|
||||
Overwriteable media DVD-RAM, DVD+RW, DVD-RW, and BD-RE are handled differently
|
||||
than with cdrecord-ProDVD in order to offer TAO-like single track recording.
|
||||
Sequential DVD-R[W], DVD+R, DVD+R DL, BD-R are handled like CD-R[W] with TAO
|
||||
and multi-session. Additionally cdrskin offers cdrecord-ProDVD-like mode DAO
|
||||
with DVD-R[W].
|
||||
|
||||
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 [http://libburnia-project.org/browser/libburn/trunk/cdrskin/README?format=txt cdrskin/README].
|
||||
|
||||
About libburn API for burning CD and DVD: http://api.libburnia-project.org
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
For yet unsupported media types see the advice to use dvd+rw-tools at
|
||||
the end of this text.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
About the command line options of cdrskin:
|
||||
|
||||
They are described in detail in [http://scdbackup.sourceforge.net/man_1_cdrskin_devel.html#OPTIONS section OPTIONS] of
|
||||
[http://scdbackup.sourceforge.net/man_1_cdrskin_devel.html man cdrskin]
|
||||
|
||||
There are two families of options: cdrecord-compatible ones and options
|
||||
which are specific to cdrskin. The latter are mostly used to configure
|
||||
cdrskin for its task to emulate cdrecord. There are some, nevertheless,
|
||||
which provide rather exotic unique features of cdrskin.
|
||||
|
||||
The cdrecord-compatible options are listed in the output of
|
||||
{{{
|
||||
cdrskin -help
|
||||
}}}
|
||||
where the option "help" has *one* dash. Online: [http://scdbackup.sourceforge.net/cdrskin_help_devel cdrskin -help]
|
||||
|
||||
For these options you may expect program behavior that is roughly the
|
||||
same as described in original man cdrecord .
|
||||
|
||||
Online: http://cdrecord.berlios.de/old/private/man/cdrecord-2.0.html
|
||||
|
||||
The cdrskin-specific options are listed by
|
||||
{{{
|
||||
cdrskin --help
|
||||
}}}
|
||||
where the option "help" has *two* dashes. Online: [http://scdbackup.sourceforge.net/cdrskin__help_devel cdrskin --help]
|
||||
|
||||
Some are very experimental and should only be
|
||||
used in coordination with the libburnia developer team.
|
||||
Some are of general user interest, though:
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
--devices allows the sysadmin to scan the system for possible drives
|
||||
and displays their detected properties.
|
||||
The drives are listed one per line, with fields:
|
||||
libburn-drive-number, sysadmin-device-file, permissions, vendor, type
|
||||
{{{
|
||||
0 dev='/dev/sr0' rwrw-- : 'HL-DT-ST' 'DVDRAM GSA-4082B'
|
||||
}}}
|
||||
This feature is valuable since cdrskin -scanbus will not give you
|
||||
the device file name and its current permissions.
|
||||
cdrskin will accept of course the proposed dev= option as address
|
||||
for any usage of the drive.
|
||||
|
||||
Different from cdrecord, cdrskin is intended to be run without special
|
||||
privileges, i.e. no superuser setuid. It is intended that the sysadmin
|
||||
controls drive accessability by rw-permissions of the drive rather than
|
||||
by x-permission of the burn binary. To be usable with cdrskin, the drive
|
||||
has to offer both, r- and w-permission.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
blank=as_needed applies the suitable blanking or formatting to make
|
||||
any supported type of media ready for writing from scratch.
|
||||
If this is not possible, e.g. because the media is written and not
|
||||
re-usable, then the program run fails.
|
||||
|
||||
Option blank= offers several specialized blanking and formatting types,
|
||||
which one may use for particular purposes on DVD-RW, DVD-RAM and BD-RE.
|
||||
(See also below: blank=format_overwrite)
|
||||
The drive offers a list of possible formats by cdrskin option --list_formats.
|
||||
One should aquire MMC background information before making use of them.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
cdrskin does not only read from and write to optical drives which comply
|
||||
to the MMC standard but also does the same with regular files or block
|
||||
devices other than optical drives.
|
||||
|
||||
Because the power to alter a disk file might be a bad surprise for a
|
||||
traditional user of cdrecord, it is necessary to give option
|
||||
--allow_emulated_drives before an emulated drive may be addressed.
|
||||
Eventually one of the startup files would be a good place for it.
|
||||
See man page, section FILES.
|
||||
|
||||
The addresses of emulated drives begin with the prefix "stdio:".
|
||||
{{{
|
||||
dev=stdio:/tmp/pseudo_drive
|
||||
dev=stdio:/dev/usbstick
|
||||
}}}
|
||||
|
||||
Regular files and block devices behave much like DVD-RAM.
|
||||
|
||||
Other file types may be valid targets for write-only operations.
|
||||
This includes standard output, named pipes, character devices
|
||||
{{{
|
||||
dev=stdio:/dev/fd/1
|
||||
dev=stdio:/tmp/named_pipe
|
||||
dev=stdio:/dev/ptyxy
|
||||
}}}
|
||||
|
||||
These files behave much like blank DVD-R.
|
||||
|
||||
All files used as pseudo-drives have to offer rw-permission.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
The DVD capabilities of cdrskin differ from those of cdrecord-ProDVD. cdrskin
|
||||
offers TAO-like multi-session with DVD-R[W], DVD+R[ DL] and TAO-like single
|
||||
session with overwriteable DVD media. It also offers DAO on DVD-R[W] which is
|
||||
probably the same as the traditional cdrecord-ProDVD write mode.
|
||||
|
||||
Non-cdrecord blank mode blank=format_overwrite brings a DVD-RW
|
||||
disc from its initial profile "Sequential Recording" into profile state
|
||||
"Restricted Overwrite".
|
||||
{{{
|
||||
cdrskin dev=/dev/sr0 -v blank=format_overwrite
|
||||
}}}
|
||||
|
||||
DVD-RAM, DVD+RW, BD-RE and overwriteable DVD-RW appear to cdrskin as blank
|
||||
media which are capable of taking only a single track. This track may be
|
||||
positioned on a 32KiB aligned address, though.
|
||||
{{{
|
||||
cdrskin ... write_start_address=2412m ...
|
||||
}}}
|
||||
|
||||
Non-cdrecord blank mode blank=deformat_sequential brings an overwriteable
|
||||
DVD-RW back into state "Sequential Recording" with the capability of doing
|
||||
multi-session, if the drive is capable of "Incremental Streaming"
|
||||
(MMC feature 21h).
|
||||
|
||||
Used sequential DVD-RW media may be blanked by blank=fast or blank=all which
|
||||
normally both do full blanking. Thus sequential DVD-RW behave much like large
|
||||
CD-RW with possibly more than 99 tracks.
|
||||
|
||||
blank=deformat_sequential does minimal blanking of DVD-RW which usually yields
|
||||
media incapable of "Incremental Streaming".
|
||||
|
||||
Option --prodvd_cli_compatible activates blank=fast and blank=all for
|
||||
overwriteable DVD-RW which normally ignore those two options. It also makes
|
||||
option -multi tolerable with media and write modes which are not suitable for
|
||||
multi-session. (The default behavior of cdrskin deems me to be preferrable.)
|
||||
|
||||
Option --grow_overwriteable_iso gives cdrskin ISO pseudo-multi-session
|
||||
capabilities on DVD-RAM, DVD+RW, BD-RE similar to growisofs.
|
||||
Associated options blank=, -multi, -msinfo and -toc are available in this case.
|
||||
They either pretend a blank media (if there is no ISO 9660 image) or appendable
|
||||
media with a single session and track on it. blank= invalidates ISO images.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
assert_write_lba=<lba> allows to ensure that the start block address which
|
||||
was used with the formatter program (e.g. mkisofs -C) matches the start block
|
||||
address which will be used by the upcoming burn.
|
||||
|
||||
E.g. cdrskin aborts with an error message if
|
||||
{{{
|
||||
assert_write_lba=0
|
||||
}}}
|
||||
is given but an appendable media is to be burned which would start at
|
||||
block 68432.
|
||||
|
||||
|
||||
An ISO-9660 file system image must be prepared according to a particular
|
||||
block address on media. If the prepared address and the real address on media
|
||||
do not match then the filesystem will not be mountable or may even cause system
|
||||
trouble.
|
||||
|
||||
A sequential archive format like afio or star will not necessarily need such
|
||||
a coordination of addresses. It might nevertheless be confusing to a reader
|
||||
if the archive does not start at block 0.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
fifo_start_at=<num> is a throughput enhancer for unsteady data streams
|
||||
like they are produced by a compressing archiver program when piping to
|
||||
CD on-the-fly. It makes better use of the general property of a FIFO
|
||||
buffer to transport surplus bandwidth into the future. Yep. A time machine.
|
||||
One-way, i fear.
|
||||
|
||||
FIFO originally was introduced by cdrecord's author Joerg Schilling in order
|
||||
to protect mediocre burner hardware from suffering buffer underruns
|
||||
and thus producing misburns (at 1x speed on CD-R media at the price of a
|
||||
DVD-RAM nowadays). This purpose would not justify a fifo any more -
|
||||
given the limited life time of burners and the seamless underrun protection
|
||||
of contemporary consumer drives.
|
||||
|
||||
With an unsteady data stream the task of the buffer is to soak up peak
|
||||
performance and to release it steadily at the drive's maximum speed.
|
||||
The larger the buffer the more reserves can be built up and the longer
|
||||
input drought can be compensated.
|
||||
|
||||
Original cdrecord has the historical property, though, to first wait until
|
||||
the buffer is completely filled. Best practice for fighting drive
|
||||
underruns, of course.
|
||||
With a very fat fs=# buffer (128 MB for 12x CD is not unrealistic) this
|
||||
can cause a big delay until burning finally starts and takes its due time.
|
||||
|
||||
fifo_start_at=<num> makes cdrskin start burning after the given number of bytes
|
||||
is read rather than waiting for the FIFO to be completely full resp. the data
|
||||
stream to end. It risks a few drive buffer underruns at the beginning of burn
|
||||
- but modern drives stand this.
|
||||
|
||||
Usage examples:
|
||||
{{{
|
||||
cdrskin ... fs=128m fifo_start_at=20m ...
|
||||
cdrskin ... fifo_start_at=0 ...
|
||||
}}}
|
||||
|
||||
Note: no FIFO can give you better average throughput than the average
|
||||
throughput of the data source and the throughput of the burner.
|
||||
It can be used, though, to bring the effective throughput very close
|
||||
to the theoretical limit. Especially with high speed media.
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
--no_rc allows you to surely ban influence from systemwide or user specific
|
||||
default settings of cdrskin. Possible locations for such settings:
|
||||
|
||||
/etc/default/cdrskin
|
||||
|
||||
/etc/opt/cdrskin/rc
|
||||
|
||||
/etc/cdrskin/cdrskin.conf
|
||||
|
||||
$HOME/.cdrskinrc
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
dev_translation=<sep><from><sep><to> may be needed to foist cdrskin to
|
||||
frontend programs of cdrecord which do *not* ask cdrecord -scanbus but
|
||||
which make own assumptions and guesses about cdrecord's device addresses.
|
||||
|
||||
Normally, cdrskin understands all addresses which are suitable for cdrecord
|
||||
under Linux. See cdrskin/README, "Pseudo-SCSI Adresses".
|
||||
This option is mainly for (yet unknown) exotic configurations or very
|
||||
stubborn frontend programs.
|
||||
|
||||
If a frontend refuses to work with cdrskin, look into the error protocol
|
||||
of that frontend, look at the output of a run of cdrskin --devices and give
|
||||
cdrskin the necessary hint.
|
||||
Example: Your frontend insists in using "0,0,0" and --devices reported
|
||||
dev='/dev/hdc' resp. cdrskin dev=ATA -scanbus reported "1,0,0" then this
|
||||
would be the appropriate translation:
|
||||
{{{
|
||||
dev_translation=+0,0,0+/dev/hdc
|
||||
}}}
|
||||
The "+" character is a separator to be choosen by you.
|
||||
Currently i am not aware of the need to choose any other than "+"
|
||||
unless you get playful with custom translations like
|
||||
{{{
|
||||
dev_translation=-"cd+dvd"-1,0,0
|
||||
}}}
|
||||
See http://scdbackup.sourceforge.net/k3b_on_cdrskin.html
|
||||
for an illustrated example with K3b 0.10 .
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
DVD advise:
|
||||
|
||||
For burning of DVD/BD media other than DVD-RAM, DVD+RW, DVD+R, DVD+R DL,
|
||||
DVD-RW, DVD-R, BD-RE, the cdrskin project currently advises to use
|
||||
Andy Polyakov's dvd+rw-tools which despite their historic name are
|
||||
capable of all the media above and more, including BD discs.
|
||||
|
||||
http://fy.chalmers.se/~appro/linux/DVD+RW/tools
|
||||
|
||||
They are not compatible or related to cdrecord resp. cdrecord-ProDVD
|
||||
(now obsoleted by original source cdrtools cdrecord with identical
|
||||
capabilities besides the license key).
|
||||
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
Advanced multi-session use cases:
|
||||
|
||||
A special feature of dvd+rw-tools is growing of ISO-9660 filesystems on
|
||||
overwriteable media. This is not the same as multi-session writing of cdrskin
|
||||
with CD media, but retrieves additional information from the existing ISO
|
||||
image and finally manipulates the start sectors of this existing image.
|
||||
|
||||
So, inspired by growisofs, cdrskin can offer DVD multi-session not only with
|
||||
sequential DVD-R[W] and with DVD+R [DL], but also with DVD-RAM, DVD+RW, BD-RE
|
||||
and even regular disk files or block devices other than CD/DVD writers.
|
||||
This is enabled by option --grow_overwriteable_iso.
|
||||
|
||||
The libburnia project provides an integrated ISO-9660 multi-session tool
|
||||
named [wiki:Xorriso xorriso] which tries to go one step beyond
|
||||
growisofs. It uses [wiki:Libburn libburn] , [wiki:Libisofs libisofs]
|
||||
and [wiki:Libisoburn libisoburn].
|
||||
|
||||
See [http://scdbackup.sourceforge.net/man_1_xorriso.html man xorriso].
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user