1 |
Index: configure |
2 |
=================================================================== |
3 |
--- configure (revision 27174) |
4 |
+++ configure (working copy) |
5 |
@@ -115,6 +115,7 @@ |
6 |
libvisual |
7 |
fftw |
8 |
sdl |
9 |
+mp3lame |
10 |
exif |
11 |
newexif |
12 |
dcraw |
13 |
@@ -174,6 +175,7 @@ |
14 |
--enable-libvisual enable libvisual visualizers [$libvisual] |
15 |
--enable-fftw enable fftw visualizers [$fftw] |
16 |
--enable-sdl use SDL for the synaesthesia output [$sdl] |
17 |
+ --enable-libmp3lame enable MP3 encoding support using LAME [$mp3lame] |
18 |
|
19 |
MythNews related options: |
20 |
--enable-mythnews build the mythnews plugin [$news] |
21 |
@@ -522,11 +524,11 @@ |
22 |
echo "MythMusic requires CDDA Paranoia." |
23 |
fi |
24 |
|
25 |
- mp3lame="no" |
26 |
- if has_header lame/lame.h && has_library libmp3lame ; then |
27 |
- mp3lame="yes" |
28 |
- else |
29 |
- echo "MythMusic requires the LAME mp3 encoder." |
30 |
+ if test "$mp3lame" != "no" ; then |
31 |
+ mp3lame="no" |
32 |
+ if has_header lame/lame.h && has_library libmp3lame ; then |
33 |
+ mp3lame="yes" |
34 |
+ fi |
35 |
fi |
36 |
|
37 |
taglib="no" |
38 |
@@ -550,7 +552,7 @@ |
39 |
fi |
40 |
fi |
41 |
|
42 |
- if test "$vorbis" = "no" -o "$flac" = "no" -o "$mp3lame" = "no" -o "$taglib" = "no" -o "$cdlibs" = "no" ; then |
43 |
+ if test "$vorbis" = "no" -o "$flac" = "no" -o "$taglib" = "no" -o "$cdlibs" = "no" ; then |
44 |
echo "Disabling MythMusic due to missing dependencies." |
45 |
music="no" |
46 |
fi |
47 |
@@ -849,6 +851,18 @@ |
48 |
if test "$taglib" = "yes" ; then |
49 |
echo "INCLUDEPATH += `taglib-config --prefix`/include/taglib" >> ./mythmusic/mythmusic/config.pro |
50 |
fi |
51 |
+ |
52 |
+ if test "$mp3lame" = "yes" ; then |
53 |
+ echo " MP3 encoding support will be included in MythMusic" |
54 |
+ echo "#define LAME 1" >> ./mythmusic/mythmusic/config.h |
55 |
+ echo "LIBS += -lmp3lame" >> ./mythmusic/mythmusic/config.pro |
56 |
+ echo "HEADERS += lameencoder.h" >> ./mythmusic/mythmusic/config.pro |
57 |
+ echo "SOURCES += lameencoder.cpp" >> ./mythmusic/mythmusic/config.pro |
58 |
+ fi |
59 |
+ |
60 |
+ if test "$mp3lame" = "no" ; then |
61 |
+ echo " MP3 encoding support will not be included in MythMusic" |
62 |
+ fi |
63 |
fi |
64 |
|
65 |
########################################################### |
66 |
Index: mythmusic/mythmusic/mythmusic.pro |
67 |
=================================================================== |
68 |
--- mythmusic/mythmusic/mythmusic.pro (revision 27174) |
69 |
+++ mythmusic/mythmusic/mythmusic.pro (working copy) |
70 |
@@ -20,7 +20,7 @@ |
71 |
LIBS += -lmythavcodec |
72 |
LIBS += -lmythavcore |
73 |
LIBS += -lmythavutil |
74 |
-LIBS += -ltag -logg -lvorbisfile -lvorbis -lvorbisenc -lFLAC -lmp3lame |
75 |
+LIBS += -ltag -logg -lvorbisfile -lvorbis -lvorbisenc -lFLAC |
76 |
|
77 |
cdaudio: LIBS += -lcdaudio |
78 |
paranoia:LIBS += -lcdda_paranoia -lcdda_interface |
79 |
@@ -31,7 +31,7 @@ |
80 |
HEADERS += metadata.h playbackbox.h playlist.h polygon.h |
81 |
HEADERS += streaminput.h synaesthesia.h encoder.h visualize.h avfdecoder.h |
82 |
HEADERS += treecheckitem.h vorbisencoder.h polygon.h |
83 |
-HEADERS += bumpscope.h globalsettings.h lameencoder.h dbcheck.h |
84 |
+HEADERS += bumpscope.h globalsettings.h dbcheck.h |
85 |
HEADERS += metaio.h metaiotaglib.h |
86 |
HEADERS += metaioflacvorbis.h metaioavfcomment.h metaiomp4.h |
87 |
HEADERS += metaiowavpack.h metaioid3.h metaiooggvorbis.h |
88 |
@@ -49,7 +49,7 @@ |
89 |
SOURCES += flacencoder.cpp main.cpp |
90 |
SOURCES += mainvisual.cpp metadata.cpp playbackbox.cpp playlist.cpp |
91 |
SOURCES += streaminput.cpp encoder.cpp dbcheck.cpp |
92 |
-SOURCES += synaesthesia.cpp treecheckitem.cpp lameencoder.cpp |
93 |
+SOURCES += synaesthesia.cpp treecheckitem.cpp |
94 |
SOURCES += vorbisencoder.cpp visualize.cpp bumpscope.cpp globalsettings.cpp |
95 |
SOURCES += databasebox.cpp genres.cpp |
96 |
SOURCES += metaio.cpp metaiotaglib.cpp |
97 |
Index: mythmusic/mythmusic/globalsettings.cpp |
98 |
=================================================================== |
99 |
--- mythmusic/mythmusic/globalsettings.cpp (revision 27174) |
100 |
+++ mythmusic/mythmusic/globalsettings.cpp (working copy) |
101 |
@@ -28,6 +28,7 @@ |
102 |
|
103 |
// mythmusic |
104 |
#include "globalsettings.h" |
105 |
+#include "config.h" |
106 |
#include "mainvisual.h" |
107 |
#include "mythlistview-qt3.h" |
108 |
|
109 |
@@ -185,7 +186,9 @@ |
110 |
HostComboBox *gc = new HostComboBox("EncoderType"); |
111 |
gc->setLabel(QObject::tr("Encoding")); |
112 |
gc->addSelection(QObject::tr("Ogg Vorbis"), "ogg"); |
113 |
+#ifdef LAME |
114 |
gc->addSelection(QObject::tr("Lame (MP3)"), "mp3"); |
115 |
+#endif |
116 |
gc->setHelpText(QObject::tr("Audio encoder to use for CD ripping. " |
117 |
"Note that the quality level 'Perfect' will use the " |
118 |
"FLAC encoder.")); |
119 |
@@ -204,6 +207,7 @@ |
120 |
return gc; |
121 |
}; |
122 |
|
123 |
+#ifdef LAME |
124 |
static HostCheckBox *Mp3UseVBR() |
125 |
{ |
126 |
HostCheckBox *gc = new HostCheckBox("Mp3UseVBR"); |
127 |
@@ -214,6 +218,7 @@ |
128 |
"The Ogg encoder will always use variable bitrates.")); |
129 |
return gc; |
130 |
}; |
131 |
+#endif |
132 |
|
133 |
static HostLineEdit *FilenameTemplate() |
134 |
{ |
135 |
@@ -649,7 +654,9 @@ |
136 |
encodersettings->setLabel(QObject::tr("CD Ripper Settings (part 2)")); |
137 |
encodersettings->addChild(EncoderType()); |
138 |
encodersettings->addChild(DefaultRipQuality()); |
139 |
+#ifdef LAME |
140 |
encodersettings->addChild(Mp3UseVBR()); |
141 |
+#endif |
142 |
addChild(encodersettings); |
143 |
} |
144 |
|
145 |
Index: mythmusic/mythmusic/cdrip.cpp |
146 |
=================================================================== |
147 |
--- mythmusic/mythmusic/cdrip.cpp (revision 27174) |
148 |
+++ mythmusic/mythmusic/cdrip.cpp (working copy) |
149 |
@@ -45,11 +45,14 @@ |
150 |
#include <mythuibuttonlist.h> |
151 |
|
152 |
// MythMusic includes |
153 |
+#include "config.h" |
154 |
#include "cdrip.h" |
155 |
#include "cddecoder.h" |
156 |
#include "encoder.h" |
157 |
#include "vorbisencoder.h" |
158 |
+#ifdef LAME |
159 |
#include "lameencoder.h" |
160 |
+#endif |
161 |
#include "flacencoder.h" |
162 |
#include "genres.h" |
163 |
#include "editmetadata.h" |
164 |
@@ -193,7 +196,9 @@ |
165 |
|
166 |
QString textstatus; |
167 |
QString encodertype = gCoreContext->GetSetting("EncoderType"); |
168 |
+#ifdef LAME |
169 |
bool mp3usevbr = gCoreContext->GetNumSetting("Mp3UseVBR", 0); |
170 |
+#endif |
171 |
|
172 |
m_totalSectors = 0; |
173 |
m_totalSectorsDone = 0; |
174 |
@@ -260,6 +265,7 @@ |
175 |
|
176 |
if (m_quality < 3) |
177 |
{ |
178 |
+#ifdef LAME |
179 |
if (encodertype == "mp3") |
180 |
{ |
181 |
outfile += ".mp3"; |
182 |
@@ -267,6 +273,7 @@ |
183 |
titleTrack, mp3usevbr)); |
184 |
} |
185 |
else // ogg |
186 |
+#endif |
187 |
{ |
188 |
outfile += ".ogg"; |
189 |
encoder.reset(new VorbisEncoder(outfile, m_quality, |
190 |
Index: settings.pro |
191 |
=================================================================== |
192 |
--- settings.pro (revision 27174) |
193 |
+++ settings.pro (working copy) |
194 |
@@ -60,7 +60,7 @@ |
195 |
} |
196 |
QMAKE_LIBDIR_X11 = |
197 |
|
198 |
-EXTRA_LIBS += -lfreetype -lmp3lame |
199 |
+EXTRA_LIBS += -lfreetype |
200 |
EXTRA_LIBS += $$CONFIG_AUDIO_ALSA_LIBS |
201 |
EXTRA_LIBS += $$CONFIG_AUDIO_JACK_LIBS |
202 |
EXTRA_LIBS += $$CONFIG_FIREWIRE_LIBS |