1
From 1853eee0f15d9d5a1ab0407d5d87e36167e5c9eb Mon Sep 17 00:00:00 2001
2
From: Kevin Kofler <kevin.kofler@chello.at>
3
Date: Sat, 23 Apr 2011 15:44:23 +0200
4
Subject: [PATCH] Prefer growisofs to wodim for DVD/BluRay burning.
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
9
K3b 2 defaults to cdrecord for all burning tasks, including DVDs and BluRay
10
discs. Unfortunately, it also does this when cdrecord is actually wodim. This
11
is a bad idea, because wodim's DVD burning code is not the "ProDVD" code in
12
Jörg Schilling's current cdrecord releases, but a much older, buggier and
13
basically unmaintained DVD patch. We cannot ship the ProDVD code in wodim
14
because of licensing conflicts: That code was never released under the GPL, it
15
was relicensed directly from its original proprietary license to the CDDL. But
16
wodim is GPLed, and cannot be relicensed to the CDDL, in fact this was the
17
whole reason for the fork: Jörg Schilling's cdrecord distributes mixed CDDL and
18
GPL code linked together. So the DVD code in wodim is based on an ancient
19
experimental community-contributed DVD support patch for cdrecord (from the
20
times where ProDVD was entirely proprietary). So it's a bad idea to use wodim
21
for DVDs. As for BluRay discs, those aren't currently supported by wodim at
22
all; K3b should detect this, but still, it's better to explicitly default to
23
growisofs there too, in case wodim grows some experimental BluRay support.
25
One concrete known issue with wodim's DVD burning code is that it fails to burn
26
dual-layer DVD+Rs: https://bugzilla.redhat.com/show_bug.cgi?id=610976 . But
27
chances are there are many more DVD burning bugs in wodim, which are unlikely
28
to get fixed promptly.
30
Growisofs, on the other hand, is designed specifically for DVDs and BluRay
31
disks, doesn't have licensing issues and has been used successfully for DVDs
32
for years (in fact, K3b 1 always used growisofs for DVDs).
34
This patch makes K3b default to growisofs for all DVD or BluRay burning tasks
35
if cdrecord is actually wodim.
39
libk3b/jobs/k3bdvdcopyjob.cpp | 17 ++++++++++++-----
40
libk3b/jobs/k3bmetawriter.cpp | 12 ++++++++++--
41
libk3b/projects/datacd/k3bdatajob.cpp | 13 ++++++++++---
42
3 files changed, 32 insertions(+), 10 deletions(-)
44
diff --git a/libk3b/jobs/k3bdvdcopyjob.cpp b/libk3b/jobs/k3bdvdcopyjob.cpp
45
index 5dff56b..3f15eb9 100644
46
--- a/libk3b/jobs/k3bdvdcopyjob.cpp
47
+++ b/libk3b/jobs/k3bdvdcopyjob.cpp
48
@@ -169,13 +169,20 @@ void K3b::DvdCopyJob::slotDiskInfoReady( K3b::Device::DeviceHandler* dh )
49
// first let's determine which application to use
50
d->usedWritingApp = writingApp();
51
if ( d->usedWritingApp == K3b::WritingAppAuto ) {
52
- // let's default to cdrecord for the time being
53
+ // prefer growisofs to wodim, which doesn't work all that great for DVDs
54
+ // (and doesn't support BluRay at all)
55
+ if ( k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "wodim" ) )
56
+ d->usedWritingApp = K3b::WritingAppGrowisofs;
57
+ // otherwise, let's default to cdrecord for the time being
58
// FIXME: use growisofs for non-dao and non-auto mode
59
- if ( K3b::Device::isBdMedia( d->sourceDiskInfo.mediaType() ) ) {
60
- if ( k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "blu-ray" ) )
62
+ if ( K3b::Device::isBdMedia( d->sourceDiskInfo.mediaType() ) ) {
63
+ if ( k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "blu-ray" ) )
64
+ d->usedWritingApp = K3b::WritingAppCdrecord;
66
+ d->usedWritingApp = K3b::WritingAppGrowisofs;
68
d->usedWritingApp = K3b::WritingAppCdrecord;
70
- d->usedWritingApp = K3b::WritingAppGrowisofs;
74
diff --git a/libk3b/jobs/k3bmetawriter.cpp b/libk3b/jobs/k3bmetawriter.cpp
75
index 6338cd1..7d80e28 100644
76
--- a/libk3b/jobs/k3bmetawriter.cpp
77
+++ b/libk3b/jobs/k3bmetawriter.cpp
78
@@ -261,11 +261,13 @@ bool K3b::MetaWriter::determineUsedAppAndMode()
79
bool cdrecordOnTheFly = false;
80
bool cdrecordCdText = false;
81
bool cdrecordBluRay = false;
82
+ bool cdrecordWodim = false;
83
bool growisofsBluRay = false;
84
if( k3bcore->externalBinManager()->binObject("cdrecord") ) {
85
cdrecordOnTheFly = k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "audio-stdin" );
86
cdrecordCdText = k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "cdtext" );
87
cdrecordBluRay = k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "blu-ray" );
88
+ cdrecordWodim = k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "wodim" );
90
if( k3bcore->externalBinManager()->binObject("growisofs") ) {
91
growisofsBluRay = k3bcore->externalBinManager()->binObject("growisofs")->hasFeature( "blu-ray" );
92
@@ -316,10 +318,16 @@ bool K3b::MetaWriter::determineUsedAppAndMode()
93
d->usedWritingApp = WritingAppGrowisofs;
95
else if( mediaType & Device::MEDIA_DVD_ALL ) {
96
- d->usedWritingApp = WritingAppCdrecord;
97
+ // wodim (at least on fedora) doesn't do DVDs all that well, use growisofs instead
98
+ if ( cdrecordWodim ) {
99
+ d->usedWritingApp = WritingAppGrowisofs;
102
+ d->usedWritingApp = WritingAppCdrecord;
105
else if( mediaType & Device::MEDIA_BD_ALL ) {
106
- if( cdrecordBluRay ) {
107
+ if( cdrecordBluRay && ! cdrecordWodim ) {
108
d->usedWritingApp = WritingAppCdrecord;
110
else if( growisofsBluRay ) {
111
diff --git a/libk3b/projects/datacd/k3bdatajob.cpp b/libk3b/projects/datacd/k3bdatajob.cpp
112
index 3fb3abd..6af7f23 100644
113
--- a/libk3b/projects/datacd/k3bdatajob.cpp
114
+++ b/libk3b/projects/datacd/k3bdatajob.cpp
115
@@ -58,7 +58,7 @@ class K3b::DataJob::Private
119
- : usedWritingApp(K3b::WritingAppCdrecord),
120
+ : usedWritingApp(K3b::WritingAppAuto),
121
verificationJob( 0 ),
124
@@ -813,8 +813,12 @@ bool K3b::DataJob::waitForBurnMedium()
126
d->usedWritingApp = writingApp();
127
// let's default to cdrecord for the time being (except for special cases below)
128
+ // but prefer growisofs to wodim for DVDs
129
if ( d->usedWritingApp == K3b::WritingAppAuto ) {
130
- d->usedWritingApp = K3b::WritingAppCdrecord;
131
+ if (k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "wodim" ))
132
+ d->usedWritingApp = K3b::WritingAppGrowisofs;
134
+ d->usedWritingApp = K3b::WritingAppCdrecord;
137
// -------------------------------
138
@@ -930,7 +934,10 @@ bool K3b::DataJob::waitForBurnMedium()
139
else if ( foundMedium & K3b::Device::MEDIA_BD_ALL ) {
140
d->usedWritingApp = writingApp();
141
if( d->usedWritingApp == K3b::WritingAppAuto ) {
142
- d->usedWritingApp = K3b::WritingAppCdrecord;
143
+ if (k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "wodim" ))
144
+ d->usedWritingApp = K3b::WritingAppGrowisofs;
146
+ d->usedWritingApp = K3b::WritingAppCdrecord;
149
if ( d->usedWritingApp == K3b::WritingAppCdrecord &&