Compare commits

...

57 Commits

Author SHA1 Message Date
a6fc6b43f9 Documented changes and release timestamp 2008-07-16 08:41:52 +00:00
0c6fde1ee8 Updated cdrskin tarball generator 2008-07-16 08:40:32 +00:00
73503c9bb1 Made number transition to 0.5.0 and activated development documentation 2008-07-16 08:27:44 +00:00
775b377b21 Branched for 0.5.0 release 2008-07-15 19:05:58 +00:00
76e85e600c Followed hint of Giulio Orsero to recognize disk by /proc/ide/hdX/media 2008-07-14 16:44:59 +00:00
9d48bb6892 New API call burn_fifo_peek_data() 2008-07-14 11:38:22 +00:00
38f0399fff Did LT_CURRENT++, LT_AGE++ because of new API call 2008-07-14 11:31:16 +00:00
39198ff8cb Making visible the new NOTE and HINT about busy alleged hard disks 2008-07-14 11:30:09 +00:00
67ca4a251a Trying to avoid SORRY messages when hitting busy hard disk /dev/hdX 2008-07-14 11:28:55 +00:00
b1c6953b61 With auto device family: scd is now fallback if sr does not exist 2008-07-02 09:39:02 +00:00
eb95d89272 Inserted @since tags for all functions older than 0.2.0 2008-06-14 14:06:38 +00:00
548051e53f Updated release history 2008-06-14 14:05:47 +00:00
a72b38c116 Documented changes and release timestamp 2008-05-17 12:09:02 +00:00
a67aa2ccee Updated cdrskin tarball generator 2008-05-17 12:06:38 +00:00
2fb5ea8def Made number transition to 0.4.9 2008-05-17 12:05:36 +00:00
55061cb7cf Made inability to get format list a reason to abort the program 2008-05-14 16:52:35 +00:00
4b3ec06cc4 Added format types 0x30 and 0x32 to list in API comments 2008-05-14 16:51:40 +00:00
ad6bd91b21 Bug fix: random access addressing for DVD-RAM and BD-RE did not work 2008-05-14 16:50:27 +00:00
0e2aaa2d59 Documented changes and release timestamp 2008-05-10 13:43:12 +00:00
4244a3c141 Updated cdrskin tarball generator 2008-05-10 13:41:58 +00:00
e4d30e4762 Made number transition to 0.4.7 2008-05-10 13:40:55 +00:00
2856e9c984 Changed blank examples to blank=as_needed 2008-05-09 19:42:49 +00:00
6660ef7ece Allowed BD-ROM and BD-R for read-only purposes 2008-05-09 14:51:48 +00:00
37092086d9 Documented read-only profiles CD-ROM and DVD-ROM 2008-05-09 14:31:12 +00:00
35d1394262 Declared BD-RE to be supported 2008-05-06 18:35:48 +00:00
4dec38984d Declared BD-RE to be supported 2008-05-06 18:17:05 +00:00
be0626ae9e Declared BD-RE to be supported 2008-05-06 18:10:44 +00:00
a54113267e Declared BD-RE to be supported 2008-05-06 18:08:04 +00:00
2d9d250471 Mapped undefined size to 0 with burn_disc_get_formats() and DVD-RW 2008-05-06 08:41:48 +00:00
ff7520f2f5 Avoided to report negative burn_multi_caps.start_range_high with DVD-RW 2008-05-06 08:24:11 +00:00
d0d90fc902 Updated project history 2008-05-03 11:16:12 +00:00
1d41767348 Documented newest enhancements 2008-04-27 16:36:13 +00:00
12b0fbf17c New blank type as_needed 2008-04-27 14:02:32 +00:00
44368aef6c New blank type format_if_needed 2008-04-27 08:47:55 +00:00
43b6ad6008 New blank subtypes format_defectmgt_cert_[on|off], on is default 2008-04-26 15:10:35 +00:00
f006ee5436 Enabled quick formatting with DVD-RAM, made slow formatting default with BD-RE 2008-04-26 15:07:39 +00:00
5e4da147a5 Documented newest enhancements 2008-04-25 13:44:01 +00:00
103b301b09 Incremented LT_CURRENT and LT_AGE to reflect API enhancements 2008-04-25 13:36:19 +00:00
0386feabfe Documented experimental support for BD-RE formatting 2008-04-25 13:24:39 +00:00
4e949d79fe Preparations for formatting BD-RE 2008-04-25 13:16:23 +00:00
422a97a2f2 Mentioned new features 2008-04-24 18:37:46 +00:00
a52ea438a5 Wrote down what was learned about DVD-RAM formatting 2008-04-24 18:37:02 +00:00
62f41452bb New blank type blank=format_by_index_<number> 2008-04-23 11:02:11 +00:00
015bc00a91 New option --list_formats 2008-04-22 20:10:38 +00:00
d6fde26824 Adjustments with DVD-RAM formatting 2008-04-22 16:13:05 +00:00
1cfb29f032 Adjustments with DVD-RAM formatting 2008-04-18 19:46:18 +00:00
65cf751a30 Began to implement formatting of DVD-RAM and experimentally of BD-RE 2008-04-18 09:28:16 +00:00
4683386de1 Began to implement formatting of DVD-RAM and experimentally of BD-RE 2008-04-18 09:27:16 +00:00
5d51869c3b Made burn_read_data() obey its flag bit1 2008-04-16 08:22:14 +00:00
fe8a6c6224 Some adjustments of cdrskin man page 2008-04-15 09:43:33 +00:00
db5568c03b Enforced tail padding with stream_recording, enlarged transport buffer 2008-04-15 09:42:32 +00:00
a07631c57b New option stream_recording=on|off 2008-04-12 16:46:05 +00:00
e522db6220 New API call burn_write_opts_set_stream_recording() 2008-04-12 16:42:45 +00:00
51ac900de6 Trying to fix bugs about BD-RE, macro for simulating BD-RE on DVD-RAM 2008-04-10 21:16:07 +00:00
cdea153443 Switched from configure.ac versioning to libburn.h versioning 2008-04-08 13:35:43 +00:00
0ce3f7c224 Updated cdrskin tarball generator 2008-04-08 13:34:14 +00:00
8de0a3dc6c Made number transition 2008-04-08 13:32:07 +00:00
30 changed files with 2307 additions and 412 deletions

View File

@ -101,9 +101,9 @@ test_structest_CPPFLAGS = -Ilibburn
test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS) test_structest_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS)
test_structest_SOURCES = test/structest.c test_structest_SOURCES = test/structest.c
## cdrskin construction site - ts A60816 - A71025 ## cdrskin construction site - ts A60816 - A80716
cdrskin_cdrskin_CPPFLAGS = -Ilibburn cdrskin_cdrskin_CPPFLAGS = -Ilibburn
cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_4_3 cdrskin_cdrskin_CFLAGS = -DCdrskin_libburn_0_5_0
# cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS) # cdrskin_cdrskin_LDADD = $(libburn_libburn_la_OBJECTS) $(THREAD_LIBS)
# ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking # ts A80123, change proposed by Simon Huggins to cause dynamic libburn linking

43
README
View File

@ -39,11 +39,15 @@ into its toplevel directory (here: "libburn") and execute
./configure --prefix=/usr ./configure --prefix=/usr
make make
To make the libraries accessible for running resp. developing applications To make libburn accessible for running resp. application development,
and to install the cdrecord compatibility binary cdrskin, do: and to install the cdrecord compatibility binary cdrskin, do:
make install make install
Above procedure installs cdrskin depending on libburn.so.4 .
For a standalone cdrskin binary, see cdrskin/README.
An important part of the project, libisofs, is hosted in a bzr repository at An important part of the project, libisofs, is hosted in a bzr repository at
launchpad.net : launchpad.net :
bzr branch lp:libisofs bzr branch lp:libisofs
@ -120,7 +124,7 @@ The project components (list subject to growth, hopefully):
Rock Ridge extensions. Manipulation is not only adding or Rock Ridge extensions. Manipulation is not only adding or
overwriting of files but also deletion, renaming, and attribute overwriting of files but also deletion, renaming, and attribute
changing. changing.
See libisoburn/README for more See xorriso/README for more.
- "test" is a collection of application gestures and examples given by the - "test" is a collection of application gestures and examples given by the
authors of the library features. The burn API example of libburn authors of the library features. The burn API example of libburn
@ -261,6 +265,41 @@ Project history as far as known to me:
the purpose of ISO image reading and writing. It emulates multi-session on the purpose of ISO image reading and writing. It emulates multi-session on
overwriteable media. Application xorriso makes use of all three libraries. overwriteable media. Application xorriso makes use of all three libraries.
- 8th Apr 2008 libburn-0.4.4 has proven to be capable of burning to DVD+R/DL
and read performance on disk file pseudo-drives has been improved.
- 27th Apr 2008 libisofs-0.6.4 can now read data file content from images
and can map pieces of disk files onto image files. Image directory iteration
has been enhanced. Input data streams and extended information have been
exposed in the API to allow future development.
- 29th Apr 2008 libisoburn-0.1.4 was made more efficient with reading of
image tree nodes. It now depends on libisofs-0.6.4 and libburn-0.4.4.
xorriso makes use of new libisofs features by performing incremental
updates of directory trees and by cutting oversized data files into
pieces. A primitive single session emulation of cdrcord and mkisofs is
provided.
- 10th May 2008 libburn-0.4.6 supports formatting and writing of BD-RE,
full nominal speed for DVD-RAM and BD-RE. cdrskin has a unified blank
type with automatic media state recognition.
- 17th May 2008 an old bug with DVD-RAM and now with BD-RE is fixed by
libburn-0.4.8 to allow libisoburn emulation of multisession on those media.
- 19th May 2008 libisoburn-0.1.6 brings better table-of-content emulation
on overwriteble media and disk files.
- 1st Jun 2008 libisofs-0.6.6 fixes some problems around device files.
- 3rd Jun 2008 libisoburn-0.1.8 fixes a bug with overwriteable media.
- 23rd Jun 2008 libisoburn-0.2.0 introduces extraction of files from
ISO images.
- 16th Jul 2008 libburn-0.5.0 handles systems with no /dev/sr* but only
/dev/scd*.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
cdrskin. By Thomas Schmitt <scdbackup@gmx.net> cdrskin. By Thomas Schmitt <scdbackup@gmx.net>
Integrated sub project of libburnia-project.org but also published via: Integrated sub project of libburnia-project.org but also published via:
http://scdbackup.sourceforge.net/cdrskin_eng.html http://scdbackup.sourceforge.net/cdrskin_eng.html
http://scdbackup.sourceforge.net/cdrskin-0.4.3.tar.gz http://scdbackup.sourceforge.net/cdrskin-0.5.0.pl00.tar.gz
Copyright (C) 2006-2008 Thomas Schmitt, provided under GPL version 2. Copyright (C) 2006-2008 Thomas Schmitt, provided under GPL version 2.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@ -20,10 +20,10 @@ By using this software you agree to the disclaimer at the end of this text
Compilation, First Glimpse, Installation Compilation, First Glimpse, Installation
Obtain cdrskin-0.4.3.tar.gz, take it to a directory of your choice and do: Obtain cdrskin-0.5.0.pl00.tar.gz, take it to a directory of your choice and do:
tar xzf cdrskin-0.4.3.tar.gz tar xzf cdrskin-0.5.0.pl00.tar.gz
cd cdrskin-0.4.3 cd cdrskin-0.5.0
Within that directory execute: Within that directory execute:
@ -53,9 +53,9 @@ try whether command
ldconfig ldconfig
makes it accessible. With the statically linked binary this should not matter. makes it accessible. With the statically linked binary this should not matter.
You may as well do the few necessary actions manually. If cdrskin was With that static binary you may as well do the few necessary actions manually.
already installed by a previous version, or by "make install" in the course If cdrskin was already installed by a previous version, or by "make install"
of this installation, then find out where: in the course of this installation, then find out where:
which cdrskin which cdrskin
Copy your standalone binary to exactly the address which you get as reply. Copy your standalone binary to exactly the address which you get as reply.
E.g.: E.g.:
@ -139,8 +139,8 @@ Obtain some info about the drive
Obtain some info about the drive and the inserted media Obtain some info about the drive and the inserted media
cdrskin dev=0,1,0 -atip -v cdrskin dev=0,1,0 -atip -v
Make used CD-RW or used unformatted DVD-RW writeable again Prepare CD-RW or DVD-RW for re-use, DVD-RAM or BD-RE for first use
cdrskin -v dev=0,1,0 blank=fast -eject cdrskin -v dev=/dev/sg1 blank=as_needed -eject
Format DVD-RW to avoid need for blanking before re-use Format DVD-RW to avoid need for blanking before re-use
cdrskin -v dev=0,1,0 blank=format_overwrite cdrskin -v dev=0,1,0 blank=format_overwrite
@ -154,16 +154,16 @@ Burn image file my_image.iso to media
Write multi-session to the same CD , DVD-R[W] or DVD+R[/DL] 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 1.iso
cdrskin dev=/dev/hdc padsize=300k -multi -tao 2.iso cdrskin dev=/dev/hdc padsize=300k -multi 2.iso
cdrskin dev=/dev/hdc padsize=300k -multi -tao 3.iso cdrskin dev=/dev/hdc padsize=300k -multi 3.iso
cdrskin dev=/dev/hdc padsize=300k -tao 4.iso cdrskin dev=/dev/hdc padsize=300k 4.iso
Get multi-session info for option -C of program mkisofs: Get multi-session info for option -C of program mkisofs:
c_values=$(cdrskin dev=/dev/hdc -msinfo 2>/dev/null) c_values=$(cdrskin dev=/dev/hdc -msinfo 2>/dev/null)
mkisofs ... -C "$c_values" ... mkisofs ... -C "$c_values" ...
Burn a compressed afio archive to media on-the-fly Burn a compressed afio archive to media on-the-fly
find . | afio -oZ - | cdrskin -v dev=0,1,0 fs=32m speed=8 -tao \ find . | afio -oZ - | cdrskin -v dev=0,1,0 fs=32m speed=8 \
driveropts=burnfree padsize=300k - driveropts=burnfree padsize=300k -
Burn 6 audio tracks from files with different formats to CD (not to any DVD). Burn 6 audio tracks from files with different formats to CD (not to any DVD).
@ -186,8 +186,6 @@ See output of command
cdrskin --list_ignored_options cdrskin --list_ignored_options
If you have use cases for them, please report your wishes and expectations. If you have use cases for them, please report your wishes and expectations.
DVD support is restricted to single layer DVD for now. Double layer media
are implemented but untested.
On the other hand, the capability of multi-session and of writing streams On the other hand, the capability of multi-session and of writing streams
of unpredicted lenght surpass the current DVD capabilities of cdrecord. of unpredicted lenght surpass the current DVD capabilities of cdrecord.
@ -262,17 +260,27 @@ I myself am not into audio. So libburn-hackers@pykix.org might be the
best address for suggestions, requests and bug reports. best address for suggestions, requests and bug reports.
DVD+RW and DVD-RAM DVD+RW , DVD-RAM , BD-RE
DVD+RW and DVD-RAM media get treated as blank media regardless wether they 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 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. 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). Currently Speed is counted in DVD units (i.e. 1x = 1,385,000 bytes/second) or BD units
there is no difference between -sao and -tao. If ever, then -tao will be the (1x = 4,495,625 bytes/second). Currently there is no difference between -sao
mode which preserves the current behavior. 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.
Program growisofs can append to an ISO filesystem on DVD+RW by additionally
manipulating the first session. Meanwhile cdrskin can do the same.
Option --grow_overwriteable_iso allows -multi (although unneeded), enables Option --grow_overwriteable_iso allows -multi (although unneeded), enables
-msinfo and -toc, and makes blank=fast an invalidator for ISO filesystems -msinfo and -toc, and makes blank=fast an invalidator for ISO filesystems
on overwriteable media. on overwriteable media.
@ -341,12 +349,12 @@ Incremental Streaming afterwards. So blank=fast will do full blanking.
blank=deformat_sequential_quickest is faster but might yield DAO-only media. blank=deformat_sequential_quickest is faster but might yield DAO-only media.
DVD+R and DVD+R/DL DVD+R and DVD+R DL
From the view of cdrskin they behave much like DVD-R. Each track gets wrapped From the view of cdrskin they behave much like DVD-R. Each track gets wrapped
into an own session, though. into an own session, though.
DVD+R/DL appear as extra large DVD+R. cdrskin does not allow to set the address DVD+R DL appear as extra large DVD+R. cdrskin does not allow to set the address
of the layer break where ia reading drive might show some delay while switching of the layer break where a reading drive might show some delay while switching
between both media layers. between both media layers.
@ -397,9 +405,9 @@ 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 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 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. by the drive's firmware and to lead to mere misburns.
The worst mishaps which hit the author implied the need to reboot the The worst mishaps which hit the author imposed the need to reboot the
system because of drives gnawing endlessly on ill media. Permanent hardware system because of drives gnawing endlessly on ill media. Permanent hardware
damage did not occur in 1.5 years of development. damage did not occur in 2.5 years of development. But one never knows ...
------------------------------------------------------------------------------ ------------------------------------------------------------------------------

View File

@ -38,7 +38,7 @@ original="./libburn_svn_release.tgz"
# My changes are in $changes , mainly in $changes/cdrskin # My changes are in $changes , mainly in $changes/cdrskin
changes="./libburn-release" changes="./libburn-release"
skin_release="0.4.2" skin_release="0.5.0"
patch_level=".pl00" patch_level=".pl00"
skin_rev="$skin_release""$patch_level" skin_rev="$skin_release""$patch_level"
@ -104,9 +104,9 @@ cdrskin_target="$target"/cdrskin
libburn_target="$target"/libburn libburn_target="$target"/libburn
# Create version timestamp # Create version timestamp
timestamp="$(date -u '+%Y.%m.%d.%H%M%S')" # timestamp="$(date -u '+%Y.%m.%d.%H%M%S')"
echo "$timestamp" # echo "$timestamp"
echo '#define Cdrskin_timestamP "'"$timestamp"'"' >"$cdrskin_dir"/cdrskin_timestamp.h # echo '#define Cdrskin_timestamP "'"$timestamp"'"' >"$cdrskin_dir"/cdrskin_timestamp.h
# Add the cdrskin files # Add the cdrskin files
if test -e "$cdrskin_target" if test -e "$cdrskin_target"

View File

@ -38,7 +38,7 @@ original="./libburn_svn.tgz"
# My changes are in $changes , mainly in $changes/cdrskin # My changes are in $changes , mainly in $changes/cdrskin
changes="./libburn-develop" changes="./libburn-develop"
skin_release="0.4.3" skin_release="0.5.1"
patch_level="" patch_level=""
skin_rev="$skin_release""$patch_level" skin_rev="$skin_release""$patch_level"
@ -239,7 +239,7 @@ rm -rf "$target"
./"$bintarget_dynamic" -version ./"$bintarget_dynamic" -version
./"$bintarget_static" -version ./"$bintarget_static" -version
ls -l "$cdrskin_tarball" ls -l "$cdrskin_tarball"
ls -l "$bintarget_dynamic"* ls -l "$bintarget_dynamic"
ls -l "$bintarget_static" ls -l "$bintarget_static"
ls -l $(basename "$man_page_html") ls -l $(basename "$man_page_html")

View File

@ -2,7 +2,7 @@
.\" First parameter, NAME, should be all caps .\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1) .\" other parameters are allowed: see man(7), man(1)
.TH CDRSKIN 1 "September 26, 2007" .TH CDRSKIN 1 "May 17, 2008"
.\" Please adjust this date whenever revising the manpage. .\" Please adjust this date whenever revising the manpage.
.\" .\"
.\" Some roff macros, for reference: .\" Some roff macros, for reference:
@ -16,8 +16,7 @@
.\" .sp <n> insert n+1 empty lines .\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7) .\" for manpage-specific macros, see man(7)
.SH NAME .SH NAME
cdrskin \- burns preformatted data to CD-R[W], DVD-R[W], DVD+R[W], DVD+R/DL, cdrskin \- burns preformatted data to CD, DVD, and BD-RE via libburn.
DVD-RAM via libburn.
.SH SYNOPSIS .SH SYNOPSIS
.B cdrskin .B cdrskin
.RI [ options | track_source_addresses ] .RI [ options | track_source_addresses ]
@ -29,13 +28,15 @@ DVD-RAM via libburn.
.\" respectively. .\" respectively.
.PP .PP
\fBcdrskin\fP is a program that provides some of cdrecord's options \fBcdrskin\fP is a program that provides some of cdrecord's options
in a compatible way for CD media. With DVD it has its own ways. in a compatible way for CD media. With DVD and BD-RE it has its own ways.
You do not need to be superuser for its daily usage. You do not need to be superuser for its daily usage.
.SS .SS
.B Overview of features: .B Overview of features:
.br .br
Blanking of CD-RW and DVD-RW. Blanking of CD-RW and DVD-RW.
.br .br
Formatting of DVD-RW, DVD+RW, DVD-RAM, BD-RE.
.br
Burning of data or audio tracks to CD, Burning of data or audio tracks to CD,
.br .br
either in versatile Track at Once mode (TAO) either in versatile Track at Once mode (TAO)
@ -50,7 +51,7 @@ Single session on DVD-RW or DVD-R (Disk-at-once).
.br .br
Single session or emulated ISO-9660 multi-session Single session or emulated ISO-9660 multi-session
.br .br
on overwriteable DVD+RW, DVD-RW, DVD-RAM, on overwriteable DVD+RW, DVD-RW, DVD-RAM, BD-RE
.br .br
or on data file or block device. or on data file or block device.
.br .br
@ -68,7 +69,7 @@ Recordable CD Media
.br .br
Sequentially Recordable DVD Media Sequentially Recordable DVD Media
.br .br
Overwriteable DVD Media Overwriteable DVD or BD Media
.br .br
Drive preparation and addressing Drive preparation and addressing
.br .br
@ -96,7 +97,7 @@ These informations are also used by the operating systems' CD-ROM read drivers.
.PP .PP
In general there are two types of tracks: data and audio. They differ in In general there are two types of tracks: data and audio. They differ in
sector size, throughput and readability via the systems' CD-ROM drivers sector size, throughput and readability via the systems' CD-ROM drivers
resp. by music CD players. With DVD there is only type data. resp. by music CD players. With DVD and BD there is only type data.
.br .br
If not explicitely option -audio is given, then any track is burned as type If not explicitely option -audio is given, then any track is burned as type
data, unless the track source is a file with suffix ".wav" or ".au" and has a data, unless the track source is a file with suffix ".wav" or ".au" and has a
@ -166,7 +167,7 @@ Multiple cycles of blanking and overwriting with random numbers might be.
Currently DVD-RW, DVD-R and DVD+R[/DL] can be used for the Sequential recording Currently DVD-RW, DVD-R and DVD+R[/DL] can be used for the Sequential recording
model. model.
.br .br
DVD-RW must be in state "Sequential Recording". This applies to DVD-RW only if they are in state "Sequential Recording".
The media must be either blank or appendable. The media must be either blank or appendable.
Newly purchased DVD-RW and DVD-R media are in this state. Newly purchased DVD-RW and DVD-R media are in this state.
Used DVD-RW get into blank sequential state by option Used DVD-RW get into blank sequential state by option
@ -211,12 +212,10 @@ Option -multi might make DVD media unreadable in some DVD-ROM drives.
Best reader compatibility is achieved without it Best reader compatibility is achieved without it
(i.e. by single session media). (i.e. by single session media).
.SS .SS
.B Overwriteable DVD Media: .B Overwriteable DVD or BD Media:
.br .br
Currently types DVD+RW, DVD-RW and DVD-RAM can be overwritten via cdrskin. Currently types DVD+RW, DVD-RW, DVD-RAM and BD-RE can be overwritten via
.br cdrskin.
DVD+RW and DVD-RAM media need no special initial formatting. They offer a
single continuous data area for blockwise random access.
.br .br
Option -audio is not allowed. Only one track is allowed. Option -audio is not allowed. Only one track is allowed.
Option -multi cannot mark a recognizeable end of overwriteable media. Option -multi cannot mark a recognizeable end of overwriteable media.
@ -229,6 +228,12 @@ media get treated as blank regardless wether they hold data or not.
.br .br
Currently there is no difference between -sao and -tao. If ever, then -tao Currently there is no difference between -sao and -tao. If ever, then -tao
will be the mode which preserves the current behavior. will be the mode which preserves the current behavior.
.PP
DVD+RW and DVD-RAM media need no special initial formatting. They offer a
single continuous data area for blockwise random access. BD-RE need
explicit formatting before use. See
.B blank=as_needed
or blank=format_defectmgt .
.br .br
DVD-RW are sold in state "Sequential Recording". To become suitable for the DVD-RW are sold in state "Sequential Recording". To become suitable for the
Overwriteable DVD recording model they need to get formatted to state Overwriteable DVD recording model they need to get formatted to state
@ -331,7 +336,8 @@ original cdrecord by Joerg Schilling:
.TP .TP
.BI \-atip .BI \-atip
Retrieve some info about media state. With CD-RW print "Is erasable". Retrieve some info about media state. With CD-RW print "Is erasable".
With DVD media print "book type:" and a media type text. With DVD media print "book type:" and a media type text. With BD media
print "Mounted Media:" and media type text.
.TP .TP
.BI \-audio .BI \-audio
Announces that the subsequent tracks are to be burned as audio. Announces that the subsequent tracks are to be burned as audio.
@ -342,16 +348,26 @@ stereo. For little-endian byte order (which is usual on PCs) use option
those parameters and eventually raw audio data get extracted and burned as those parameters and eventually raw audio data get extracted and burned as
audio track. Same is done for suffix ".au" and SUN Audio. audio track. Same is done for suffix ".au" and SUN Audio.
.br .br
Option -audio may be used only with CD media and not with DVD. Option -audio may be used only with CD media and not with DVD or BD.
.TP .TP
.BI blank= type .BI blank= type
Blank a CD-RW, a DVD-RW, or format a DVD+/-RW. Blank a CD-RW, DVD-RW, or format a DVD-RW, DVD+RW, DVD-RAM, BD-RE.
This is combinable with burning in the same run of cdrskin. This is combinable with burning in the same run of cdrskin.
The type given with blank= selects the particular behavior: The type given with blank= selects the particular behavior:
.RS .RS
.TP .TP
help as_needed
Print this list of blanking types. Try to make the media ready for writing from scratch. If it needs formatting,
then format it. If it is not blank, then try to apply blank=fast.
It is a reason to abort if the media cannot assume thoroughly writeable state,
e.g. if it is non-blank write-once.
.br
This leaves unformatted DVD-RW in unformatted blank state. To format DVD-RW use
blank=format_overwriteable.
.br
(Note: blank=as_needed is not an original cdrecord option.)
.TP
The following blank types are specific to particular media familes. Use them if special features are desired.
.TP .TP
all all
Blank an entire CD-RW or an unformatted DVD-RW. Blank an entire CD-RW or an unformatted DVD-RW.
@ -361,10 +377,35 @@ fast
Minimally blank an entire CD-RW or blank an unformatted DVD-RW. Minimally blank an entire CD-RW or blank an unformatted DVD-RW.
(See also --prodvd_cli_compatible, --grow_overwriteable_iso) (See also --prodvd_cli_compatible, --grow_overwriteable_iso)
.TP .TP
deformat_sequential
Like blank=all but with the additional ability to blank overwriteable DVD-RW.
This will destroy their formatting and make them sequentially recordable.
Another peculiarity is the ability to blank media which appear already blank.
This is similar to option -force but does not try to blank media other than
recognizable CD-RW and DVD-RW.
.br
(Note: blank=deformat_* are not original cdrecord options.)
.TP
deformat_sequential_quickest
Like blank=deformat_sequential but blanking DVD-RW only minimally.
This is faster than full blanking but may yield media incapable of
Incremental Streaming (-tao).
.TP
format_if_needed
Format a media if it is not overwriteably formatted yet,
and if cdrskin supports formatting for the media type,
and if formatting will not happen automatically during write.
This currently applies to unformatted DVD-RW, DVD-RAM and BD-RE.
Eventually the appropriate default formatting is chosen.
If other media or states are encountered then nothing happens.
.br
The following formatting types are more specialized to particular
media families.
.TP
format_overwrite format_overwrite
Format a DVD-RW to "Restricted Overwrite". The user should bring some patience. Format a DVD-RW to "Restricted Overwrite". The user should bring some patience.
.br .br
(Note: blank=format_overwrite* are not original cdrecord options.) (Note: blank=format_* are not original cdrecord options.)
.TP .TP
format_overwrite_quickest format_overwrite_quickest
Like format_overwrite without creating a 128 MiB trailblazer session. Like format_overwrite without creating a 128 MiB trailblazer session.
@ -383,19 +424,59 @@ This option treats already formatted media even if not option -force is given.
For DVD+RW this is the only supported explicit formatting type. It provides For DVD+RW this is the only supported explicit formatting type. It provides
complete "de-icing" so no reader slips on unwritten data areas. complete "de-icing" so no reader slips on unwritten data areas.
.TP .TP
deformat_sequential format_defectmgt
Like blank=all but with the additional ability to blank overwriteable DVD-RW. Format DVD-RAM or BD-RE to reserve the default amount of spare blocks for
This will destroy their formatting and make them sequentially recordable. defect management.
Another peculiarity is the ability to blank media which appear already blank.
This is similar to option -force but does not try to blank media other than
recognizable CD-RW and DVD-RW.
.br .br
(Note: blank=deformat_sequential* are not original cdrecord options.) The following format_defectmgt_* allow to submit user wishes which
nevertheless have to match one of the available formats. These formats are
offered by the drive after examining the media.
.TP .TP
deformat_sequential_quickest format_defectmgt_cert_off
Like blank=deformat_sequential but blanking DVD-RW only minimally. Disable the usual media quality certification in order to save time and
This is faster than full blanking but may yield media incapable of format to default size.
Incremental Streaming (-tao). The certification setting persists even if subsequent blank= options override
the size of the format selection.
.br
Whether formatting without certification works properly depends much on the
drive. One should check the "Format status:" from --list_formats afterwards.
.TP
format_defectmgt_cert_on
Re-enable the usual media quality certification and format to default size.
The certification setting persists like with format_defectmgt_cert_off.
.br
Whether there happens certification at all depends much on the media state
and the actually selected format descriptor.
.TP
format_defectmgt_max
Format DVD-RAM or BD-RE to reserve a maximum number of spare blocks.
.TP
format_defectmgt_min
Format DVD-RAM or BD-RE to reserve a minimum number of spare blocks.
It might be necessary to format format_defectmgt_none first in order to get
offered the most minmal spare blocks sizes for format_defectmgt_min.
.TP
format_defectmgt_none
Format DVD-RAM or BD-RE to the largest available payload in the hope to disable
defect management at all. This seems not to have a speed increasing effect,
though.
.TP
format_defectmgt_payload_<size>
Format DVD-RAM or BD-RE. The text after "format_defectmgt_payload_" gives a
number of bytes, eventually with suffixes "s", "k", "m". The largest number
of spare blocks will be chosen which allows at least the given payload size.
.TP
format_by_index_<number>
Format DVD-RW, DVD+RW, DVD-RAM or BD-RE.
The number after "format_by_index_" is used as index to the list of available
format descriptors. This list can be obtained by option --list_formats.
The numbers after text "Format idx" are the ones to be used with
format_by_index_. Format descriptor lists are volatile. Do neither eject
nor write the media between the run of --list_formats and the run of
blank=format_by_index_ or else you may get a different format than desired.
.TP
help
Print this list of blanking types.
.RE .RE
.TP .TP
.BI \-checkdrive .BI \-checkdrive
@ -567,7 +648,7 @@ To retrieve an archive file which was written as follow-up session,
you may use option -toc to learn about the "lba" of the desired track number. you may use option -toc to learn about the "lba" of the desired track number.
This lba is the address of the 2048 byte block where the archive begins. This lba is the address of the 2048 byte block where the archive begins.
.br .br
With overwriteable DVD media, -multi cannot mark the end of the session. With overwriteable DVD or BD media, -multi cannot mark the end of the session.
So when adding a new session this end has to be determined from the payload. So when adding a new session this end has to be determined from the payload.
Currently only ISO-9660 filesystems can be used that way. See option Currently only ISO-9660 filesystems can be used that way. See option
.B \--grow_overwriteable_iso .B \--grow_overwriteable_iso
@ -606,7 +687,7 @@ producing audible gaps between them.
With DVD-R[W] this mode can only write a single track. With DVD-R[W] this mode can only write a single track.
No -multi is allowed with DVD-R[W] -sao. No -multi is allowed with DVD-R[W] -sao.
.br .br
-sao is permissible with overwriteable DVD and with DVD+R[/DL] but actually -sao is permissible with overwriteable DVD, BD or DVD+R[/DL] but actually
only imposes restrictions without providing known advantages. only imposes restrictions without providing known advantages.
.br .br
-sao can only be used for tracks of fixely predicted size. This implies that -sao can only be used for tracks of fixely predicted size. This implies that
@ -631,6 +712,7 @@ Bus,Target,Lun Number) 'Vendor' 'Mode' 'Revision'
.BI speed= number .BI speed= number
Set speed of drive. With data CD, 1x speed corresponds to a throughput of Set speed of drive. With data CD, 1x speed corresponds to a throughput of
150,000 bytes/second. With DVD, 1x = 1,385,000 bytes/second. 150,000 bytes/second. With DVD, 1x = 1,385,000 bytes/second.
With BD 1x = 4,495,625 bytes/second.
It is not an error to set a speed higher than is suitable for drive It is not an error to set a speed higher than is suitable for drive
and media. One should stay within a realistic speed range, though. and media. One should stay within a realistic speed range, though.
Special speed settings are: Special speed settings are:
@ -648,7 +730,7 @@ suffix ".wav".
.BI \-tao .BI \-tao
Write CD in Track At Once (TAO) mode, sequential DVD-R[W] in Incremental Write CD in Track At Once (TAO) mode, sequential DVD-R[W] in Incremental
Streaming mode, or DVD+R[/DL] without traditional -sao restrictions. Streaming mode, or DVD+R[/DL] without traditional -sao restrictions.
This mode also applies pro-forma to overwriteable DVD media. This mode also applies pro-forma to overwriteable media
.br .br
Mode -tao can be used with track sources of unpredictable size, like standard Mode -tao can be used with track sources of unpredictable size, like standard
input or named pipes. It is also the only mode that can be used for writing input or named pipes. It is also the only mode that can be used for writing
@ -778,8 +860,9 @@ be the only finalization. It is advised to eject the media afterwards because
the write operations circumvent the usual system i/o with its caches and the write operations circumvent the usual system i/o with its caches and
buffers. By ejecting, those invalid memory copies get surely discarded. buffers. By ejecting, those invalid memory copies get surely discarded.
.br .br
Only few media can be written this way: DVD-RAM, RVD+RW and overwriteable Only few media can be written this way: DVD-RAM, BD-RE, RVD+RW and
DVD-RW. Writing is restricted to the already formatted area of the media. overwriteable DVD-RW. Writing is restricted to the already formatted
area of the media.
.br .br
Writing starts at byte 0 of the media or at the address given by option Writing starts at byte 0 of the media or at the address given by option
.B write_start_address= . .B write_start_address= .
@ -794,7 +877,7 @@ padded up to the necessary size by zeros. Size -1 revokes direct writing
and switches back to normal session oriented writing. and switches back to normal session oriented writing.
.br .br
Both, write_start_address and direct_write_amount size must be aligned to a Both, write_start_address and direct_write_amount size must be aligned to a
media dependend transaction size. With DVD-RAM and DVD+RW this is 2k, with media dependend transaction size. With DVD-RAM, BD-RE, DVD+RW this is 2k, with
overwriteable DVD-RW it is 32k. overwriteable DVD-RW it is 32k.
.TP .TP
.BI fallback_program= command .BI fallback_program= command
@ -874,6 +957,16 @@ With multi-session DVD, blank=fast will act like dvd+rw-format -blank=full .
.br .br
growisofs -dvd-compat is roughly equivalent to cdrskin without option -multi. growisofs -dvd-compat is roughly equivalent to cdrskin without option -multi.
.TP .TP
.BI \--list_formats
List the available format descriptors as reported by the drive for the
loaded media. Each descriptor line begins with "Format idx" and the
descriptor's list index, followed by a ":", the format type, the number
of payload blocks and that same number converted to MiB.
.br
The meaning of the format types is defined by the MMC standard
with command FORMAT UNIT. A user will more be interested in the
sizes than in the types.
.TP
.BI \--list_ignored_options .BI \--list_ignored_options
List all ignored cdrecord options. The "-" options cannot be used as addresses List all ignored cdrecord options. The "-" options cannot be used as addresses
of track sources. No track source address may begin with a text equal to an of track sources. No track source address may begin with a text equal to an
@ -930,8 +1023,8 @@ This option redirects to stderr all message output except its own result
string and eventual output of -msinfo. string and eventual output of -msinfo.
.TP .TP
.BI write_start_address= byte_offset .BI write_start_address= byte_offset
Set the address on media where to start writing the track. With DVD+RW or Set the address on media where to start writing the track. With DVD+RW, DVD-RAM
DVD-RAM byte_offset must be aligned to 2 kiB blocks, but better is 32 kiB. or BD-RE byte_offset must be aligned to 2 kiB blocks, but better is 32 kiB.
With DVD-RW 32 kiB alignment is mandatory. With DVD-RW 32 kiB alignment is mandatory.
.br .br
Other media are not suitable for this option yet. Other media are not suitable for this option yet.
@ -951,8 +1044,6 @@ tested. Currently this applies to :
.br .br
Profile 0015h , DVD-R/DL Sequential (will not allow -multi). Profile 0015h , DVD-R/DL Sequential (will not allow -multi).
.br .br
Profile 0043h , BD-RE.
.br
If you really test such media, then please report the outcome on If you really test such media, then please report the outcome on
libburn-hackers@pykix.org libburn-hackers@pykix.org
.TP .TP
@ -1084,6 +1175,13 @@ Linux specific:
Use and report literal Bus,Target,Lun addresses rather than real SCSI and Use and report literal Bus,Target,Lun addresses rather than real SCSI and
pseudo ATA addresses. This method is outdated and was never compatible with pseudo ATA addresses. This method is outdated and was never compatible with
original cdrecord. original cdrecord.
.TP
.BI stream_recording="on"|"off"
By setting "on" request that compliance to the desired speed setting is
preferred over management of write errors. With DVD-RAM and BD-RE this can
bring effective write speed near to the nominal write speed of the media.
But it will also disable the automatic use of replacement blocks
if write errors occur. It might as well be disliked or ignored by the drive.
.br .br
.SH EXAMPLES .SH EXAMPLES
.SS .SS
@ -1103,11 +1201,9 @@ cdrskin dev=ATA:1,0,0 -v -atip
.br .br
cdrskin dev=/dev/hdc -toc cdrskin dev=/dev/hdc -toc
.SS .SS
.B Make used CD-RW or used unformatted DVD-RW writable again: .B Prepare CD-RW or DVD-RW for re-use, DVD-RAM or BD-RE for first use:
.br .br
cdrskin -v dev=/dev/sg1 blank=fast -eject cdrskin -v dev=/dev/sg1 blank=as_needed -eject
.br
cdrskin -v dev=/dev/dvd blank=all -eject
.SS .SS
.B Format DVD-RW to avoid need for blanking before re-use: .B Format DVD-RW to avoid need for blanking before re-use:
.br .br
@ -1121,7 +1217,7 @@ cdrskin -v dev=/dev/sr0 blank=deformat_sequential
.br .br
cdrskin -v dev=/dev/hdc speed=12 fs=8m \\ cdrskin -v dev=/dev/hdc speed=12 fs=8m \\
.br .br
-sao -eject padsize=300k my_image.iso blank=as_needed -eject padsize=300k my_image.iso
.SS .SS
.B Write compressed afio archive on-the-fly (not possible with minimally blanked DVD-RW): .B Write compressed afio archive on-the-fly (not possible with minimally blanked DVD-RW):
.br .br
@ -1129,17 +1225,17 @@ find . | afio -oZ - | \\
.br .br
cdrskin -v dev=0,1,0 fs=32m speed=8 \\ cdrskin -v dev=0,1,0 fs=32m speed=8 \\
.br .br
-tao padsize=300k - blank=as_needed padsize=300k -
.SS .SS
.B Write multi-session to the same CD, DVD-R[W] or DVD+R[/DL]: .B Write multi-session to the same CD, DVD-R[W] or DVD+R[/DL]:
.br .br
cdrskin dev=/dev/hdc -v padsize=300k -multi -tao 1.iso cdrskin dev=/dev/hdc -v padsize=300k -multi 1.iso
.br .br
cdrskin dev=/dev/hdc -v padsize=300k -multi -tao 2.iso cdrskin dev=/dev/hdc -v padsize=300k -multi 2.iso
.br .br
cdrskin dev=/dev/hdc -v padsize=300k -multi -tao 3.iso cdrskin dev=/dev/hdc -v padsize=300k -multi 3.iso
.br .br
cdrskin dev=/dev/hdc -v padsize=300k -tao 4.iso cdrskin dev=/dev/hdc -v padsize=300k 4.iso
.SS .SS
.B Get multi-session info for option -C of program mkisofs: .B Get multi-session info for option -C of program mkisofs:
.br .br
@ -1147,9 +1243,9 @@ c_values=$(cdrskin dev=/dev/hdc -msinfo 2>/dev/null)
.br .br
mkisofs ... -C "$c_values" ... mkisofs ... -C "$c_values" ...
.SS .SS
.B Inquire free space on media for a -tao -multi run: .B Inquire free space on media for a -multi run:
.br .br
x=$(cdrskin dev=/dev/sr0 -tao -multi \\ x=$(cdrskin dev=/dev/sr0 -multi \\
.br .br
--tell_media_space 2>/dev/null) --tell_media_space 2>/dev/null)
.br .br
@ -1214,23 +1310,25 @@ Formatting data track sources for cdrskin:
.br .br
.BR mkisofs (8), .BR mkisofs (8),
.BR genisoimage (8), .BR genisoimage (8),
.BR xorriso (1),
.BR afio (1), .BR afio (1),
.BR star (1) .BR star (1)
.br .br
.TP .TP
Other CD/DVD burn programs: Other CD/DVD/BD burn programs:
.br .br
.BR cdrecord (1), .BR cdrecord (1),
.BR wodim (1) .BR wodim (1),
.BR xorriso (1)
.br .br
.TP .TP
For DVD burning (also tutor of libburn's DVD capabilities): For DVD/BD burning (also tutor of libburn's DVD/BD capabilities):
.br .br
.BR growisofs (1) .BR growisofs (1)
.br .br
.SH AUTHOR .SH AUTHOR
cdrskin was written by Thomas Schmitt <scdbackup@gmx.net>. cdrskin was written by Thomas Schmitt <scdbackup@gmx.net>.
.PP .PP
This manual page was written by George Danchev <danchev@spnet.net> and This manual page was started by George Danchev <danchev@spnet.net> and
Thomas Schmitt, for the Debian project and for all others. is now maintained by Thomas Schmitt.

