diff -Nurp -x '*~' -x '*.rej' -x '*.orig' mythplugins-13114/configure mythplugins-13114-f/configure --- mythplugins-13114/configure 2006-08-03 23:39:47.000000000 +0300 +++ mythplugins-13114-f/configure 2007-03-23 22:44:02.000000000 +0200 @@ -30,6 +30,7 @@ fftw_lib="yes" fftw_lib3="yes" sdl="yes" aac="no" # compile fails w/libfaad v2.0 +mp3lame="yes" exif="yes" newexif="yes" festival="no" # no config detection/setup routine @@ -91,6 +92,7 @@ MythMusic related options: --enable-fftw enable fftw visualizers [$fftw_lib] --enable-sdl use SDL for the synaesthesia output [$sdl] --enable-aac enable AAC/MP4 audio file decompression [$aac] + --enable-lame enable MP3 encoding support using LAME [$mp3lame] MythNews related options: --enable-mythnews build the mythnews plugin [$news] @@ -214,6 +216,10 @@ for opt do ;; --disable-aac) aac="no" ;; + --enable-lame) mp3lame="yes" + ;; + --disable-lame) mp3lame="no" + ;; --enable-exif) exif="yes" ;; --enable-new-exif) newexif="yes" @@ -242,6 +248,7 @@ for opt do opengl="yes"; fftw_lib="yes"; aac="yes"; + mp3lame="yes"; exif="yes"; festival="yes"; archive="yes"; @@ -264,6 +271,7 @@ for opt do opengl="no"; fftw_lib="no"; aac="no"; + mp3lame="no"; exif="no"; festival="no"; archive="no"; @@ -384,6 +392,15 @@ if test "$aac" != "no" ; then fi fi +if test "$mp3lame" != "no" ; then + mp3lame="no" + if has_library libmp3lame ; then + if has_header lame/lame.h ; then + mp3lame="yes" + fi + fi +fi + if test "$exif" != "no" ; then exif="no" if has_library libexif ; then @@ -436,14 +453,7 @@ if test "$music" != "no" ; then echo "MythMusic requires CDDA Paranoia." fi - mp3lame="no" - if has_header lame/lame.h && has_library libmp3lame ; then - mp3lame="yes" - else - echo "MythMusic requires the LAME mp3 encoder." - fi - - if test "$mad" = "no" -o "$vorbis" = "no" -o "$flac" = "no" -o "$cdaudio" = "no" -o "$paranoia" = "no" -o "$mp3lame" = "no" ; then + if test "$mad" = "no" -o "$vorbis" = "no" -o "$flac" = "no" -o "$cdaudio" = "no" -o "$paranoia" = "no" ; then echo "Disabling MythMusic due to missing dependencies." music="no" fi @@ -785,6 +795,18 @@ if test "$music" = "yes" ; then if test "$aac" = "no" ; then echo " AAC support will not be included in MythMusic" fi + + if test "$mp3lame" = "yes" ; then + echo " MP3 encoding support will be included in MythMusic" + echo "#define LAME 1" >> ./mythmusic/mythmusic/config.h + echo "LIBS += -lmp3lame" >> ./mythmusic/mythmusic/config.pro + echo "HEADERS += lameencoder.h" >> ./mythmusic/mythmusic/config.pro + echo "SOURCES += lameencoder.cpp" >> ./mythmusic/mythmusic/config.pro + fi + + if test "$mp3lame" = "no" ; then + echo " MP3 encoding support will not be included in MythMusic" + fi fi ########################################################### diff -Nurp -x '*~' -x '*.rej' -x '*.orig' mythplugins-13114/mythmusic/mythmusic/cdrip.cpp mythplugins-13114-f/mythmusic/mythmusic/cdrip.cpp --- mythplugins-13114/mythmusic/mythmusic/cdrip.cpp 2006-09-05 00:24:11.000000000 +0300 +++ mythplugins-13114-f/mythmusic/mythmusic/cdrip.cpp 2007-03-23 22:44:30.000000000 +0200 @@ -40,11 +40,14 @@ using namespace std; #include <mythtv/lcddevice.h> // MythMusic includes +#include "config.h" #include "cdrip.h" #include "cddecoder.h" #include "encoder.h" #include "vorbisencoder.h" +#ifdef LAME #include "lameencoder.h" +#endif #include "flacencoder.h" Ripper::Ripper(MythMainWindow *parent, const char *name) @@ -698,7 +701,9 @@ void Ripper::ripthedisc(void) QString cddevice = gContext->GetSetting("CDDevice"); QString encodertype = gContext->GetSetting("EncoderType"); int encodequal = qualchooser->currentItem(); +#ifdef LAME bool mp3usevbr = gContext->GetNumSetting("Mp3UseVBR", 0); +#endif CdDecoder *decoder = new CdDecoder("cda", NULL, NULL, NULL); @@ -758,6 +763,7 @@ void Ripper::ripthedisc(void) if (encodequal < 3) { +#ifdef LAME if (encodertype == "mp3") { outfile += ".mp3"; @@ -765,6 +771,7 @@ void Ripper::ripthedisc(void) mp3usevbr); } else // ogg +#endif { outfile += ".ogg"; encoder = new VorbisEncoder(outfile, encodequal, track); diff -Nurp -x '*~' -x '*.rej' -x '*.orig' mythplugins-13114/mythmusic/mythmusic/globalsettings.cpp mythplugins-13114-f/mythmusic/mythmusic/globalsettings.cpp --- mythplugins-13114/mythmusic/mythmusic/globalsettings.cpp 2006-09-05 06:36:34.000000000 +0300 +++ mythplugins-13114-f/mythmusic/mythmusic/globalsettings.cpp 2007-03-23 22:44:02.000000000 +0200 @@ -3,6 +3,7 @@ #include <unistd.h> #include "globalsettings.h" +#include "config.h" #include <qfile.h> #include <qdialog.h> #include <qcursor.h> @@ -157,7 +158,9 @@ static HostComboBox *EncoderType() HostComboBox *gc = new HostComboBox("EncoderType"); gc->setLabel(QObject::tr("Encoding")); gc->addSelection(QObject::tr("Ogg Vorbis"), "ogg"); +#ifdef LAME gc->addSelection(QObject::tr("Lame (MP3)"), "mp3"); +#endif gc->setHelpText(QObject::tr("Audio encoder to use for CD ripping. " "Note that the quality level 'Perfect' will use the " "FLAC encoder.")); @@ -176,6 +179,7 @@ static HostComboBox *DefaultRipQuality() return gc; }; +#ifdef LAME static HostCheckBox *Mp3UseVBR() { HostCheckBox *gc = new HostCheckBox("Mp3UseVBR"); @@ -186,6 +190,7 @@ static HostCheckBox *Mp3UseVBR() "The Ogg encoder will always use variable bitrates.")); return gc; }; +#endif static HostLineEdit *FilenameTemplate() { @@ -585,7 +590,9 @@ MusicRipperSettings::MusicRipperSettings encodersettings->setLabel(QObject::tr("CD Ripper Settings (part 2)")); encodersettings->addChild(EncoderType()); encodersettings->addChild(DefaultRipQuality()); +#ifdef LAME encodersettings->addChild(Mp3UseVBR()); +#endif addChild(encodersettings); } diff -Nurp -x '*~' -x '*.rej' -x '*.orig' mythplugins-13114/mythmusic/mythmusic/mythmusic.pro mythplugins-13114-f/mythmusic/mythmusic/mythmusic.pro --- mythplugins-13114/mythmusic/mythmusic/mythmusic.pro 2006-02-17 03:15:01.000000000 +0200 +++ mythplugins-13114-f/mythmusic/mythmusic/mythmusic.pro 2007-03-23 22:44:02.000000000 +0200 @@ -21,7 +21,7 @@ uifiles.files = music-ui.xml images/*.pn INSTALLS += installfiles uifiles LIBS += -lmad -lid3tag -logg -lvorbisfile -lvorbis -lvorbisenc -lcdaudio -lFLAC -LIBS += -lmp3lame -lcdda_paranoia -lcdda_interface +LIBS += -lcdda_paranoia -lcdda_interface # Input HEADERS += cddecoder.h cdrip.h constants.h databasebox.h @@ -29,7 +29,7 @@ HEADERS += decoder.h flacdecoder.h flace HEADERS += metadata.h playbackbox.h playlist.h polygon.h HEADERS += streaminput.h synaesthesia.h encoder.h visualize.h avfdecoder.h HEADERS += treecheckitem.h vorbisdecoder.h vorbisencoder.h polygon.h -HEADERS += bumpscope.h globalsettings.h lameencoder.h dbcheck.h +HEADERS += bumpscope.h globalsettings.h dbcheck.h HEADERS += metaio.h metaioid3v2.h vcedit.h metaiooggvorbiscomment.h HEADERS += metaioflacvorbiscomment.h metaioavfcomment.h metaio_libid3hack.h HEADERS += goom/filters.h goom/goomconfig.h goom/goom_core.h goom/graphic.h @@ -42,7 +42,7 @@ SOURCES += cddecoder.cpp cdrip.cpp decod SOURCES += flacdecoder.cpp flacencoder.cpp maddecoder.cpp main.cpp SOURCES += mainvisual.cpp metadata.cpp playbackbox.cpp playlist.cpp SOURCES += streaminput.cpp encoder.cpp dbcheck.cpp -SOURCES += synaesthesia.cpp treecheckitem.cpp vorbisdecoder.cpp lameencoder.cpp +SOURCES += synaesthesia.cpp treecheckitem.cpp vorbisdecoder.cpp SOURCES += vorbisencoder.cpp visualize.cpp bumpscope.cpp globalsettings.cpp SOURCES += databasebox.cpp genres.cpp SOURCES += metaio.cpp metaioid3v2.cpp vcedit.c metaiooggvorbiscomment.cpp diff -Nurp -x '*~' -x '*.rej' -x '*.orig' mythplugins-13114/settings.pro mythplugins-13114-f/settings.pro --- mythplugins-13114/settings.pro 2006-08-28 23:47:26.000000000 +0300 +++ mythplugins-13114-f/settings.pro 2007-03-23 22:44:02.000000000 +0200 @@ -52,7 +52,8 @@ LOCAL_LIBDIR_X11 = } QMAKE_LIBDIR_X11 = -EXTRA_LIBS = -lfreetype -lmp3lame +EXTRA_LIBS = -lfreetype +EXTRA_LIBS += $$CONFIG_MP3_LIBS EXTRA_LIBS += $$CONFIG_AUDIO_ALSA_LIBS EXTRA_LIBS += $$CONFIG_AUDIO_ARTS_LIBS EXTRA_LIBS += $$CONFIG_AUDIO_JACK_LIBS