From 48576ad4f2b114eb4c250540b7217da81c8f3767 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 13 Jun 2013 12:59:55 +0100 Subject: [PATCH] Move libmythsamplerate to external/libsamplerate. --- mythtv/configure | 4 ++ mythtv/docs/doxygen-architecture-document.cpp | 8 ++-- mythtv/external/Makefile | 5 ++- .../libsamplerate}/AUTHORS | 0 .../libsamplerate}/COPYING | 0 .../libsamplerate}/ChangeLog | 0 .../libsamplerate}/NEWS | 0 .../libsamplerate}/README | 0 .../libsamplerate}/common.h | 0 .../libsamplerate}/fastest_coeffs.h | 0 .../libsamplerate}/float_cast.h | 0 .../libsamplerate}/high_qual_coeffs.h | 0 .../external/libsamplerate/libsamplerate.pro | 41 +++++++++++++++++++ .../libsamplerate}/mid_qual_coeffs.h | 0 .../libsamplerate}/samplerate.c | 2 - .../libsamplerate}/samplerate.h | 0 .../libsamplerate}/src_linear.c | 0 .../libsamplerate}/src_sinc.c | 0 .../libsamplerate}/src_zoh.c | 0 mythtv/libs/libmyth/audio/audiooutputbase.h | 2 + mythtv/libs/libmyth/libmyth.pro | 8 ++-- .../libs/libmythmetadata/libmythmetadata.pro | 4 +- .../libmythsamplerate/libmythsamplerate.pro | 24 ----------- mythtv/libs/libs.pro | 4 +- mythtv/programs/programs-libs.pro | 3 +- 25 files changed, 65 insertions(+), 40 deletions(-) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/AUTHORS (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/COPYING (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/ChangeLog (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/NEWS (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/README (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/common.h (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/fastest_coeffs.h (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/float_cast.h (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/high_qual_coeffs.h (100%) create mode 100644 mythtv/external/libsamplerate/libsamplerate.pro rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/mid_qual_coeffs.h (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/samplerate.c (99%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/samplerate.h (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/src_linear.c (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/src_sinc.c (100%) rename mythtv/{libs/libmythsamplerate => external/libsamplerate}/src_zoh.c (100%) delete mode 100644 mythtv/libs/libmythsamplerate/libmythsamplerate.pro diff --git a/mythtv/configure b/mythtv/configure index a2aae29281f..ab172677db0 100755 --- a/mythtv/configure +++ b/mythtv/configure @@ -6479,5 +6479,9 @@ fi echo "Configuring libmythbluray..." (cd external/libmythbluray ; \ ${qmakeconf} -o Makefile) +echo "Configuring libsamplerate..." +(cd external/libsamplerate ; \ + ${qmakeconf} -o Makefile) + test -n "$WARNINGS" && printf "\n$WARNINGS" || exit 0 diff --git a/mythtv/docs/doxygen-architecture-document.cpp b/mythtv/docs/doxygen-architecture-document.cpp index 33a02cfe8c5..4742511ee35 100644 --- a/mythtv/docs/doxygen-architecture-document.cpp +++ b/mythtv/docs/doxygen-architecture-document.cpp @@ -102,7 +102,7 @@ There are also a few simple \ref testing "testing shortcuts". and some old UI widgets are implemented by libmyth. This library depends on libav*, libmythbase, libmythui, libmythupnp, - libmythsamplerate, libmythsoundtouch and libmythfreesurround. + libsamplerate, libmythsoundtouch and libmythfreesurround. Any changes to this library's ABI may trigger a MythTV binary version change because the plugins depend on it. @@ -144,7 +144,7 @@ There are also a few simple \ref testing "testing shortcuts". This library does not depend on any of our libraries. -
libmythsamplerate
Audio resampling library. +
libsamplerate
Audio resampling library. Documented Externally. We use this to support different output sample rates than the sample rate used in the audio streams we play. @@ -190,9 +190,9 @@ There are also a few simple \ref testing "testing shortcuts". This library does not depend on any of our libraries. -Two libraries libmythmpeg2 and libmythsamplerate appear redundant, but +Two libraries libmythmpeg2 and libsamplerate appear redundant, but libmpeg2 decodes MPEG-2 more quickly than ffmpeg on some systems, and -libmythsamplerate resamples audio with better quality when we only need +libsamplerate resamples audio with better quality when we only need to match the hardware sample rate to the A/V streams audio sample rate. \section db Database Schema diff --git a/mythtv/external/Makefile b/mythtv/external/Makefile index 6d2e513ede9..ea5c4135693 100644 --- a/mythtv/external/Makefile +++ b/mythtv/external/Makefile @@ -1,6 +1,6 @@ include ../config.mak -SUBDIRS = FFmpeg zeromq nzmqt qjson libmythbluray +SUBDIRS = FFmpeg zeromq nzmqt qjson libmythbluray libsamplerate ifdef CONFIG_HDHOMERUN SUBDIRS += libhdhomerun @@ -55,3 +55,6 @@ libhdhomerun-all libhdhomerun-clean libhdhomerun-distclean libhdhomerun-install libmythbluray-all libmythbluray-clean libmythbluray-distclean libmythbluray-install libmythbluray-uninstall: ${MAKE} -C libmythbluray ${@:libmythbluray-%=%} +libsamplerate-all libsamplerate-clean libsamplerate-distclean libsamplerate-install libsamplerate-uninstall: + ${MAKE} -C libsamplerate ${@:libsamplerate-%=%} + diff --git a/mythtv/libs/libmythsamplerate/AUTHORS b/mythtv/external/libsamplerate/AUTHORS similarity index 100% rename from mythtv/libs/libmythsamplerate/AUTHORS rename to mythtv/external/libsamplerate/AUTHORS diff --git a/mythtv/libs/libmythsamplerate/COPYING b/mythtv/external/libsamplerate/COPYING similarity index 100% rename from mythtv/libs/libmythsamplerate/COPYING rename to mythtv/external/libsamplerate/COPYING diff --git a/mythtv/libs/libmythsamplerate/ChangeLog b/mythtv/external/libsamplerate/ChangeLog similarity index 100% rename from mythtv/libs/libmythsamplerate/ChangeLog rename to mythtv/external/libsamplerate/ChangeLog diff --git a/mythtv/libs/libmythsamplerate/NEWS b/mythtv/external/libsamplerate/NEWS similarity index 100% rename from mythtv/libs/libmythsamplerate/NEWS rename to mythtv/external/libsamplerate/NEWS diff --git a/mythtv/libs/libmythsamplerate/README b/mythtv/external/libsamplerate/README similarity index 100% rename from mythtv/libs/libmythsamplerate/README rename to mythtv/external/libsamplerate/README diff --git a/mythtv/libs/libmythsamplerate/common.h b/mythtv/external/libsamplerate/common.h similarity index 100% rename from mythtv/libs/libmythsamplerate/common.h rename to mythtv/external/libsamplerate/common.h diff --git a/mythtv/libs/libmythsamplerate/fastest_coeffs.h b/mythtv/external/libsamplerate/fastest_coeffs.h similarity index 100% rename from mythtv/libs/libmythsamplerate/fastest_coeffs.h rename to mythtv/external/libsamplerate/fastest_coeffs.h diff --git a/mythtv/libs/libmythsamplerate/float_cast.h b/mythtv/external/libsamplerate/float_cast.h similarity index 100% rename from mythtv/libs/libmythsamplerate/float_cast.h rename to mythtv/external/libsamplerate/float_cast.h diff --git a/mythtv/libs/libmythsamplerate/high_qual_coeffs.h b/mythtv/external/libsamplerate/high_qual_coeffs.h similarity index 100% rename from mythtv/libs/libmythsamplerate/high_qual_coeffs.h rename to mythtv/external/libsamplerate/high_qual_coeffs.h diff --git a/mythtv/external/libsamplerate/libsamplerate.pro b/mythtv/external/libsamplerate/libsamplerate.pro new file mode 100644 index 00000000000..d6d142f8dd9 --- /dev/null +++ b/mythtv/external/libsamplerate/libsamplerate.pro @@ -0,0 +1,41 @@ +include ( ../../settings.pro ) + +TEMPLATE = lib +TARGET = mythsamplerate-$$LIBVERSION +CONFIG += thread staticlib warn_off +CONFIG -= qt + +INCLUDEPATH += ../ ../../ + +DEFINES += HAVE_AV_CONFIG_H + +QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) + +# Input +HEADERS += samplerate.h + +SOURCES += samplerate.c src_linear.c src_sinc.c src_zoh.c + +inc.path = $${PREFIX}/include/mythtv/ +inc.files = samplerate.h + +INSTALLS += inc + +mingw { + dll : contains( TEMPLATE, lib ) { + + # Qt under Linux/UnixMac OS X builds libBlah.a and libBlah.so, + # but is using the Windows defaults libBlah.a and Blah.dll. + # + # So that our dependency targets work between SUBDIRS, override: + # + TARGET = lib$${TARGET} + + + # Windows doesn't have a nice variable like LD_LIBRARY_PATH, + # which means make install would be broken without extra steps. + # As a workaround, we store dlls with exes. Also improves debugging! + # + target.path = $${PREFIX}/bin + } +} diff --git a/mythtv/libs/libmythsamplerate/mid_qual_coeffs.h b/mythtv/external/libsamplerate/mid_qual_coeffs.h similarity index 100% rename from mythtv/libs/libmythsamplerate/mid_qual_coeffs.h rename to mythtv/external/libsamplerate/mid_qual_coeffs.h diff --git a/mythtv/libs/libmythsamplerate/samplerate.c b/mythtv/external/libsamplerate/samplerate.c similarity index 99% rename from mythtv/libs/libmythsamplerate/samplerate.c rename to mythtv/external/libsamplerate/samplerate.c index 98117678ff5..12423e8498b 100644 --- a/mythtv/libs/libmythsamplerate/samplerate.c +++ b/mythtv/external/libsamplerate/samplerate.c @@ -26,8 +26,6 @@ #include #include -#include "libmythbase/mythconfig.h" - #include "samplerate.h" #include "float_cast.h" #include "common.h" diff --git a/mythtv/libs/libmythsamplerate/samplerate.h b/mythtv/external/libsamplerate/samplerate.h similarity index 100% rename from mythtv/libs/libmythsamplerate/samplerate.h rename to mythtv/external/libsamplerate/samplerate.h diff --git a/mythtv/libs/libmythsamplerate/src_linear.c b/mythtv/external/libsamplerate/src_linear.c similarity index 100% rename from mythtv/libs/libmythsamplerate/src_linear.c rename to mythtv/external/libsamplerate/src_linear.c diff --git a/mythtv/libs/libmythsamplerate/src_sinc.c b/mythtv/external/libsamplerate/src_sinc.c similarity index 100% rename from mythtv/libs/libmythsamplerate/src_sinc.c rename to mythtv/external/libsamplerate/src_sinc.c diff --git a/mythtv/libs/libmythsamplerate/src_zoh.c b/mythtv/external/libsamplerate/src_zoh.c similarity index 100% rename from mythtv/libs/libmythsamplerate/src_zoh.c rename to mythtv/external/libsamplerate/src_zoh.c diff --git a/mythtv/libs/libmyth/audio/audiooutputbase.h b/mythtv/libs/libmyth/audio/audiooutputbase.h index 2b1227645a1..707310ef9c2 100644 --- a/mythtv/libs/libmyth/audio/audiooutputbase.h +++ b/mythtv/libs/libmyth/audio/audiooutputbase.h @@ -15,7 +15,9 @@ using namespace std; // MythTV headers #include "audiooutput.h" +// external/libsamplerate #include "samplerate.h" + #include "mythlogging.h" #include "mthread.h" diff --git a/mythtv/libs/libmyth/libmyth.pro b/mythtv/libs/libmyth/libmyth.pro index 2a6f449495b..bb7b7c1a5d0 100644 --- a/mythtv/libs/libmyth/libmyth.pro +++ b/mythtv/libs/libmyth/libmyth.pro @@ -87,17 +87,17 @@ SOURCES += mythrssmanager.cpp netutils.cpp SOURCES += netgrabbermanager.cpp } -INCLUDEPATH += ../libmythsamplerate ../libmythsoundtouch ../libmythfreesurround +INCLUDEPATH += ../../external/libsamplerate ../libmythsoundtouch ../libmythfreesurround INCLUDEPATH += ../libmythbase INCLUDEPATH += ../.. ../ ./ ../libmythupnp ../libmythui INCLUDEPATH += ../../external/FFmpeg -DEPENDPATH += ../libmythsamplerate ../libmythsoundtouch +DEPENDPATH += ../../external/libsamplerate ../libmythsoundtouch DEPENDPATH += ../libmythfreesurround DEPENDPATH += ../ ../libmythui ../libmythbase DEPENDPATH += ../libmythupnp DEPENDPATH += ./audio -LIBS += -L../libmythsamplerate -lmythsamplerate-$${LIBVERSION} +LIBS += -L../../external/libsamplerate -lmythsamplerate-$${LIBVERSION} LIBS += -L../libmythsoundtouch -lmythsoundtouch-$${LIBVERSION} LIBS += -L../libmythbase -lmythbase-$${LIBVERSION} LIBS += -L../libmythui -lmythui-$${LIBVERSION} @@ -109,7 +109,7 @@ LIBS += -L../../external/FFmpeg/libavutil -lmythavutil LIBS += -L../../external/FFmpeg/libavformat -lmythavformat LIBS += -L../../external/FFmpeg/libswresample -lmythswresample -POST_TARGETDEPS += ../libmythsamplerate/libmythsamplerate-$${MYTH_LIB_EXT} +POST_TARGETDEPS += ../../external/libsamplerate/libmythsamplerate-$${MYTH_LIB_EXT} POST_TARGETDEPS += ../libmythsoundtouch/libmythsoundtouch-$${MYTH_LIB_EXT} POST_TARGETDEPS += ../libmythfreesurround/libmythfreesurround-$${MYTH_LIB_EXT} POST_TARGETDEPS += ../../external/FFmpeg/libavcodec/$$avLibName(avcodec) diff --git a/mythtv/libs/libmythmetadata/libmythmetadata.pro b/mythtv/libs/libmythmetadata/libmythmetadata.pro index 843c3a99817..54cb344a6fc 100644 --- a/mythtv/libs/libmythmetadata/libmythmetadata.pro +++ b/mythtv/libs/libmythmetadata/libmythmetadata.pro @@ -43,13 +43,13 @@ INCLUDEPATH += ../../external/FFmpeg ../libmyth ../../external/libmythbluray # for TagLib INCLUDEPATH += $${CONFIG_TAGLIB_INCLUDES} -DEPENDPATH += ../libmythsamplerate ../libmythsoundtouch +DEPENDPATH += ../../external/libsamplerate ../libmythsoundtouch DEPENDPATH += ../libmythfreesurround DEPENDPATH += ../ ../libmythui ../libmythbase DEPENDPATH += ../libmythupnp ../libmythtv ../libmyth DEPENDPATH += ../../external/libmythbluray -LIBS += -L../libmythsamplerate -lmythsamplerate-$${LIBVERSION} +LIBS += -L../../external/libsamplerate -lmythsamplerate-$${LIBVERSION} LIBS += -L../libmythsoundtouch -lmythsoundtouch-$${LIBVERSION} LIBS += -L../libmythbase -lmythbase-$${LIBVERSION} LIBS += -L../libmythui -lmythui-$${LIBVERSION} diff --git a/mythtv/libs/libmythsamplerate/libmythsamplerate.pro b/mythtv/libs/libmythsamplerate/libmythsamplerate.pro deleted file mode 100644 index d92778f1808..00000000000 --- a/mythtv/libs/libmythsamplerate/libmythsamplerate.pro +++ /dev/null @@ -1,24 +0,0 @@ -include ( ../../settings.pro ) - -TEMPLATE = lib -TARGET = mythsamplerate-$$LIBVERSION -CONFIG += thread staticlib warn_off -CONFIG -= qt - -INCLUDEPATH += ../ ../../ - -DEFINES += HAVE_AV_CONFIG_H - -QMAKE_CLEAN += $(TARGET) $(TARGETA) $(TARGETD) $(TARGET0) $(TARGET1) $(TARGET2) - -# Input -HEADERS += samplerate.h - -SOURCES += samplerate.c src_linear.c src_sinc.c src_zoh.c - -inc.path = $${PREFIX}/include/mythtv/ -inc.files = samplerate.h - -INSTALLS += inc - -include ( ../libs-targetfix.pro ) diff --git a/mythtv/libs/libs.pro b/mythtv/libs/libs.pro index c0a7c80cdc4..9e2a921d44c 100644 --- a/mythtv/libs/libs.pro +++ b/mythtv/libs/libs.pro @@ -3,7 +3,6 @@ include (../settings.pro) TEMPLATE = subdirs # Libraries without dependencies -SUBDIRS += libmythsamplerate SUBDIRS += libmythsoundtouch libmythdvdnav SUBDIRS += libmythfreesurround libmythbase SUBDIRS += libmythservicecontracts @@ -18,7 +17,8 @@ SUBDIRS += libmythui libmythupnp libmyth libmythui.depends = libmythbase libmythupnp.depends = libmythbase libmyth.depends = libmythbase libmythui libmythupnp -libmyth.depends += libmythsamplerate libmythsoundtouch libmythfreesurround +libmyth.depends += libmythsoundtouch +libmyth.depends += libmythfreesurround libmythupnp.depends = libmythbase libmythservicecontracts LIBMYTHTVDEPS = $$SUBDIRS diff --git a/mythtv/programs/programs-libs.pro b/mythtv/programs/programs-libs.pro index 1370e434b63..6dc5df0c810 100644 --- a/mythtv/programs/programs-libs.pro +++ b/mythtv/programs/programs-libs.pro @@ -2,7 +2,8 @@ INCLUDEPATH += ../.. ../../libs/ ../../libs/libmyth ../../libs/libmyth/audio INCLUDEPATH += ../../libs/libmythtv ../../external/FFmpeg INCLUDEPATH += ../../libs/libmythupnp ../../libs/libmythui ../../libs/libmythmetadata INCLUDEPATH += ../../libs/libmythlivemedia ../../libs/libmythbase -INCLUDEPATH += ../../libs/libmythdvdnav ../../external/libmythbluray ../../libs/libmythsamplerate +INCLUDEPATH += ../../libs/libmythdvdnav ../../external/libmythbluray +INCLUDEPATH += ../../external/libsamplerate INCLUDEPATH += ../../libs/libmythtv/mpeg INCLUDEPATH += ../../libs/libmythtv/vbitext INCLUDEPATH += ../../libs/libmythservicecontracts