View File

@ -7,7 +7,7 @@ A cdrecord compatible command line interface for libburn.
This project is neither directed against original cdrecord nor does it exploit This project is neither directed against original cdrecord nor does it exploit
any source code of said program. It rather tries to be an alternative method any source code of said program. It rather tries to be an alternative method
to burn CD or DVD, which is not based on the same code as cdrecord. to burn CD, DVD, or BD, which is not based on the same code as cdrecord.
See also : http://scdbackup.sourceforge.net/cdrskin_eng.html See also : http://scdbackup.sourceforge.net/cdrskin_eng.html
Interested users of cdrecord are encouraged to contribute further option Interested users of cdrecord are encouraged to contribute further option
@ -88,7 +88,7 @@ or
/** The official program version */ /** The official program version */
#ifndef Cdrskin_prog_versioN #ifndef Cdrskin_prog_versioN
#define Cdrskin_prog_versioN "0.4.3" #define Cdrskin_prog_versioN "0.5.0"
#endif #endif
/** The official libburn interface revision to use. /** The official libburn interface revision to use.
@ -98,10 +98,10 @@ or
#define Cdrskin_libburn_majoR 0 #define Cdrskin_libburn_majoR 0
#endif #endif
#ifndef Cdrskin_libburn_minoR #ifndef Cdrskin_libburn_minoR
#define Cdrskin_libburn_minoR 4 #define Cdrskin_libburn_minoR 5
#endif #endif
#ifndef Cdrskin_libburn_micrO #ifndef Cdrskin_libburn_micrO
#define Cdrskin_libburn_micrO 2 #define Cdrskin_libburn_micrO 0
#endif #endif
@ -135,44 +135,44 @@ or
#endif /* Cdrskin_libburn_cvs_A60220_tS */ #endif /* Cdrskin_libburn_cvs_A60220_tS */
#ifdef Cdrskin_libburn_0_4_2 #ifdef Cdrskin_libburn_0_5_0
#define Cdrskin_libburn_versioN "0.4.2" #define Cdrskin_libburn_versioN "0.5.0"
#define Cdrskin_libburn_from_pykix_svN 1 #define Cdrskin_libburn_from_pykix_svN 1
#endif /* Cdrskin_libburn_0_4_2 */ #endif /* Cdrskin_libburn_0_5_0 */
#ifdef Cdrskin_libburn_0_4_3 #ifdef Cdrskin_libburn_0_5_1
#define Cdrskin_libburn_versioN "0.4.3" #define Cdrskin_libburn_versioN "0.5.1"
#define Cdrskin_libburn_from_pykix_svN 1 #define Cdrskin_libburn_from_pykix_svN 1
/* Place novelty switch macros here. /* Place novelty switch macros here.
Move them down to Cdrskin_libburn_from_pykix_svN on version leap Move them down to Cdrskin_libburn_from_pykix_svN on version leap
*/ */
/* there are no novelties in 0.4.3 yet */ /* there are no libburn novelties in 0.5.1 yet */
#endif /* Cdrskin_libburn_0_4_3 */ #endif /* Cdrskin_libburn_0_5_1 */
#ifndef Cdrskin_libburn_versioN #ifndef Cdrskin_libburn_versioN
#define Cdrskin_libburn_0_4_2 #define Cdrskin_libburn_0_5_0
#define Cdrskin_libburn_versioN "0.4.2" #define Cdrskin_libburn_versioN "0.5.0"
#define Cdrskin_libburn_from_pykix_svN 1 #define Cdrskin_libburn_from_pykix_svN 1
#endif #endif
#ifdef Cdrskin_libburn_0_4_2 #ifdef Cdrskin_libburn_0_5_0
#undef Cdrskin_libburn_majoR #undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR #undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO #undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 0 #define Cdrskin_libburn_majoR 0
#define Cdrskin_libburn_minoR 4 #define Cdrskin_libburn_minoR 5
#define Cdrskin_libburn_micrO 2 #define Cdrskin_libburn_micrO 0
#endif #endif
#ifdef Cdrskin_libburn_0_4_3 #ifdef Cdrskin_libburn_0_5_1
#undef Cdrskin_libburn_majoR #undef Cdrskin_libburn_majoR
#undef Cdrskin_libburn_minoR #undef Cdrskin_libburn_minoR
#undef Cdrskin_libburn_micrO #undef Cdrskin_libburn_micrO
#define Cdrskin_libburn_majoR 0 #define Cdrskin_libburn_majoR 0
#define Cdrskin_libburn_minoR 4 #define Cdrskin_libburn_minoR 5
#define Cdrskin_libburn_micrO 3 #define Cdrskin_libburn_micrO 1
#endif #endif
@ -240,7 +240,19 @@ or
#define Cdrskin_libburn_has_drive_equals_adR 1 #define Cdrskin_libburn_has_drive_equals_adR 1
/* 0.4.2 */ /* 0.4.2 */
/* no novel features but rather organizational changes */ /* no novel libburn features but rather organizational changes */
/* 0.4.4 */
/* novel libburn features are transparent to cdrskin */
/* 0.4.6 */
#define Cdrskin_libburn_has_stream_recordinG 1
/* 0.4.8 */
/* Bug fix release for write_start_address=... on DVD-RAM and BD-RE */
/* 0.5.0 */
/* novel libburn features are transparent to cdrskin */
#ifdef Cdrskin_new_api_tesT #ifdef Cdrskin_new_api_tesT
@ -2388,15 +2400,27 @@ return:
fprintf(stderr,"\tfast\t\tminimally blank the entire disk\n"); fprintf(stderr,"\tfast\t\tminimally blank the entire disk\n");
fprintf(stderr,"\tminimal\t\tminimally blank the entire disk\n"); fprintf(stderr,"\tminimal\t\tminimally blank the entire disk\n");
fprintf(stderr, fprintf(stderr,
"\tformat_overwrite\tformat a DVD-RW to \"Restricted Overwrite\"\n"); "\tas_needed\tblank or format media to make it ready for (re-)use\n");
fprintf(stderr,
"\tdeformat_sequential\t\tfully blank, even formatted DVD-RW\n");
fprintf(stderr,
"\tdeformat_sequential_quickest\tminimally blank, even DVD-RW\n");
fprintf(stderr,
"\tformat_if_needed\t\tmake overwriteable if needed and possible\n");
fprintf(stderr,
"\tformat_overwrite\t\tformat a DVD-RW to \"Restricted Overwrite\"\n");
fprintf(stderr, fprintf(stderr,
"\tformat_overwrite_quickest\tto \"Restricted Overwrite intermediate\"\n"); "\tformat_overwrite_quickest\tto \"Restricted Overwrite intermediate\"\n");
fprintf(stderr, fprintf(stderr,
"\tformat_overwrite_full\tfull-size format a DVD-RW or DVD+RW\n"); "\tformat_overwrite_full\t\tfull-size format a DVD-RW or DVD+RW\n");
fprintf(stderr, fprintf(stderr,
"\tdeformat_sequential\tfully blank, even formatted DVD-RW\n"); "\tformat_defectmgt[_max|_min|_none]\tformat DVD-RAM or BD-RE\n");
fprintf(stderr, fprintf(stderr,
"\tdeformat_sequential_quickest\tminimally blank, even DVD-RW\n"); "\tformat_defectmgt[_cert_on|_cert_off]\tcertification slow|quick\n");
fprintf(stderr,
"\tformat_defectmgt_payload_<size>\tformat DVD-RAM or BD-RE\n");
fprintf(stderr,
"\tformat_by_index_<number>\t\tformat by index from --list_formats\n");
#else /* ! Cdrskin_extra_leaN */ #else /* ! Cdrskin_extra_leaN */
@ -2650,6 +2674,7 @@ set_dev:;
" --grow_overwriteable_iso emulate multi-session on media like DVD+RW\n"); " --grow_overwriteable_iso emulate multi-session on media like DVD+RW\n");
printf( printf(
" --ignore_signals try to ignore any signals rather than to abort\n"); " --ignore_signals try to ignore any signals rather than to abort\n");
printf(" --list_formats list format descriptors for loaded media.\n");
printf(" --list_ignored_options list all ignored cdrecord options.\n"); printf(" --list_ignored_options list all ignored cdrecord options.\n");
#ifdef Cdrskin_libburn_has_set_waitinG #ifdef Cdrskin_libburn_has_set_waitinG
printf(" modesty_on_drive=<options> no writing into full drive buffer\n"); printf(" modesty_on_drive=<options> no writing into full drive buffer\n");
@ -2666,6 +2691,13 @@ set_dev:;
printf( printf(
" --single_track accept only last argument as source_address\n"); " --single_track accept only last argument as source_address\n");
#ifdef Cdrskin_libburn_has_stream_recordinG
printf(
" stream_recording=\"on\"|\"off\" \"on\" requests to prefer speed\n");
printf(
" over write error management.\n");
#endif
#ifdef Cdrskin_allow_libburn_taO #ifdef Cdrskin_allow_libburn_taO
printf( printf(
" tao_to_sao_tsize=<num> use num as fixed track size if in a\n"); " tao_to_sao_tsize=<num> use num as fixed track size if in a\n");
@ -3050,6 +3082,8 @@ ex:;
static double Cdrskin_cd_speed_factoR= 150.0*1024.0; static double Cdrskin_cd_speed_factoR= 150.0*1024.0;
/** The DVD payload speed factor for reporting progress: 1x */ /** The DVD payload speed factor for reporting progress: 1x */
static double Cdrskin_dvd_speed_factoR= 1385000; static double Cdrskin_dvd_speed_factoR= 1385000;
/** The BD payload speed factor for reporting progress: 1x */
static double Cdrskin_bd_speed_factoR= 4495625;
/** The effective payload speed factor for reporting progress */ /** The effective payload speed factor for reporting progress */
static double Cdrskin_speed_factoR= 150.0*1024.0; static double Cdrskin_speed_factoR= 150.0*1024.0;
@ -3059,6 +3093,7 @@ static double Cdrskin_speed_factoR= 150.0*1024.0;
*/ */
static double Cdrskin_libburn_cd_speed_factoR= 176.4; static double Cdrskin_libburn_cd_speed_factoR= 176.4;
static double Cdrskin_libburn_dvd_speed_factoR= 1385.0; static double Cdrskin_libburn_dvd_speed_factoR= 1385.0;
static double Cdrskin_libburn_bd_speed_factoR= 4495.625;
/* The effective speed conversion factor for burn_drive_set_speed() */ /* The effective speed conversion factor for burn_drive_set_speed() */
static double Cdrskin_libburn_speed_factoR= 176.4; static double Cdrskin_libburn_speed_factoR= 176.4;
@ -3068,6 +3103,7 @@ static double Cdrskin_libburn_speed_factoR= 176.4;
*/ */
static double Cdrskin_libburn_cd_speed_addoN= 40.0; static double Cdrskin_libburn_cd_speed_addoN= 40.0;
static double Cdrskin_libburn_dvd_speed_addoN= 1.0; /*poor accuracy with 2.4x*/ static double Cdrskin_libburn_dvd_speed_addoN= 1.0; /*poor accuracy with 2.4x*/
static double Cdrskin_libburn_bd_speed_addoN= 1.0;
static double Cdrskin_libburn_speed_addoN = 40.0; static double Cdrskin_libburn_speed_addoN = 40.0;
@ -3084,6 +3120,7 @@ struct CdrskiN {
int gracetime; int gracetime;
int dummy_mode; int dummy_mode;
int force_is_set; int force_is_set;
int stream_recording_is_set;
int single_track; int single_track;
int prodvd_cli_compatible; int prodvd_cli_compatible;
@ -3099,21 +3136,60 @@ struct CdrskiN {
char msifile[Cdrskin_strleN]; char msifile[Cdrskin_strleN];
int do_atip; int do_atip;
int do_list_formats;
int do_blank; int do_blank;
int blank_fast; int blank_fast;
int no_blank_appendable; int no_blank_appendable;
int blank_format_type; /* 0=blank int blank_format_type; /* bit0-7: job type
bit0-7: 0=blank
1=format_overwrite 1=format_overwrite for DVD+RW, DVD-RW
bit8-15: bit0-7 of burn_disc_format(flag) bit8-15: bit0-7 of burn_disc_format(flag)
bit8 = write zeros after formatting bit8 = write zeros after formatting
bit9 = insist in size 0 bit9 = insist in size 0
bit10= format to maximum available size bit10= format to maximum available size
bit11= - reserved -
bit12= - reserved -
bit13= - reserved -
bit14= - reserved -
bit15= format by index
2=deformat_sequential (blank_fast might matter) 2=deformat_sequential (blank_fast might matter)
3=format (= format_overwrite restricted to DVD+RW) 3=format (= format_overwrite restricted to DVD+RW)
4=format_defectmgt for DVD-RAM, BD-RE
bit8-15: bit0-7 of burn_disc_format(flag)
bit8 = write zeros after formatting
bit9+10: size mode
0 = use parameter size as far as it makes sense
1 = (identical to size mode 0)
2 = without bit7: format to maximum size
with bit7 : take size from indexed format
descriptor
3 = without bit7: format to default size
with bit7 : take size from indexed format
descriptor
bit11= - reserved -
bit12= - reserved -
bit13= try to disable defect management
bit14= - reserved -
bit15= format by index
5=format_by_index
gets mapped to 4 with DVD-RAM and BD-RE else to 1,
bit15 should be set and bit16-23 should contain
a usable index number
6=format_if_needed
gets mapped to default variants of specialized
formats if the media state requires formatting
before writing
7=if_needed
gets mapped to 6 for DVD-RAM and BD-RE,
to 0 with all other non-blanks
bit8-15: bit0-7 of burn_disc_format(flag)
depending on job type
*/ */
int blank_format_index; /* bit8-15 of burn_disc_format(flag) */
double blank_format_size; /* to be used with burn_disc_format() */ double blank_format_size; /* to be used with burn_disc_format() */
int blank_format_no_certify;
int do_direct_write; int do_direct_write;
int do_burn; int do_burn;
@ -3259,6 +3335,7 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
o->gracetime= 0; o->gracetime= 0;
o->dummy_mode= 0; o->dummy_mode= 0;
o->force_is_set= 0; o->force_is_set= 0;
o->stream_recording_is_set= 0;
o->single_track= 0; o->single_track= 0;
o->prodvd_cli_compatible= 0; o->prodvd_cli_compatible= 0;
o->do_devices= 0; o->do_devices= 0;
@ -3268,11 +3345,14 @@ int Cdrskin_new(struct CdrskiN **skin, struct CdrpreskiN *preskin, int flag)
o->do_msinfo= 0; o->do_msinfo= 0;
o->msifile[0]= 0; o->msifile[0]= 0;
o->do_atip= 0; o->do_atip= 0;
o->do_list_formats= 0;
o->do_blank= 0; o->do_blank= 0;
o->blank_fast= 0; o->blank_fast= 0;
o->no_blank_appendable= 0; o->no_blank_appendable= 0;
o->blank_format_type= 0; o->blank_format_type= 0;
o->blank_format_index= -1;
o->blank_format_size= 0.0; o->blank_format_size= 0.0;
o->blank_format_no_certify= 0;
o->do_direct_write= 0; o->do_direct_write= 0;
o->do_burn= 0; o->do_burn= 0;
o->tell_media_space= 0; o->tell_media_space= 0;
@ -3702,6 +3782,10 @@ int Cdrskin_grab_drive(struct CdrskiN *skin, int flag)
Cdrskin_speed_factoR= Cdrskin_dvd_speed_factoR; Cdrskin_speed_factoR= Cdrskin_dvd_speed_factoR;
Cdrskin_libburn_speed_factoR= Cdrskin_libburn_dvd_speed_factoR; Cdrskin_libburn_speed_factoR= Cdrskin_libburn_dvd_speed_factoR;
Cdrskin_libburn_speed_addoN= Cdrskin_libburn_dvd_speed_addoN; Cdrskin_libburn_speed_addoN= Cdrskin_libburn_dvd_speed_addoN;
} else if(strstr(profile_name,"BD")==profile_name) {
Cdrskin_speed_factoR= Cdrskin_bd_speed_factoR;
Cdrskin_libburn_speed_factoR= Cdrskin_libburn_bd_speed_factoR;
Cdrskin_libburn_speed_addoN= Cdrskin_libburn_bd_speed_addoN;
} }
} }
#endif /* Cdrskin_libburn_has_get_profilE */ #endif /* Cdrskin_libburn_has_get_profilE */
@ -4232,11 +4316,13 @@ int Cdrskin_invalidate_iso_head(struct CdrskiN *skin, int flag)
@param flag Bitfield for control purposes: @param flag Bitfield for control purposes:
bit0= permission to check for overwriteable ISO image bit0= permission to check for overwriteable ISO image
bit1= do not report media profile bit1= do not report media profile
bit2= do not report but only check for pseudo appendable
@return 1=ok, 2=ok, is pseudo appendable, <=0 error
*/ */
int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s, int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
int flag) int flag)
{ {
int ret, iso_size; int ret, iso_size, pseudo_appendable= 0;
if(flag&1) { if(flag&1) {
if(skin->media_is_overwriteable && skin->grow_overwriteable_iso>0) { if(skin->media_is_overwriteable && skin->grow_overwriteable_iso>0) {
@ -4244,10 +4330,14 @@ int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
ret= 1; ret= 1;
else else
ret= Cdrskin_overwriteable_iso_size(skin,&iso_size,0); ret= Cdrskin_overwriteable_iso_size(skin,&iso_size,0);
if(ret>0) if(ret>0) {
s= BURN_DISC_APPENDABLE; s= BURN_DISC_APPENDABLE;
pseudo_appendable= 1;
}
} }
} }
if(flag&4)
return(1+pseudo_appendable);
printf("cdrskin: status %d ",s); printf("cdrskin: status %d ",s);
if(s==BURN_DISC_FULL) { if(s==BURN_DISC_FULL) {
@ -4275,7 +4365,7 @@ int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
printf("-unknown status code-\n"); printf("-unknown status code-\n");
if(flag&2) if(flag&2)
return(1); return(1+pseudo_appendable);
#ifdef Cdrskin_libburn_has_get_profilE #ifdef Cdrskin_libburn_has_get_profilE
if((s==BURN_DISC_FULL || s==BURN_DISC_APPENDABLE || s==BURN_DISC_BLANK || if((s==BURN_DISC_FULL || s==BURN_DISC_APPENDABLE || s==BURN_DISC_BLANK ||
@ -4297,7 +4387,7 @@ int Cdrskin_report_disc_status(struct CdrskiN *skin, enum burn_disc_status s,
} }
#endif #endif
return(1); return(1+pseudo_appendable);
} }
@ -4471,7 +4561,8 @@ int Cdrskin_checkdrive(struct CdrskiN *skin, char *profile_name, int flag)
if(drive_info->sao_block_types & BURN_BLOCK_SAO) if(drive_info->sao_block_types & BURN_BLOCK_SAO)
printf(" SAO"); printf(" SAO");
if((drive_info->raw_block_types & BURN_BLOCK_RAW96R) && if((drive_info->raw_block_types & BURN_BLOCK_RAW96R) &&
strstr(profile_name,"DVD")!=profile_name) strstr(profile_name,"DVD")!=profile_name &&
strstr(profile_name,"BD")!=profile_name)
printf(" RAW/RAW96R"); printf(" RAW/RAW96R");
printf("\n"); printf("\n");
@ -4783,6 +4874,8 @@ int Cdrskin_atip(struct CdrskiN *skin, int flag)
printf("book type: %s (emulated booktype)\n", profile_name); printf("book type: %s (emulated booktype)\n", profile_name);
if(profile_number==0x13) /* DVD-RW */ if(profile_number==0x13) /* DVD-RW */
printf("cdrskin: message for sdvdbackup: \"(growisofs mode Restricted Overwrite)\"\n"); printf("cdrskin: message for sdvdbackup: \"(growisofs mode Restricted Overwrite)\"\n");
} else if(strstr(profile_name,"BD")==profile_name) {
printf("Mounted Media: %2.2Xh, %s\n", profile_number, profile_name);
} else { } else {
printf("ATIP info from disk:\n"); printf("ATIP info from disk:\n");
if(burn_disc_erasable(drive)) { if(burn_disc_erasable(drive)) {
@ -4826,6 +4919,83 @@ ex:;
} }
/** Perform --list_formats
@param flag Bitfield for control purposes:
@return <=0 error, 1 success
*/
int Cdrskin_list_formats(struct CdrskiN *skin, int flag)
{
struct burn_drive *drive;
int ret, i, status, num_formats, profile_no, type;
off_t size;
unsigned dummy;
char status_text[80], profile_name[90];
#ifdef Cdrskin_libburn_has_burn_disc_formaT
ret= Cdrskin_grab_drive(skin,0);
if(ret<=0)
return(ret);
drive= skin->drives[skin->driveno].drive;
ret = burn_disc_get_formats(drive, &status, &size, &dummy,
&num_formats);
if(ret <= 0) {
fprintf(stderr, "cdrskin: SORRY: Cannot obtain format list info\n");
ret= 0; goto ex;
}
ret= burn_disc_get_profile(drive, &profile_no, profile_name);
printf("Media current: ");
if(profile_no > 0 && ret > 0) {
if(profile_name[0])
printf("%s\n", profile_name);
else
printf("%4.4Xh\n", profile_no);
} else
printf("is not recognizable\n");
if(status == BURN_FORMAT_IS_UNFORMATTED)
sprintf(status_text, "unformatted, up to %.1f MiB",
((double) size) / 1024.0 / 1024.0);
else if(status == BURN_FORMAT_IS_FORMATTED) {
if(profile_no==0x12 || profile_no==0x13 || profile_no==0x1a ||
profile_no==0x43)
sprintf(status_text, "formatted, with %.1f MiB",
((double) size) / 1024.0 / 1024.0);
else
sprintf(status_text, "written, with %.1f MiB",
((double) size) / 1024.0 / 1024.0);
} else if(status == BURN_FORMAT_IS_UNKNOWN) {
if (profile_no > 0)
sprintf(status_text, "intermediate or unknown");
else
sprintf(status_text, "no media or unknown media");
} else
sprintf(status_text, "illegal status according to MMC-5");
printf("Format status: %s\n", status_text);
for (i = 0; i < num_formats; i++) {
ret= burn_disc_get_format_descr(drive, i, &type, &size, &dummy);
if (ret <= 0)
continue;
printf("Format idx %-2d: %2.2Xh , %.fs , %.1f MiB\n",
i, type, ((double) size) / 2048.0, ((double) size) / 1024.0/1024.0);
}
ret= 1;
ex:;
Cdrskin_release_drive(skin,0);
return(ret);
#else /* Cdrskin_libburn_has_burn_disc_formaT */
fprintf(stderr,
"cdrskin: SORRY: libburn is too old to obtain format list info\n");
return(0);
#endif /* Cdrskin_libburn_has_burn_disc_formaT */
}
#ifndef Cdrskin_extra_leaN #ifndef Cdrskin_extra_leaN
/* A70324: proposal by Eduard Bloch */ /* A70324: proposal by Eduard Bloch */
@ -4920,13 +5090,17 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
struct burn_progress p; struct burn_progress p;
struct burn_drive *drive; struct burn_drive *drive;
int ret,loop_counter= 0,hint_force= 0,do_format= 0, profile_number= -1; int ret,loop_counter= 0,hint_force= 0,do_format= 0, profile_number= -1;
int wrote_well= 1; int wrote_well= 1, format_flag= 0, status, num_formats;
off_t size;
unsigned dummy;
double start_time; double start_time;
char *verb= "blank", *presperf="blanking", *fmt_text= "..."; char *verb= "blank", *presperf="blanking", *fmt_text= "...";
char profile_name[80]; char profile_name[80];
static char fmtp[][40]= { static char fmtp[][40]= {
"format_default", "format_overwrite", "deformat_sequential"}; "...", "format_overwrite", "deformat_sequential",
static int fmtp_max= 2; "(-format)", "format_defectmgt", "format_by_index",
"format_if_needed", "as_needed"};
static int fmtp_max= 7;
start_time= Sfile_microtime(0); /* will be refreshed later */ start_time= Sfile_microtime(0); /* will be refreshed later */
ret= Cdrskin_grab_drive(skin,0); ret= Cdrskin_grab_drive(skin,0);
@ -4940,13 +5114,11 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
burn_disc_get_profile(skin->grabbed_drive,&profile_number,profile_name); burn_disc_get_profile(skin->grabbed_drive,&profile_number,profile_name);
#endif #endif
if(skin->verbosity>=Cdrskin_verbose_progresS) ret= Cdrskin_report_disc_status(skin,s,
Cdrskin_report_disc_status(skin,s,1); 1|(4*!(skin->verbosity>=Cdrskin_verbose_progresS)));
if(ret==2)
s= BURN_DISC_APPENDABLE;
do_format= skin->blank_format_type & 0xff; do_format= skin->blank_format_type & 0xff;
if(do_format == 1 || do_format == 3) {
verb= "format";
presperf= "formatting";
}
#ifdef Cdrskin_libburn_has_pretend_fulL #ifdef Cdrskin_libburn_has_pretend_fulL
if(s==BURN_DISC_UNSUITABLE) { if(s==BURN_DISC_UNSUITABLE) {
@ -4962,7 +5134,47 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
if(do_format) if(do_format)
if(do_format>=0 && do_format<=fmtp_max) if(do_format>=0 && do_format<=fmtp_max)
fmt_text= fmtp[do_format]; fmt_text= fmtp[do_format];
if(do_format==5) { /* format_by_index */
if(profile_number == 0x12 || profile_number == 0x43)
do_format= 4;
else
do_format= 1;
} else if(do_format==6 || do_format==7) { /* format_if_needed , as_needed */
/* Find out whether format is needed at all.
Eventuelly set up a suitable formatting run
*/
if(profile_number == 0x14 && do_format==6) { /* sequential DVD-RW */
do_format= 1;
skin->blank_format_type= 1|(1<<8);
skin->blank_format_size= 128*1024*1024;
} else if(profile_number == 0x12 ||
profile_number == 0x43) { /* DVD-RAM , BD-RE */;
#ifdef Cdrskin_libburn_has_burn_disc_formaT
ret= burn_disc_get_formats(drive, &status, &size, &dummy, &num_formats);
if(ret>0 && status!=BURN_FORMAT_IS_FORMATTED) {
do_format= 4;
skin->blank_format_type= 4|(3<<9); /* default payload size */
skin->blank_format_size= 0;
}
#endif
} else if(do_format==7) { /* try to blank what is not blank yet */
if(s!=BURN_DISC_BLANK) {
do_format= 0;
skin->blank_fast= 1;
}
}
if(do_format==6 || do_format==7) {
if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(fprintf(stderr,
"cdrskin: NOTE : blank=%s : no need for action detected\n", fmt_text));
{ret= 2; goto ex;}
}
}
if(do_format == 1 || do_format == 3 || do_format == 4) {
verb= "format";
presperf= "formatting";
}
if(do_format==2) { if(do_format==2) {
/* Forceful blanking to Sequential Recording for DVD-R[W] and CD-RW */ /* Forceful blanking to Sequential Recording for DVD-R[W] and CD-RW */
@ -5000,12 +5212,26 @@ int Cdrskin_blank(struct CdrskiN *skin, int flag)
fprintf(stderr, fprintf(stderr,
"cdrskin: NOTE : blank=format_... : DVD+RW do not need this\n"); "cdrskin: NOTE : blank=format_... : DVD+RW do not need this\n");
fprintf(stderr, fprintf(stderr,
"cdrskin: HINT : For de-icing use option blank=format_overwrite_full"); "cdrskin: HINT : For de-icing use option blank=format_overwrite_full\n");
{ret= 2; goto ex;} {ret= 2; goto ex;}
} }
} else { } else {
fprintf(stderr, fprintf(stderr,
"cdrskin: SORRY : blank=%s for now does DVD+/-RW only\n",fmt_text); "cdrskin: SORRY : blank=%s for now does DVD-RW and DVD+RW only\n",
fmt_text);
{ret= 0; goto ex;}
}
if(s==BURN_DISC_UNSUITABLE)
fprintf(stderr,
"cdrskin: NOTE : blank=%s accepted not yet suitable media\n",
fmt_text);
} else if(do_format==4) {
/* Formatting and influencing defect management of DVD-RAM , BD-RE */
if(!(profile_number == 0x12 || profile_number == 0x43)) {
fprintf(stderr,
"cdrskin: SORRY : blank=%s for now does DVD-RAM and BD-RE only\n",
fmt_text);
{ret= 0; goto ex;} {ret= 0; goto ex;}
} }
if(s==BURN_DISC_UNSUITABLE) if(s==BURN_DISC_UNSUITABLE)
@ -5075,7 +5301,8 @@ unsupported_format_type:;
Cdrskin_adjust_speed(skin,0); Cdrskin_adjust_speed(skin,0);
#ifndef Cdrskin_extra_leaN #ifndef Cdrskin_extra_leaN
Cdrskin_wait_before_action(skin,1+(do_format==1 || do_format==3)); Cdrskin_wait_before_action(skin,
1+(do_format==1 || do_format==3 || do_format==4));
#endif /* ! Cdrskin_extra_leaN */ #endif /* ! Cdrskin_extra_leaN */
skin->drive_is_busy= 1; skin->drive_is_busy= 1;
@ -5083,9 +5310,15 @@ unsupported_format_type:;
burn_disc_erase(drive,skin->blank_fast); burn_disc_erase(drive,skin->blank_fast);
#ifdef Cdrskin_libburn_has_burn_disc_formaT #ifdef Cdrskin_libburn_has_burn_disc_formaT
} else if(do_format==1 || do_format==3) { } else if(do_format==1 || do_format==3 || do_format==4) {
burn_disc_format(drive,(off_t) skin->blank_format_size, format_flag= (skin->blank_format_type>>8)&(1|2|4|32|128);
((skin->blank_format_type>>8)&0xff) | ((!!skin->force_is_set)<<4)); if(skin->force_is_set)
format_flag|= 16;
if(format_flag&128)
format_flag|= (skin->blank_format_index&255)<<8;
if(skin->blank_format_no_certify)
format_flag|= 64;
burn_disc_format(drive,(off_t) skin->blank_format_size,format_flag);
#endif #endif
} else { } else {
@ -5119,7 +5352,8 @@ blanking_done:;
"\rcdrskin: %s done \n", "\rcdrskin: %s done \n",
presperf); presperf);
printf("%s time: %.3fs\n", printf("%s time: %.3fs\n",
(do_format==1 || do_format==3?"Formatting":"Blanking"), (do_format==1 || do_format==3 || do_format==4 ?
"Formatting":"Blanking"),
Sfile_microtime(0)-start_time); Sfile_microtime(0)-start_time);
} }
fflush(stdout); fflush(stdout);
@ -6226,6 +6460,9 @@ burn_failed:;
#ifdef Cdrskin_libburn_has_set_forcE #ifdef Cdrskin_libburn_has_set_forcE
burn_write_opts_set_force(o, !!skin->force_is_set); burn_write_opts_set_force(o, !!skin->force_is_set);
#endif #endif
#ifdef Cdrskin_libburn_has_stream_recordinG
burn_write_opts_set_stream_recording(o, !!skin->stream_recording_is_set);
#endif
if(skin->dummy_mode) { if(skin->dummy_mode) {
fprintf(stderr, fprintf(stderr,
@ -6745,7 +6982,7 @@ sorry_failed_to_eject:;
*/ */
int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag) int Cdrskin_setup(struct CdrskiN *skin, int argc, char **argv, int flag)
{ {
int i,k,l,ret,source_has_size=0; int i,k,l,ret,source_has_size=0, idx= -1;
double value,grab_and_wait_value= -1.0; double value,grab_and_wait_value= -1.0;
char *cpt,*value_pt,adr[Cdrskin_adrleN],*blank_mode= ""; char *cpt,*value_pt,adr[Cdrskin_adrleN],*blank_mode= "";
struct stat stbuf; struct stat stbuf;
@ -6914,6 +7151,10 @@ set_blank:;
skin->do_blank= 1; skin->do_blank= 1;
skin->blank_fast= 1; skin->blank_fast= 1;
blank_mode= "fast"; blank_mode= "fast";
} else if(strcmp(cpt,"format_if_needed")==0) {
skin->do_blank= 1;
skin->blank_format_type= 6;
skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(cpt,"format_overwrite")==0) { } else if(strcmp(cpt,"format_overwrite")==0) {
skin->do_blank= 1; skin->do_blank= 1;
skin->blank_format_type= 1|(1<<8); skin->blank_format_type= 1|(1<<8);
@ -6929,6 +7170,43 @@ set_blank:;
skin->blank_format_type= 1; skin->blank_format_type= 1;
skin->blank_format_size= 0; skin->blank_format_size= 0;
skin->preskin->demands_cdrskin_caps= 1; skin->preskin->demands_cdrskin_caps= 1;
} else if(strncmp(cpt,"format_defectmgt",16)==0) {
skin->do_blank= 1;
skin->blank_format_type= 4|(3<<9); /* default payload size */
skin->blank_format_size= 0;
skin->preskin->demands_cdrskin_caps= 1;
if(cpt[16]=='_') {
cpt+= 17;
if(strcmp(cpt,"none")==0)
skin->blank_format_type= 4|(1<<13);
else if(strcmp(cpt,"max")==0)
skin->blank_format_type= 4; /* smallest payload size above 0 */
else if(strcmp(cpt,"min")==0)
skin->blank_format_type= 4|(2<<9); /*largest payload size with mgt*/
else if(strncmp(cpt,"payload_",8)==0) {
skin->blank_format_size= Scanf_io_size(cpt+8,0);
skin->blank_format_type= 4;
} else if(strcmp(cpt,"cert_off")==0)
skin->blank_format_no_certify= 1;
else if(strcmp(cpt,"cert_on")==0)
skin->blank_format_no_certify= 0;
else
goto unsupported_blank_option;
}
skin->preskin->demands_cdrskin_caps= 1;
} else if(strncmp(cpt,"format_by_index_",16)==0) {
sscanf(cpt+16, "%d", &idx);
if(idx<0 || idx>255) {
fprintf(stderr,"cdrskin: SORRY : blank=%s provides unusable index\n",
cpt);
return(0);
}
skin->do_blank= 1;
skin->blank_format_type= 5|(2<<9)|(1<<15);
skin->blank_format_index= idx;
skin->blank_format_size= 0;
skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(cpt,"deformat_sequential")==0) { } else if(strcmp(cpt,"deformat_sequential")==0) {
skin->do_blank= 1; skin->do_blank= 1;
skin->blank_format_type= 2; skin->blank_format_type= 2;
@ -6939,10 +7217,14 @@ set_blank:;
skin->blank_format_type= 2; skin->blank_format_type= 2;
skin->blank_fast= 1; skin->blank_fast= 1;
skin->preskin->demands_cdrskin_caps= 1; skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(cpt,"as_needed")==0) {
skin->do_blank= 1;
skin->blank_format_type= 7;
} else if(strcmp(cpt,"help")==0) { } else if(strcmp(cpt,"help")==0) {
/* is handled in Cdrpreskin_setup() */; /* is handled in Cdrpreskin_setup() */;
continue; continue;
} else { } else {
unsupported_blank_option:;
fprintf(stderr,"cdrskin: FATAL : Blank option '%s' not supported yet\n", fprintf(stderr,"cdrskin: FATAL : Blank option '%s' not supported yet\n",
cpt); cpt);
return(0); return(0);
@ -7206,8 +7488,13 @@ gracetime_equals:;
} else if(strcmp(argv[i],"-isosize")==0) { } else if(strcmp(argv[i],"-isosize")==0) {
skin->use_data_image_size= 1; skin->use_data_image_size= 1;
} else if(strcmp(argv[i],"--list_formats")==0) {
skin->do_list_formats= 1;
skin->preskin->demands_cdrskin_caps= 1;
} else if(strcmp(argv[i],"--list_ignored_options")==0) { } else if(strcmp(argv[i],"--list_ignored_options")==0) {
char line[80]; char line[80];
/* is also handled in Cdrpreskin_setup() */;
line[0]= 0; line[0]= 0;
printf("cdrskin: List of all ignored options:\n"); printf("cdrskin: List of all ignored options:\n");
@ -7425,6 +7712,17 @@ set_speed:;
if(skin->verbosity>=Cdrskin_verbose_cmD) if(skin->verbosity>=Cdrskin_verbose_cmD)
ClN(printf("cdrskin: speed : %f\n",skin->x_speed)); ClN(printf("cdrskin: speed : %f\n",skin->x_speed));
} else if(strncmp(argv[i],"-stream_recording=",18)==0) {
value_pt= argv[i]+18;
goto set_stream_recording;
} else if(strncmp(argv[i],"stream_recording=",17)==0) {
value_pt= argv[i]+17;
set_stream_recording:;
if(strcmp(value_pt, "on")==0)
skin->stream_recording_is_set= 1;
else
skin->stream_recording_is_set= 0;
} else if(strcmp(argv[i],"-swab")==0) { } else if(strcmp(argv[i],"-swab")==0) {
skin->swap_audio_bytes= 0; skin->swap_audio_bytes= 0;
@ -7734,11 +8032,15 @@ int Cdrskin_create(struct CdrskiN **o, struct CdrpreskiN **preskin,
printf("cdrskin: scanning for devices ...\n"); printf("cdrskin: scanning for devices ...\n");
fflush(stdout); fflush(stdout);
#ifdef Cdrskin_libburn_has_burn_msgS
if(skin->preskin->verbosity<Cdrskin_verbose_debuG)
burn_msgs_set_severities("NEVER", "NOTE", "cdrskin: ");
#endif
/* In cdrskin there is not much sense in queueing library messages. /* In cdrskin there is not much sense in queueing library messages.
It is done here only for testing it from time to time */ It is done here only for testing it from time to time */
Cdrpreskin_queue_msgs(skin->preskin,1); Cdrpreskin_queue_msgs(skin->preskin,1);
#ifndef Cdrskin_oldfashioned_api_usE #ifndef Cdrskin_oldfashioned_api_usE
if(stdio_drive) { if(stdio_drive) {
ret= burn_drive_scan_and_grab(&(skin->drives),skin->preskin->device_adr,0); ret= burn_drive_scan_and_grab(&(skin->drives),skin->preskin->device_adr,0);
@ -7759,6 +8061,11 @@ int Cdrskin_create(struct CdrskiN **o, struct CdrpreskiN **preskin,
} }
} }
#ifdef Cdrskin_libburn_has_burn_msgS
burn_msgs_set_severities(skin->preskin->queue_severity,
skin->preskin->print_severity, "cdrskin: ");
#endif
/* This prints the eventual queued messages */ /* This prints the eventual queued messages */
Cdrpreskin_queue_msgs(skin->preskin,0); Cdrpreskin_queue_msgs(skin->preskin,0);
@ -7843,6 +8150,13 @@ int Cdrskin_run(struct CdrskiN *skin, int *exit_value, int flag)
if(ret<=0) if(ret<=0)
{*exit_value= 7; goto ex;} {*exit_value= 7; goto ex;}
} }
if(skin->do_list_formats) {
if(skin->n_drives<=0)
{*exit_value= 14; goto no_drive;}
ret= Cdrskin_list_formats(skin, 0);
if(ret<=0)
{*exit_value= 14; goto ex;}
}
if(skin->do_blank) { if(skin->do_blank) {
if(skin->n_drives<=0) if(skin->n_drives<=0)
{*exit_value= 8; goto no_drive;} {*exit_value= 8; goto no_drive;}

View File

@ -2,7 +2,7 @@
<HEAD> <HEAD>
<META NAME="description" CONTENT="cdrskin, a limited cdrecord compatibility wrapper for libburn"> <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, cdrecord, compatible, scdbackup"> <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, cdrecord, compatible, scdbackup">
<META NAME="robots" CONTENT="follow"> <META NAME="robots" CONTENT="follow">
<TITLE>cdrskin homepage english</TITLE> <TITLE>cdrskin homepage english</TITLE>
</HEAD> </HEAD>
@ -17,26 +17,27 @@
</A> </A>
<P><H2> Homepage of </H2> <P><H2> Homepage of </H2>
<H1> cdrskin </H1> <H1> cdrskin </H1>
<!-- <FONT SIZE=+0><A HREF="cdrskin_ger.html">deutsch (german)</A></FONT> -->
<H2>Limited cdrecord compatibility wrapper for libburn</H2> <H2>Limited cdrecord compatibility wrapper for libburn</H2>
</CENTER> </CENTER>
<P> <P>
<H2>Purpose:</H2> <H2>Purpose:</H2>
Burns preformatted data to CD and DVD media:<BR> Burns preformatted data to CD, DVD, and BD media:<BR>
CD-R, DVD-R, DVD+R, DVD+R/DL, CD-RW, DVD-RW, DVD-RAM, DVD+RW CD-R, DVD-R, DVD+R, DVD+R/DL, CD-RW, DVD-RW, DVD-RAM, DVD+RW, BD-RE
</P> </P>
<P> <P>
<HR> <HR>
<A HREF="#download">Direct hop to download links -></A>
<P> <P>
<H2>Hardware requirements:</H2> <H2>Hardware requirements:</H2>
A CD/DVD recorder suitable for A CD/DVD/BD recorder suitable for
<A HREF="http://libburnia-project.org">http://libburnia-project.org</A> <BR> <A HREF="http://libburnia-project.org">http://libburnia-project.org</A> <BR>
(SCSI , ATA , USB , or SATA writers compliant to standard MMC-3 for CD (SCSI , ATA , USB , or SATA writers compliant to standard MMC-3 for CD
and to MMC-5 for DVD). and to MMC-5 for DVD or BD).
<BR> <BR>
</P> </P>
@ -56,10 +57,10 @@ and to MMC-5 for DVD).
GPL software included:<BR> GPL software included:<BR>
</H2> </H2>
<DL> <DL>
<DT>libburn-0.4.2</DT> <DT>libburn-0.5.0</DT>
<DD>(founded by Derek Foreman and Ben Jansens, <DD>(founded by Derek Foreman and Ben Jansens,
furthered by team of libburnia-project.org)</DD> furthered since August 2006 by Thomas Schmitt from team of libburnia-project.org)</DD>
<DD>transfers data to CD and DVD</DD> <DD>transfers data to CD, DVD, BD-RE</DD>
</DL> </DL>
</P> </P>
@ -84,10 +85,10 @@ Ports to other usable systems are appreciated. Reports are welcome.
<DL> <DL>
<DT>The most common options of cdrecord for data and audio on CD media <DT>The most common options of cdrecord for data and audio on CD media
are provided in a compatible way.<BR> are provided in a compatible way.<BR>
On single layer DVD media cdrskin is able to perform any recording job On all DVD media except DVD-R DL, cdrskin is able to perform any recording job
which is possible with cdrecord. which is possible with cdrecord.
Other than with cdrecord, options -multi and -tao are supported with Other than with cdrecord, option -multi is supported with many DVD types and
certain DVD types. write mode -tao works with anything but quickly blanked DVD-RW.
</DT> </DT>
<BR><BR> <BR><BR>
<DT>Get an overview of drives and their addresses</DT> <DT>Get an overview of drives and their addresses</DT>
@ -105,9 +106,8 @@ as listed by option --devices.</DT>
<DD>$<KBD>&nbsp;cdrskin dev=ATA:1,0,0 -v -atip</KBD></DD> <DD>$<KBD>&nbsp;cdrskin dev=ATA:1,0,0 -v -atip</KBD></DD>
<DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -toc</KBD></DD> <DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -toc</KBD></DD>
<DT>Make used CD-RW or used unformatted DVD-RW writable again:</DT> <DT>Prepare CD-RW or DVD-RW for re-use, DVD-RAM or BD-RE for first use:</DT>
<DD>$<KBD>&nbsp;cdrskin -v dev=/dev/sg1 blank=fast -eject</KBD></DD> <DD>$<KBD>&nbsp;cdrskin -v dev=/dev/sg1 blank=as_needed -eject</KBD></DD>
<DD>$<KBD>&nbsp;cdrskin -v dev=/dev/dvd blank=all -eject</KBD></DD>
<DT>Format DVD-RW to avoid need for blanking before re-use:</DT> <DT>Format DVD-RW to avoid need for blanking before re-use:</DT>
<DD>$<KBD>&nbsp;cdrskin -v dev=/dev/sr0 blank=format_overwrite</KBD></DD> <DD>$<KBD>&nbsp;cdrskin -v dev=/dev/sr0 blank=format_overwrite</KBD></DD>
@ -118,28 +118,28 @@ as listed by option --devices.</DT>
<DT>Write ISO-9660 filesystem image as only one to blank or formatted media: <DT>Write ISO-9660 filesystem image as only one to blank or formatted media:
</DT> </DT>
<DD>$<KBD>&nbsp;cdrskin -v dev=/dev/hdc speed=12 fs=8m \</KBD></DD> <DD>$<KBD>&nbsp;cdrskin -v dev=/dev/hdc speed=12 fs=8m \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-sao -eject padsize=300k my_image.iso</KBD></DD> <DD><KBD>&nbsp;&nbsp;blank=as_needed -eject padsize=300k my_image.iso</KBD></DD>
<DT>Write compressed afio archive on-the-fly:</DT> <DT>Write compressed afio archive on-the-fly:</DT>
<DD>$<KBD>&nbsp;find . | afio -oZ - | \</KBD></DD> <DD>$<KBD>&nbsp;find . | afio -oZ - | \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;cdrskin -v dev=0,1,0 fs=32m speed=8 \</KBD></DD> <DD><KBD>&nbsp;&nbsp;cdrskin -v dev=0,1,0 fs=32m speed=8 \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;-tao padsize=300k -</KBD></DD> <DD><KBD>&nbsp;&nbsp;blank=as_needed padsize=300k -</KBD></DD>
<DT>Write several sessions to the same CD, DVD-R[W] or DVD+R[/DL]:</DT> <DT>Write several sessions to the same CD, DVD-R[W] or DVD+R[/DL]:</DT>
<DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -v padsize=300k -multi -tao 1.iso</KBD> <DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -v padsize=300k -multi 1.iso</KBD>
</DD> </DD>
<DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -v padsize=300k -multi -tao 2.iso</KBD> <DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -v padsize=300k -multi 2.iso</KBD>
</DD> </DD>
<DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -v padsize=300k -multi -tao 3.iso</KBD> <DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -v padsize=300k -multi 3.iso</KBD>
</DD> </DD>
<DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -v padsize=300k -tao 4.iso</KBD></DD> <DD>$<KBD>&nbsp;cdrskin dev=/dev/hdc -v padsize=300k 4.iso</KBD></DD>
<DT>Get multi-session info for option -C of program mkisofs:</DT> <DT>Get multi-session info for option -C of program mkisofs:</DT>
<DD>$<KBD>&nbsp;c_values=$(cdrskin dev=/dev/sr0 -msinfo 2>/dev/null)</KBD></DD> <DD>$<KBD>&nbsp;c_values=$(cdrskin dev=/dev/sr0 -msinfo 2>/dev/null)</KBD></DD>
<DD>$<KBD>&nbsp;mkisofs ... -C "$c_values" ...</KBD></DD> <DD>$<KBD>&nbsp;mkisofs ... -C "$c_values" ...</KBD></DD>
<DT>Inquire free space on media for a -tao -multi run:</DT> <DT>Inquire free space on media for a -multi run:</DT>
<DD>$<KBD>&nbsp;x=$(cdrskin dev=/dev/sr0 -tao -multi \</KBD></DD> <DD>$<KBD>&nbsp;x=$(cdrskin dev=/dev/sr0 -multi \</KBD></DD>
<DD><KBD>&nbsp;&nbsp;--tell_media_space 2>/dev/null)</KBD></DD> <DD><KBD>&nbsp;&nbsp;--tell_media_space 2>/dev/null)</KBD></DD>
<DD>$<KBD>&nbsp;echo "Available: $x blocks of 2048 data bytes"</KBD></DD> <DD>$<KBD>&nbsp;echo "Available: $x blocks of 2048 data bytes"</KBD></DD>
@ -166,18 +166,28 @@ man cdrecord</A></KBD></DD>
this "don't bother Joerg" demand.) this "don't bother Joerg" demand.)
</DD> </DD>
</DL> </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 tool
<A HREF="http://scdbackup.sourceforge.net/xorriso_eng.html">xorriso</A>.
</DD>
</DL>
Testers wanted who are willing to risk some double layer DVD media. Testers wanted who are willing to risk some DVD-R DL media
or to do experiments on BD-R media.
</P> </P>
<HR> <HR>
<A NAME="download"></A>
<P> <P>
<DL> <DL>
<DT>Download as source code (see README):</DT> <DT>Download as source code (see README):</DT>
<DD><A HREF="cdrskin-0.4.2.pl00.tar.gz">cdrskin-0.4.2.pl00.tar.gz</A> <DD><A HREF="cdrskin-0.5.0.pl00.tar.gz">cdrskin-0.5.0.pl00.tar.gz</A>
(700 KB). (730 KB).
</DD> </DD>
<DD> <DD>
The cdrskin tarballs are source code identical with libburn releases The cdrskin tarballs are source code identical with libburn releases
@ -185,6 +195,8 @@ of the same version number.
They get produced via a different procedure, though.<BR> They get produced via a different procedure, though.<BR>
cdrskin is part of libburn - full libburn is provided with cdrskin releases. cdrskin is part of libburn - full libburn is provided with cdrskin releases.
</DD> </DD>
<!-- This is not offered any more since spring 2008
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DT>Download as single x86 binaries (untar and move to /usr/bin/cdrskin):</DT> <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"> <DD><A HREF="cdrskin_0.4.2.pl00-x86-suse9_0.tar.gz">
@ -199,6 +211,9 @@ cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
<DD>runs on SuSE 7.2 (2.4.4), and on the systems above.</DD> <DD>runs on SuSE 7.2 (2.4.4), and on the systems above.</DD>
</DL> </DL>
</DD> </DD>
-->
</DL> </DL>
<DL><DT>Documentation:</DT> <DL><DT>Documentation:</DT>
<DD><A HREF="README_cdrskin">README</A> an introduction</DD> <DD><A HREF="README_cdrskin">README</A> an introduction</DD>
@ -221,17 +236,18 @@ cdrskin_0.4.2.pl00-x86-suse9_0-static.tar.gz</A>, (310 KB), -static compiled,
<HR> <HR>
<P> <P>
Enhancements towards previous stable version cdrskin-0.4.0: Enhancements towards previous stable version cdrskin-0.4.8.pl00:
<UL> <UL>
<LI>Safe dynamic linking possible with libburn.so.4</LI> <LI>Ability to use /dev/scdN as fallback if /dev/srN does not exist</LI>
<!--
<LI>none</LI>
-->
</UL> </UL>
<!-- Bug fixes towards cdrskin-0.4.8.pl00:
Bug fixes towards cdrskin-0.4.2.pl00:
<UL> <UL>
<LI>none yet</LI> <LI>Option drive_scsi_dev_family=scd lead to buffer overflow</LI>
</UL> </UL>
-->
</P> </P>
@ -239,26 +255,26 @@ Enhancements towards previous stable version cdrskin-0.4.0:
<P> <P>
<DL> <DL>
<DT><H3>Development snapshot, version 0.4.3 :</H3></DT> <DT><H3>Development snapshot, version 0.5.1 :</H3></DT>
<DD>Enhancements towards stable version 0.4.2.pl00: <DD>Enhancements towards current stable version 0.5.0.pl00:
<UL> <UL>
<LI>Support for DVD+R/DL media is now official</LI>
<!-- <!--
<LI>none yet</LI>
--> -->
<LI>none yet</LI>
</UL> </UL>
</DD> </DD>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DD><A HREF="README_cdrskin_devel">README 0.4.3</A> <DD><A HREF="README_cdrskin_devel">README 0.5.1</A>
<DD><A HREF="cdrskin__help_devel">cdrskin_0.4.3 --help</A></DD> <DD><A HREF="cdrskin__help_devel">cdrskin_0.5.1 --help</A></DD>
<DD><A HREF="cdrskin_help_devel">cdrskin_0.4.3 -help</A></DD> <DD><A HREF="cdrskin_help_devel">cdrskin_0.5.1 -help</A></DD>
<DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.4.3)</A></DD> <DD><A HREF="man_1_cdrskin_devel.html">man cdrskin (as of 0.5.1)</A></DD>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DT>Maintainers of cdrskin unstable packages please use SVN of <DT>Maintainers of cdrskin unstable packages please use SVN of
<A HREF="http://libburnia-project.org"> libburnia-project.org</A></DT> <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> <DD>Download: <KBD><B>svn co http://svn.libburnia-project.org/libburn/trunk libburn</B>
</KBD></DD> </KBD></DD>
<DD>Build: <KBD><B>cd libburn ; ./bootstrap ; ./configure --prefix /usr ; make</B> <DD>Build: <KBD><B>cd libburn ; ./bootstrap ; ./configure --prefix /usr ; make ; cdrskin/compile_cdrskin.sh</B>
</KBD></DD> </KBD></DD>
<DD>Build of SVN versions needs <A HREF="http://sources.redhat.com/autobook/"> <DD>Build of SVN versions needs <A HREF="http://sources.redhat.com/autobook/">
autotools</A> of at least version 1.7 installed. autotools</A> of at least version 1.7 installed.
@ -266,15 +282,20 @@ But after the run of <KBD>./bootstrap</KBD>, only
vanilla tools like make and gcc are needed.</DD> vanilla tools like make and gcc are needed.</DD>
</DD> </DD>
<DD>&nbsp;</DD> <DD>&nbsp;</DD>
<DT>The following downloads are intended for adventurous end users or <DT>The following download is intended for adventurous end users or
admins with full system souvereignty.</DT> admins with full system souvereignty.</DT>
<DD>Source (./bootstrap is already applied, build tested, for more see <DD>Source (./bootstrap is already applied, build tested, for more see
<A HREF="README_cdrskin_devel">upcoming README</A> ): <A HREF="README_cdrskin_devel">upcoming README</A> ):
</DD> </DD>
<DD> <DD>
<A HREF="cdrskin-0.4.3.tar.gz">cdrskin-0.4.3.tar.gz</A> <A HREF="cdrskin-0.5.1.tar.gz">cdrskin-0.5.1.tar.gz</A>
(700 KB). (730 KB).
</DD> </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>Binary (untar and move to /usr/bin/cdrskin):</DD>
<DD><A HREF="cdrskin_0.4.3-x86-suse9_0.tar.gz"> <DD><A HREF="cdrskin_0.4.3-x86-suse9_0.tar.gz">
cdrskin_0.4.3-x86-suse9_0.tar.gz</A>, (110 KB). cdrskin_0.4.3-x86-suse9_0.tar.gz</A>, (110 KB).
@ -282,6 +303,8 @@ cdrskin_0.4.3-x86-suse9_0.tar.gz</A>, (110 KB).
<DD><A HREF="cdrskin_0.4.3-x86-suse9_0-static.tar.gz"> <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) cdrskin_0.4.3-x86-suse9_0-static.tar.gz</A>, (310 KB)
</DD> </DD>
-->
</DL> </DL>
</P> </P>
@ -307,14 +330,33 @@ provide libburn with invaluable examples on how to deal with DVD media.
<A NAME="examples"> <A NAME="examples">
<P> <P>
<DL> <DL>
<DT>Example for a setup of device permissions. To be done by the superuser:</DT> <DT>Example for a setup of device permissions.</DT>
<DT>(CD devices which offer no rw-permission are invisible to normal users.) <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> </DT>
<DD># <KBD><B>cdrskin --devices</B></KBD></DD> <DD># <KBD><B>cdrskin --devices</B></KBD></DD>
<DD><KBD>...</KBD></DD> <DD><KBD>...</KBD></DD>
<DD><KBD>0&nbsp; dev='/dev/sr0'&nbsp; rwrwr- :&nbsp; 'TEAC' 'CD-ROM CD-532S'</KBD></DD> <DD><KBD>0&nbsp; dev='/dev/sr0'&nbsp; rwr-r- :&nbsp; 'TEAC' 'CD-ROM CD-532S'</KBD></DD>
<DD><KBD>1&nbsp; dev='/dev/hdc'&nbsp; rwrw-- :&nbsp; 'LITE-ON' 'LTR-48125S'</KBD></DD> <DD><KBD>1&nbsp; dev='/dev/hdc'&nbsp; rwrw-- :&nbsp; '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> <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> </DL>
</P> </P>
@ -329,6 +371,8 @@ Example how to setup K3b to use cdrskin for burning data CD projects.
is a GUI frontend which uses cdrecord for CD burning.) is a GUI frontend which uses cdrecord for CD burning.)
</P> </P>
<!--
<HR> <HR>
<A NAME="scdbackup"> <A NAME="scdbackup">
@ -383,6 +427,8 @@ and try again.
</DL> </DL>
</P> </P>
-->
<HR> <HR>
<A NAME="cdrecord"> <A NAME="cdrecord">
@ -395,7 +441,7 @@ cdrecord but not vice versa.
I am a long time user of cdrecord and it works fine for me. 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 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 data on CD and CD-RW via stdin. cdrecord is reliable, versatile and well
maintained. So for me - there would be not problem with it. maintained. So for me - there would be no problem with it.
<BR> <BR>
But the author of cdrecord and the Linux kernel people foster a very hostile 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). relationship. Ok, that's their business, not mine (or ours if you are with me).
@ -442,13 +488,25 @@ and by <A HREF="http://sourceforge.net">sourceforge.net</A><BR>
<HR> <HR>
<DL> <DL>
<DT>Links to my other published software projects : <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 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> <DD><A HREF=http://scdbackup.webframe.org/main_eng.html>
scdbackup, multi volume CD backup</A> scdbackup, multi volume CD backup</A>
<DL><DD><A HREF=http://scdbackup.sourceforge.net/main_eng.html> <DL><DD><A HREF=http://scdbackup.sourceforge.net/main_eng.html>
(a second source of above)</A></DL> (a second source of above)</A></DD></DL></DD>
<DD><A HREF=http://stic.sourceforge.net>Some Tools for Image Collectors</A> <DD><A HREF=http://stic.sourceforge.net>Some Tools for Image Collectors</A>
</DD>
<DD><A HREF=http://scdbackup.webframe.org/pppoem> <DD><A HREF=http://scdbackup.webframe.org/pppoem>
pppoem, a DSL throughput monitor (mainly for Linux kernel 2.4)</A> pppoem, a DSL throughput monitor (mainly for Linux kernel 2.4)</A>
</DD>
</DL> </DL>
<BR><BR> <BR><BR>
Legal statement: This website does not serve any commercial purpose.<BR> Legal statement: This website does not serve any commercial purpose.<BR>

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2008.03.03.202930" #define Cdrskin_timestamP "2008.07.16.070001"

