libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libcdio-devel] About burning CD, DVD, and Blu-ray


From: Thomas Schmitt
Subject: [Libcdio-devel] About burning CD, DVD, and Blu-ray
Date: Fri, 01 Jan 2010 16:16:28 +0100

Hi,

this is an overview of what Rocky and i have
proven to be achievable about CD/DVD/BD burning.

- Porting
- Available features and programs
- Testing the Linux port

------------------------------------------------
- Porting:

On Linux it is now possible to do all drive
operations of libburn through the API of
libcdio. This enables libburn's cdrecord emulator
cdrskin to perform the same operations as if it
depended on libburn's own Linux adapter.
Even the peculiar drive addresses like  dev=1,0,0
or  dev=ATA:0,0,0  do work.

The full benefit of our cooperation will arise
when the recent enhancements of the libcdio Linux
driver have been reproduced in the other OS
drivers of libcdio.
The task to do so should not be overly difficult
if an OS installation with burner drive is
available for testing:

- Implement access modes "MMC_RDWR" and
  "MMC_RDWR_EXCL". They have to allow read-write
  access to the drive.
  On Linux this was essentially about using
  open(O_RDWR) instead of open(O_RDONLY).
   "MMC_RDWR_EXCL" shall do its best to become
  the only user of the drive. It is allowed to
  refuse opening a drive which is already in use
  by others.
  Advisory locking on Linux is done by a non-
  portable meaning of O_EXCL on device files.

- Record the eventual SCSI sense reply of each
  MMC command in libcdio's inner buffer
    generic_img_private_t.scsi_mmc_sense.
  The sense reply indicates the state of the
  drive if a MMC command was problematic or
  something interesting happened with the drive.
  Normally it is provided by the OS interface
  which transports SCSI commands for libcdio.
  The recorded sense reply can then be obtained
  via the new libcdio call mmc_last_cmd_sense().

- Optional feature.
  It is well ok not to implement this:
  Obtain information about the drive which
  suffices to compose a cdrecord drive address
  as it is usual on the respective operating
  system.
  On Linux this is traditionally the number
  triple  dev=Bus,Target,Lun  which libcdio now
  reports as part of a 5-tuple text
    "Bus,Host,Channel,Target,Lun"
  via
    cdio_get_arg(p_cdio, "scsi-tuple");
    cdio_get_arg(p_cdio, "scsi-tuple-linux");
  Other drivers should eventually implement
    .get_arg(p_cdio, "scsi-tuple");
    .get_arg(p_cdio, "scsi-tuple-<OS>");
  which both shall give identical reply.
  The <OS> suffix shall allow to ask for the
  form of a particular operating system, without
  knowing on what system libcdio is running.
  Of course, each driver has to deliver only
  its local form and not those of other OSes.
  Request for a foreign form shall cause NULL
  as reply of .get_arg().


These changes enable libcdio to be system adapter
for libburn which in its core is supposed to be
portable to any Unix-like system.
It has own system adapters with MMC capability
only for Linux and FreeBSD. But it is proven to
be compilable on Solaris.
So a suitable libcdio driver for Solaris and its
successful testing would make me quite happy.

The libburnia project promises to help with
porting libburn to any system where a suitable
libcdio driver exists. (Success cannot be
guaranteed, of course.)


------------------------------------------------
- Available features and programs:

After such a port there will be available

- libburn for writing audio to CD, data to CD,
  DVD and Blu-ray. It can read data from all
  three media families.

- cdrskin for operating libburn via the cdrecord
  command line interface.

- libisofs, libisoburn, xorriso for dealing with
  ISO 9660 filesystems.
  xorriso provides as add-on a mkisofs compatible
  command line interface. Its own CLI goes quite
  a step beyond the pair of mkisofs and cdrecord.

libburn.so.4 is used on Linux by GUI frontends
xfburn and Brasero (libburn optional).

For a most simple burn program see
  http://svn.libburnia-project.org/libburn/trunk/test/libburner.c


------------------------------------------------
- Testing the Linux port:

libburn from our SVN trunk
  http://svn.libburnia-project.org/libburn/trunk
can be connected to libcdio by:
  ./bootstrap
  ./configure --enable-libcdio
  make clean ; make
and is then usable on Linux via an installed
libcdio.so from the sources in
  git://git.sv.gnu.org/libcdio.git

Applications of libburn do not have to be aware
of this change in any way.
Just install libburn by:
  make install

cdrskin and xorriso from SVN trunk will
eventually report with their option -version:
  sg-libcdio h83 with libcdio 0.83git ...


I currently use libburn via libcdio for my
personal backups. The upper layers of my backup
stacks verify success by MD5 based checkreading.
So far it looks all well.

People who care to test are invited to ask for
help and tell me about success or failure.


Have a nice day :)

Thomas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]