Add various bugfixes from upstream 2.0 branch (forwarded request 145797 from sumski) OBS-URL: https://build.opensuse.org/request/show/145798 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/k3b?expand=0&rev=48
143 lines
6.6 KiB
Diff
143 lines
6.6 KiB
Diff
From: Kevin Kofler <kevin.kofler@chello.at>
|
|
Date: Sat, 23 Apr 2011 13:44:23 +0000
|
|
Subject: Prefer growisofs to wodim for DVD/BluRay burning.
|
|
X-Git-Url: http://quickgit.kde.org/?p=k3b.git&a=commitdiff&h=1853eee0f15d9d5a1ab0407d5d87e36167e5c9eb
|
|
---
|
|
Prefer growisofs to wodim for DVD/BluRay burning.
|
|
|
|
K3b 2 defaults to cdrecord for all burning tasks, including DVDs and BluRay
|
|
discs. Unfortunately, it also does this when cdrecord is actually wodim. This
|
|
is a bad idea, because wodim's DVD burning code is not the "ProDVD" code in
|
|
Jörg Schilling's current cdrecord releases, but a much older, buggier and
|
|
basically unmaintained DVD patch. We cannot ship the ProDVD code in wodim
|
|
because of licensing conflicts: That code was never released under the GPL, it
|
|
was relicensed directly from its original proprietary license to the CDDL. But
|
|
wodim is GPLed, and cannot be relicensed to the CDDL, in fact this was the
|
|
whole reason for the fork: Jörg Schilling's cdrecord distributes mixed CDDL and
|
|
GPL code linked together. So the DVD code in wodim is based on an ancient
|
|
experimental community-contributed DVD support patch for cdrecord (from the
|
|
times where ProDVD was entirely proprietary). So it's a bad idea to use wodim
|
|
for DVDs. As for BluRay discs, those aren't currently supported by wodim at
|
|
all; K3b should detect this, but still, it's better to explicitly default to
|
|
growisofs there too, in case wodim grows some experimental BluRay support.
|
|
|
|
One concrete known issue with wodim's DVD burning code is that it fails to burn
|
|
dual-layer DVD+Rs: https://bugzilla.redhat.com/show_bug.cgi?id=610976 . But
|
|
chances are there are many more DVD burning bugs in wodim, which are unlikely
|
|
to get fixed promptly.
|
|
|
|
Growisofs, on the other hand, is designed specifically for DVDs and BluRay
|
|
disks, doesn't have licensing issues and has been used successfully for DVDs
|
|
for years (in fact, K3b 1 always used growisofs for DVDs).
|
|
|
|
This patch makes K3b default to growisofs for all DVD or BluRay burning tasks
|
|
if cdrecord is actually wodim.
|
|
|
|
REVIEW: 101208
|
|
---
|
|
|
|
|
|
--- a/libk3b/jobs/k3bdvdcopyjob.cpp
|
|
+++ b/libk3b/jobs/k3bdvdcopyjob.cpp
|
|
@@ -169,13 +169,20 @@
|
|
// first let's determine which application to use
|
|
d->usedWritingApp = writingApp();
|
|
if ( d->usedWritingApp == K3b::WritingAppAuto ) {
|
|
- // let's default to cdrecord for the time being
|
|
+ // prefer growisofs to wodim, which doesn't work all that great for DVDs
|
|
+ // (and doesn't support BluRay at all)
|
|
+ if ( k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "wodim" ) )
|
|
+ d->usedWritingApp = K3b::WritingAppGrowisofs;
|
|
+ // otherwise, let's default to cdrecord for the time being
|
|
// FIXME: use growisofs for non-dao and non-auto mode
|
|
- if ( K3b::Device::isBdMedia( d->sourceDiskInfo.mediaType() ) ) {
|
|
- if ( k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "blu-ray" ) )
|
|
+ else {
|
|
+ if ( K3b::Device::isBdMedia( d->sourceDiskInfo.mediaType() ) ) {
|
|
+ if ( k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "blu-ray" ) )
|
|
+ d->usedWritingApp = K3b::WritingAppCdrecord;
|
|
+ else
|
|
+ d->usedWritingApp = K3b::WritingAppGrowisofs;
|
|
+ } else
|
|
d->usedWritingApp = K3b::WritingAppCdrecord;
|
|
- else
|
|
- d->usedWritingApp = K3b::WritingAppGrowisofs;
|
|
}
|
|
}
|
|
|
|
|
|
--- a/libk3b/jobs/k3bmetawriter.cpp
|
|
+++ b/libk3b/jobs/k3bmetawriter.cpp
|
|
@@ -261,11 +261,13 @@
|
|
bool cdrecordOnTheFly = false;
|
|
bool cdrecordCdText = false;
|
|
bool cdrecordBluRay = false;
|
|
+ bool cdrecordWodim = false;
|
|
bool growisofsBluRay = false;
|
|
if( k3bcore->externalBinManager()->binObject("cdrecord") ) {
|
|
cdrecordOnTheFly = k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "audio-stdin" );
|
|
cdrecordCdText = k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "cdtext" );
|
|
cdrecordBluRay = k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "blu-ray" );
|
|
+ cdrecordWodim = k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "wodim" );
|
|
}
|
|
if( k3bcore->externalBinManager()->binObject("growisofs") ) {
|
|
growisofsBluRay = k3bcore->externalBinManager()->binObject("growisofs")->hasFeature( "blu-ray" );
|
|
@@ -316,10 +318,16 @@
|
|
d->usedWritingApp = WritingAppGrowisofs;
|
|
}
|
|
else if( mediaType & Device::MEDIA_DVD_ALL ) {
|
|
- d->usedWritingApp = WritingAppCdrecord;
|
|
+ // wodim (at least on fedora) doesn't do DVDs all that well, use growisofs instead
|
|
+ if ( cdrecordWodim ) {
|
|
+ d->usedWritingApp = WritingAppGrowisofs;
|
|
+ }
|
|
+ else {
|
|
+ d->usedWritingApp = WritingAppCdrecord;
|
|
+ }
|
|
}
|
|
else if( mediaType & Device::MEDIA_BD_ALL ) {
|
|
- if( cdrecordBluRay ) {
|
|
+ if( cdrecordBluRay && ! cdrecordWodim ) {
|
|
d->usedWritingApp = WritingAppCdrecord;
|
|
}
|
|
else if( growisofsBluRay ) {
|
|
|
|
--- a/libk3b/projects/datacd/k3bdatajob.cpp
|
|
+++ b/libk3b/projects/datacd/k3bdatajob.cpp
|
|
@@ -58,7 +58,7 @@
|
|
{
|
|
public:
|
|
Private()
|
|
- : usedWritingApp(K3b::WritingAppCdrecord),
|
|
+ : usedWritingApp(K3b::WritingAppAuto),
|
|
verificationJob( 0 ),
|
|
pipe( 0 ) {
|
|
}
|
|
@@ -813,8 +813,12 @@
|
|
|
|
d->usedWritingApp = writingApp();
|
|
// let's default to cdrecord for the time being (except for special cases below)
|
|
+ // but prefer growisofs to wodim for DVDs
|
|
if ( d->usedWritingApp == K3b::WritingAppAuto ) {
|
|
- d->usedWritingApp = K3b::WritingAppCdrecord;
|
|
+ if (k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "wodim" ))
|
|
+ d->usedWritingApp = K3b::WritingAppGrowisofs;
|
|
+ else
|
|
+ d->usedWritingApp = K3b::WritingAppCdrecord;
|
|
}
|
|
|
|
// -------------------------------
|
|
@@ -930,7 +934,10 @@
|
|
else if ( foundMedium & K3b::Device::MEDIA_BD_ALL ) {
|
|
d->usedWritingApp = writingApp();
|
|
if( d->usedWritingApp == K3b::WritingAppAuto ) {
|
|
- d->usedWritingApp = K3b::WritingAppCdrecord;
|
|
+ if (k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "wodim" ))
|
|
+ d->usedWritingApp = K3b::WritingAppGrowisofs;
|
|
+ else
|
|
+ d->usedWritingApp = K3b::WritingAppCdrecord;
|
|
}
|
|
|
|
if ( d->usedWritingApp == K3b::WritingAppCdrecord &&
|
|
|