[k3b] [Bug 137436] Adding support for cdrskin as an alternative to cdrecord/wodim

Thomas Schmitt bugzilla_noreply at kde.org
Mon Nov 28 11:48:39 UTC 2016


https://bugs.kde.org/show_bug.cgi?id=137436

--- Comment #31 from Thomas Schmitt <scdbackup at gmx.net> ---
Hi,

Leslie Zhai wrote:
> I need to be faimilar with cdrskin command...

I will try to be of help as good as i can.


> +bool K3b::CdrskinProgram::scanFeatures(ExternalBin& bin) const
> ...
> +    fp << bin.path() << "write" << "-h";
> ...
> +    if (fp.execute() >= 0) {
> ...
>          if (output.contains("gracetime"))

I suppose this shall get the cdrskin help text by the equivalent of
  cdrskin -help 2>&1 | interpreter

Not sure how the cdrskin option "-help" is supposed to get in here.
I cannot find the corresponding gesture for cdrecord or wodim in
 
https://cgit.kde.org/k3b.git/tree/libk3b/core/k3bdefaultexternalprograms.cpp?id=88c0c90659b3dcde527788c3d79ce70fa9582b40
but only one with cdrdao.

Run
  cdrdao write -h 2>&1 
indeed triggers a help text on stdout.

The corresponding run with cdrskin would be (like with wodim and cdrecord)

  cdrskin -help 2>&1

In general it seems better to derive the cdrskin wrapper code from
the one for wodim or cdrecord, rather than from cdrdao.

Option -xa1 is listed in the -help text and will not lead to an error if used.
Nevertheless it will not write XA Mode 2 but rather Mode 1 while stripping
8 surplus XA header bytes per sector from the data stream. The result is
then readable as CD-ROM data.

Additional cdrskin features are announced by option --help (with two dashes).
Those are not supported by cdrecord or wodim (although wodim knows --devices).


> +    if (bin.version() >= K3b::Version(2, 1, 1, "a29"))
> +        bin.addFeature( "blu-ray" );

I think this tries to determine cdrecord features from cdrecord version
numbers.

cdrskin says on option -version:

  cdrskin 1.4.6 : limited cdrecord compatibility wrapper for libburn
  Cdrecord 2.01a27 Emulation. Copyright (C) 2006-2016, see
libburnia-project.org

So "blu-ray" would probably not be triggered.
(I will update the fake cdrecord version to a29. It exists on
request of K3B users who install their cdrskin as "/usr/bin/cdrecord".)

Blu-ray support was complete in cdrskin-0.6.2, 20 Feb 2009.

"burnfree" was supported from start (and is default).
"burnproof" is accepted as alias of "burnfree".

The other version number dependent features need to be checked what they
mean and whether cdrskin supports them.


> +bool K3b::MetaWriter::setupCdrskinJob()
> ...
> +                writer->addArgument( "-useinfo" );
> ...
> +                writer->addArgument( "-shorttrack" );

These options are not yet supported by cdrskin.
One will have to test the -help text before using them.


> +                if( image.isEmpty() ) {
> +                    // this is only supported by cdrecord versions >= 2.01a13
> +                    writer->addArgument( QFile::encodeName( d->infFileName( audioTrackCnt ) ) );

I assume this is a companion of "-useinfo". Needs to become conditional then.


> + d->process << "gracetime=2"; // 2 is the lowest allowed value (Joerg, why do you do this to us?)

I am Thomas and i allow gracetime=0. :))

Further cdrskin's gracetime default is 0.
Only with undersized tracks (< 600 KB) the gracetime is at least 15 seconds
in order to let a command line user abort the run.


> +    if( d->usedSpeed == 0 ) {
> +        // try to determine the writeSpeed

cdrskin accepts special speed values "0" = slowest, "-1" or "any" = fastest.
Default is fastest speed.


> + emit infoMessage( i18n( "Cdrskin version %1 does not support Blu-ray writing." ,d->cdrskinBinObject->version() ), MessageError );

Will this tell the cdrskin version (e.g. 1.4.6) or the pseudo cdreord one ?


> + // cdrskin only supports SAO for DVD
> + d->process << "-sao";

It supports -tao on all media except fast-blanked DVD-RW and DVD-R DL,
which both support only write type DAO.
On DVD+RW and alike, there is no difference between -sao and -tao.
On DVD-R, -tao chooses Incremental mode which is capable of -multi and
of appending new sessions to existing Incremental sessions.
On DVD+R, -sao emits a command RESERVE TRACK, whereas -tao does not.

One may omit both -tao and -sao in order to let cdrskin decide on base
of -multi, input source and Medium state which write type to use.


> +#warning Enable layer jump mode: add it to K3b::WritingMode and to the GUI

This mode is not planned to be implemented in cdrskin.
growisofs uses it and seems to fail more often than libburn.
So libburn for now lets the drive decide when to switch layers on
multi-layered media.


> +        else if( d->writingMode == K3b::WritingModeRaw ) {
> +            if( burnDevice()->supportsWritingMode( K3b::Device::WRITINGMODE_RAW_R96R ) )
> +            d->process << "-raw96r";

These write modes are not supported by cdrskin. They need to be made
contitional.


> +        // with cdrskin 1.11a02 burnproof was renamed to burnfree

Here you replaced "cdrecord" by "cdrskin" without checking the semantics.

Both names are supported by cdrskin since its first release.


> +    switch( d->formattingMode ) {
> +        case FormattingComplete:
> +            d->process << "blank=all";
> ...
> +            d->process << "blank=fast";

Aha. formattingMode means blanking mode. (I already wondered.)

cdrskin takes into respect that fast blanking of DVD-RW media yields
a medium state which is not suitable for -tao or -multi. I.e. only
DAO (-sao or -dao) is possible which means predictable track size
and only a single session.


> + // Cdrskin starts all error and warning messages with it's path
> + // With Debian's script it starts with cdrskin (or /usr/bin/cdrskin or whatever! I hate this script!)

Can this be a remnant rant about cdrecord and a Debian script ?

cdrskin has the habit to prepend its name to many error messages.
But not its path. Further there may be error messages with "libburn:"
prepended.

In general one will have to cross check the messages listed here with
the source of cdrskin, whether they appear there.


Have a nice day :)

Thomas

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the k3b mailing list