Ticket #3233: mythtv-0.21-nolame.patch
File mythtv-0.21-nolame.patch, 9.3 KB (added by , 16 years ago) |
---|
-
configure
95 95 echo " --enable-libfaad enable FAAD support via libfaad [default=no]" 96 96 echo " --enable-libfaadbin open libfaad.so.0 at runtime [default=no]" 97 97 echo " --enable-libgsm enable GSM support via libgsm [default=no]" 98 echo " -- enable-libmp3lame enable MP3 encodingvia libmp3lame [default=no]"98 echo " --disable-libmp3lame disable MP3 encoding/playback via libmp3lame [default=no]" 99 99 echo " --enable-libnut enable NUT (de)muxing via libnut," 100 100 echo " native demuxer exists [default=no]" 101 101 echo " --enable-libtheora enable Theora encoding via libtheora [default=no]" … … 1158 1158 iptv="yes" 1159 1159 ivtv="yes" 1160 1160 joystick_menu="default" 1161 l amemp3="yes"1161 libmp3lame="yes" 1162 1162 lirc="yes" 1163 1163 opengl="yes" 1164 1164 v4l="yes" … … 2634 2634 #has_library libmysqlclient || has_library mysql/libmysqlclient || 2635 2635 # die "ERROR! You must have a MySQL library installed to run MythTV." 2636 2636 # 2637 enabled lamemp3 && has_library libmp3lame && has_header lame/lame.h || 2638 die "ERROR! You must have the Lame MP3 encoding library installed to compile MythTV." 2637 enabled libmp3lame && has_library libmp3lame && has_header lame/lame.h || disable libmp3lame 2639 2638 2640 2639 #test for lirc client libraries and headers 2641 2640 enabled lirc && has_library liblirc_client && check_header lirc/lirc_client.h || disable lirc … … 3298 3297 append CCONFIG "using_live" 3299 3298 fi 3300 3299 3300 if enabled libmp3lame; then 3301 append CCONFIG "using_lame" 3302 echo "CONFIG_MP3_LIBS=-lmp3lame" >> $MYTH_CONFIG_MAK 3303 fi 3304 3301 3305 if enabled lirc; then 3302 3306 echo "CONFIG_LIRC_LIBS=-llirc_client" >> $MYTH_CONFIG_MAK 3303 3307 fi -
libs/libmythtv/NuppelVideoRecorder.cpp
69 69 pid = pid2 = 0; 70 70 inputchannel = 1; 71 71 compression = 1; 72 #ifdef LAME 72 73 compressaudio = 1; 74 #else 75 compressaudio = 0; 76 #endif 73 77 usebttv = 1; 74 78 w = 352; 75 79 h = 240; … … 81 85 framerate_multiplier = 1.0; 82 86 height_multiplier = 1.0; 83 87 88 #ifdef LAME 89 mp3buf = NULL; 84 90 mp3quality = 3; 85 91 gf = NULL; 92 #endif 93 86 94 rtjc = NULL; 87 95 strm = NULL; 88 mp3buf = NULL;89 96 90 97 transcoding = false; 91 98 … … 183 190 } 184 191 if (rtjc) 185 192 delete rtjc; 193 #ifdef LAME 186 194 if (mp3buf) 187 195 delete [] mp3buf; 188 196 if (gf) 189 lame_close(gf); 197 lame_close(gf); 198 #endif 190 199 if (strm) 191 200 delete [] strm; 192 201 if (fd >= 0) … … 302 311 hmjpg_vdecimation = value; 303 312 else if (opt == "audiocompression") 304 313 compressaudio = value; 314 #ifdef LAME 305 315 else if (opt == "mp3quality") 306 316 mp3quality = value; 317 #endif 307 318 else if (opt == "samplerate") 308 319 audio_samplerate = value; 309 320 else if (opt == "audioframesize") … … 397 408 if ((tmp = profile->byName("audiocodec"))) 398 409 setting = tmp->getValue(); 399 410 411 #ifdef LAME 400 412 if (setting == "MP3") 401 413 { 402 414 SetOption("audiocompression", 1); 403 415 SetIntOption(profile, "mp3quality"); 404 416 SetIntOption(profile, "samplerate"); 405 417 } 406 else if (setting == "Uncompressed") 418 else 419 #endif 420 if (setting == "Uncompressed") 407 421 { 408 422 SetOption("audiocompression", 0); 409 423 SetIntOption(profile, "samplerate"); … … 734 748 735 749 if (compressaudio) 736 750 { 751 #ifdef LAME 737 752 gf = lame_init(); 738 753 lame_set_bWriteVbrTag(gf, 0); 739 754 lame_set_quality(gf, mp3quality); … … 754 769 "AudioInit(): lame support requires 16bit audio"); 755 770 compressaudio = false; 756 771 } 772 #else 773 VERBOSE(VB_IMPORTANT, LOC_ERR + 774 "AudioInit(): support for LAME MP3 compression not enabled, disabling"); 775 compressaudio = false; 776 #endif 757 777 } 778 779 #ifdef LAME 758 780 mp3buf_size = (int)(1.25 * 16384 + 7200); 759 781 mp3buf = new char[mp3buf_size]; 782 #endif 760 783 761 784 return 0; 762 785 } … … 1997 2020 moredata.rtjpeg_chroma_filter = M2; 1998 2021 } 1999 2022 2023 #ifdef LAME 2000 2024 if (compressaudio) 2001 2025 { 2002 2026 moredata.audio_fourcc = FOURCC_LAME; … … 2004 2028 moredata.audio_quality = mp3quality; 2005 2029 } 2006 2030 else 2031 #endif 2007 2032 { 2008 2033 moredata.audio_fourcc = FOURCC_RAWA; 2009 2034 } … … 3229 3254 } 3230 3255 } 3231 3256 3257 #ifdef LAME 3232 3258 if (compressaudio) 3233 3259 { 3234 3260 char mp3gapless[7200]; … … 3285 3311 audiobytes += audio_buffer_size; 3286 3312 } 3287 3313 else 3314 #endif 3288 3315 { 3289 3316 frameheader.comptype = '0'; // uncompressed audio 3290 3317 frameheader.packetlength = audio_buffer_size; -
libs/libmythtv/libmythtv.pro
239 239 using_ivtv:HEADERS += ivtvdecoder.h 240 240 using_ivtv:SOURCES += ivtvdecoder.cpp 241 241 242 # LAME MP3 Compression enabled 243 using_lame:DEFINES += LAME 244 242 245 # On screen display (video output overlay) 243 246 using_fribidi:DEFINES += USING_FRIBIDI 244 247 HEADERS += osd.h osdtypes.h -
libs/libmythtv/NuppelVideoRecorder.h
5 5 #include <sys/time.h> 6 6 #include <time.h> 7 7 #include <pthread.h> 8 9 #ifdef LAME 8 10 #ifdef MMX 9 11 #undef MMX 10 12 #define MMXBLAH … … 13 15 #ifdef MMXBLAH 14 16 #define MMX 15 17 #endif 18 #endif 16 19 17 20 #include "filter.h" 18 21 #include "minilzo.h" … … 164 167 165 168 bool transcoding; 166 169 170 #ifdef LAME 167 171 int mp3quality; 168 172 char *mp3buf; 169 173 int mp3buf_size; 170 174 lame_global_flags *gf; 175 #endif 171 176 172 177 RTjpeg *rtjc; 173 178 -
libs/libmythtv/recordingprofile.cpp
78 78 } 79 79 }; 80 80 81 #ifdef LAME 81 82 class MP3Quality : public SliderSetting, public CodecParamStorage 82 83 { 83 84 public: … … 92 93 "numbers) requires more CPU.")); 93 94 }; 94 95 }; 96 #endif 95 97 96 98 class BTTVVolume : public SliderSetting, public CodecParamStorage 97 99 { … … 401 403 addChild(codecName); 402 404 setTrigger(codecName); 403 405 404 ConfigurationGroup* params = new VerticalConfigurationGroup(false); 406 ConfigurationGroup* params; 407 408 #ifdef LAME 409 params = new VerticalConfigurationGroup(false); 405 410 params->setLabel("MP3"); 406 411 params->addChild(new SampleRate(parent)); 407 412 params->addChild(new MP3Quality(parent)); 408 413 params->addChild(new BTTVVolume(parent)); 409 414 addTarget("MP3", params); 415 #endif 410 416 411 417 params = new VerticalConfigurationGroup(false, false, true, true); 412 418 params->setLabel("MPEG-2 Hardware Encoder"); … … 433 439 else 434 440 { 435 441 // V4L, TRANSCODE (and any undefined types) 442 #ifdef LAME 436 443 codecName->addSelection("MP3"); 444 #endif 437 445 codecName->addSelection("Uncompressed"); 438 446 } 439 447 } 440 448 else 441 449 { 450 #ifdef LAME 442 451 codecName->addSelection("MP3"); 452 #endif 443 453 codecName->addSelection("Uncompressed"); 444 454 codecName->addSelection("MPEG-2 Hardware Encoder"); 445 455 } … … 1376 1386 "(:NAME, :VIDEOCODEC, :AUDIOCODEC, :PROFILEGROUP);"); 1377 1387 query.bindValue(":NAME", profName); 1378 1388 query.bindValue(":VIDEOCODEC", "MPEG-4"); 1389 #ifdef LAME 1379 1390 query.bindValue(":AUDIOCODEC", "MP3"); 1391 #else 1392 query.bindValue(":AUDIOCODEC", "Uncompressed"); 1393 #endif 1380 1394 query.bindValue(":PROFILEGROUP", group); 1381 1395 if (!query.exec()) 1382 1396 MythContext::DBError("RecordingProfileEditor::open", query); -
libs/libavcodec/libavcodec.pro
321 321 contains( CONFIG_LIBFAAC, yes ) { SOURCES *= libfaac.c } 322 322 contains( CONFIG_LIBFAAD, yes ) { SOURCES *= libfaad.c } 323 323 contains( CONFIG_LIBGSM, yes ) { SOURCES *= libgsm.c } 324 contains( CONFIG_LIBMP3LAME, yes ) { SOURCES *= libmp3lame.c }325 324 contains( CONFIG_LIBTHEORA, yes ) { SOURCES *= libtheoraenc.c } 326 325 contains( CONFIG_LIBVORBIS, yes ) { SOURCES *= libvorbis.c } 327 326 contains( CONFIG_LIBX264, yes ) { SOURCES *= libx264.c } … … 374 373 DEFINES += HAVE_DVDV 375 374 } 376 375 376 using_lame { 377 SOURCES *= libmp3lame.c 378 } 379 377 380 !contains( CONFIG_SWSCALER, yes ) { SOURCES *= imgresample.c } 378 381 379 382 contains( HAVE_GPROF, yes ) { -
settings.pro
104 104 } 105 105 QMAKE_LIBDIR_OPENGL = 106 106 107 EXTRA_LIBS = $$FREETYPE_LIBS -lmp3lame 107 EXTRA_LIBS = $$FREETYPE_LIBS 108 EXTRA_LIBS += $$CONFIG_MP3_LIBS 108 109 EXTRA_LIBS += $$CONFIG_AUDIO_OSS_LIBS 109 110 EXTRA_LIBS += $$CONFIG_AUDIO_ALSA_LIBS 110 111 EXTRA_LIBS += $$CONFIG_AUDIO_ARTS_LIBS