~ubuntu-branches/ubuntu/trusty/k3b/trusty

« back to all changes in this revision

Viewing changes to debian/patches/Prefer-growisofs-to-wodim-for-DVD-BluRay-burning.patch

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-11-12 10:36:01 UTC
  • mfrom: (2.1.20 sid)
  • Revision ID: package-import@ubuntu.com-20131112103601-q6vvln9lv3mg7qxh
Tags: 2.0.2-7ubuntu1
* Merge with Debian, remaining changes:
  - Suggest, not recommend libk3b6-extracodecs (Cannot be on the CD)
  - Do not ship k3b documentation, it's for the KDE3 version.
  - Do not install unused scalable icons to save space
  - Keep kubuntu_02_kubuntu_restricted.diff
  - Keep kubuntu_03_no_missing_mp3_warn.diff
  - Keep kubuntu_05_no_system_settings.diff
  - Keep kubuntu_07_quicklists.diff
  - Disable 111_advice_debian_libk3b3-extracodes.diff and
    112_dont_require_mp3.diff which aren't required due to our mp3 patches.
  - swap kubuntu_06_libav_0.7.diff for Debian's
    Fixed_compilation_with_new_FFMPEG.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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.
 
5
MIME-Version: 1.0
 
6
Content-Type: text/plain; charset=UTF-8
 
7
Content-Transfer-Encoding: 8bit
 
8
 
 
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.
 
24
 
 
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.
 
29
 
 
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).
 
33
 
 
34
This patch makes K3b default to growisofs for all DVD or BluRay burning tasks
 
35
if cdrecord is actually wodim.
 
36
 
 
37
REVIEW: 101208
 
38
---
 
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(-)
 
43
 
 
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" ) )
 
61
+            else {
 
62
+                if ( K3b::Device::isBdMedia( d->sourceDiskInfo.mediaType() ) ) {
 
63
+                    if ( k3bcore->externalBinManager()->binObject("cdrecord")->hasFeature( "blu-ray" ) )
 
64
+                        d->usedWritingApp = K3b::WritingAppCdrecord;
 
65
+                    else
 
66
+                        d->usedWritingApp = K3b::WritingAppGrowisofs;
 
67
+                } else
 
68
                     d->usedWritingApp = K3b::WritingAppCdrecord;
 
69
-                else
 
70
-                    d->usedWritingApp = K3b::WritingAppGrowisofs;
 
71
             }
 
72
         }
 
73
 
 
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" );
 
89
     }
 
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;
 
94
             }
 
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;
 
100
+                }
 
101
+                else {
 
102
+                    d->usedWritingApp = WritingAppCdrecord;
 
103
+                }
 
104
             }
 
105
             else if( mediaType & Device::MEDIA_BD_ALL ) {
 
106
-                if( cdrecordBluRay ) {
 
107
+                if( cdrecordBluRay && ! cdrecordWodim ) {
 
108
                     d->usedWritingApp = WritingAppCdrecord;
 
109
                 }
 
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
 
116
 {
 
117
 public:
 
118
     Private()
 
119
-        : usedWritingApp(K3b::WritingAppCdrecord),
 
120
+        : usedWritingApp(K3b::WritingAppAuto),
 
121
           verificationJob( 0 ),
 
122
           pipe( 0 ) {
 
123
     }
 
124
@@ -813,8 +813,12 @@ bool K3b::DataJob::waitForBurnMedium()
 
125
 
 
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;
 
133
+            else
 
134
+                d->usedWritingApp = K3b::WritingAppCdrecord;
 
135
         }
 
136
 
 
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;
 
145
+            else
 
146
+                d->usedWritingApp = K3b::WritingAppCdrecord;
 
147
         }
 
148
 
 
149
         if ( d->usedWritingApp == K3b::WritingAppCdrecord &&
 
150
-- 
 
151
1.7.10.4
 
152