View File

@ -5163,21 +5163,525 @@ Mentioned support for DVD+R/DL.
* Support for DVD+R/DL media is now official * Support for DVD+R/DL media is now official
* Experimental code for BD-RE with --allow_untested_media * Experimental code for BD-RE with --allow_untested_media
[] 1 Mar 2008 [1595]
cdrskin/changelog.txt cdrskin/changelog.txt
Updated changelog Updated changelog
2008.03.03.202930 [1598]
libburn/libburn.h
libburn/drive.c
libburn/read.c
Got rid of a cumbersome open-close cycle with burn_read_data() on stdio:
2 Apr 2008 [1654]
COPYRIGHT
Corrected GPL version
------------------------------------ cycle - cdrskin-0.4.3 - 2008.04.07.152331
* libburn: Improved read performance from stdio: pseudo-drives
2008.04.08.100001 [ZeroFourFour 1669]
Makefile.am
configure.ac
README
libburn/libburn.h (burn_header_version_*)
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/wiki_plain.txt
cdrskin/cdrskin_eng.html
doc/comments
Made number transition and activated development documentation
8 Apr 2008 [ZeroFourFour 1670]
- cdrskin/add_ts_changes_to_libburn_0_4_2
- cdrskin/add_ts_changes_to_libburn_0_4_3
+ cdrskin/add_ts_changes_to_libburn_0_4_4
+ cdrskin/add_ts_changes_to_libburn_0_4_5
Updated cdrskin tarball generator
8 Apr 2008 [ZeroFourFour 1671]
cdrskin/changelog.txt
Documented changes and release timestamp
2008.04.08.100001 [ZeroFourFour 1672]
libburn/util.c
Switched from configure.ac versioning to libburn.h versioning
8 Apr 2008 [ZeroFourFour 1673]
cdrskin/changelog.txt
Documented last minute changes
----------------------------- release - cdrskin-0.4.4.pl00 - 2008.04.08.100001
* Support for DVD+R/DL media is now official
* Experimental code for BD-RE with --allow_untested_media
* libburn: Improved read performance from stdio: pseudo-drives
2008.04.08.132344 [1674]
Makefile.am
configure.ac
README
libburn/libburn.h (burn_header_version_*)
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/wiki_plain.txt
cdrskin/cdrskin_eng.html
doc/comments
cdrskin/changelog.txt
Made number transition
8 Apr 2008 [1675]
- cdrskin/add_ts_changes_to_libburn_0_4_2
- cdrskin/add_ts_changes_to_libburn_0_4_3
+ cdrskin/add_ts_changes_to_libburn_0_4_4
+ cdrskin/add_ts_changes_to_libburn_0_4_5
Updated cdrskin tarball generator
2008.04.08.133452 [1676]
libburn/util.c
Switched from configure.ac versioning to libburn.h versioning
------------------------------------ cycle - cdrskin-0.4.5 - 2008.04.08.134413
2008.04.10.211529 [1681]
libburn/mmc.c
libburn/drive.c
cdrskin/cdrskin.c
Trying to fix bugs about BD-RE, macro for simulating BD-RE on DVD-RAM
------------------------------------ cycle - cdrskin-0.4.5 - 2008.04.10.211529
2008.04.12.164244 [1683]
libburn/libburn.h
libburn/transport.h
libburn/options.h
libburn/options.c
libburn/write.c
libburn/drive.c
libburn/mmc.c
New API call burn_write_opts_set_stream_recording()
2008.04.12.164606 [1684]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
cdrskin/cdrskin_eng.html
New option stream_recording=on|off
------------------------------------ cycle - cdrskin-0.4.5 - 2008.04.12.164930
* New option stream_recording=on can speed up DVD-RAM
2008.04.15.094133 [1685]
libburn/os-linux.h
libburn/write.c
Enforced tail padding with stream_recording, enlarged transport buffer
15 Apr 2008 [1686]
cdrskin/cdrskin.1
Some adjustments of cdrskin man page
------------------------------------ cycle - cdrskin-0.4.5 - 2008.04.15.094545
2008.04.16.082208 [1687]
libburn/read.c
Made burn_read_data() obey its flag bit1
2008.04.18.092715 [1688]
libburn/libburn.h
libburn/async.c
libburn/drive.c
libburn/mmc.c
Began to implement formatting of DVD-RAM and experimentally of BD-RE
2008.04.18.092816 [1689]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
Began to implement formatting of DVD-RAM and experimentally of BD-RE
2008.04.18.194602 [1691]
libburn/mmc.c
Adjustments with DVD-RAM formatting
2008.04.22.161139 [1695]
libburn/libburn.h
libburn/transport.h
libburn/mmc.c
libburn/drive.c
cdrskin/cdrskin.c
cdrskin/cdrskin.1
Adjustments with DVD-RAM formatting
2008.04.22.200949 [1696]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
New option --list_formats
2008.04.23.110116 [1697]
libburn/mmc.c
cdrskin/cdrskin.c
cdrskin/cdrskin.1
New blank type blank=format_by_index_<number>
24 Apr 2008 [1698]
doc/cookbook.txt
Wrote down what was learned about DVD-RAM formatting
24 Apr 2008 [1699]
cdrskin/cdrskin_eng.html
Mentioned new features
2008.04.25.131531 [1700]
libburn/mmc.c
Preparations for formatting BD-RE
2008.04.25.132353 [1701]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
Documented experimental support for BD-RE formatting
25 Apr 2008 [1702]
configure.ac
Incremented LT_CURRENT and LT_AGE to reflect API enhancements
25 Apr 2008 [1703]
cdrskin/cdrskin_eng.html
Documented newest enhancements
------------------------------------ cycle - cdrskin-0.4.5 - 2008.04.25.134438
* New blank type blank=format_defectmgt for DVD-RAM
* New option --list_formats
* New blank type blank=format_by_index_<number>
* Experimental support for formatting BD-RE
2008.04.26.150646 [1704]
libburn/libburn.h
libburn/mmc.c
libburn/drive.c
doc/cookbook.txt
Enabled quick formatting with DVD-RAM, made slow formatting default with BD-RE
2008.04.26.150945 [1705]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
New blank subtypes format_defectmgt_cert_[on|off], on is default
2008.04.27.084704 [1706]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
New blank type format_if_needed
2008.04.27.140144 [1707]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
New blank type as_needed
27 Apr 2008 [1708]
cdrskin/cdrskin_eng.html
Documented newest enhancements
------------------------------------ cycle - cdrskin-0.4.5 - 2008.04.27.163625
* New blank type blank=as_needed for automatic handling of media type and state
3 May 2008 [1723]
README
Updated project history
2008.05.06.082429 [1729]
libburn/drive.c
Avoided to report negative burn_multi_caps.start_range_high with DVD-RW
2008.05.06.084156 [1730]
libburn/mmc.c
Mapped undefined size to 0 with burn_disc_get_formats() and DVD-RW
2008.05.06.180813 [1733]
libburn/libburn.h
libburn/drive.c
libburn/mmc.c
doc/cookbook.txt
doc/comments
test/libburner.c
Declared BD-RE to be supported
2008.05.06.181100 [1734]
cdrskin/cdrskin.c
cdrskin/cdrskin.1
cdrskin/wiki_plain.txt
Declared BD-RE to be supported
2008.05.06.181723 [1735]
libburn/mmc.c
Declared BD-RE to be supported
6 May 2008 [1736]
cdrskin/cdrskin_eng.html
cdrskin/cdrskin.1
Declared BD-RE to be supported
------------------------------------ cycle - cdrskin-0.4.5 - 2008.05.06.183436
* Support for BD-RE media is now official
2008.05.09.143130 [1748]
libburn/libburn.h
Documented read-only profiles CD-ROM and DVD-ROM
2008.05.09.145205 [1749]
libburn/mmc.c
Allowed BD-ROM and BD-R for read-only purposes
9 May 2008 [1750]
cdrskin/cdrskin.1
Changed blank examples to blank=as_needed
------------------------------------ cycle - cdrskin-0.4.5 - 2008.05.09.151327
2008.05.10.080001 [1754]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/wiki_plain.txt
cdrskin/cdrskin_eng.html
doc/comments
cdrskin/cdrskin.1
Made number transition to 0.4.6 and activated development documentation
10 May 2008 [1755]
cdrskin/README
Made number transition to 0.4.6 and activated development documentation
10 May 2008 [1756]
- cdrskin/add_ts_changes_to_libburn_0_4_4
- cdrskin/add_ts_changes_to_libburn_0_4_5
+ cdrskin/add_ts_changes_to_libburn_0_4_6
+ cdrskin/add_ts_changes_to_libburn_0_4_7
Updated cdrskin tarball generator
10 May 2008 [1757]
cdrskin/changelog.txt
Documented changes and release timestamp
----------------------------- release - cdrskin-0.4.6.pl00 - 2008.05.10.080001
* Support for BD-RE media is now official
* New option stream_recording=on can speed up DVD-RAM and BD-RE
* New option --list_formats
* New blank types for expert formatting of DVD-RAM and BD-RE
* New blank type blank=as_needed for automatic handling of media type and state
2008.05.10.132543 [1758]
Makefile.am
configure.ac
README
libburn/libburn.h (burn_header_version_*)
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/wiki_plain.txt
cdrskin/cdrskin_eng.html
doc/comments
cdrskin/cdrskin.1
Made number transition to 0.4.7
10 May 2008 [1759]
- cdrskin/add_ts_changes_to_libburn_0_4_4
- cdrskin/add_ts_changes_to_libburn_0_4_5
+ cdrskin/add_ts_changes_to_libburn_0_4_6
+ cdrskin/add_ts_changes_to_libburn_0_4_7
Updated cdrskin tarball generator
10 May 2008 [1760]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - cdrskin-0.4.7 - 2008.05.10.132543
2008.05.14.165025 [1776]
libburn/write.c
Bug fix: random access addressing for DVD-RAM and BD-RE did not work
2008.05.14.165157 [1777]
libburn/libburn.h
Added format types 0x30 and 0x32 to list in API comments
2008.05.14.165258 [1778]
cdrskin/cdrskin.c
Made inability to get format list a reason to abort the program
------------------------------------ cycle - cdrskin-0.4.7 - 2008.05.14.165258
* Bug fix: random access addressing for DVD-RAM and BD-RE did not work
2008.05.17.080001 [1788]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
cdrskin/cdrskin.1
Made number transition to 0.4.8 and activated development documentation
17 May 2008 [1789]
- cdrskin/add_ts_changes_to_libburn_0_4_6
- cdrskin/add_ts_changes_to_libburn_0_4_7
+ cdrskin/add_ts_changes_to_libburn_0_4_8
+ cdrskin/add_ts_changes_to_libburn_0_4_9
Updated cdrskin tarball generator
17 May 2008 [1792]
cdrskin/changelog.txt
Documented changes and release timestamp
----------------------------- release - cdrskin-0.4.8.pl00 - 2008.05.17.080001
* Bug fix: random access addressing for DVD-RAM and BD-RE did not work
2008.05.17.115434 [1790]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
cdrskin/cdrskin.1
Made number transition to 0.4.9
17 May 2008 [1791]
- cdrskin/add_ts_changes_to_libburn_0_4_6
- cdrskin/add_ts_changes_to_libburn_0_4_7
+ cdrskin/add_ts_changes_to_libburn_0_4_8
+ cdrskin/add_ts_changes_to_libburn_0_4_9
Updated cdrskin tarball generator
17 May 2008 [1793]
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - cdrskin-0.4.9 - 2008.05.17.121250
14 Jun 2008 [1852]
README
Updated release history
2008.06.14.140711 [1853]
libburn/libburn.h
Inserted @since tags for all functions older than 0.2.0
2008.07.02.093933 [1882]
libburn/sg-linux.c
With auto device family: scd is now fallback if sr does not exist
------------------------------------ cycle - cdrskin-0.4.9 - 2008.07.12.164045
* Ability to use /dev/scd as fallback if /dev/sr does not exist
* Bug fix: option drive_scsi_dev_family=scd lead to buffer overflow
2008.07.14.112935 [1914]
libburn/sg-linux.c
libburn/libdax_msgs.h
Trying to avoid SORRY messages when hitting busy hard disk /dev/hdX
2008.07.14.113050 [1915]
cdrskin/cdrskin.c
Making visible the new NOTE and HINT about busy alleged hard disks
2008.07.14.113152 [1916]
configure.ac
Did LT_CURRENT++, LT_AGE++ because of new API call
2008.07.14.113903 [1917]
libburn/libburn.h
libburn/file.c
libburn/async.c
New API call burn_fifo_peek_data()
2008.07.14.164528 [1922]
libburn/sg-linux.c
Followed hint of Giulio Orsero to recognize disk by /proc/ide/hdX/media
------------------------------------ cycle - cdrskin-0.4.9 - 2008.07.14.164906
* New API call burn_fifo_peek_data()
2008.07.16.070001 [1927]
Makefile.am
configure.ac
README
libburn/libburn.h
cdrskin/cdrskin.c
cdrskin/README
cdrskin/compile_cdrskin.sh
cdrskin/cdrskin_timestamp.h
cdrskin/cdrskin_eng.html
Made number transition to 0.5.0 and activated development documentation
16 Jul 2008 [1928]
- cdrskin/add_ts_changes_to_libburn_0_4_8
- cdrskin/add_ts_changes_to_libburn_0_4_9
+ cdrskin/add_ts_changes_to_libburn_0_5_0
+ cdrskin/add_ts_changes_to_libburn_0_5_1
Updated cdrskin tarball generator
16 Jul 2008 []
cdrskin/changelog.txt
Documented changes and release timestamp
------------------------------------ cycle - cdrskin-0.5.0 - 2008.07.16.070001
* Ability to use /dev/scd as fallback if /dev/sr does not exist
* Bug fix: option drive_scsi_dev_family=scd lead to buffer overflow
* New API call burn_fifo_peek_data()
------------------------------------ cycle - cdrskin-0.5.1 -
------------------------------------ cycle - cdrskin-0.5.1 -
=============================================================================== ===============================================================================
TODO TODO
=============================================================================== ===============================================================================
@since tags
--------------------------------- bugs -------------------------------------
- Why are DVD+R tracks labeled "invisible" by dvd+rw-mediainfo ?
Why does the DVD drive only show the first session ?
READ TRACK INFORMATION[#5]:
Track State: invisible
Track Start Address: 954960*2KB
Free Blocks: 0*2KB
Track Size: 22784*2KB
ROM Compatibility LBA: 265696
------------------------------ end of bugs ---------------------------------
Overhaul libburn drive scan and single drive opening
Provide DVD+R DL layer break setter
Check all SORRY and FATAL errors whether they should become FAILUREs Check all SORRY and FATAL errors whether they should become FAILUREs
Refuse writing if track size exceeds free media space
problem with telltoc: double descriptor list from before load and after load problem with telltoc: double descriptor list from before load and after load
@ -5187,9 +5691,6 @@ cdrskin/README
Thin out Thin out
[]
open(,O_LARGEFILE) ?
[] []
Emulate -dummy on overwriteables ? Emulate -dummy on overwriteables ?
@ -5198,14 +5699,6 @@ Emulate -dummy on DVD+R ?
------------------------------------ cycle - cdrskin-0.3.9 -
cdrskin/changelog.txt
Next cdrskin-0.3.9 cycle
What about minimum track sizes ? (POWER OFF/ON , BUS RESET ?) What about minimum track sizes ? (POWER OFF/ON , BUS RESET ?)
@ -5213,14 +5706,6 @@ After cooking: review of -do_diet ?
growisofs.c : _LINUX_CAPABILITY_VERSION CAP_SYS_RAWIO SYS_capset ? growisofs.c : _LINUX_CAPABILITY_VERSION CAP_SYS_RAWIO SYS_capset ?
Questions to post:
A70211_to_cdwrite_growisofs_question_finalizing
Format DVD-RAM ?
Disable error checking with DVD-RAM.
Rectify mmc_read_atip speed interpretation. 12x media are reported as 10x. I never heard of 6x media. Rectify mmc_read_atip speed interpretation. 12x media are reported as 10x. I never heard of 6x media.

View File

@ -1,13 +1,13 @@
#!/bin/sh #!/bin/sh
# compile_cdrskin.sh # compile_cdrskin.sh
# Copyright 2005 - 2008 Thomas Schmitt, scdbackup@gmx.net, GPL # Copyright 2005 - 2008 Thomas Schmitt, scdbackup@gmx.net, GPL version 2
# to be executed within ./libburn-* resp ./cdrskin-* # to be executed within ./libburn-* resp ./cdrskin-*
debug_opts="-O2" debug_opts="-O2"
def_opts= def_opts=
largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1" largefile_opts="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1"
libvers="-DCdrskin_libburn_0_4_3" libvers="-DCdrskin_libburn_0_5_0"
cleanup_src_or_obj="libburn/cleanup.o" cleanup_src_or_obj="libburn/cleanup.o"
libdax_msgs_o="libburn/libdax_msgs.o" libdax_msgs_o="libburn/libdax_msgs.o"
libdax_audioxtr_o="libburn/libdax_audioxtr.o" libdax_audioxtr_o="libburn/libdax_audioxtr.o"
@ -33,15 +33,15 @@ do
libdax_audioxtr_o= libdax_audioxtr_o=
libdax_msgs_o="libburn/message.o" libdax_msgs_o="libburn/message.o"
cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c" cleanup_src_or_obj="-DCleanup_has_no_libburn_os_H cdrskin/cleanup.c"
elif test "$i" = "-libburn_0_4_2" elif test "$i" = "-libburn_0_5_0"
then then
libvers="-DCdrskin_libburn_0_4_2" libvers="-DCdrskin_libburn_0_5_0"
libdax_audioxtr_o="libburn/libdax_audioxtr.o" libdax_audioxtr_o="libburn/libdax_audioxtr.o"
libdax_msgs_o="libburn/libdax_msgs.o" libdax_msgs_o="libburn/libdax_msgs.o"
cleanup_src_or_obj="libburn/cleanup.o" cleanup_src_or_obj="libburn/cleanup.o"
elif test "$i" = "-libburn_svn" elif test "$i" = "-libburn_svn"
then then
libvers="-DCdrskin_libburn_0_4_3" libvers="-DCdrskin_libburn_0_5_1"
libdax_audioxtr_o="libburn/libdax_audioxtr.o" libdax_audioxtr_o="libburn/libdax_audioxtr.o"
libdax_msgs_o="libburn/libdax_msgs.o" libdax_msgs_o="libburn/libdax_msgs.o"
cleanup_src_or_obj="libburn/cleanup.o" cleanup_src_or_obj="libburn/cleanup.o"
@ -76,7 +76,7 @@ do
echo " -compile_cdrfifo compile program cdrskin/cdrfifo." echo " -compile_cdrfifo compile program cdrskin/cdrfifo."
echo " -compile_dewav compile program test/dewav without libburn." echo " -compile_dewav compile program test/dewav without libburn."
echo " -cvs_A60220 set macro to match libburn-CVS of 20 Feb 2006." echo " -cvs_A60220 set macro to match libburn-CVS of 20 Feb 2006."
echo " -libburn_0_4_2 set macro to match libburn-0.4.2." echo " -libburn_0_5_0 set macro to match libburn-0.5.0"
echo " -libburn_svn set macro to match current libburn-SVN." echo " -libburn_svn set macro to match current libburn-SVN."
echo " -no_largefile do not use 64 bit off_t (must match libburn)." echo " -no_largefile do not use 64 bit off_t (must match libburn)."
echo " -do_not_compile_cdrskin omit compilation of cdrskin/cdrskin." echo " -do_not_compile_cdrskin omit compilation of cdrskin/cdrskin."

View File

@ -8,9 +8,9 @@
Its paragon, cdrecord, is a powerful GPL'ed burn program included in Joerg 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 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. traditionally provided by cdrecord. Currently it does CD-R and CD-RW this way.
Overwriteable media DVD-RAM, DVD+RW and DVD-RW are handled differently than Overwriteable media DVD-RAM, DVD+RW, DVD-RW, and BD-RE are handled differently
with cdrecord-ProDVD in order to offer TAO-like single track recording. than with cdrecord-ProDVD in order to offer TAO-like single track recording.
Sequential DVD-R[W] and DVD+R[/DL] are handled like CD-R[W] with TAO and Sequential DVD-R[W], DVD+R, DVD+R DL are handled like CD-R[W] with TAO and
multi-session. Additionally cdrskin offers cdrecord-ProDVD-like mode DAO multi-session. Additionally cdrskin offers cdrecord-ProDVD-like mode DAO
with DVD-R[W]. with DVD-R[W].
@ -23,7 +23,7 @@ About libburn API for burning CD and DVD: http://api.libburnia-project.org
-------------------------------------------------------------------------- --------------------------------------------------------------------------
For dual layer DVD types see the advice to use dvd+rw-tools at For yet unsupported media types see the advice to use dvd+rw-tools at
the end of this text. the end of this text.
-------------------------------------------------------------------------- --------------------------------------------------------------------------
@ -81,6 +81,19 @@ 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 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 to the MMC standard but also does the same with regular files or block
devices other than optical drives. devices other than optical drives.
@ -115,7 +128,7 @@ All files used as pseudo-drives have to offer rw-permission.
-------------------------------------------------------------------------- --------------------------------------------------------------------------
The DVD capabilities of cdrskin differ from those of cdrecord-ProDVD. cdrskin 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 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 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. probably the same as the traditional cdrecord-ProDVD write mode.
@ -126,9 +139,9 @@ disc from its initial profile "Sequential Recording" into profile state
cdrskin dev=/dev/sr0 -v blank=format_overwrite cdrskin dev=/dev/sr0 -v blank=format_overwrite
}}} }}}
DVD-RAM, DVD+RW and overwriteable DVD-RW appear to cdrskin as blank media DVD-RAM, DVD+RW, BD-RE and overwriteable DVD-RW appear to cdrskin as blank
which are capable of taking only a single track. This track may be positioned media which are capable of taking only a single track. This track may be
on a 32KiB aligned address, though. positioned on a 32KiB aligned address, though.
{{{ {{{
cdrskin ... write_start_address=2412m ... cdrskin ... write_start_address=2412m ...
}}} }}}
@ -151,7 +164,7 @@ 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.) multi-session. (The default behavior of cdrskin deems me to be preferrable.)
Option --grow_overwriteable_iso gives cdrskin ISO pseudo-multi-session Option --grow_overwriteable_iso gives cdrskin ISO pseudo-multi-session
capabilities on DVD-RAM and DVD+RW similar to growisofs. capabilities on DVD-RAM, DVD+RW, BD-RE similar to growisofs.
Associated options blank=, -multi, -msinfo and -toc are available in this case. 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 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. media with a single session and track on it. blank= invalidates ISO images.
@ -268,8 +281,8 @@ for an illustrated example with K3b 0.10 .
DVD advise: DVD advise:
For burning of DVD media other than DVD-RAM, DVD+RW, DVD+R, DVD+R/DL, For burning of DVD/BD media other than DVD-RAM, DVD+RW, DVD+R, DVD+R DL,
DVD-RW, DVD-R, the cdrskin project currently advises to use 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 Andy Polyakov's dvd+rw-tools which despite their historic name are
capable of all the media above and more, including BD discs. capable of all the media above and more, including BD discs.
@ -279,21 +292,27 @@ They are not compatible or related to cdrecord resp. cdrecord-ProDVD
(now obsoleted by original source cdrtools cdrecord with identical (now obsoleted by original source cdrtools cdrecord with identical
capabilities besides the license key). capabilities besides the license key).
--------------------------------------------------------------------------
Advanced multi-session use cases:
A special feature of dvd+rw-tools is growing of ISO-9660 filesystems on 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 overwriteable media. This is not the same as multi-session writing of cdrskin
with CD media, but retrieves additional information from the existing ISO with CD media, but retrieves additional information from the existing ISO
image and finally manipulates the start sectors of this existing image. image and finally manipulates the start sectors of this existing image.
So, inspired by growisofs, cdrskin can offer DVD multi-session not only with 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 and sequential DVD-R[W] and with DVD+R [DL], but also with DVD-RAM, DVD+RW, BD-RE
even regular disk files or block devices other than CD/DVD writers. and even regular disk files or block devices other than CD/DVD writers.
This is enabled by option --grow_overwriteable_iso. This is enabled by option --grow_overwriteable_iso.
We have recently released an integrated ISO-9660 multi-session tool The libburnia project provides an integrated ISO-9660 multi-session tool
named [wiki:Xorriso xorriso] which tries to go one step beyond named [wiki:Xorriso xorriso] which tries to go one step beyond
growisofs. It uses [wiki:Libisoburn libisoburn] and the new version growisofs. It uses [wiki:Libburn libburn] , [wiki:Libisofs libisofs]
of [wiki:Libisofs libisofs]. and [wiki:Libisoburn libisoburn].
See [http://scdbackup.sourceforge.net/man_1_xorriso.html man xorriso].
-------------------------------------------------------------------------- --------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
AC_INIT([libburn], [0.4.3], [http://libburnia-project.org]) AC_INIT([libburn], [0.5.0], [http://libburnia-project.org])
AC_PREREQ([2.50]) AC_PREREQ([2.50])
dnl AC_CONFIG_HEADER([config.h]) dnl AC_CONFIG_HEADER([config.h])
@ -59,6 +59,10 @@ dnl source code changes.
dnl dnl
dnl Neatly versioned stable releases meanwhile: dnl Neatly versioned stable releases meanwhile:
dnl 0.4.2 = libburn.so.4.7.0 dnl 0.4.2 = libburn.so.4.7.0
dnl 0.4.4 = libburn.so.4.9.0
dnl 0.4.6 = libburn.so.4.11.0
dnl 0.4.8 = libburn.so.4.13.0
dnl 0.5.0 = libburn.so.4.15.0
dnl dnl
dnl So LT_CURRENT, LT_REVISION and LT_AGE get set directly here. dnl So LT_CURRENT, LT_REVISION and LT_AGE get set directly here.
dnl SONAME of the emerging library is LT_CURRENT - LT_AGE. dnl SONAME of the emerging library is LT_CURRENT - LT_AGE.
@ -83,8 +87,8 @@ dnl If BURN_*_VERSION changes, be sure to change AC_INIT above to match.
dnl dnl
dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_* dnl As said: Only copies. Original in libburn/libburn.h : burn_header_version_*
BURN_MAJOR_VERSION=0 BURN_MAJOR_VERSION=0
BURN_MINOR_VERSION=4 BURN_MINOR_VERSION=5
BURN_MICRO_VERSION=3 BURN_MICRO_VERSION=0
BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION BURN_VERSION=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
AC_SUBST(BURN_MAJOR_VERSION) AC_SUBST(BURN_MAJOR_VERSION)
@ -95,14 +99,16 @@ AC_SUBST(BURN_VERSION)
dnl Libtool versioning dnl Libtool versioning
LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION LT_RELEASE=$BURN_MAJOR_VERSION.$BURN_MINOR_VERSION.$BURN_MICRO_VERSION
dnl dnl
dnl ts A80127 dnl ts A80717
dnl This is the development version after libburn-0.4.2 = libburn.so.4.7.0 dnl This is the release version libburn-0.5.0 = libburn.so.4.15.0
dnl LT_CURRENT++, LT_AGE++ has happened meanwhile. dnl ### This is the development version after above release version
dnl LT_CURRENT++, LT_AGE++ has not yet happened.
dnl ### LT_CURRENT++, LT_AGE++ has happened meanwhile.
dnl dnl
dnl SONAME = 12 - 8 = 4 . Library name = libburn.so.4.8.0 dnl SONAME = 19 - 15 = 4 . Library name = libburn.so.4.15.0
LT_CURRENT=12 LT_CURRENT=19
LT_AGE=15
LT_REVISION=0 LT_REVISION=0
LT_AGE=8
LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE` LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
AC_SUBST(LT_RELEASE) AC_SUBST(LT_RELEASE)

View File

@ -7,10 +7,12 @@
Libburnia is an open-source project for reading, mastering and writing Libburnia is an open-source project for reading, mastering and writing
optical discs. optical discs.
For now this means CD-R, CD-RW, DVD-RAM, DVD+RW, DVD+R, DVD-RW, DVD-R. For now this means CD-R, CD-RW, DVD-RAM, DVD+RW, DVD+R, DVD+R/DL, DVD-RW,
DVD-R, BD-RE.
Not supported yet are dual layer media, HD-DVD, BD (blue ray). Testers for Not supported yet are DVD-R/DL, HD-DVD, BD-R (blue ray). Testers for
dual layer DVD+/-R are wanted, though. DVD-R/DL are wanted, though. BD-R programming efforts would be made
if an interested tester contacts us.
The project comprises of several more or less interdependent parts which The project comprises of several more or less interdependent parts which
together strive to be a usable foundation for application development. together strive to be a usable foundation for application development.
@ -57,8 +59,8 @@ composition, updating and writing. Quite unique in the Linux world.
cdrecord is a powerful GPL'ed burn program included in Joerg cdrecord is a powerful GPL'ed burn program included in Joerg
Schilling's cdrtools. cdrskin strives to be a second source for Schilling's cdrtools. cdrskin strives to be a second source for
the services traditionally provided by cdrecord. Additionally it the services traditionally provided by cdrecord. Additionally it
provides libburn's DVD capabilities, where only -sao is compatible provides libburn's DVD/BD capabilities, where only -sao is
with cdrecord. compatible with cdrecord.
cdrskin does not contain any bytes copied from cdrecord's sources. cdrskin does not contain any bytes copied from cdrecord's sources.
Many bytes have been copied from the message output of cdrecord Many bytes have been copied from the message output of cdrecord
runs, though. runs, though.
@ -68,8 +70,8 @@ composition, updating and writing. Quite unique in the Linux world.
manipulates and writes ISO 9660 filesystem images with manipulates and writes ISO 9660 filesystem images with
Rock Ridge extensions. Manipulation is not only adding or Rock Ridge extensions. Manipulation is not only adding or
overwriting of files but also deletion, renaming, and attribute overwriting of files but also deletion, renaming, and attribute
changing. changing. An incremental backup feature is provided.
See libisoburn/README for more See xorriso/README for more
- "test" is a collection of application gestures and examples given by the - "test" is a collection of application gestures and examples given by the
authors of the library features. The burn API example of libburn authors of the library features. The burn API example of libburn

View File

@ -1,11 +1,11 @@
libburnia-project.org Optical Media Rotisserie Recipes as of August 2007 libburnia-project.org Optical Media Rotisserie Recipes as of April 2008
Content: Content:
- TAO Multi-Session CD Cookbook (CD-R, CD-RW) - TAO Multi-Session CD Cookbook (CD-R, CD-RW)
- SAO CD Cookbook (CD-R, CD-RW, pure audio or pure data only) - SAO CD Cookbook (CD-R, CD-RW, pure audio or pure data only)
- Overwriteable DVD Cookbook (DVD-RAM, DVD+RW, DVD-RW) - Overwriteable DVD Cookbook (DVD-RAM, DVD+RW, DVD-RW, BD-RE)
- Sequential DVD-R[W] Cookbook - Sequential DVD-R[W] Cookbook
- DVD+R Cookbook - DVD+R[/DL] Cookbook
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
TAO Multi-Session CD Cookbook TAO Multi-Session CD Cookbook
@ -403,7 +403,8 @@ correctness of Pre-gap and Post-gap would become evident.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Inspired by Andy Polyakov's http://fy.chalmers.se/~appro/linux/DVD+RW/tools , Inspired by Andy Polyakov's http://fy.chalmers.se/~appro/linux/DVD+RW/tools ,
backed by reading mmc5r03c.pdf from http://www.t10.org/ftp/t10/drafts/mmc5/ backed by reading mmc5r03c.pdf from http://www.t10.org/ftp/t10/drafts/mmc5/
and by experiments with drives NEC ND-4570A and LG GSA-4082B. by own experiments with drives NEC ND-4570A, LG GSA-4082B, PHILIPS SPD3300L,
and by BD-RE experiments done by Giulio Orsero on LG BE06LU10.
For libburnia-project.org by Thomas Schmitt <scdbackup@gmx.net> For libburnia-project.org by Thomas Schmitt <scdbackup@gmx.net>
@ -416,18 +417,20 @@ DVD-RAM 0012h
DVD-RW Restricted Overwrite 0013h DVD-RW Restricted Overwrite 0013h
DVD-RW Sequential Recording 0014h (i.e. unformatted) DVD-RW Sequential Recording 0014h (i.e. unformatted)
DVD+RW 001Ah DVD+RW 001Ah
BD-RE 0043h
A short compilation of the write model: A short compilation of the write model:
- Overwriting in general - Overwriting in general
The recipes described here are depending on formatting state: The recipes described here are depending on formatting state:
- DVD-RAM, fully formatted DVD+RW or DVD-RW - DVD-RAM, fully formatted DVD+RW, DVD-RW, BD-RE
- Unformatted DVD+RW - Unformatted DVD+RW
- Partly formatted DVD+RW - Partly formatted DVD+RW
- Unformatted DVD-RW - Unformatted DVD-RW
- Partly formatted DVD-RW - Partly formatted DVD-RW
- Intermediate state DVD-RW - Intermediate state DVD-RW
- DVD-RAM and BD-RE formatting
- DVD-RAM and BD-RE speed tuning
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Overwriting in general : Overwriting in general :
@ -444,7 +447,7 @@ Optimal performance is promised without any speed setting. But my experiments
showed that SET STREAMING values persist after media change. showed that SET STREAMING values persist after media change.
In the formatted area of the media, coarse random access is possible. In the formatted area of the media, coarse random access is possible.
For DVD-RAM and DVD+RW write addresses and data size need to be aligned For DVD-RAM, DVD+RW, BD-RE write addresses and data size need to be aligned
to 2 KiB. For DVD-RW alignment has to be 32 KiB. Within these limitations to 2 KiB. For DVD-RW alignment has to be 32 KiB. Within these limitations
the write address is at the discretion of the sending program. the write address is at the discretion of the sending program.
Just use 2Ah WRITE to send data. Just use 2Ah WRITE to send data.
@ -483,10 +486,13 @@ software did anything wrong.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
DVD-RAM, fully formatted DVD+RW or DVD-RW : DVD-RAM, fully formatted DVD+RW, DVD-RW, BD-RE :
Full format is the natural state of DVD-RAM. Full format is the natural state of DVD-RAM.
BD-RE are sold unformatted and need to be fully formatted first.
See paragraph about DVD-RAM and BD-RE formatting below.
DVD+RW reaches this state if Background Formatting is allowed to finish without DVD+RW reaches this state if Background Formatting is allowed to finish without
being stopped by 5Bh CLOSE TRACK SESSION. being stopped by 5Bh CLOSE TRACK SESSION.
(mmc5r03c.pdf, 6.5 FORMAT UNIT, 6.5.4.2.14 Format Type = 26h) (mmc5r03c.pdf, 6.5 FORMAT UNIT, 6.5.4.2.14 Format Type = 26h)
@ -671,6 +677,91 @@ of Intermediate state by 5Bh CLOSE TRACK SESSION with Close Function 010b.
(mmc5r03c.pdf 6.3.3.2.3) (mmc5r03c.pdf 6.3.3.2.3)
-------------------------------------------------------------------------------
DVD-RAM and BD-RE formatting :
Although DVD-RAM usually are sold formatted, there may still arise the wish
to adjust formatting.
BD-RE are sold unformatted and need to be formatted prior to usage.
Two format types are relevant for DVD-RAM : 00h and 01h.
00h offers the default size format and usually a maximum payload size format.
Even with that maximum size payload there is hardware defect management.
(mmc5r03c.pdf 6.5.4.2.1.2)
01h allows to convert payload capacity into spare blocks for defect
managment. There is no way to increase payload capacity by format 01h.
(mmc5r03c.pdf 6.5.4.2.2.1)
With BD-RE there are three format types : 00h, 30h and 31h.
00h offers the default size format.
30h offers several sizes with defect management. Usually there are three
size to choose: #1: default size, #2: maximum spare area, #3: minimal spare.
31h offers a single size and disables defect management. This has the side
effect to speed up writing to nominal speed.
(mmc5r03c.pdf 6.5.4.2.15, 6.24.3.3, Table 472)
Only format sizes from the list of format descriptors are permissible
for DVD-RAM. The format list can be obtained by 23h READ FORMAT CAPACITIES.
It also includes a description of the current formatting state.
(mmc5r03c.pdf 6.24, 6.24.3.2, 6.24.3.3)
Formatting is done by command 04h FORMAT UNIT. Its data payload consists
of a Format List Header and a Format Descriptor. It is advisable to set
the Immed bit and the FOV bit in header byte number 1. The descriptor should
be a copy of a descriptor from 23h READ FORMAT CAPACITIES.
(mmc5r03c.pdf 6.5, 6.5.3.2, 6.5.3.3)
With nearly all formats Sub-type should be set to 0. But with BD-RE formats
30h and 31h the Sub-type selects the certification mode.
Usable with 30h seem 10b Full Certification and 11b Quick Certification.
Usable with 31h seem also 00b Quick Reformat and 01b No Certification.
(mmc5r03c.pdf 6.5.4.2.15.1)
Other format types have their certification intensity controlled by
a pair of bits: CmpList and DCRT.
CmpList resides in CDB byte 1 as bit 3. DCRT resides in the payload byte 1
as bit 5. Both together should request a quick size change without lengthy
certification but maintaining the list of known defects.
(mmc5r03c.pdf 6.5, table 249, 6.5.3.2)
With DVD-RAM on my PHILIPS SPD3300L drive they prevent any format size
change though. The TSSTcorp SH-S203B works properly.
With BD-RE format 00h, the default is specified to be Quick Reformat,
and with 00h in general certification can only be disabled not enabled.
(mmc5r03c.pdf 6.5.4.2.1.7)
-------------------------------------------------------------------------------
DVD-RAM and BD-RE tuning :
A special aspect of DVD-RAM and BD-RE is their low speed with write operations,
which usually is only half than the nominal speed of media and drive.
This is blamed to the automatic checkreading which happens ifor managing
eventual defects.
Defect management of BD-RE can be disabled by format type 31h. See above.
There is no drive known yet which would apply command 2Ah WRITE10 to DVD-RAM
with full speed.
The only known way to get full speed from DVD-RAM or BD-RE with enabled defect
management is the use of AAh WRITE12 with Streaming Bit set to 1.
(mmc5r03c.pdf 6.45)
With some DVD-RAM drives this fails if a write buffer is not full 32 kB.
With the tested BD-RE ione has to write write full 64 kB buffers.
Although it seems not optimal, this is specified not only to disable the
cumbersome checkread but also to ignore known defects and to write data
to these defective addresses.
(mmc5r03c.pdf 4.8.5)
So the speed-up is only advisable as long as the media are free of
incorrectable errors.
Caveat:
MMC-5 does not guarantee AAh WRITE12 to work on DVD-RAM or BD-RE at all.
None of the features of profiles 0012h and 0043 promises the existence of
AAh WRITE12.
Nevertheless it worked on all tested drives is proper alignment was observed.
(mmc5r03c.pdf 5.4.13, 6.45)
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
@ -990,7 +1081,7 @@ close session if multi-session is demanded.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
DVD+R Cookbook DVD+R[/DL] Cookbook
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Inspired by reading mmc5r03c.pdf from http://www.t10.org/ftp/t10/drafts/mmc5/ Inspired by reading mmc5r03c.pdf from http://www.t10.org/ftp/t10/drafts/mmc5/
backed by Andy Polyakov's http://fy.chalmers.se/~appro/linux/DVD+RW/tools , backed by Andy Polyakov's http://fy.chalmers.se/~appro/linux/DVD+RW/tools ,
@ -1006,7 +1097,7 @@ DVD+R/DL 002bh
- About empty, appendable and finalized DVD+R - About empty, appendable and finalized DVD+R
- Writing a Pseudo Session to DVD+R - Writing a Pseudo Session to DVD+R
- >>> Hearsay about DVD+R/DL (Dual Layer) : - DVD+R/DL (Dual Layer
The following two chapters of the Sequential DVD-R[W] Cookbook are valid for The following two chapters of the Sequential DVD-R[W] Cookbook are valid for
DVD+R media too: DVD+R media too:
@ -1100,9 +1191,11 @@ by closing them already after the first session.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Hearsay about DVD+R/DL (Dual Layer) : DVD+R/DL (Dual Layer) :
>>> libburn treats DL media just like their single layer equivalents.
This seems to work fine for DVD+R/DL, according to a report by nightmorph
in http://libburnia-project.org/ticket/13 .
------------------------------------------------------------------------------- -------------------------------------------------------------------------------

View File

@ -43,7 +43,15 @@
#include "libdax_msgs.h" #include "libdax_msgs.h"
extern struct libdax_msgs *libdax_messenger; extern struct libdax_msgs *libdax_messenger;
#define SCAN_GOING() (workers && !workers->drive) /* ts A80714 : introduced type codes for the worker list */
#define Burnworker_type_scaN 0
#define Burnworker_type_erasE 1
#define Burnworker_type_formaT 2
#define Burnworker_type_writE 3
#define Burnworker_type_fifO 4
#define SCAN_GOING() (workers != NULL && \
workers->w_type == Burnworker_type_scaN)
typedef void *(*WorkerFunc) (void *); typedef void *(*WorkerFunc) (void *);
@ -85,6 +93,9 @@ struct fifo_opts
struct w_list struct w_list
{ {
/* ts A80714 */
int w_type; /* see above define Burnworker_type_* */
struct burn_drive *drive; struct burn_drive *drive;
pthread_t thread; pthread_t thread;
@ -113,7 +124,8 @@ static struct w_list *find_worker(struct burn_drive *d)
return NULL; return NULL;
} }
static void add_worker(struct burn_drive *d, WorkerFunc f, void *data) static void add_worker(int w_type, struct burn_drive *d,
WorkerFunc f, void *data)
{ {
struct w_list *a; struct w_list *a;
struct w_list *tmp; struct w_list *tmp;
@ -124,6 +136,7 @@ static void add_worker(struct burn_drive *d, WorkerFunc f, void *data)
#endif #endif
a = malloc(sizeof(struct w_list)); a = malloc(sizeof(struct w_list));
a->w_type = w_type;
a->drive = d; a->drive = d;
a->u = *(union w_list_data *)data; a->u = *(union w_list_data *)data;
@ -259,7 +272,8 @@ drive_is_active:;
o.drives = drives; o.drives = drives;
o.n_drives = n_drives; o.n_drives = n_drives;
o.done = 0; o.done = 0;
add_worker(NULL, (WorkerFunc) scan_worker_func, &o); add_worker(Burnworker_type_scaN, NULL,
(WorkerFunc) scan_worker_func, &o);
} else if (workers->u.scan.done) { } else if (workers->u.scan.done) {
/* its done */ /* its done */
ret = workers->u.scan.done; ret = workers->u.scan.done;
@ -303,7 +317,7 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
"NULL pointer caught in burn_disc_erase", 0, 0); "NULL pointer caught in burn_disc_erase", 0, 0);
return; return;
} }
if ((SCAN_GOING()) || find_worker(drive)) { if ((SCAN_GOING()) || find_worker(drive) != NULL) {
libdax_msgs_submit(libdax_messenger, drive->global_index, libdax_msgs_submit(libdax_messenger, drive->global_index,
0x00020102, 0x00020102,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
@ -343,7 +357,8 @@ void burn_disc_erase(struct burn_drive *drive, int fast)
o.drive = drive; o.drive = drive;
o.fast = fast; o.fast = fast;
add_worker(drive, (WorkerFunc) erase_worker_func, &o); add_worker(Burnworker_type_erasE, drive,
(WorkerFunc) erase_worker_func, &o);
} }
@ -364,7 +379,7 @@ void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
int ok = 0; int ok = 0;
char msg[160]; char msg[160];
if ((SCAN_GOING()) || find_worker(drive)) { if ((SCAN_GOING()) || find_worker(drive) != NULL) {
libdax_msgs_submit(libdax_messenger, drive->global_index, libdax_msgs_submit(libdax_messenger, drive->global_index,
0x00020102, 0x00020102,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
@ -392,6 +407,10 @@ void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
size = 0; size = 0;
flag &= ~(2|8); /* no insisting in size 0, no expansion */ flag &= ~(2|8); /* no insisting in size 0, no expansion */
flag |= 4; /* format up to maximum size */ flag |= 4; /* format up to maximum size */
} else if (drive->current_profile == 0x12) {
ok = 1; /* DVD-RAM */
} else if (drive->current_profile == 0x43) {
ok = 1; /* BD-RE */
} }
if (!ok) { if (!ok) {
@ -407,7 +426,8 @@ void burn_disc_format(struct burn_drive *drive, off_t size, int flag)
o.drive = drive; o.drive = drive;
o.size = size; o.size = size;
o.flag = flag; o.flag = flag;
add_worker(drive, (WorkerFunc) format_worker_func, &o); add_worker(Burnworker_type_formaT, drive,
(WorkerFunc) format_worker_func, &o);
} }
@ -437,7 +457,7 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
/* ts A61006 */ /* ts A61006 */
/* a ssert(!SCAN_GOING()); */ /* a ssert(!SCAN_GOING()); */
/* a ssert(!find_worker(opts->drive)); */ /* a ssert(!find_worker(opts->drive)); */
if ((SCAN_GOING()) || find_worker(opts->drive)) { if ((SCAN_GOING()) || find_worker(opts->drive) != NULL) {
libdax_msgs_submit(libdax_messenger, opts->drive->global_index, libdax_msgs_submit(libdax_messenger, opts->drive->global_index,
0x00020102, 0x00020102,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
@ -491,7 +511,8 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc)
opts->refcount++; opts->refcount++;
add_worker(opts->drive, (WorkerFunc) write_disc_worker_func, &o); add_worker(Burnworker_type_writE, opts->drive,
(WorkerFunc) write_disc_worker_func, &o);
} }
@ -519,7 +540,8 @@ int burn_fifo_start(struct burn_source *source, int flag)
o.source = source; o.source = source;
o.flag = flag; o.flag = flag;
add_worker(NULL, (WorkerFunc) fifo_worker_func, &o); add_worker(Burnworker_type_fifO, NULL,
(WorkerFunc) fifo_worker_func, &o);
fs->is_started = 1; fs->is_started = 1;
return 1; return 1;
} }

View File

@ -46,6 +46,9 @@ extern struct libdax_msgs *libdax_messenger;
static struct burn_drive drive_array[255]; static struct burn_drive drive_array[255];
static int drivetop = -1; static int drivetop = -1;
/* ts A80410 : in init.c */
extern int burn_support_untested_profiles;
/* ts A61021 : the unspecific part of sg.c:enumerate_common() /* ts A61021 : the unspecific part of sg.c:enumerate_common()
*/ */
int burn_setup_drive(struct burn_drive *d, char *fname) int burn_setup_drive(struct burn_drive *d, char *fname)
@ -58,6 +61,7 @@ int burn_setup_drive(struct burn_drive *d, char *fname)
d->released = 1; d->released = 1;
d->stdio_fd = -1; d->stdio_fd = -1;
d->status = BURN_DISC_UNREADY; d->status = BURN_DISC_UNREADY;
d->do_stream_recording = 0;
return 1; return 1;
} }
@ -588,7 +592,7 @@ void burn_disc_erase_sync(struct burn_drive *d, int fast)
/* /*
@param flag: bit0 = fill formatted size with zeros @param flag: bit0 = fill formatted size with zeros
bit1, bit2 , bit4, bit7 - bit15 are for d->format_unit() bit1, bit2 , bit4, bit5, bit7 - bit15 are for d->format_unit()
*/ */
void burn_disc_format_sync(struct burn_drive *d, off_t size, int flag) void burn_disc_format_sync(struct burn_drive *d, off_t size, int flag)
{ {
@ -611,7 +615,7 @@ void burn_disc_format_sync(struct burn_drive *d, off_t size, int flag)
d->cancel = 0; d->cancel = 0;
d->busy = BURN_DRIVE_FORMATTING; d->busy = BURN_DRIVE_FORMATTING;
ret = d->format_unit(d, size, flag & 0xff96); /* forward bits */ ret = d->format_unit(d, size, flag & 0xfff6); /* forward bits */
if (ret <= 0) if (ret <= 0)
d->cancel = 1; d->cancel = 1;
@ -1256,7 +1260,7 @@ int burn_drive_grab_dummy(struct burn_drive_info *drive_infos[], char *fname)
d->current_is_supported_profile = 1; d->current_is_supported_profile = 1;
d->block_types[BURN_WRITE_TAO] = BURN_BLOCK_MODE1; d->block_types[BURN_WRITE_TAO] = BURN_BLOCK_MODE1;
d->block_types[BURN_WRITE_SAO] = BURN_BLOCK_SAO; d->block_types[BURN_WRITE_SAO] = BURN_BLOCK_SAO;
d->media_capacity_remaining = size; burn_drive_set_media_capacity_remaining(d, size);
/* >>> ? open file for a test ? (>>> beware of "-" = stdin) */; /* >>> ? open file for a test ? (>>> beware of "-" = stdin) */;
@ -1868,8 +1872,8 @@ off_t burn_disc_available_space(struct burn_drive *d,
return 0; return 0;
if (d->drive_role != 1) { if (d->drive_role != 1) {
if (d->media_capacity_remaining <= 0) if (d->media_capacity_remaining <= 0)
d->media_capacity_remaining = burn_drive_set_media_capacity_remaining(d,
((off_t) (512 * 1024 * 1024 - 1) * (off_t) 2048); (off_t) (512 * 1024 * 1024 - 1) * (off_t) 2048);
} else { } else {
if (o != NULL) if (o != NULL)
d->send_write_parameters(d, o); d->send_write_parameters(d, o);
@ -2101,7 +2105,7 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
o->start_adr = 1; o->start_adr = 1;
size = d->media_capacity_remaining; size = d->media_capacity_remaining;
burn_os_stdio_capacity(d->devname, &size); burn_os_stdio_capacity(d->devname, &size);
d->media_capacity_remaining = size; burn_drive_set_media_capacity_remaining(d, size);
o->start_range_high = size; o->start_range_high = size;
o->start_alignment = 2048; /* imposting a drive, not a file */ o->start_alignment = 2048; /* imposting a drive, not a file */
o->might_do_sao = 4; o->might_do_sao = 4;
@ -2166,9 +2170,12 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
if (wt == BURN_WRITE_NONE || wt == BURN_WRITE_SAO || if (wt == BURN_WRITE_NONE || wt == BURN_WRITE_SAO ||
wt == BURN_WRITE_TAO) wt == BURN_WRITE_TAO)
o->might_simulate = 1; o->might_simulate = 1;
} else if (d->current_profile == 0x12 || d->current_profile == 0x13 || } else if (d->current_profile == 0x12 ||
d->current_profile == 0x1a) { d->current_profile == 0x13 ||
/* DVD-RAM, overwriteable DVD-RW, DVD+RW */ d->current_profile == 0x1a ||
d->current_profile == 0x43
) {
/* DVD-RAM, overwriteable DVD-RW, DVD+RW, BD-RE */
o->start_adr = 1; o->start_adr = 1;
ret = burn_disc_get_formats(d, &status, &size, &dummy, ret = burn_disc_get_formats(d, &status, &size, &dummy,
&num_formats); &num_formats);
@ -2187,6 +2194,8 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
} }
if (i >= num_formats) /* not expandable */ if (i >= num_formats) /* not expandable */
o->start_range_high -= 32 * 1024; o->start_range_high -= 32 * 1024;
if (o->start_range_high < 0)
o->start_range_high = 0;
} else { } else {
o->start_alignment = 2 * 1024; o->start_alignment = 2 * 1024;
if (d->best_format_size - 2048 > if (d->best_format_size - 2048 >
@ -2450,3 +2459,11 @@ int burn_drive_find_by_thread_pid(struct burn_drive **d, pid_t pid)
} }
/* ts A80422 : centralizing this setting for debugging purposes
*/
int burn_drive_set_media_capacity_remaining(struct burn_drive *d, off_t value)
{
d->media_capacity_remaining = value;
return 1;
}

View File

@ -540,3 +540,64 @@ int burn_fifo_inquire_status(struct burn_source *source,
return ret; return ret;
} }
int burn_fifo_peek_data(struct burn_source *source, char *buf, int bufsize,
int flag)
{
int size, free_bytes, ret, wait_count= 0;
char *status_text;
struct burn_source_fifo *fs = source->data;
/* Eventually start fifo thread by reading 0 bytes */
ret = fifo_read(source, (unsigned char *) NULL, 0);
if (ret<0)
return 0;
/* wait for at least bufsize bytes being ready */
while (1) {
ret= burn_fifo_inquire_status(source,
&size, &free_bytes, &status_text);
if (size < bufsize) {
libdax_msgs_submit(libdax_messenger, -1, 0x0002015c,
LIBDAX_MSGS_SEV_FAILURE, LIBDAX_MSGS_PRIO_HIGH,
"Fifo size is smaller than desired peek buffer", 0, 0);
return -1;
}
if (fs->out_counter > 0 || (ret & 4) || fs->buf == NULL) {
libdax_msgs_submit(libdax_messenger, -1, 0x0002015e,
LIBDAX_MSGS_SEV_FATAL, LIBDAX_MSGS_PRIO_HIGH,
"Fifo is already under consumption when peeking is desired",
0, 0);
return -1;
}
if(size - free_bytes >= bufsize) {
/* <<<
fprintf(stderr,
"libburn_DEBUG: after waiting cycle %d : fifo %s , %d bytes\n",
wait_count, status_text, size - free_bytes);
*/
memcpy(buf, fs->buf, bufsize);
return 1;
}
if (ret&2) { /* input has ended, not enough data arrived */
libdax_msgs_submit(libdax_messenger, -1, 0x0002015d,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
"Fifo input ended short of desired peek buffer size",
0, 0);
return 0;
}
usleep(100000);
wait_count++;
/* <<<
if(wait_count%10==0)
fprintf(stderr,
"libburn_DEBUG: waiting cycle %d : fifo %s , %d bytes\n",
wait_count, status_text, size - free_bytes);
*/
}
return(0);
}

View File

@ -198,10 +198,12 @@ enum burn_disc_status
BURN_DISC_FULL, BURN_DISC_FULL,
/* ts A61007 */ /* ts A61007 */
/* @since 0.2.4 */
/** The drive was not grabbed when the status was inquired */ /** The drive was not grabbed when the status was inquired */
BURN_DISC_UNGRABBED, BURN_DISC_UNGRABBED,
/* ts A61020 */ /* ts A61020 */
/* @since 0.2.6 */
/** The media seems not to be suitable for burning */ /** The media seems not to be suitable for burning */
BURN_DISC_UNSUITABLE BURN_DISC_UNSUITABLE
}; };
@ -242,6 +244,7 @@ enum burn_drive_status
BURN_DRIVE_GRABBING, BURN_DRIVE_GRABBING,
/* ts A61102 */ /* ts A61102 */
/* @since 0.2.6 */
/** The drive gets written zeroes before the track payload data */ /** The drive gets written zeroes before the track payload data */
BURN_DRIVE_WRITING_PREGAP, BURN_DRIVE_WRITING_PREGAP,
/** The drive is told to close a track (TAO only) */ /** The drive is told to close a track (TAO only) */
@ -250,10 +253,12 @@ enum burn_drive_status
BURN_DRIVE_CLOSING_SESSION, BURN_DRIVE_CLOSING_SESSION,
/* ts A61223 */ /* ts A61223 */
/* @since 0.3.0 */
/** The drive is formatting media */ /** The drive is formatting media */
BURN_DRIVE_FORMATTING, BURN_DRIVE_FORMATTING,
/* ts A70822 */ /* ts A70822 */
/* @since 0.4.0 */
/** The drive is busy in synchronous read (if you see this then it /** The drive is busy in synchronous read (if you see this then it
has been interrupted) */ has been interrupted) */
BURN_DRIVE_READING_SYNC, BURN_DRIVE_READING_SYNC,
@ -307,6 +312,7 @@ struct burn_toc_entry
/* ts A70201 : DVD extension. /* ts A70201 : DVD extension.
If invalid the members are guaranteed to be 0. */ If invalid the members are guaranteed to be 0. */
/* @since 0.3.2 */
/* Tracks and session numbers are 16 bit. Here are the high bytes. */ /* Tracks and session numbers are 16 bit. Here are the high bytes. */
unsigned char session_msb; unsigned char session_msb;
unsigned char point_msb; unsigned char point_msb;
@ -402,6 +408,7 @@ struct burn_source {
/* ts A70125 : BROKE BINARY BACKWARD COMPATIBILITY AT libburn-0.3.1. */ /* ts A70125 : BROKE BINARY BACKWARD COMPATIBILITY AT libburn-0.3.1. */
/* @since 0.3.2 */
/** Program the reply of (*get_size) to a fixed value. It is advised /** Program the reply of (*get_size) to a fixed value. It is advised
to implement this by a attribute off_t fixed_size; in *data . to implement this by a attribute off_t fixed_size; in *data .
The read() function does not have to take into respect this fake The read() function does not have to take into respect this fake
@ -449,7 +456,7 @@ struct burn_source {
/* ts A71222 : Supposed to be binary backwards compatible extension. */ /* ts A71222 : Supposed to be binary backwards compatible extension. */
/* @since 0.4.2 */
/** Valid only if above member .(*read)() is NULL. This indicates a /** Valid only if above member .(*read)() is NULL. This indicates a
version of struct burn_source younger than 0. version of struct burn_source younger than 0.
From then on, member .version tells which further members exist From then on, member .version tells which further members exist
@ -574,12 +581,14 @@ struct burn_progress {
int sector; int sector;
/* ts A61023 */ /* ts A61023 */
/* @since 0.2.6 */
/** The capacity of the drive buffer */ /** The capacity of the drive buffer */
unsigned buffer_capacity; unsigned buffer_capacity;
/** The free space in the drive buffer (might be slightly outdated) */ /** The free space in the drive buffer (might be slightly outdated) */
unsigned buffer_available; unsigned buffer_available;
/* ts A61119 */ /* ts A61119 */
/* @since 0.2.6 */
/** The number of bytes sent to the drive buffer */ /** The number of bytes sent to the drive buffer */
off_t buffered_bytes; off_t buffered_bytes;
/** The minimum number of bytes stored in buffer during write. /** The minimum number of bytes stored in buffer during write.
@ -591,6 +600,7 @@ struct burn_progress {
/* ts A61226 */ /* ts A61226 */
/* @since 0.3.0 */
/** Description of a speed capability as reported by the drive in conjunction /** Description of a speed capability as reported by the drive in conjunction
with eventually loaded media. There can be more than one such object per with eventually loaded media. There can be more than one such object per
drive. So they are chained via .next and .prev , where NULL marks the end drive. So they are chained via .next and .prev , where NULL marks the end
@ -673,6 +683,7 @@ void burn_finish(void);
@return 1 ok, all went well @return 1 ok, all went well
0 had to leave a drive in unclean state 0 had to leave a drive in unclean state
<0 severe error, do no use libburn again <0 severe error, do no use libburn again
@since 0.2.6
*/ */
int burn_abort(int patience, int burn_abort(int patience,
int (*pacifier_func)(void *handle, int patience, int elapsed), int (*pacifier_func)(void *handle, int patience, int elapsed),
@ -722,6 +733,7 @@ void burn_set_verbosity(int level);
@param abort_on_busy Unconditionally abort process when a non blocking @param abort_on_busy Unconditionally abort process when a non blocking
exclusive opening attempt indicates a busy drive. exclusive opening attempt indicates a busy drive.
Use this only after thorough tests with your app. Use this only after thorough tests with your app.
@since 0.2.2
*/ */
void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy); void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy);
@ -730,12 +742,12 @@ void burn_preset_device_open(int exclusive, int blocking, int abort_on_busy);
/** Allows the use of media types which are implemented in libburn but not yet /** Allows the use of media types which are implemented in libburn but not yet
tested. The list of those untested profiles is subject to change. tested. The list of those untested profiles is subject to change.
Currently it contains: 0x15 "DVD-R/DL sequential recording", Currently it contains: 0x15 "DVD-R/DL sequential recording",
0x43 "BD-RE"
If you really test such media, then please report the outcome on If you really test such media, then please report the outcome on
libburn-hackers@pykix.org libburn-hackers@pykix.org
If ever then this call should be done soon after burn_initialize() before If ever then this call should be done soon after burn_initialize() before
any drive scanning. any drive scanning.
@param yes 1=allow all implemented profiles, 0=only tested media (default) @param yes 1=allow all implemented profiles, 0=only tested media (default)
@since 0.3.4
*/ */
void burn_allow_untested_profiles(int yes); void burn_allow_untested_profiles(int yes);
@ -819,17 +831,21 @@ void burn_allow_untested_profiles(int yes);
@param load Nonzero to make the drive attempt to load a disc (close its @param load Nonzero to make the drive attempt to load a disc (close its
tray door, etc). tray door, etc).
@return 1 = success , 0 = drive not found , -1 = other error @return 1 = success , 0 = drive not found , -1 = other error
@since 0.2.2
*/ */
int burn_drive_scan_and_grab(struct burn_drive_info *drive_infos[], int burn_drive_scan_and_grab(struct burn_drive_info *drive_infos[],
char* adr, int load); char* adr, int load);
/* ts A51221 */ /* ts A51221 */
/* @since 0.2.2 */
/** Maximum number of particularly permissible drive addresses */ /** Maximum number of particularly permissible drive addresses */
#define BURN_DRIVE_WHITELIST_LEN 255 #define BURN_DRIVE_WHITELIST_LEN 255
/** Add a device to the list of permissible drives. As soon as some entry is in /** Add a device to the list of permissible drives. As soon as some entry is in
the whitelist all non-listed drives are banned from scanning. the whitelist all non-listed drives are banned from scanning.
@return 1 success, <=0 failure @return 1 success, <=0 failure
@since 0.2.2
*/ */
int burn_drive_add_whitelist(char *device_address); int burn_drive_add_whitelist(char *device_address);
@ -876,6 +892,7 @@ int burn_drive_scan(struct burn_drive_info *drive_infos[],
Use these two only. Further values are to be defined. Use these two only. Further values are to be defined.
@return 1 on success, 2 if drive was already forgotten, @return 1 on success, 2 if drive was already forgotten,
0 if not permissible, <0 on other failures, 0 if not permissible, <0 on other failures,
@since 0.2.2
*/ */
int burn_drive_info_forget(struct burn_drive_info *drive_info, int force); int burn_drive_info_forget(struct burn_drive_info *drive_info, int force);
@ -888,23 +905,28 @@ void burn_drive_info_free(struct burn_drive_info drive_infos[]);
/* ts A60823 */ /* ts A60823 */
/* @since 0.2.2 */
/** Maximum length+1 to expect with a persistent drive address string */ /** Maximum length+1 to expect with a persistent drive address string */
#define BURN_DRIVE_ADR_LEN 1024 #define BURN_DRIVE_ADR_LEN 1024
/* ts A70906 */
/** Inquire the persistent address of the given drive. /** Inquire the persistent address of the given drive.
@param drive The drive to inquire. @param drive The drive to inquire.
@param adr An application provided array of at least BURN_DRIVE_ADR_LEN @param adr An application provided array of at least BURN_DRIVE_ADR_LEN
characters size. The persistent address gets copied to it. characters size. The persistent address gets copied to it.
@return >0 success , <=0 error (due to libburn internal problem) @return >0 success , <=0 error (due to libburn internal problem)
@since 0.4.0
*/ */
int burn_drive_d_get_adr(struct burn_drive *drive, char adr[]); int burn_drive_d_get_adr(struct burn_drive *drive, char adr[]);
/* A60823 */
/** Inquire the persistent address of a drive via a given drive_info object. /** Inquire the persistent address of a drive via a given drive_info object.
(Note: This is a legacy call.) (Note: This is a legacy call.)
@param drive_info The drive to inquire.Usually some &(drive_infos[driveno]) @param drive_info The drive to inquire.Usually some &(drive_infos[driveno])
@param adr An application provided array of at least BURN_DRIVE_ADR_LEN @param adr An application provided array of at least BURN_DRIVE_ADR_LEN
characters size. The persistent address gets copied to it. characters size. The persistent address gets copied to it.
@return >0 success , <=0 error (due to libburn internal problem) @return >0 success , <=0 error (due to libburn internal problem)
@since 0.2.6
*/ */
int burn_drive_get_adr(struct burn_drive_info *drive_info, char adr[]); int burn_drive_get_adr(struct burn_drive_info *drive_info, char adr[]);
@ -913,6 +935,7 @@ int burn_drive_get_adr(struct burn_drive_info *drive_info, char adr[]);
/** Evaluate whether the given address would be a possible persistent drive /** Evaluate whether the given address would be a possible persistent drive
address of libburn. address of libburn.
@return 1 means yes, 0 means no @return 1 means yes, 0 means no
@since 0.2.6
*/ */
int burn_drive_is_enumerable_adr(char *adr); int burn_drive_is_enumerable_adr(char *adr);
@ -925,6 +948,7 @@ int burn_drive_is_enumerable_adr(char *adr);
@param adr An application provided array of at least BURN_DRIVE_ADR_LEN @param adr An application provided array of at least BURN_DRIVE_ADR_LEN
characters size. The persistent address gets copied to it. characters size. The persistent address gets copied to it.
@return 1 = success , 0 = failure , -1 = severe error @return 1 = success , 0 = failure , -1 = severe error
@since 0.2.6
*/ */
int burn_drive_convert_fs_adr(char *path, char adr[]); int burn_drive_convert_fs_adr(char *path, char adr[]);
@ -942,6 +966,7 @@ int burn_drive_convert_fs_adr(char *path, char adr[]);
@param adr An application provided array of at least BURN_DRIVE_ADR_LEN @param adr An application provided array of at least BURN_DRIVE_ADR_LEN
characters size. The persistent address gets copied to it. characters size. The persistent address gets copied to it.
@return 1 = success , 0 = failure , -1 = severe error @return 1 = success , 0 = failure , -1 = severe error
@since 0.2.6
*/ */
int burn_drive_convert_scsi_adr(int bus_no, int host_no, int channel_no, int burn_drive_convert_scsi_adr(int bus_no, int host_no, int channel_no,
int target_no, int lun_no, char adr[]); int target_no, int lun_no, char adr[]);
@ -952,6 +977,7 @@ int burn_drive_convert_scsi_adr(int bus_no, int host_no, int channel_no,
drive address obtained via burn_drive_d_get_adr(). It is also supposed to drive address obtained via burn_drive_d_get_adr(). It is also supposed to
succeed with any device file of a (possibly emulated) SCSI device. succeed with any device file of a (possibly emulated) SCSI device.
@return 1 = success , 0 = failure , -1 = severe error @return 1 = success , 0 = failure , -1 = severe error
@since 0.2.6
*/ */
int burn_drive_obtain_scsi_adr(char *path, int *bus_no, int *host_no, int burn_drive_obtain_scsi_adr(char *path, int *bus_no, int *host_no,
int *channel_no, int *target_no, int *lun_no); int *channel_no, int *target_no, int *lun_no);
@ -984,6 +1010,7 @@ void burn_drive_release(struct burn_drive *drive, int eject);
@param drive The drive to release and leave locked. @param drive The drive to release and leave locked.
@param flag Bitfield for control purposes (unused yet, submit 0) @param flag Bitfield for control purposes (unused yet, submit 0)
@return 1 means success, <=0 means failure @return 1 means success, <=0 means failure
@since 0.4.0
*/ */
int burn_drive_leave_locked(struct burn_drive *d, int flag); int burn_drive_leave_locked(struct burn_drive *d, int flag);
@ -1004,6 +1031,7 @@ enum burn_disc_status burn_disc_get_status(struct burn_drive *drive);
or BURN_DISC_UNSUITABLE. Thus marking media as writable which actually or BURN_DISC_UNSUITABLE. Thus marking media as writable which actually
failed to declare themselves either blank or (partially) filled. failed to declare themselves either blank or (partially) filled.
@return 1 drive status has been set , 0 = unsuitable drive status @return 1 drive status has been set , 0 = unsuitable drive status
@since 0.2.6
*/ */
int burn_disc_pretend_blank(struct burn_drive *drive); int burn_disc_pretend_blank(struct burn_drive *drive);
@ -1013,6 +1041,7 @@ int burn_disc_pretend_blank(struct burn_drive *drive);
Sets the drive status to BURN_DISC_FULL if it is BURN_DISC_UNREADY Sets the drive status to BURN_DISC_FULL if it is BURN_DISC_UNREADY
or BURN_DISC_UNSUITABLE. Thus marking media as blankable which actually or BURN_DISC_UNSUITABLE. Thus marking media as blankable which actually
failed to declare themselves either blank or (partially) filled. failed to declare themselves either blank or (partially) filled.
@since 0.2.6
*/ */
int burn_disc_pretend_full(struct burn_drive *drive); int burn_disc_pretend_full(struct burn_drive *drive);
@ -1023,6 +1052,7 @@ int burn_disc_pretend_full(struct burn_drive *drive);
burn_drive_get_start_end_lba(). The drive must be grabbed for this call. burn_drive_get_start_end_lba(). The drive must be grabbed for this call.
@param drive The drive to query. @param drive The drive to query.
@return 1=sucess, 0=no valid ATIP info read, -1 severe error @return 1=sucess, 0=no valid ATIP info read, -1 severe error
@since 0.2.6
*/ */
int burn_disc_read_atip(struct burn_drive *drive); int burn_disc_read_atip(struct burn_drive *drive);
@ -1037,6 +1067,7 @@ int burn_disc_read_atip(struct burn_drive *drive);
@param end_lba Returns the end lba value @param end_lba Returns the end lba value
@param flag Bitfield for control purposes (unused yet, submit 0) @param flag Bitfield for control purposes (unused yet, submit 0)
@return 1 if lba values are valid , 0 if invalid @return 1 if lba values are valid , 0 if invalid
@since 0.2.6
*/ */
int burn_drive_get_start_end_lba(struct burn_drive *drive, int burn_drive_get_start_end_lba(struct burn_drive *drive,
int *start_lba, int *end_lba, int flag); int *start_lba, int *end_lba, int flag);
@ -1054,6 +1085,7 @@ int burn_drive_get_start_end_lba(struct burn_drive *drive,
@param lba return value: start lba @param lba return value: start lba
@param nwa return value: Next Writeable Address @param nwa return value: Next Writeable Address
@return 1=nwa is valid , 0=nwa is not valid , -1=error @return 1=nwa is valid , 0=nwa is not valid , -1=error
@since 0.2.6
*/ */
int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o, int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
int trackno, int *lba, int *nwa); int trackno, int *lba, int *nwa);
@ -1065,6 +1097,7 @@ int burn_disc_track_lba_nwa(struct burn_drive *d, struct burn_write_opts *o,
@param d The drive to query. @param d The drive to query.
@param start_lba returns the start address of that track @param start_lba returns the start address of that track
@return <= 0 : failure, 1 = ok @return <= 0 : failure, 1 = ok
@since 0.3.2
*/ */
int burn_disc_get_msc1(struct burn_drive *d, int *start_lba); int burn_disc_get_msc1(struct burn_drive *d, int *start_lba);
@ -1081,6 +1114,7 @@ int burn_disc_get_msc1(struct burn_drive *d, int *start_lba);
@param d The drive to query. @param d The drive to query.
@param o If not NULL: write parameters to be set on drive before query @param o If not NULL: write parameters to be set on drive before query
@return number of most probably available free bytes @return number of most probably available free bytes
@since 0.3.4
*/ */
off_t burn_disc_available_space(struct burn_drive *d, off_t burn_disc_available_space(struct burn_drive *d,
struct burn_write_opts *o); struct burn_write_opts *o);
@ -1090,19 +1124,25 @@ off_t burn_disc_available_space(struct burn_drive *d,
/** Tells the MMC Profile identifier of the loaded media. The drive must be /** Tells the MMC Profile identifier of the loaded media. The drive must be
grabbed in order to get a non-zero result. grabbed in order to get a non-zero result.
libburn currently writes only to profiles libburn currently writes only to profiles
0x09 "CD-R", 0x0a "CD-RW", 0x09 "CD-R", 0x0a "CD-RW",
0x11 "DVD-R sequential recording", 0x12 "DVD-RAM", 0x11 "DVD-R sequential recording", 0x12 "DVD-RAM",
0x13 "DVD-RW restricted overwrite", 0x14 "DVD-RW sequential recording", 0x13 "DVD-RW restricted overwrite", 0x14 "DVD-RW sequential recording",
0x1a "DVD+RW", 0x1b "DVD+R" 0x1a "DVD+RW", 0x1b "DVD+R",
0x2b "DVD+R/DL" 0x2b "DVD+R/DL", 0x43 "BD-RE",
0xffff "stdio file"
Note: 0xffff is not a MMC profile but a libburn invention.
If enabled by burn_allow_untested_profiles() it also writes to profiles If enabled by burn_allow_untested_profiles() it also writes to profiles
0x15 "DVD-R/DL sequential recording", 0x43 "BD-RE". 0x15 "DVD-R/DL sequential recording",
Writeable stdio-drives return this profile: Read-only are the profiles
0xffff "stdio file" 0x08 "CD-ROM", 0x10 "DVD-ROM",
0x40 "BD-ROM",
For now read-only are BD-R profiles (testers wanted)
0x41 "BD-R sequential recording", 0x42 "BD-R random recording"
@param d The drive where the media is inserted. @param d The drive where the media is inserted.
@param pno Profile Number as of mmc5r03c.pdf, table 89 @param pno Profile Number. See also mmc5r03c.pdf, table 89
@param name Profile Name (see above list, unknown profiles have empty name) @param name Profile Name (see above list, unknown profiles have empty name)
@return 1 profile is valid, 0 no profile info available @return 1 profile is valid, 0 no profile info available
@since 0.3.0
*/ */
int burn_disc_get_profile(struct burn_drive *d, int *pno, char name[80]); int burn_disc_get_profile(struct burn_drive *d, int *pno, char name[80]);
@ -1132,6 +1172,7 @@ struct burn_write_opts *burn_write_opts_new(struct burn_drive *drive);
/** Inquires the drive associated with a burn_write_opts object. /** Inquires the drive associated with a burn_write_opts object.
@param opts object to inquire @param opts object to inquire
@return pointer to drive @return pointer to drive
@since 0.4.0
*/ */
struct burn_drive *burn_write_opts_get_drive(struct burn_write_opts *opts); struct burn_drive *burn_write_opts_get_drive(struct burn_write_opts *opts);
@ -1166,38 +1207,54 @@ void burn_read_opts_free(struct burn_read_opts *opts);
void burn_disc_erase(struct burn_drive *drive, int fast); void burn_disc_erase(struct burn_drive *drive, int fast);
/* ts A70101 - A70112 */ /* ts A70101 - A70417 */
/** Format media for use with libburn. This currently applies to DVD-RW /** Format media for use with libburn. This currently applies to DVD-RW
in state "Sequential Recording" (profile 0014h) which get formatted to in state "Sequential Recording" (profile 0014h) which get formatted to
state "Restricted Overwrite" (profile 0013h). DVD+RW can be "de-iced" state "Restricted Overwrite" (profile 0013h). DVD+RW can be "de-iced"
by setting bit2 of flag. Other media cannot be formatted yet. by setting bit2 of flag. Other media cannot be formatted yet.
This function usually returns while the drive is still in the process
of formatting. The formatting is done, when burn_drive_get_status()
returns BURN_DRIVE_IDLE. This may be immediately after return or may
need several thousand seconds to occur.
@param drive The drive with the disc to format. @param drive The drive with the disc to format.
@param size The size in bytes to be used with the format command. It should @param size The size in bytes to be used with the format command. It should
be divisible by 32*1024. The effect of this parameter may be divisible by 32*1024. The effect of this parameter may
depend on the media profile. depend on the media profile and on parameter flag.
@param flag Bitfield for control purposes: @param flag Bitfield for control purposes:
bit0= after formatting, write the given number of zero-bytes bit0= after formatting, write the given number of zero-bytes
to the media and eventually perform preliminary closing. to the media and eventually perform preliminary closing.
bit1= insist in size 0 even if there is a better default known bit1+2: size mode
bit2= format to maximum available size 0 = use parameter size as far as it makes sense
1 = insist in size 0 even if there is a better default known
(on DVD-RAM or BD-RE identical to size mode 0)
2 = without bit7: format to maximum available size
with bit7 : take size from indexed format descriptor
3 = without bit7: format to default size
with bit7 : take size from indexed format descriptor
bit3= -reserved- bit3= -reserved-
bit4= enforce re-format of (partly) formatted media bit4= enforce re-format of (partly) formatted media
bit5= try to disable eventual defect management
bit6= try to avoid lengthy media certification
bit7= MMC expert application mode (else libburn tries to bit7= MMC expert application mode (else libburn tries to
choose a suitable format type): choose a suitable format type):
bit8 to bit15 contain the index of the format to use. See bit8 to bit15 contain the index of the format to use. See
burn_disc_get_formats(), burn_disc_get_format_descr(). burn_disc_get_formats(), burn_disc_get_format_descr().
Acceptable types are: 0x00, 0x10, 0x11, 0x13, 0x15, 0x26. Acceptable types are: 0x00, 0x01, 0x10, 0x11, 0x13,
0x15, 0x26, 0x30, 0x31.
If bit7 is set, bit4 is set automatically. If bit7 is set, bit4 is set automatically.
@since 0.3.0
*/ */
void burn_disc_format(struct burn_drive *drive, off_t size, int flag); void burn_disc_format(struct burn_drive *drive, off_t size, int flag);
/* ts A70112 */ /* ts A70112 */
/* @since 0.3.0 */
/** Possible formatting status values */ /** Possible formatting status values */
#define BURN_FORMAT_IS_UNFORMATTED 1 #define BURN_FORMAT_IS_UNFORMATTED 1
#define BURN_FORMAT_IS_FORMATTED 2 #define BURN_FORMAT_IS_FORMATTED 2
#define BURN_FORMAT_IS_UNKNOWN 3 #define BURN_FORMAT_IS_UNKNOWN 3
/* ts A70112 */
/** Inquire the formatting status, the associated sizes and the number of /** Inquire the formatting status, the associated sizes and the number of
available formats. The info is media specific and stems from MMC command available formats. The info is media specific and stems from MMC command
23h READ FORMAT CAPACITY. See mmc5r03c.pdf 6.24 for background details. 23h READ FORMAT CAPACITY. See mmc5r03c.pdf 6.24 for background details.
@ -1216,10 +1273,12 @@ void burn_disc_format(struct burn_drive *drive, off_t size, int flag);
burn_disc_get_format_descr() to obtain such a format burn_disc_get_format_descr() to obtain such a format
and eventually with burn_disc_format() to select one. and eventually with burn_disc_format() to select one.
@return 1 reply is valid , <=0 failure @return 1 reply is valid , <=0 failure
@since 0.3.0
*/ */
int burn_disc_get_formats(struct burn_drive *drive, int *status, off_t *size, int burn_disc_get_formats(struct burn_drive *drive, int *status, off_t *size,
unsigned *bl_sas, int *num_formats); unsigned *bl_sas, int *num_formats);
/* ts A70112 */
/** Inquire parameters of an available media format. /** Inquire parameters of an available media format.
@param drive The drive with the disc to format. @param drive The drive with the disc to format.
@param index The index of the format item. Beginning with 0 up to reply @param index The index of the format item. Beginning with 0 up to reply
@ -1227,10 +1286,12 @@ int burn_disc_get_formats(struct burn_drive *drive, int *status, off_t *size,
@param type The format type. See mmc5r03c.pdf, 6.5, 04h FORMAT UNIT. @param type The format type. See mmc5r03c.pdf, 6.5, 04h FORMAT UNIT.
0x00=full, 0x10=CD-RW/DVD-RW full, 0x11=CD-RW/DVD-RW grow, 0x00=full, 0x10=CD-RW/DVD-RW full, 0x11=CD-RW/DVD-RW grow,
0x15=DVD-RW quick, 0x13=DVD-RW quick grow, 0x15=DVD-RW quick, 0x13=DVD-RW quick grow,
0x26=DVD+RW background 0x26=DVD+RW background, 0x30=BD-RE with spare areas,
0x31=BD-RE without spare areas
@param size The maximum size in bytes achievable with this format. @param size The maximum size in bytes achievable with this format.
@param tdp Type Dependent Parameter. See mmc5r03c.pdf. @param tdp Type Dependent Parameter. See mmc5r03c.pdf.
@return 1 reply is valid , <=0 failure @return 1 reply is valid , <=0 failure
@since 0.3.0
*/ */
int burn_disc_get_format_descr(struct burn_drive *drive, int index, int burn_disc_get_format_descr(struct burn_drive *drive, int index,
int *type, off_t *size, unsigned *tdp); int *type, off_t *size, unsigned *tdp);
@ -1249,6 +1310,7 @@ void burn_disc_read(struct burn_drive *drive, const struct burn_read_opts *o);
/* ts A70222 */ /* ts A70222 */
/* @since 0.3.4 */
/** The length of a rejection reasons string for burn_precheck_write() and /** The length of a rejection reasons string for burn_precheck_write() and
burn_write_opts_auto_write_type() . burn_write_opts_auto_write_type() .
*/ */
@ -1264,6 +1326,7 @@ void burn_disc_read(struct burn_drive *drive, const struct burn_read_opts *o);
@param reasons Eventually returns a list of rejection reason statements @param reasons Eventually returns a list of rejection reason statements
@param silent 1= do not issue error messages , 0= report problems @param silent 1= do not issue error messages , 0= report problems
@return 1 ok, -1= no recordable media detected, 0= other failure @return 1 ok, -1= no recordable media detected, 0= other failure
@since 0.3.4
*/ */
int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc, int burn_precheck_write(struct burn_write_opts *o, struct burn_disc *disc,
char reasons[BURN_REASONS_LEN], int silent); char reasons[BURN_REASONS_LEN], int silent);
@ -1297,6 +1360,7 @@ void burn_drive_cancel(struct burn_drive *drive);
during write, a call to burn_drive_cancel() by the application thread. during write, a call to burn_drive_cancel() by the application thread.
@param d The drive to inquire. @param d The drive to inquire.
@return 1=burn seems to have went well, 0=burn failed @return 1=burn seems to have went well, 0=burn failed
@since 0.2.6
*/ */
int burn_drive_wrote_well(struct burn_drive *d); int burn_drive_wrote_well(struct burn_drive *d);
@ -1413,6 +1477,7 @@ void burn_track_define_data(struct burn_track *t, int offset, int tail,
@param t The track to change @param t The track to change
@param swap_source_bytes 0=do not swap, 1=swap byte pairs @param swap_source_bytes 0=do not swap, 1=swap byte pairs
@return 1=success , 0=unacceptable value @return 1=success , 0=unacceptable value
@since 0.2.6
*/ */
int burn_track_set_byte_swap(struct burn_track *t, int swap_source_bytes); int burn_track_set_byte_swap(struct burn_track *t, int swap_source_bytes);
@ -1466,6 +1531,7 @@ enum burn_source_status burn_track_set_source(struct burn_track *t,
@param t The track to change @param t The track to change
@param size The size to set @param size The size to set
@return 0=failure 1=sucess @return 0=failure 1=sucess
@since 0.3.4
*/ */
int burn_track_set_default_size(struct burn_track *t, off_t size); int burn_track_set_default_size(struct burn_track *t, off_t size);
@ -1525,6 +1591,7 @@ struct burn_source *burn_fd_source_new(int datafd, int subfd, off_t size);
to be disposed by calling burn_source_free() for each. to be disposed by calling burn_source_free() for each.
inp can be freed immediately, the returned fifo may be inp can be freed immediately, the returned fifo may be
kept as handle for burn_fifo_inquire_status(). kept as handle for burn_fifo_inquire_status().
@since 0.4.0
*/ */
struct burn_source *burn_fifo_source_new(struct burn_source *inp, struct burn_source *burn_fifo_source_new(struct burn_source *inp,
int chunksize, int chunks, int flag); int chunksize, int chunks, int flag);
@ -1546,17 +1613,43 @@ struct burn_source *burn_fifo_source_new(struct burn_source *inp,
5="abandoned" : consumption has ended prematurely 5="abandoned" : consumption has ended prematurely
6="ended" : consumption has ended without input error 6="ended" : consumption has ended without input error
7="aborted" : consumption has ended after input error 7="aborted" : consumption has ended after input error
@since 0.4.0
*/ */
int burn_fifo_inquire_status(struct burn_source *fifo, int *size, int burn_fifo_inquire_status(struct burn_source *fifo, int *size,
int *free_bytes, char **status_text); int *free_bytes, char **status_text);
/* ts A80713 */
/** Obtain a preview of the first input data of a fifo which was created
by burn_fifo_source_new(). The data will later be delivered normally to
the consumer track of the fifo.
bufsize may not be larger than the fifo size (chunk_size * chunks).
This call will succeed only if data consumption by the track has not
started yet, i.e. best before the call to burn_disc_write().
It will start the worker thread of the fifo with the expectable side
effects on the external data source. Then it waits either until enough
data have arrived or until it becomes clear that this will not happen.
The call may be repeated with increased bufsize. It will always yield
the bytes beginning from the first one in the fifo.
@param fifo The fifo object to inquire
@param buf Pointer to memory of at least bufsize bytes where to
deliver the peeked data
@param bufsize Number of bytes to peek from the start of the fifo data
@param flag Bitfield for control purposes (unused yet, submit 0).
@return <0 on severe error, 0 if not enough data, 1 if bufsize bytes read
@since 0.5.0
*/
int burn_fifo_peek_data(struct burn_source *source, char *buf, int bufsize,
int flag);
/* ts A70328 */ /* ts A70328 */
/** Sets a fixed track size after the data source object has already been /** Sets a fixed track size after the data source object has already been
created. created.
@param t The track to operate on @param t The track to operate on
@param size the number of bytes to use as track size @param size the number of bytes to use as track size
@return <=0 indicates failure , >0 success @return <=0 indicates failure , >0 success
@since 0.3.6
*/ */
int burn_track_set_size(struct burn_track *t, off_t size); int burn_track_set_size(struct burn_track *t, off_t size);
@ -1569,7 +1662,12 @@ int burn_track_get_sectors(struct burn_track *);
/* ts A61101 */ /* ts A61101 */
/** Tells how many source bytes have been read and how many data bytes have /** Tells how many source bytes have been read and how many data bytes have
been written by the track during burn */ been written by the track during burn.
@param t The track to inquire
@param read_bytes Number of bytes read from the track source
@param written_bytes Number of bytes written to track
@since 0.2.6
*/
int burn_track_get_counters(struct burn_track *t, int burn_track_get_counters(struct burn_track *t,
off_t *read_bytes, off_t *written_bytes); off_t *read_bytes, off_t *written_bytes);
@ -1614,6 +1712,7 @@ void burn_drive_set_speed(struct burn_drive *d, int read, int write);
@param min_percent Minimum of desired buffer oscillation: 25 to 100 @param min_percent Minimum of desired buffer oscillation: 25 to 100
@param max_percent Maximum of desired buffer oscillation: 25 to 100 @param max_percent Maximum of desired buffer oscillation: 25 to 100
@return 1=success , 0=failure @return 1=success , 0=failure
@since 0.3.8
*/ */
int burn_drive_set_buffer_waiting(struct burn_drive *d, int enable, int burn_drive_set_buffer_waiting(struct burn_drive *d, int enable,
int min_usec, int max_usec, int timeout_sec, int min_usec, int max_usec, int timeout_sec,
@ -1651,6 +1750,7 @@ int burn_write_opts_set_write_type(struct burn_write_opts *opts,
bit1= do not issue error messages via burn_msgs queue bit1= do not issue error messages via burn_msgs queue
(is automatically set with bit0) (is automatically set with bit0)
@return Chosen write type. BURN_WRITE_NONE on failure. @return Chosen write type. BURN_WRITE_NONE on failure.
@since 0.3.2
*/ */
enum burn_write_types burn_write_opts_auto_write_type( enum burn_write_types burn_write_opts_auto_write_type(
struct burn_write_opts *opts, struct burn_disc *disc, struct burn_write_opts *opts, struct burn_disc *disc,
@ -1715,6 +1815,7 @@ void burn_write_opts_set_mediacatalog(struct burn_write_opts *opts, unsigned cha
being the last one and thus creating a BURN_DISC_APPENDABLE media. being the last one and thus creating a BURN_DISC_APPENDABLE media.
@param opts The option object to be manipulated @param opts The option object to be manipulated
@param multi 1=media will be appendable, 0=media will be closed (default) @param multi 1=media will be appendable, 0=media will be closed (default)
@since 0.2.6
*/ */
void burn_write_opts_set_multi(struct burn_write_opts *opts, int multi); void burn_write_opts_set_multi(struct burn_write_opts *opts, int multi);
@ -1731,6 +1832,7 @@ void burn_write_opts_set_multi(struct burn_write_opts *opts, int multi);
.start_range_low , .start_range_high . .start_range_low , .start_range_high .
@param opts The write opts to change @param opts The write opts to change
@param value The address in bytes (-1 = start at default address) @param value The address in bytes (-1 = start at default address)
@since 0.3.0
*/ */
void burn_write_opts_set_start_byte(struct burn_write_opts *opts, off_t value); void burn_write_opts_set_start_byte(struct burn_write_opts *opts, off_t value);
@ -1743,6 +1845,7 @@ void burn_write_opts_set_start_byte(struct burn_write_opts *opts, off_t value);
by the last track of the last session. by the last track of the last session.
@param opts The write opts to change @param opts The write opts to change
@param fill_up_media If 1 : fill up by last track, if 0 = do not fill up @param fill_up_media If 1 : fill up by last track, if 0 = do not fill up
@since 0.3.4
*/ */
void burn_write_opts_set_fillup(struct burn_write_opts *opts, void burn_write_opts_set_fillup(struct burn_write_opts *opts,
int fill_up_media); int fill_up_media);
@ -1754,10 +1857,25 @@ void burn_write_opts_set_fillup(struct burn_write_opts *opts,
- the check whether the media profile supports simulated burning - the check whether the media profile supports simulated burning
@param opts The write opts to change @param opts The write opts to change
@param use_force 1=ignore above checks, 0=refuse work on failed check @param use_force 1=ignore above checks, 0=refuse work on failed check
@since 0.3.4
*/ */
void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force); void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force);
/* ts A80412 */
/** Eventually makes use of the more modern write command AAh WRITE12 and
sets the Streaming bit. With DVD-RAM this can override the traditional
slowdown to half nominal speed. But if it speeds up writing then it also
disables error management and correction. Weigh your priorities.
This only affects the write operations of burn_disc_write().
@param opts The write opts to change
@param value 0=use 2Ah WRITE10, 1=use AAh WRITE12 with Streaming bit
@since 0.4.6
*/
void burn_write_opts_set_stream_recording(struct burn_write_opts *opts,
int value);
/** Sets whether to read in raw mode or not /** Sets whether to read in raw mode or not
@param opts The read opts to change @param opts The read opts to change
@param raw_mode If non-zero, reading will be done in raw mode, so that everything in the data tracks on the @param raw_mode If non-zero, reading will be done in raw mode, so that everything in the data tracks on the
@ -1828,6 +1946,7 @@ int burn_drive_get_write_speed(struct burn_drive *d);
again by call burn_drive_grab() and again by call burn_disc_read_atip(). again by call burn_drive_grab() and again by call burn_disc_read_atip().
@param d Drive to query @param d Drive to query
@return Minimum write speed in K/s @return Minimum write speed in K/s
@since 0.2.6
*/ */
int burn_drive_get_min_write_speed(struct burn_drive *d); int burn_drive_get_min_write_speed(struct burn_drive *d);
@ -1850,6 +1969,7 @@ int burn_drive_get_read_speed(struct burn_drive *d);
@param d Drive to query @param d Drive to query
@param speed_list The copy. If empty, *speed_list gets returned as NULL. @param speed_list The copy. If empty, *speed_list gets returned as NULL.
@return 1=success , 0=list empty , <0 severe error @return 1=success , 0=list empty , <0 severe error
@since 0.3.0
*/ */
int burn_drive_get_speedlist(struct burn_drive *d, int burn_drive_get_speedlist(struct burn_drive *d,
struct burn_speed_descriptor **speed_list); struct burn_speed_descriptor **speed_list);
@ -1869,6 +1989,7 @@ int burn_drive_get_speedlist(struct burn_drive *d,
bit1= look for any source type (else look for source==2 first bit1= look for any source type (else look for source==2 first
and for any other source type only with CD media) and for any other source type only with CD media)
@return >0 indicates a valid best_descr, 0 = no valid best_descr @return >0 indicates a valid best_descr, 0 = no valid best_descr
@since 0.3.8
*/ */
int burn_drive_get_best_speed(struct burn_drive *d, int speed_goal, int burn_drive_get_best_speed(struct burn_drive *d, int speed_goal,
struct burn_speed_descriptor **best_descr, int flag); struct burn_speed_descriptor **best_descr, int flag);
@ -1879,11 +2000,13 @@ int burn_drive_get_best_speed(struct burn_drive *d, int speed_goal,
burn_drive_get_speedlist(). burn_drive_get_speedlist().
@param speed_list The list copy. *speed_list gets set to NULL. @param speed_list The list copy. *speed_list gets set to NULL.
@return 1=list disposed , 0= *speedlist was already NULL @return 1=list disposed , 0= *speedlist was already NULL
@since 0.3.0
*/ */
int burn_drive_free_speedlist(struct burn_speed_descriptor **speed_list); int burn_drive_free_speedlist(struct burn_speed_descriptor **speed_list);
/* ts A70203 */ /* ts A70203 */
/* @since 0.3.2 */
/** The reply structure for burn_disc_get_multi_caps() /** The reply structure for burn_disc_get_multi_caps()
*/ */
struct burn_multi_caps { struct burn_multi_caps {
@ -1961,7 +2084,8 @@ struct burn_multi_caps {
/** Wether the current profile indicates CD media. 1=yes, 0=no */ /** Wether the current profile indicates CD media. 1=yes, 0=no */
int current_is_cd_profile; int current_is_cd_profile;
/* ts A70528, added to version 0.3.7 */ /* ts A70528 */
/* @since 0.3.8 */
/** Wether the current profile is able to perform simulated write */ /** Wether the current profile is able to perform simulated write */
int might_simulate; int might_simulate;
}; };
@ -1978,6 +2102,7 @@ struct burn_multi_caps {
@param caps returns the info structure @param caps returns the info structure
@param flag Bitfield for control purposes (unused yet, submit 0) @param flag Bitfield for control purposes (unused yet, submit 0)
@return < 0 : error , 0 : writing seems impossible , 1 : writing possible @return < 0 : error , 0 : writing seems impossible , 1 : writing possible
@since 0.3.2
*/ */
int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt, int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
struct burn_multi_caps **caps, int flag); struct burn_multi_caps **caps, int flag);
@ -1986,6 +2111,7 @@ int burn_disc_get_multi_caps(struct burn_drive *d, enum burn_write_types wt,
burn_disc_get_multi_caps(). The pointer *caps gets set to NULL. burn_disc_get_multi_caps(). The pointer *caps gets set to NULL.
@param caps the info structure to dispose (note: pointer to pointer) @param caps the info structure to dispose (note: pointer to pointer)
@return 0 : *caps was already NULL, 1 : memory object was disposed @return 0 : *caps was already NULL, 1 : memory object was disposed
@since 0.3.2
*/ */
int burn_disc_free_multi_caps(struct burn_multi_caps **caps); int burn_disc_free_multi_caps(struct burn_multi_caps **caps);
@ -2048,6 +2174,7 @@ void burn_version(int *major, int *minor, int *micro);
/* ts A80129 */ /* ts A80129 */
/* @since 0.4.4 */
/** These three release version numbers tell the revision of this header file /** These three release version numbers tell the revision of this header file
and of the API it describes. They are memorized by applications at build and of the API it describes. They are memorized by applications at build
time. time.
@ -2065,8 +2192,8 @@ void burn_version(int *major, int *minor, int *micro);
*/ */
#define burn_header_version_major 0 #define burn_header_version_major 0
#define burn_header_version_minor 4 #define burn_header_version_minor 5
#define burn_header_version_micro 3 #define burn_header_version_micro 0
/** Note: /** Note:
Above version numbers are also recorded in configure.ac because libtool Above version numbers are also recorded in configure.ac because libtool
wants them as parameters at build time. wants them as parameters at build time.
@ -2128,12 +2255,13 @@ These two advises are mutually exclusive.
to stderr. Default: "FATAL". to stderr. Default: "FATAL".
@param print_id A text prefix to be printed before the message. @param print_id A text prefix to be printed before the message.
@return >0 for success, <=0 for error @return >0 for success, <=0 for error
@since 0.2.6
*/ */
int burn_msgs_set_severities(char *queue_severity, int burn_msgs_set_severities(char *queue_severity,
char *print_severity, char *print_id); char *print_severity, char *print_id);
/* ts A60924 : ticket 74 */ /* ts A60924 : ticket 74 */
/* @since 0.2.6 */
#define BURN_MSGS_MESSAGE_LEN 4096 #define BURN_MSGS_MESSAGE_LEN 4096
/** Obtain the oldest pending libburn message from the queue which has at /** Obtain the oldest pending libburn message from the queue which has at
@ -2151,6 +2279,7 @@ int burn_msgs_set_severities(char *queue_severity,
@param severity Will become the severity related to the message and @param severity Will become the severity related to the message and
should provide at least 80 bytes. should provide at least 80 bytes.
@return 1 if a matching item was found, 0 if not, <0 for severe errors @return 1 if a matching item was found, 0 if not, <0 for severe errors
@since 0.2.6
*/ */
int burn_msgs_obtain(char *minimum_severity, int burn_msgs_obtain(char *minimum_severity,
int *error_code, char msg_text[], int *os_errno, int *error_code, char msg_text[], int *os_errno,
@ -2173,6 +2302,7 @@ int burn_msgs_obtain(char *minimum_severity,
Submit NULL if the message is not specific to a Submit NULL if the message is not specific to a
particular drive object. particular drive object.
@return 1 if message was delivered, <=0 if failure @return 1 if message was delivered, <=0 if failure
@since 0.4.0
*/ */
int burn_msgs_submit(int error_code, char msg_text[], int os_errno, int burn_msgs_submit(int error_code, char msg_text[], int os_errno,
char severity[], struct burn_drive *d); char severity[], struct burn_drive *d);
@ -2185,15 +2315,18 @@ int burn_msgs_submit(int error_code, char msg_text[], int os_errno,
@param severity_number The rank number: the higher, the more severe. @param severity_number The rank number: the higher, the more severe.
@param flag Bitfield for control purposes (unused yet, submit 0) @param flag Bitfield for control purposes (unused yet, submit 0)
@return >0 success, <=0 failure @return >0 success, <=0 failure
@since 0.4.0
*/ */
int burn_text_to_sev(char *severity_name, int *severity_number, int flag); int burn_text_to_sev(char *severity_name, int *severity_number, int flag);
/* ts A80202 : @since 0.4.4 */ /* ts A80202 */
/** Convert a severity number into a severity name /** Convert a severity number into a severity name
@since 0.4.4
@param severity_number The rank number: the higher, the more severe. @param severity_number The rank number: the higher, the more severe.
@param severity_name A name as with burn_msgs_submit(), e.g. "SORRY". @param severity_name A name as with burn_msgs_submit(), e.g. "SORRY".
@param flag Bitfield for control purposes (unused yet, submit 0) @param flag Bitfield for control purposes (unused yet, submit 0)
@since 0.4.4
*/ */
int burn_sev_to_text(int severity_number, char **severity_name, int flag); int burn_sev_to_text(int severity_number, char **severity_name, int flag);
@ -2205,11 +2338,13 @@ int burn_sev_to_text(int severity_number, char **severity_name, int flag);
See also: libisofs, API function iso_get_messenger(). See also: libisofs, API function iso_get_messenger().
@param messenger The foreign but compatible message handle. @param messenger The foreign but compatible message handle.
@return 1 : success, <=0 : failure @return 1 : success, <=0 : failure
@since 0.4.0
*/ */
int burn_set_messenger(void *messenger); int burn_set_messenger(void *messenger);
/* ts A61002 */ /* ts A61002 */
/* @since 0.2.6 */
/** The prototype of a handler function suitable for burn_set_abort_handling(). /** The prototype of a handler function suitable for burn_set_abort_handling().
Such a function has to return -2 if it does not want the process to Such a function has to return -2 if it does not want the process to
exit with value 1. exit with value 1.
@ -2228,6 +2363,7 @@ typedef int (*burn_abort_handler_t)(void *handle, int signum, int flag);
Arguments (text, NULL, 0) activate the builtin abort handler. It will Arguments (text, NULL, 0) activate the builtin abort handler. It will
eventually call burn_abort() and then perform exit(1). If text is not NULL eventually call burn_abort() and then perform exit(1). If text is not NULL
then it is used as prefix for pacifier messages of burn_abort_pacifier(). then it is used as prefix for pacifier messages of burn_abort_pacifier().
@since 0.2.6
*/ */
void burn_set_signal_handling(void *handle, burn_abort_handler_t handler, void burn_set_signal_handling(void *handle, burn_abort_handler_t handler,
int mode); int mode);
@ -2260,6 +2396,7 @@ void burn_set_signal_handling(void *handle, burn_abort_handler_t handler,
@param flag Bitfield for control purposes: @param flag Bitfield for control purposes:
bit0 = flush the drive buffer after eventual writing bit0 = flush the drive buffer after eventual writing
@return 1=sucessful , <=0 : number of transfered bytes * -1 @return 1=sucessful , <=0 : number of transfered bytes * -1
@since 0.4.0
*/ */
int burn_random_access_write(struct burn_drive *d, off_t byte_address, int burn_random_access_write(struct burn_drive *d, off_t byte_address,
char *data, off_t data_count, int flag); char *data, off_t data_count, int flag);
@ -2284,6 +2421,7 @@ int burn_random_access_write(struct burn_drive *d, off_t byte_address,
bit0= - reserved - bit0= - reserved -
bit1= do not submit error message if read error bit1= do not submit error message if read error
@return 1=sucessful , <=0 an error occured @return 1=sucessful , <=0 an error occured
@since 0.4.0
*/ */
int burn_read_data(struct burn_drive *d, off_t byte_address, int burn_read_data(struct burn_drive *d, off_t byte_address,
char data[], off_t data_size, off_t *data_count, int flag); char data[], off_t data_size, off_t *data_count, int flag);
@ -2297,6 +2435,7 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
1= real MMC drive 1= real MMC drive
2= stdio-drive, random access, read-write 2= stdio-drive, random access, read-write
3= stdio-drive, sequential, write-only 3= stdio-drive, sequential, write-only
@since 0.4.0
*/ */
int burn_drive_get_drive_role(struct burn_drive *d); int burn_drive_get_drive_role(struct burn_drive *d);
@ -2323,6 +2462,7 @@ int burn_drive_get_drive_role(struct burn_drive *d);
prefix "stdio:". prefix "stdio:".
@return 1= adr2 leads to d1 , 0= adr2 seems not to lead to d1, @return 1= adr2 leads to d1 , 0= adr2 seems not to lead to d1,
-1 = adr2 is bad -1 = adr2 is bad
@since 0.4.0
*/ */
int burn_drive_equals_adr(struct burn_drive *d1, char *adr2, int drive_role2); int burn_drive_equals_adr(struct burn_drive *d1, char *adr2, int drive_role2);

View File

@ -524,6 +524,11 @@ Range "scdbackup" : 0x00020000 to 0x0002ffff
0x00020157 (FATAL,HIGH) = burn_source is not a fifo object 0x00020157 (FATAL,HIGH) = burn_source is not a fifo object
0x00020158 (DEBUG,LOW) = Reporting thread disposal precautions 0x00020158 (DEBUG,LOW) = Reporting thread disposal precautions
0x00020159 (DEBUG,HIGH) = TOC Format 0 returns inconsistent data 0x00020159 (DEBUG,HIGH) = TOC Format 0 returns inconsistent data
0x0002015a (NOTE,HIGH) = Could not examine busy device
0x0002015b (HINT,HIGH) = Busy '...' seems to be a hard disk, as '...1' exists
0x0002015c (FAILURE,HIGH) = Fifo size is smaller than desired peek buffer
0x0002015d (FAILURE,HIGH) = Fifo input ended short of desired peek buffer size
0x0002015e (FATAL,HIGH) = Fifo is already under consumption when peeking
libdax_audioxtr: libdax_audioxtr:
0x00020200 (SORRY,HIGH) = Cannot open audio source file 0x00020200 (SORRY,HIGH) = Cannot open audio source file

View File

@ -46,6 +46,7 @@ extern struct libdax_msgs *libdax_messenger;
#define Libburn_support_dvd_minusrw_overW 1 #define Libburn_support_dvd_minusrw_overW 1
/* ts A70112 */ /* ts A70112 */
/* ts A80410 : applies to BD-RE too */
#define Libburn_support_dvd_raM 1 #define Libburn_support_dvd_raM 1
/* ts A70129 */ /* ts A70129 */
@ -54,7 +55,26 @@ extern struct libdax_msgs *libdax_messenger;
/* ts A70306 */ /* ts A70306 */
#define Libburn_support_dvd_plus_R 1 #define Libburn_support_dvd_plus_R 1
/* DVD progress report: /* ts A70509 : handling 0x41 and 0x42 as read-only types */
#define Libburn_support_bd_r_readonlY 1
/* ts A80410 : <<< Dangerous experiment: Pretend that DVD-RAM is BD-RE
# define Libburn_dvd_ram_as_bd_rE yes
*/
/* ts A80509 : <<< Experiment: pretend that DVD-COM and CD-ROM are other media
like BD-ROM (0x40), BD-R seq (0x41), BD-R random (0x42)
# define Libburn_rom_as_profilE 0x40
*/
/* ts A80425 : Prevents command FORMAT UNIT for DVD-RAM or BD-RE.
Useful only to test the selection of format descriptors without
actually formatting the media.
# define Libburn_do_not_format_dvd_ram_or_bd_rE 1
*/
/* DVD/BD progress report:
ts A61219 : It seems to work with a used (i.e. thoroughly formatted) DVD+RW. ts A61219 : It seems to work with a used (i.e. thoroughly formatted) DVD+RW.
Error messages of class DEBUG appear because of inability to Error messages of class DEBUG appear because of inability to
read TOC or track info. Nevertheless, the written images verify. read TOC or track info. Nevertheless, the written images verify.
@ -93,6 +113,12 @@ extern struct libdax_msgs *libdax_messenger;
ts A70330 : Allowed finalizing of DVD+R. ts A70330 : Allowed finalizing of DVD+R.
ts A80228 : Made DVD+R/DL support official after nightmorph reported success ts A80228 : Made DVD+R/DL support official after nightmorph reported success
in http://libburnia-project.org/ticket/13 in http://libburnia-project.org/ticket/13
ts A80416 : drive->do_stream_recording brings DVD-RAM to full nominal
writing speed at cost of no defect management.
ts A80416 : Giulio Orsero reports success with BD-RE writing. With
drive->do_stream_recording it does full nominal speed.
ts A80506 : Giulio Orsero reports success with BD-RE formatting.
BD-RE is now an officially supported profile.
*/ */
/* ts A70519 : With MMC commands of data direction FROM_DRIVE: /* ts A70519 : With MMC commands of data direction FROM_DRIVE:
@ -308,15 +334,19 @@ int mmc_read_track_info(struct burn_drive *d, int trackno, struct buffer *buf,
c.opcode[1] = 1; c.opcode[1] = 1;
if(trackno<=0) { if(trackno<=0) {
if (d->current_profile == 0x1a || d->current_profile == 0x13 || if (d->current_profile == 0x1a || d->current_profile == 0x13 ||
d->current_profile == 0x12 || d->current_profile == 0x43) d->current_profile == 0x12 || d->current_profile == 0x42 ||
d->current_profile == 0x43)
/* DVD+RW , DVD-RW restricted overwrite , DVD-RAM /* DVD+RW , DVD-RW restricted overwrite , DVD-RAM
BD-RE */ BD-R random recording, BD-RE */
trackno = 1; trackno = 1;
else if (d->current_profile == 0x10 || else if (d->current_profile == 0x10 ||
d->current_profile == 0x11 || d->current_profile == 0x11 ||
d->current_profile == 0x14 || d->current_profile == 0x14 ||
d->current_profile == 0x15) d->current_profile == 0x15 ||
/* DVD-ROM , DVD-R[W] Sequential */ d->current_profile == 0x40 ||
d->current_profile == 0x41)
/* DVD-ROM , DVD-R[W] Sequential ,
BD-ROM , BD-R sequential */
trackno = d->last_track_no; trackno = d->last_track_no;
else /* mmc5r03c.pdf: valid only for CD, DVD+R, DVD+R DL */ else /* mmc5r03c.pdf: valid only for CD, DVD+R, DVD+R DL */
trackno = 0xFF; trackno = 0xFF;
@ -363,7 +393,8 @@ int mmc_get_nwa(struct burn_drive *d, int trackno, int *lba, int *nwa)
return 0; return 0;
} }
if (num > 0) { if (num > 0) {
d->media_capacity_remaining = ((off_t) num) * ((off_t) 2048); burn_drive_set_media_capacity_remaining(d,
((off_t) num) * ((off_t) 2048));
d->media_lba_limit = *nwa + num; d->media_lba_limit = *nwa + num;
} else } else
d->media_lba_limit = 0; d->media_lba_limit = 0;
@ -703,22 +734,26 @@ int mmc_write(struct burn_drive *d, int start, struct buffer *buf)
if(d->wait_for_buffer_free) if(d->wait_for_buffer_free)
mmc_wait_for_buffer_free(d, buf); mmc_wait_for_buffer_free(d, buf);
scsi_init_command(&c, MMC_WRITE_10, sizeof(MMC_WRITE_10)); /* ts A80412 */
/* if(d->do_stream_recording > 0) {
memcpy(c.opcode, MMC_WRITE_10, sizeof(MMC_WRITE_10));
c.oplen = sizeof(MMC_WRITE_10); /* >>> ??? is WRITE12 available ? */
*/ /* >>> ??? inquire feature 107h Stream Writing bit ? */
scsi_init_command(&c, MMC_WRITE_12, sizeof(MMC_WRITE_12));
mmc_int_to_four_char(c.opcode + 2, start);
mmc_int_to_four_char(c.opcode + 6, len);
c.opcode[10] = 1<<7; /* Streaming bit */
} else {
scsi_init_command(&c, MMC_WRITE_10, sizeof(MMC_WRITE_10));
mmc_int_to_four_char(c.opcode + 2, start);
c.opcode[6] = 0;
c.opcode[7] = (len >> 8) & 0xFF;
c.opcode[8] = len & 0xFF;
}
c.retry = 1; c.retry = 1;
mmc_int_to_four_char(c.opcode + 2, start);
c.opcode[6] = 0;
c.opcode[7] = (len >> 8) & 0xFF;
c.opcode[8] = len & 0xFF;
c.page = buf; c.page = buf;
c.dir = TO_DRIVE; c.dir = TO_DRIVE;
/*
burn_print(12, "%d, %d, %d, %d - ", c->opcode[2], c->opcode[3], c->opcode[4], c->opcode[5]);
burn_print(12, "%d, %d, %d, %d\n", c->opcode[6], c->opcode[7], c->opcode[8], c->opcode[9]);
*/
#ifdef Libburn_log_in_and_out_streaM #ifdef Libburn_log_in_and_out_streaM
/* <<< ts A61031 */ /* <<< ts A61031 */
@ -978,7 +1013,8 @@ int mmc_fake_toc(struct burn_drive *d)
} }
/* ts A71128 : My DVD-ROM drive issues no reliable track info. /* ts A71128 : My DVD-ROM drive issues no reliable track info.
One has to try 43h READ TOC/PMA/ATIP Form 0. */ One has to try 43h READ TOC/PMA/ATIP Form 0. */
if (d->current_profile == 0x10 && d->last_track_no <= 1) { if ((d->current_profile == 0x10 || d->current_profile == 0x40) &&
d->last_track_no <= 1) {
ret = mmc_read_toc_fmt0(d); ret = mmc_read_toc_fmt0(d);
return ret; return ret;
} }
@ -1041,9 +1077,9 @@ int mmc_fake_toc(struct burn_drive *d)
if (session_number > d->disc->sessions) { if (session_number > d->disc->sessions) {
if (i == d->last_track_no - 1) { if (i == d->last_track_no - 1) {
/* ts A70212 : Last track field Free Blocks */ /* ts A70212 : Last track field Free Blocks */
d->media_capacity_remaining = burn_drive_set_media_capacity_remaining(d,
((off_t) mmc_four_char_to_int(tdata + 16)) * ((off_t) mmc_four_char_to_int(tdata + 16)) *
((off_t) 2048); ((off_t) 2048));
d->media_lba_limit = 0; d->media_lba_limit = 0;
} }
continue; continue;
@ -1421,11 +1457,28 @@ static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
d->erasable = !!(data[2] & 16); d->erasable = !!(data[2] & 16);
disc_status = data[2] & 3; disc_status = data[2] & 3;
if (d->current_profile == 0x10) { /* DVD-ROM */ if (d->current_profile == 0x10 || d->current_profile == 0x40) {
/* DVD-ROM , BD-ROM */
disc_status = 2; /* always full and finalized */ disc_status = 2; /* always full and finalized */
d->erasable = 0; /* never erasable */ d->erasable = 0; /* never erasable */
} }
/* ts A80207 : DVD - R DL can normally be read but not be written */
if(d->current_profile == 0x15 && !burn_support_untested_profiles) {
disc_status = 2; /* always full and finalized */
d->erasable = 0; /* never erasable */
}
#ifdef Libburn_support_bd_r_readonlY
/* <<< For now: declaring BD-R read-only
*/
if (d->current_profile == 0x41 || d->current_profile == 0x42) {
/* BD-R seq, BD-R rnd */
disc_status = 2; /* always full and finalized */
d->erasable = 0; /* never erasable */
}
#endif /* Libburn_support_bd_r_readonlY */
switch (disc_status) { switch (disc_status) {
case 0: case 0:
d->toc_entries = 0; d->toc_entries = 0;
@ -1449,14 +1502,20 @@ static int mmc_read_disc_info_al(struct burn_drive *d, int *alloc_len)
break; break;
} }
/* ts A80207 : DVD +/- R DL can normally be read but not be written */
if((d->current_profile == 0x2b || d->current_profile == 0x15) && #ifdef NIX
!d->current_is_supported_profile) { /* <<< on its way out. DVD-R DL are current_is_supported_profile
unconditionally. Writeability is handled above now.
*/
/* ts A80207 : DVD - R DL can normally be read but not be written */
if(d->current_profile == 0x15 && !d->current_is_supported_profile) {
if(d->status == BURN_DISC_APPENDABLE) if(d->status == BURN_DISC_APPENDABLE)
d->status = BURN_DISC_FULL; d->status = BURN_DISC_FULL;
d->erasable = 0; /* never erasable */ d->erasable = 0; /* never erasable */
d->current_is_supported_profile = 1; d->current_is_supported_profile = 1;
} }
#endif /* NIX */
if ((d->current_profile != 0 || d->status != BURN_DISC_UNREADY) if ((d->current_profile != 0 || d->status != BURN_DISC_UNREADY)
&& ! d->current_is_supported_profile) { && ! d->current_is_supported_profile) {
@ -2093,9 +2152,34 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
if (len < 8 || len > 4096) if (len < 8 || len > 4096)
return 0; return 0;
cp = (c.page->data[6]<<8) | c.page->data[7]; cp = (c.page->data[6]<<8) | c.page->data[7];
#ifdef Libburn_rom_as_profilE
if (cp == 0x08 || cp == 0x10 || cp==0x40)
cp = Libburn_rom_as_profilE;
#endif /* Libburn_rom_as_profilE */
d->current_profile = cp; d->current_profile = cp;
strcpy(d->current_profile_text, mmc_obtain_profile_name(cp)); strcpy(d->current_profile_text, mmc_obtain_profile_name(cp));
if (cp == 0x08 || cp == 0x09 || cp == 0x0a)
/* Read-only supported media */
if (cp == 0x08) /* CD-ROM */
d->current_is_supported_profile = d->current_is_cd_profile = 1;
if (cp == 0x10) /* DVD-ROM */
d->current_is_supported_profile = 1;
if (cp == 0x40) /* BD-ROM */
d->current_is_supported_profile = 1;
#ifdef Libburn_support_bd_r_readonlY
if (cp == 0x41 || cp == 0x42) /* BD-R sequential, BD-R random */
d->current_is_supported_profile = 1;
#endif
/* Write supported media (they get declared suitable in
burn_disc_get_multi_caps) */
if (cp == 0x09 || cp == 0x0a)
d->current_is_supported_profile = d->current_is_cd_profile = 1; d->current_is_supported_profile = d->current_is_cd_profile = 1;
#ifdef Libburn_support_dvd_plus_rW #ifdef Libburn_support_dvd_plus_rW
@ -2107,14 +2191,21 @@ static int mmc_get_configuration_al(struct burn_drive *d, int *alloc_len)
d->current_is_supported_profile = 1; d->current_is_supported_profile = 1;
#endif #endif
#ifdef Libburn_support_dvd_raM #ifdef Libburn_support_dvd_raM
if (cp == 0x12 || (cp == 0x43 && burn_support_untested_profiles)) if (cp == 0x12 || cp == 0x43) { /* DVD-RAM , BD-RE */
/* DVD-RAM , BD-RE */
d->current_is_supported_profile = 1; d->current_is_supported_profile = 1;
#ifdef Libburn_dvd_ram_as_bd_rE
cp = d->current_profile = 0x43;
strcpy(d->current_profile_text, mmc_obtain_profile_name(cp));
#endif
}
#endif #endif
#ifdef Libburn_support_dvd_r_seQ #ifdef Libburn_support_dvd_r_seQ
if (cp == 0x10 || cp == 0x11 || cp == 0x14) /* DVD-ROM,DVD-R,DVD-RW */ if (cp == 0x11 || cp == 0x14) /* DVD-R, DVD-RW */
d->current_is_supported_profile = 1; d->current_is_supported_profile = 1;
if (cp == 0x15 && burn_support_untested_profiles) /* DVD-R/DL */ if (cp == 0x15) /* DVD-R/DL . */
/* Writeable only if burn_support_untested_profiles */
d->current_is_supported_profile = 1; d->current_is_supported_profile = 1;
#endif #endif
#ifdef Libburn_support_dvd_plus_R #ifdef Libburn_support_dvd_plus_R
@ -2328,6 +2419,8 @@ static int mmc_read_format_capacities_al(struct burn_drive *d,
d->format_descr_type = dpt[4] & 3; d->format_descr_type = dpt[4] & 3;
d->format_curr_max_size = (((off_t) dpt[0]) << 24) d->format_curr_max_size = (((off_t) dpt[0]) << 24)
+ (dpt[1] << 16) + (dpt[2] << 8) + dpt[3]; + (dpt[1] << 16) + (dpt[2] << 8) + dpt[3];
if (d->format_descr_type == BURN_FORMAT_IS_UNKNOWN)
d->format_curr_max_size = 0;
d->format_curr_blsas = (dpt[5] << 16) + (dpt[6] << 8) + dpt[7]; d->format_curr_blsas = (dpt[5] << 16) + (dpt[6] << 8) + dpt[7];
/* <<< /* <<<
@ -2340,6 +2433,45 @@ static int mmc_read_format_capacities_al(struct burn_drive *d,
*/ */
d->format_curr_max_size *= (off_t) 2048; d->format_curr_max_size *= (off_t) 2048;
if((d->current_profile == 0x12 || d->current_profile == 0x43)
&& d->media_capacity_remaining == 0) {
burn_drive_set_media_capacity_remaining(d,
d->format_curr_max_size);
d->media_lba_limit = d->format_curr_max_size / 2048;
}
#ifdef Libburn_dvd_ram_as_bd_rE
/* <<< dummy format descriptor list as obtained from
dvd+rw-mediainfo by Giulio Orsero in April 2008
*/
d->num_format_descr = 5;
d->format_descriptors[0].type = 0x00;
d->format_descriptors[0].size = (off_t) 11826176 * (off_t) 2048;
d->format_descriptors[0].tdp = 0x3000;
d->format_descriptors[1].type = 0x30;
d->format_descriptors[1].size = (off_t) 11826176 * (off_t) 2048;
d->format_descriptors[1].tdp = 0x3000;
d->format_descriptors[2].type = 0x30;
d->format_descriptors[2].size = (off_t) 11564032 * (off_t) 2048;
d->format_descriptors[2].tdp = 0x5000;
d->format_descriptors[3].type = 0x30;
d->format_descriptors[3].size = (off_t) 12088320 * (off_t) 2048;
d->format_descriptors[3].tdp = 0x1000;
d->format_descriptors[4].type = 0x31;
d->format_descriptors[4].size = (off_t) 12219392 * (off_t) 2048;
d->format_descriptors[4].tdp = 0x800;
d->best_format_type = 0x00;
d->best_format_size = (off_t) 11826176 * (off_t) 2048;
/* silencing compiler warnings about unused variables */
num_blocks = size = sign = i = max_score = num_descr = score = type = 0;
if (d->current_profile == 0x12 || d->current_profile == 0x43)
return 1;
d->num_format_descr = 0;
#endif /* Libburn_dvd_ram_as_bd_rE */
if (top_wanted == 0x00 || top_wanted == 0x10) if (top_wanted == 0x00 || top_wanted == 0x10)
sign = -1; /* the caller clearly desires full format */ sign = -1; /* the caller clearly desires full format */
@ -2372,11 +2504,6 @@ static int mmc_read_format_capacities_al(struct burn_drive *d,
/* Criterion is proximity to quick intermediate state */ /* Criterion is proximity to quick intermediate state */
if (type == 0x00) { /* full format (with lead out) */ if (type == 0x00) { /* full format (with lead out) */
score = 1 * sign; score = 1 * sign;
if(d->current_profile == 0x12 &&
d->media_capacity_remaining == 0) {
d->media_capacity_remaining = size;
d->media_lba_limit = num_blocks;
}
} else if (type == 0x10) { /* DVD-RW full format */ } else if (type == 0x10) { /* DVD-RW full format */
score = 10 * sign; score = 10 * sign;
} else if(type == 0x13) { /* DVD-RW quick grow last session */ } else if(type == 0x13) { /* DVD-RW quick grow last session */
@ -2384,12 +2511,13 @@ static int mmc_read_format_capacities_al(struct burn_drive *d,
} else if(type == 0x15) { /* DVD-RW Quick */ } else if(type == 0x15) { /* DVD-RW Quick */
score = 50 * sign; score = 50 * sign;
if(d->current_profile == 0x13) { if(d->current_profile == 0x13) {
d->media_capacity_remaining = size; burn_drive_set_media_capacity_remaining(d,
size);
d->media_lba_limit = num_blocks; d->media_lba_limit = num_blocks;
} }
} else if(type == 0x26) { /* DVD+RW */ } else if(type == 0x26) { /* DVD+RW */
score = 1 * sign; score = 1 * sign;
d->media_capacity_remaining = size; burn_drive_set_media_capacity_remaining(d, size);
d->media_lba_limit = num_blocks; d->media_lba_limit = num_blocks;
} else { } else {
continue; continue;
@ -2545,10 +2673,16 @@ int mmc_read_buffer_capacity(struct burn_drive *d)
and mmc5r03c.pdf, 6.5 FORMAT UNIT */ and mmc5r03c.pdf, 6.5 FORMAT UNIT */
/* /*
@param size The size (in bytes) to be sent with the FORMAT comand @param size The size (in bytes) to be sent with the FORMAT comand
@param flag bit1= insist in size 0 even if there is a better default known @param flag bit1+2: size mode
bit2= format to maximum available size 0 = use parameter size as far as it makes sense
1 = insist in size 0 even if there is a better default known
2 = without bit7: format to maximum available size
with bit7 : take size from indexed format descriptor
3 = format to default size
bit3= expand format up to at least size bit3= expand format up to at least size
bit4= enforce re-format of (partly) formatted media bit4= enforce re-format of (partly) formatted media
bit5= try to disable eventual defect management
bit6= try to avoid lengthy media certification
bit7= bit8 to bit15 contain the index of the format to use bit7= bit8 to bit15 contain the index of the format to use
bit8-bit15 = see bit7 bit8-bit15 = see bit7
*/ */
@ -2557,13 +2691,15 @@ int mmc_format_unit(struct burn_drive *d, off_t size, int flag)
struct buffer buf; struct buffer buf;
struct command c; struct command c;
int ret, tolerate_failure = 0, return_immediately = 0, i, format_type; int ret, tolerate_failure = 0, return_immediately = 0, i, format_type;
int index; int index, format_sub_type = 0, format_00_index, size_mode;
off_t num_of_blocks = 0, diff; int accept_count = 0;
off_t num_of_blocks = 0, diff, format_size, i_size, format_00_max_size;
char msg[160],descr[80]; char msg[160],descr[80];
int full_format_type = 0x00; /* Full Format (or 0x10 for DVD-RW ?) */ int full_format_type = 0x00; /* Full Format (or 0x10 for DVD-RW ?) */
if (mmc_function_spy(d, "mmc_format_unit") <= 0) if (mmc_function_spy(d, "mmc_format_unit") <= 0)
return 0; return 0;
size_mode = (flag >> 1) & 3;
scsi_init_command(&c, MMC_FORMAT_UNIT, sizeof(MMC_FORMAT_UNIT)); scsi_init_command(&c, MMC_FORMAT_UNIT, sizeof(MMC_FORMAT_UNIT));
/* /*
@ -2590,7 +2726,7 @@ int mmc_format_unit(struct burn_drive *d, off_t size, int flag)
if (ret <= 0) if (ret <= 0)
goto selected_not_suitable; goto selected_not_suitable;
index = (flag >> 8) & 0xff; index = (flag >> 8) & 0xff;
if(index < 0 || index > d->num_format_descr) { if(index < 0 || index >= d->num_format_descr) {
selected_not_suitable:; selected_not_suitable:;
libdax_msgs_submit(libdax_messenger, d->global_index, libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020132, 0x00020132,
@ -2601,13 +2737,17 @@ selected_not_suitable:;
} }
if (!(d->current_profile == 0x13 || if (!(d->current_profile == 0x13 ||
d->current_profile == 0x14 || d->current_profile == 0x14 ||
d->current_profile == 0x1a)) d->current_profile == 0x1a ||
d->current_profile == 0x12 ||
d->current_profile == 0x43))
goto unsuitable_media; goto unsuitable_media;
format_type = d->format_descriptors[index].type; format_type = d->format_descriptors[index].type;
if (!(format_type == 0x00 || format_type == 0x10 || if (!(format_type == 0x00 || format_type == 0x01 ||
format_type == 0x10 ||
format_type == 0x11 || format_type == 0x13 || format_type == 0x11 || format_type == 0x13 ||
format_type == 0x15 || format_type == 0x26)) format_type == 0x15 || format_type == 0x26 ||
format_type == 0x30 || format_type == 0x31 ))
goto selected_not_suitable; goto selected_not_suitable;
if (flag & 4) { if (flag & 4) {
num_of_blocks = num_of_blocks =
@ -2619,7 +2759,20 @@ selected_not_suitable:;
c.page->data[9 + i] = c.page->data[9 + i] =
( d->format_descriptors[index].tdp >> ( d->format_descriptors[index].tdp >>
(16 - 8 * i)) & 0xff; (16 - 8 * i)) & 0xff;
sprintf(descr, "%s (bit7)", d->current_profile_text); if (format_type == 0x30 || format_type == 0x31) {
if (flag & 64)
format_sub_type = 3; /* Quick certification */
else
format_sub_type = 2; /* Full certification */
}
if (d->current_profile == 0x12 && format_type !=0x01 &&
(flag & 64)) {
/* DCRT and CmpList, see below */
c.page->data[1] |= 0x20;
c.opcode[1] |= 0x08;
}
c.page->data[1] |= 0x80; /* FOV = this flag vector is valid */
sprintf(descr, "%s (descr %d)", d->current_profile_text,index);
return_immediately = 1; /* caller must do the waiting */ return_immediately = 1; /* caller must do the waiting */
} else if (d->current_profile == 0x1a) { /* DVD+RW */ } else if (d->current_profile == 0x1a) { /* DVD+RW */
@ -2630,6 +2783,8 @@ selected_not_suitable:;
/* mmc5r03c.pdf , 6.5.4.2.14, DVD+RW Basic Format */ /* mmc5r03c.pdf , 6.5.4.2.14, DVD+RW Basic Format */
format_type = 0x26; format_type = 0x26;
/* >>> ??? is this "| 8" a bug ? */
if ((size <= 0 && !(flag & 2)) || (flag & (4 | 8))) { if ((size <= 0 && !(flag & 2)) || (flag & (4 | 8))) {
/* maximum capacity */ /* maximum capacity */
memset(c.page->data + 4, 0xff, 4); memset(c.page->data + 4, 0xff, 4);
@ -2717,6 +2872,7 @@ selected_not_suitable:;
} }
} else { } else {
no_suitable_formatting_type:;
libdax_msgs_submit(libdax_messenger, d->global_index, libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020131, 0x00020131,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_HIGH,
@ -2730,9 +2886,170 @@ selected_not_suitable:;
format_type == 0x15 ? "quick" : "full"); format_type == 0x15 ? "quick" : "full");
return_immediately = 1; /* caller must do the waiting */ return_immediately = 1; /* caller must do the waiting */
} else if (d->current_profile == 0x12) {
/* ts A80417 : DVD-RAM */
/* 6.5.4.2.1 Format Type = 00h (Full Format)
6.5.4.2.2 Format Type = 01h (Spare Area Expansion)
*/
index = format_00_index = -1;
format_size = format_00_max_size = -1;
for (i = 0; i < d->num_format_descr; i++) {
format_type = d->format_descriptors[i].type;
i_size = d->format_descriptors[i].size;
if (format_type != 0x00 && format_type != 0x01)
continue;
if (flag & 32) { /* No defect mgt */
/* Search for largest 0x00 format descriptor */
if (format_type != 0x00)
continue;
if (i_size < format_size)
continue;
format_size = i_size;
index = i;
continue;
} else if (flag & 4) { /*Max or default size with mgt*/
/* Search for second largest 0x00
format descriptor. For max size allow
format type 0x01.
*/
if (format_type == 0x00) {
if (i_size < format_size)
continue;
if (i_size < format_00_max_size) {
format_size = i_size;
index = i;
continue;
}
format_size = format_00_max_size;
index = format_00_index;
format_00_max_size = i_size;
format_00_index = i;
continue;
}
if (size_mode==3)
continue;
if (i_size > format_size) {
format_size = i_size;
index = i;
}
continue;
}
/* Search for smallest 0x0 or 0x01
descriptor >= size */;
if (d->format_descriptors[i].size >= size &&
(format_size < 0 || i_size < format_size)
) {
format_size = i_size;
index = i;
}
}
if(index < 0 && (flag & 4) && !(flag & 32)) {
format_size = format_00_max_size;
index = format_00_index;
}
if(index < 0)
goto no_suitable_formatting_type;
format_type = d->format_descriptors[index].type;
num_of_blocks = d->format_descriptors[index].size / 2048;
mmc_int_to_four_char(c.page->data + 4, num_of_blocks);
for (i = 0; i < 3; i++)
c.page->data[9 + i] =
( d->format_descriptors[index].tdp >>
(16 - 8 * i)) & 0xff;
sprintf(descr, "%s", d->current_profile_text);
return_immediately = 1; /* caller must do the waiting */
c.page->data[1] |= 0x80; /* FOV = this flag vector is valid */
if ((flag & 64) && format_type != 0x01) {
/* MMC-5 6.5.3.2 , 6.5.4.2.1.2
DCRT: Disable Certification and maintain number
of blocks
CmpList: Override maintaining of number of blocks
with DCRT
*/
/* ts A80426 : prevents change of formatted size
with PHILIPS SPD3300L and Verbatim 3x DVD-RAM
and format_type 0x00. Works on TSSTcorp SH-S203B
*/
c.page->data[1] |= 0x20;
c.opcode[1] |= 0x08;
}
} else if (d->current_profile == 0x43) {
/* BD-RE */
index = -1;
format_size = -1;
if (d->num_format_descr <= 0)
goto no_suitable_formatting_type;
if (d->format_descriptors[0].type != 0)
goto no_suitable_formatting_type;
for (i = 0; i < d->num_format_descr; i++) {
format_type = d->format_descriptors[i].type;
i_size = d->format_descriptors[i].size;
if (format_type != 0x00 && format_type != 0x30 &&
format_type != 0x31)
continue;
if (flag & 32) { /* No defect mgt */
/* search largest format 0x31 */
if(format_type != 0x31)
continue;
} else if(size_mode == 2) { /* max payload size */
/* search largest 0x30 format descriptor */
if(format_type != 0x30)
continue;
} else if(size_mode == 3) { /* default payload size */
if (accept_count < 1)
index = 0; /* this cannot certify */
if(format_type != 0x30)
continue;
accept_count++;
if (accept_count == 1)
index = i;
continue;
} else { /* defect managed format with size wish */
/* search for smallest 0x30 >= size */
if(format_type != 0x30)
continue;
if (i_size < size)
continue;
if (format_size >= 0 && i_size >= format_size)
continue;
index = i;
format_size = i_size;
continue;
}
/* common for all cases which search largest
descriptors */
if (i_size > format_size) {
format_size = i_size;
index = i;
}
}
if (size_mode == 2 && index < 0 && !(flag & 32))
index = 0;
if (index < 0)
goto no_suitable_formatting_type;
format_type = d->format_descriptors[index].type;
if (format_type == 0x30 || format_type == 0x31) {
if (flag & 64)
format_sub_type = 3; /* Quick certification */
else
format_sub_type = 2; /* Full certification */
}
num_of_blocks = d->format_descriptors[index].size / 2048;
mmc_int_to_four_char(c.page->data + 4, num_of_blocks);
for (i = 0; i < 3; i++)
c.page->data[9 + i] =
( d->format_descriptors[index].tdp >>
(16 - 8 * i)) & 0xff;
sprintf(descr, "%s", d->current_profile_text);
return_immediately = 1; /* caller must do the waiting */
c.page->data[1] |= 0x80; /* FOV = this flag vector is valid */
} else { } else {
/* >>> other formattable types to come */ /* >>> other formattable types to come */
unsuitable_media:; unsuitable_media:;
sprintf(msg, "Unsuitable media detected. Profile %4.4Xh %s", sprintf(msg, "Unsuitable media detected. Profile %4.4Xh %s",
d->current_profile, d->current_profile_text); d->current_profile, d->current_profile_text);
@ -2742,13 +3059,39 @@ unsuitable_media:;
msg, 0, 0); msg, 0, 0);
return 0; return 0;
} }
c.page->data[8] = format_type << 2; c.page->data[8] = (format_type << 2) | (format_sub_type & 3);
sprintf(msg, "Format type %2.2Xh \"%s\", blocks = %.f\n", sprintf(msg, "Format type %2.2Xh \"%s\", blocks = %.f",
format_type, descr, (double) num_of_blocks); format_type, descr, (double) num_of_blocks);
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002, libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
msg, 0, 0); msg, 0, 0);
sprintf(msg, "CDB: ");
for (i = 0; i < 6; i++)
sprintf(msg + strlen(msg), "%2.2X ", c.opcode[i]);
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
msg, 0, 0);
sprintf(msg, "Format list: ");
for (i = 0; i < 12; i++)
sprintf(msg + strlen(msg), "%2.2X ", c.page->data[i]);
strcat(msg, "\n");
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO,
msg, 0, 0);
#ifdef Libburn_do_not_format_dvd_ram_or_bd_rE
if(d->current_profile == 0x43 || d->current_profile == 0x12) {
sprintf(msg,
"Formatting of %s not implemented yet - This is a dummy",
d->current_profile_text);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00000002,
LIBDAX_MSGS_SEV_WARNING, LIBDAX_MSGS_PRIO_ZERO,
msg, 0, 0);
return 1;
}
#endif /* Libburn_do_not_format_dvd_ram_or_bd_rE */
d->issue_command(d, &c); d->issue_command(d, &c);
if (c.error && !tolerate_failure) { if (c.error && !tolerate_failure) {

View File

@ -38,6 +38,7 @@ struct burn_write_opts *burn_write_opts_new(struct burn_drive *drive)
opts->start_byte = -1; opts->start_byte = -1;
opts->fill_up_media = 0; opts->fill_up_media = 0;
opts->force_is_set = 0; opts->force_is_set = 0;
opts->do_stream_recording = 0;
opts->has_mediacatalog = 0; opts->has_mediacatalog = 0;
opts->format = BURN_CDROM; opts->format = BURN_CDROM;
opts->multi = 0; opts->multi = 0;
@ -380,6 +381,16 @@ void burn_write_opts_set_force(struct burn_write_opts *opts, int use_force)
} }
/* ts A80412: API */
void burn_write_opts_set_stream_recording(struct burn_write_opts *opts,
int value)
{
opts->do_stream_recording = !!value;
}
/* ts A70901: API */ /* ts A70901: API */
struct burn_drive *burn_write_opts_get_drive(struct burn_write_opts *opts) struct burn_drive *burn_write_opts_get_drive(struct burn_write_opts *opts)
{ {

View File

@ -49,6 +49,11 @@ struct burn_write_opts
*/ */
int force_is_set; int force_is_set;
/* ts A80412 : whether to use WRITE12 with Streaming bit set
rather than WRITE10. Speeds up DVD-RAM. Might help with BD-RE.
This gets transferred to burn_drive.do_stream_recording */
int do_stream_recording;
/** A disc can have a media catalog number */ /** A disc can have a media catalog number */
int has_mediacatalog; int has_mediacatalog;
unsigned char mediacatalog[13]; unsigned char mediacatalog[13];

View File

@ -43,9 +43,12 @@ SIGKILL, SIGCHLD, SIGSTOP, SIGURG, SIGWINCH
/* The maximum size for a (SCSI) i/o transaction */ /* The maximum size for a (SCSI) i/o transaction */
/* Important : MUST be at least 32768 ! */ /* Important : MUST be at least 32768 ! */
/* ts A70523 : >32k seems not good with kernel 2.4 USB drivers and audio /* ts A70523 : >32k seems not good with kernel 2.4 USB drivers and audio
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536 #define BURN_OS_TRANSPORT_BUFFER_SIZE 32768
*/ */
#define BURN_OS_TRANSPORT_BUFFER_SIZE 32768 /* ts A80414 : curbed in write.c CD media to Libburn_cd_obS = 32 kiB
re-enlarged transport to 64 kiB for BD-RE experiments
*/
#define BURN_OS_TRANSPORT_BUFFER_SIZE 65536
/* To hold the index number of the most recently delivered address from /* To hold the index number of the most recently delivered address from

View File

@ -464,14 +464,13 @@ int burn_read_data(struct burn_drive *d, off_t byte_address,
wpt += 2048; wpt += 2048;
*data_count += 2048; *data_count += 2048;
} }
if (!(flag & 2))
libdax_msgs_submit(libdax_messenger, libdax_msgs_submit(libdax_messenger,
d->global_index, d->global_index,
0x00020000, 0x00020000,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH,
"burn_read_data() returns 0", "burn_read_data() returns 0",
0, 0); 0, 0);
ret = 0; goto ex; ret = 0; goto ex;
} }
memcpy(wpt, d->buffer->data, cpy_size); memcpy(wpt, d->buffer->data, cpy_size);

View File

@ -260,6 +260,37 @@ static void sg_select_device_family(void)
} }
/* ts A80701 */
/* This cares for the case that no /dev/srNN but only /dev/scdNN exists.
A theoretical case which has its complement in SuSE 10.2 having
/dev/sr but not /dev/scd.
*/
static int sg_exchange_scd_for_sr(char *fname, int flag)
{
struct stat stbuf;
char scd[17], msg[160];
if (burn_sg_use_family != 0 || strncmp(fname, "/dev/sr", 7)!=0 ||
strlen(fname)>9 || strlen(fname)<8)
return 2;
if (fname[7] < '0' || fname[7] > '9')
return 2;
if (fname [8] != 0 && (fname[7] < '0' || fname[7] > '9'))
return 2;
if (stat(fname, &stbuf) != -1)
return 2;
strcpy(scd, "/dev/scd");
strcpy(scd + 8, fname + 7);
if (stat(scd, &stbuf) == -1)
return 2;
sprintf(msg, "%s substitutes for non-existent %s", scd, fname);
libdax_msgs_submit(libdax_messenger, -1, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_HIGH, msg, 0, 0);
strcpy(fname, scd);
return 1;
}
static int sgio_test(int fd) static int sgio_test(int fd)
{ {
unsigned char test_ops[] = { 0, 0, 0, 0, 0, 0 }; unsigned char test_ops[] = { 0, 0, 0, 0, 0, 0 };
@ -279,6 +310,33 @@ static int sgio_test(int fd)
static int sg_handle_busy_device(char *fname, int os_errno) static int sg_handle_busy_device(char *fname, int os_errno)
{ {
char msg[4096]; char msg[4096];
struct stat stbuf;
int looks_like_hd= 0, fd, ret;
/* ts A80713 :
check existence of /dev/hdX1 as hint for hard disk rather than CD
Hint by Giulio Orsero: check /proc/ide/hdX/media for "disk"
*/
if (strncmp(fname, "/dev/hd", 7)==0) {
sprintf(msg, "%s1", fname);
if (stat(msg, &stbuf) != -1)
looks_like_hd= 1;
sprintf(msg, "/proc/ide/hd%c/media", fname[7]);
fd = open(msg, O_RDONLY);
if (fd != -1) {
ret = read(fd, msg, 10);
if (ret < 0)
ret = 0;
msg[ret]= 0;
close(fd);
if (strncmp(msg, "disk\n", 5) == 0 ||
strcmp(msg, "disk") == 0)
looks_like_hd= 2;
else if (strncmp(msg, "cdrom\n", 6) == 0 ||
strcmp(msg, "cdrom") == 0)
looks_like_hd= 0;
}
}
/* ts A60814 : i saw no way to do this more nicely */ /* ts A60814 : i saw no way to do this more nicely */
if (burn_sg_open_abort_busy) { if (burn_sg_open_abort_busy) {
@ -292,10 +350,26 @@ static int sg_handle_busy_device(char *fname, int os_errno)
} }
/* ts A60924 : now reporting to libdax_msgs */ /* ts A60924 : now reporting to libdax_msgs */
sprintf(msg, "Cannot open busy device '%s'", fname); if (looks_like_hd == 2) { /* is surely hard disk */
libdax_msgs_submit(libdax_messenger, -1, 0x00020001, ;
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_LOW, } else if (looks_like_hd) {
msg, os_errno, 0); sprintf(msg, "Could not examine busy device '%s'", fname);
libdax_msgs_submit(libdax_messenger, -1, 0x0002015a,
LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_LOW,
msg, os_errno, 0);
sprintf(msg,
"Busy '%s' seems to be a hard disk, as '%s1' exists. But better check.",
fname, fname);
libdax_msgs_submit(libdax_messenger, -1, 0x0002015b,
LIBDAX_MSGS_SEV_HINT, LIBDAX_MSGS_PRIO_LOW,
msg, 0, 0);
} else {
sprintf(msg, "Cannot open busy device '%s'", fname);
libdax_msgs_submit(libdax_messenger, -1, 0x00020001,
LIBDAX_MSGS_SEV_SORRY, LIBDAX_MSGS_PRIO_LOW,
msg, os_errno, 0);
}
return 1; return 1;
} }
@ -646,7 +720,7 @@ static void sg_enumerate(void)
int i, fd, sibling_fds[BURN_OS_SG_MAX_SIBLINGS], sibling_count= 0, ret; int i, fd, sibling_fds[BURN_OS_SG_MAX_SIBLINGS], sibling_count= 0, ret;
int sid_ret = 0; int sid_ret = 0;
int bus_no= -1, host_no= -1, channel_no= -1, target_no= -1, lun_no= -1; int bus_no= -1, host_no= -1, channel_no= -1, target_no= -1, lun_no= -1;
char fname[10]; char fname[17];
char sibling_fnames[BURN_OS_SG_MAX_SIBLINGS][BURN_OS_SG_MAX_NAMELEN]; char sibling_fnames[BURN_OS_SG_MAX_SIBLINGS][BURN_OS_SG_MAX_NAMELEN];
sg_select_device_family(); sg_select_device_family();
@ -661,6 +735,9 @@ static void sg_enumerate(void)
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
sprintf(fname, linux_sg_device_family, i); sprintf(fname, linux_sg_device_family, i);
/* ts A80702 */
sg_exchange_scd_for_sr(fname, 0);
if (linux_sg_enumerate_debug) if (linux_sg_enumerate_debug)
fprintf(stderr, "libburn_debug: %s : ", fname); fprintf(stderr, "libburn_debug: %s : ", fname);
@ -893,6 +970,10 @@ int sg_give_next_adr(burn_drive_enumerator_t *idx,
if (adr_size < 10) if (adr_size < 10)
return -1; return -1;
sprintf(adr, linux_sg_device_family, *idx); sprintf(adr, linux_sg_device_family, *idx);
/* ts A80702 */
sg_exchange_scd_for_sr(adr, 0);
return 1; return 1;
next_ata:; next_ata:;
baseno += sg_limit; baseno += sg_limit;
@ -1378,7 +1459,6 @@ int sg_is_enumerable_adr(char *adr)
sg_give_next_adr(&idx, fname, sizeof(fname), -1); sg_give_next_adr(&idx, fname, sizeof(fname), -1);
return 1; return 1;
} }
} }
sg_give_next_adr(&idx, fname, sizeof(fname), -1); sg_give_next_adr(&idx, fname, sizeof(fname), -1);
return(0); return(0);

View File

@ -187,6 +187,11 @@ struct burn_drive
synchronize chache has happened yet */ synchronize chache has happened yet */
int needs_sync_cache; int needs_sync_cache;
/* ts A80412 : whether to use WRITE12 with Streaming bit set
rather than WRITE10. Speeds up DVD-RAM. Might help
with BD-RE */
int do_stream_recording;
/* ts A61218 from 51h READ DISC INFORMATION */ /* ts A61218 from 51h READ DISC INFORMATION */
int bg_format_status; /* 0=needs format start, 1=needs format restart*/ int bg_format_status; /* 0=needs format start, 1=needs format restart*/
@ -348,4 +353,9 @@ struct burn_drive
/* end of generic 'drive' data structures */ /* end of generic 'drive' data structures */
/* ts A80422 : centralizing this setting for debugging purposes
*/
int burn_drive_set_media_capacity_remaining(struct burn_drive *d, off_t value);
#endif /* __TRANSPORT */ #endif /* __TRANSPORT */

View File

@ -47,7 +47,14 @@ char *burn_strndup(char *s, int n)
void burn_version(int *major, int *minor, int *micro) void burn_version(int *major, int *minor, int *micro)
{ {
/* ts A80408 : switched from configure.ac versioning to libburn.h versioning */
#ifdef burn_header_version_major
*major = burn_header_version_major;
*minor = burn_header_version_minor;
*micro = burn_header_version_micro;
#else
*major = BURN_MAJOR_VERSION; *major = BURN_MAJOR_VERSION;
*minor = BURN_MINOR_VERSION; *minor = BURN_MINOR_VERSION;
*micro = BURN_MICRO_VERSION; *micro = BURN_MICRO_VERSION;
#endif
} }

View File

@ -49,6 +49,24 @@
extern struct libdax_msgs *libdax_messenger; extern struct libdax_msgs *libdax_messenger;
/* The maximum output size to be used with CD media. This is also curbed
by BURN_OS_TRANSPORT_BUFFER_SIZE. The smaller number gets into effect.
*/
#define Libburn_cd_obS (32 * 1024)
/* The size to be used with DVD media.
*/
#define Libburn_dvd_obS (32 * 1024)
/* The size to be used with BD-RE media in normal, not streamed mode.
*/
#define Libburn_bd_re_obS (32 * 1024)
/* The size to be used with BD-RE media in streamed mode.
*/
#define Libburn_bd_re_streamed_obS (64 * 1024)
static int type_to_ctrl(int mode) static int type_to_ctrl(int mode)
{ {
int ctrl = 0; int ctrl = 0;
@ -1401,7 +1419,6 @@ int burn_disc_setup_dvd_plus_rw(struct burn_write_opts *o,
{ {
struct burn_drive *d = o->drive; struct burn_drive *d = o->drive;
int ret; int ret;
char msg[160];
if (d->bg_format_status==0 || d->bg_format_status==1) { if (d->bg_format_status==0 || d->bg_format_status==1) {
d->busy = BURN_DRIVE_FORMATTING; d->busy = BURN_DRIVE_FORMATTING;
@ -1412,16 +1429,6 @@ int burn_disc_setup_dvd_plus_rw(struct burn_write_opts *o,
d->busy = BURN_DRIVE_WRITING; d->busy = BURN_DRIVE_WRITING;
d->needs_close_session = 1; d->needs_close_session = 1;
} }
d->nwa = 0;
if (o->start_byte >= 0) {
d->nwa = o->start_byte / 2048;
sprintf(msg, "Write start address is %d * 2048", d->nwa);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020127,
LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
}
/* >>> perform OPC if needed */; /* >>> perform OPC if needed */;
@ -1511,7 +1518,7 @@ int burn_disc_setup_dvd_plus_r(struct burn_write_opts *o,
} }
/* ts A61218 - A70129 */ /* ts A61218 - A70415 */
int burn_dvd_write_sync(struct burn_write_opts *o, int burn_dvd_write_sync(struct burn_write_opts *o,
struct burn_disc *disc) struct burn_disc *disc)
{ {
@ -1523,6 +1530,9 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
d->needs_close_session = 0; d->needs_close_session = 0;
/* buffer flush trigger for sector.c:get_sector() */
o->obs = Libburn_dvd_obS;
if (d->current_profile == 0x1a || d->current_profile == 0x12 || if (d->current_profile == 0x1a || d->current_profile == 0x12 ||
d->current_profile == 0x43) { d->current_profile == 0x43) {
/* DVD+RW , DVD-RAM , BD-RE */ /* DVD+RW , DVD-RAM , BD-RE */
@ -1538,7 +1548,24 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
msg, 0, 0); msg, 0, 0);
goto early_failure; goto early_failure;
} }
d->nwa = 0;
if (o->start_byte >= 0) {
d->nwa = o->start_byte / 2048;
sprintf(msg, "Write start address is %d * 2048",
d->nwa);
libdax_msgs_submit(libdax_messenger, d->global_index,
0x00020127,
LIBDAX_MSGS_SEV_NOTE, LIBDAX_MSGS_PRIO_HIGH,
msg, 0, 0);
}
o->obs_pad = 0; /* no filling-up of track's last 32k buffer */ o->obs_pad = 0; /* no filling-up of track's last 32k buffer */
if (d->current_profile == 0x43) /* BD-RE */
o->obs = Libburn_bd_re_obS;
if (d->do_stream_recording) {
o->obs_pad = 1;
if (d->current_profile == 0x43) /* BD-RE */
o->obs = Libburn_bd_re_streamed_obS;
}
} else if (d->current_profile == 0x13) { } else if (d->current_profile == 0x13) {
/* DVD-RW Restricted Overwrite */ /* DVD-RW Restricted Overwrite */
@ -1611,7 +1638,11 @@ int burn_dvd_write_sync(struct burn_write_opts *o,
/* ??? padding needed ??? cowardly doing it for now */ /* ??? padding needed ??? cowardly doing it for now */
o->obs_pad = 1; /* fill-up track's last 32k buffer */ o->obs_pad = 1; /* fill-up track's last 32k buffer */
} }
o->obs = 32*1024; /* buffer flush trigger for sector.c:get_sector() */
sprintf(msg, "dvd/bd Profile= %2.2Xh , obs= %d , obs_pad= %d",
d->current_profile, o->obs, o->obs_pad);
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO, msg, 0, 0);
for (i = 0; i < disc->sessions; i++) { for (i = 0; i < disc->sessions; i++) {
/* update progress */ /* update progress */
@ -1978,6 +2009,9 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
/* ts A61224 */ /* ts A61224 */
burn_disc_init_write_status(o, disc); /* must be done very early */ burn_disc_init_write_status(o, disc); /* must be done very early */
/* ts A80412 */
d->do_stream_recording = o->do_stream_recording;
d->buffer = &buf; d->buffer = &buf;
memset(d->buffer, 0, sizeof(struct buffer)); memset(d->buffer, 0, sizeof(struct buffer));
d->rlba = -150; d->rlba = -150;
@ -1988,16 +2022,26 @@ void burn_disc_write_sync(struct burn_write_opts *o, struct burn_disc *disc)
ret = burn_stdio_write_sync(o, disc); ret = burn_stdio_write_sync(o, disc);
if (ret <= 0) if (ret <= 0)
goto fail_wo_sync; goto fail_wo_sync;
return; goto ex;
} }
/* ts A61218 */ /* ts A61218 */
if (! d->current_is_cd_profile) { if (! d->current_is_cd_profile) {
ret = burn_dvd_write_sync(o, disc); ret = burn_dvd_write_sync(o, disc);
if (ret <= 0) if (ret <= 0)
goto fail_wo_sync; goto fail_wo_sync;
return; goto ex;
} }
/* ts A70521 : Linux 2.4 USB audio fails with 64 kiB */
/* ts A80414 : might need 64 kiB for BD-RE streaming */
/* buffer flush trigger for sector.c:get_sector() */
o->obs = Libburn_cd_obS;
sprintf(msg, "cd Profile= %2.2Xh , obs= %d , obs_pad= %d",
d->current_profile, o->obs, o->obs_pad);
libdax_msgs_submit(libdax_messenger, d->global_index, 0x00000002,
LIBDAX_MSGS_SEV_DEBUG, LIBDAX_MSGS_PRIO_ZERO, msg, 0, 0);
/* ts A70218 */ /* ts A70218 */
if (o->write_type == BURN_WRITE_SAO) { if (o->write_type == BURN_WRITE_SAO) {
for (i = 0 ; i < disc->session[0]->tracks; i++) { for (i = 0 ; i < disc->session[0]->tracks; i++) {
@ -2148,7 +2192,7 @@ return crap. so we send the command, then ignore the result.
/* ts A61012 : This return was traditionally missing. I suspect this /* ts A61012 : This return was traditionally missing. I suspect this
to have caused Cdrskin_eject() failures */ to have caused Cdrskin_eject() failures */
return; goto ex;
fail: fail:
d->sync_cache(d); d->sync_cache(d);
@ -2160,6 +2204,9 @@ fail_wo_sync:;
"Burn run failed", 0, 0); "Burn run failed", 0, 0);
d->cancel = 1; d->cancel = 1;
d->busy = BURN_DRIVE_IDLE; d->busy = BURN_DRIVE_IDLE;
ex:;
d->do_stream_recording = 0;
return;
} }
/* ts A70811 : API function */ /* ts A70811 : API function */

View File

@ -8,8 +8,9 @@
libburner is a minimal demo application for the library libburn as provided libburner is a minimal demo application for the library libburn as provided
on http://libburnia-project.org . It can list the available devices, can on http://libburnia-project.org . It can list the available devices, can
blank a CD-RW or DVD-RW, can format a DVD-RW, can burn to CD-R, CD-RW, DVD-R, blank a CD-RW or DVD-RW, can format DVD-RW and BD-RE, can burn to CD-R,
DVD+R, DVD+R/DL, DVD+RW, DVD-RAM or DVD-RW. Not supported yet: DVD-R/DL, BD. CD-RW, DVD-R, DVD+R, DVD+R/DL, DVD+RW, DVD-RW, DVD-RAM, BD-RE.
Not supported yet: DVD-R/DL, BD-R.
It's main purpose, nevertheless, is to show you how to use libburn and also It's main purpose, nevertheless, is to show you how to use libburn and also
to serve the libburnia team as reference application. libburner.c does indeed to serve the libburnia team as reference application. libburner.c does indeed
@ -28,7 +29,8 @@
With that aquired drive you can blank a CD-RW With that aquired drive you can blank a CD-RW
libburner_blank_disc() libburner_blank_disc()
or you can format a DVD-RW to profile "Restricted Overwrite" (needed once) or you can format a DVD-RW to profile "Restricted Overwrite" (needed once)
libburner_format_row() or an unused BD-RE to default size
libburner_format_owrt()
With the aquired drive you can burn to CD or DVD With the aquired drive you can burn to CD or DVD
libburner_payload() libburner_payload()
When everything is done, main() releases the drive and shuts down libburn: When everything is done, main() releases the drive and shuts down libburn:
@ -313,26 +315,45 @@ int libburner_blank_disc(struct burn_drive *drive, int blank_fast)
} }
/** Persistently changes DVD-RW profile 0014h "Sequential Recording" to /** Formats unformatted DVD-RW to profile 0013h "Restricted Overwrite"
profile 0013h "Restricted Overwrite" which needs no blanking for re-use which needs no blanking for re-use but is not capable of multi-session.
but is not capable of multi-session.
Expect a behavior similar to blanking with unusual noises from the drive. Expect a behavior similar to blanking with unusual noises from the drive.
Formats unformatted BD-RE to default size. This will allocate some
reserve space, test for bad blocks and make the media ready for writing.
Expect a very long run time.
*/ */
int libburner_format_row(struct burn_drive *drive) int libburner_format_owrt(struct burn_drive *drive)
{ {
struct burn_progress p; struct burn_progress p;
double percent = 1.0; double percent = 1.0;
int ret, status, num_formats, format_flag= 0;
off_t size = 0;
unsigned dummy;
if (current_profile == 0x13) { if (current_profile == 0x13) {
fprintf(stderr, "IDLE: DVD-RW media is already formatted\n"); fprintf(stderr, "IDLE: DVD-RW media is already formatted\n");
return 2; return 2;
} else if (current_profile != 0x14) { } else if (current_profile == 0x43) {
fprintf(stderr, "FATAL: Can only format DVD-RW\n"); ret = burn_disc_get_formats(drive, &status, &size, &dummy,
&num_formats);
if (ret > 0 && status == BURN_FORMAT_IS_FORMATTED) {
fprintf(stderr,
"IDLE: BD-RE media is already formatted\n");
return 2;
}
size = 0; /* does not really matter */
format_flag = 3<<1; /* format to default size, no quick */
} else if (current_profile == 0x14) { /* sequential DVD-RW */
size = 128 * 1024 * 1024;
format_flag = 1; /* write initial 128 MiB */
} else {
fprintf(stderr, "FATAL: Can only format DVD-RW or BD-RE\n");
return 0; return 0;
} }
printf("Beginning to format media.\n"); printf("Beginning to format media.\n");
burn_disc_format(drive, (off_t) 0, 0); burn_disc_format(drive, size, format_flag);
sleep(1); sleep(1);
while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) { while (burn_drive_get_status(drive, &p) != BURN_DRIVE_IDLE) {
@ -344,9 +365,10 @@ int libburner_format_row(struct burn_drive *drive)
} }
burn_disc_get_profile(drive_list[0].drive, &current_profile, burn_disc_get_profile(drive_list[0].drive, &current_profile,
current_profile_name); current_profile_name);
printf("Media type now: %4.4xh \"%s\"\n", if (current_profile == 0x14 || current_profile == 0x13)
current_profile, current_profile_name); printf("Media type now: %4.4xh \"%s\"\n",
if (current_profile != 0x13) { current_profile, current_profile_name);
if (current_profile == 0x14) {
fprintf(stderr, fprintf(stderr,
"FATAL: Failed to change media profile to desired value\n"); "FATAL: Failed to change media profile to desired value\n");
return 0; return 0;
@ -534,7 +556,8 @@ int libburner_payload(struct burn_drive *drive,
burn_session_free(session); burn_session_free(session);
burn_disc_free(target_disc); burn_disc_free(target_disc);
if (multi && current_profile != 0x1a && current_profile != 0x13 && if (multi && current_profile != 0x1a && current_profile != 0x13 &&
current_profile != 0x12) /* not with DVD+RW, DVD-RW, DVD-RAM */ current_profile != 0x12 && current_profile != 0x43)
/* not with DVD+RW, formatted DVD-RW, DVD-RAM, BD-RE */
printf("NOTE: Media left appendable.\n"); printf("NOTE: Media left appendable.\n");
if (simulate_burn) if (simulate_burn)
printf("\n*** Did TRY to SIMULATE burning ***\n\n"); printf("\n*** Did TRY to SIMULATE burning ***\n\n");
@ -697,7 +720,7 @@ int main(int argc, char **argv)
{ ret = 0; goto release_drive; } { ret = 0; goto release_drive; }
if (do_blank) { if (do_blank) {
if (do_blank > 100) if (do_blank > 100)
ret = libburner_format_row(drive_list[driveno].drive); ret = libburner_format_owrt(drive_list[driveno].drive);
else else
ret = libburner_blank_disc(drive_list[driveno].drive, ret = libburner_blank_disc(drive_list[driveno].drive,
do_blank == 1); do_blank == 1);