diff --git a/configure.ac b/configure.ac index 0fb21937f..ada2ce491 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,11 @@ AC_PROG_CXX AC_DISABLE_STATIC AM_PROG_LIBTOOL +AC_ARG_WITH([tremor], [AS_HELP_STRING([--with-tremor], + [use libvorbisidec instead of libogg/libvorbis])], + [TREMOR="$withval"], + [TREMOR=no]) + if test "$BOXTYPE" != "tripledragon"; then echo "BOXTYPE: $BOXTYPE" TUXBOX_APPS_DVB @@ -22,12 +27,18 @@ fi if test "$BOXTYPE" = "tripledragon"; then TUXBOX_APPS_LIB_PKGCONFIG(DIRECTFB, directfb) fi + +if test "$TREMOR" = "yes"; then + TUXBOX_APPS_LIB_PKGCONFIG(VORBISIDEC,vorbisidec) + AC_DEFINE(USE_TREMOR,1,use libvorbisidec/tremor library) +fi +AM_CONDITIONAL(USE_TREMOR, test "$TREMOR" = "yes") + TUXBOX_APPS_LIB_CONFIG(CURL,curl-config) TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config) # TUXBOX_APPS_LIB_PKGCONFIG(OPENSSL,openssl) TUXBOX_APPS_LIB_PKGCONFIG(ID3TAG,libid3tag) TUXBOX_APPS_LIB_PKGCONFIG(MAD,libmad) -#TUXBOX_APPS_LIB_PKGCONFIG(VORBISIDEC,tremor) TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng) TUXBOX_APPS_LIB_PKGCONFIG(AVFORMAT,libavformat) TUXBOX_APPS_LIB_PKGCONFIG(AVCODEC,libavcodec) diff --git a/src/Makefile.am b/src/Makefile.am index 58befd0ec..bb10cbc11 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,12 @@ SUBDIRS += lcddisplay INCLUDES += -I$(top_srcdir)/lib/libtriple endif +if USE_TREMOR +VORBISLIBS = @VORBISIDEC_LIBS@ +else +VORBISLIBS = -lvorbisfile -lvorbis -logg +endif + bin_PROGRAMS = neutrino neutrino_SOURCES = neutrino_menue.cpp neutrino.cpp @@ -69,7 +75,7 @@ neutrino_LDADD = \ @LIBCS_LIBS@ \ @AVFORMAT_LIBS@ \ @AVUTIL_LIBS@ \ - -lvorbisfile -lvorbis -logg \ + $(VORBISLIBS) \ -lungif \ -ljpeg \ -lrt -lpthread diff --git a/src/driver/audiodec/oggdec.cpp b/src/driver/audiodec/oggdec.cpp index 70de54381..b28a7aa4d 100644 --- a/src/driver/audiodec/oggdec.cpp +++ b/src/driver/audiodec/oggdec.cpp @@ -137,14 +137,14 @@ CBaseDec::RetCode COggDec::Decoder(FILE *in, const int OutputFd, State* const st } bytes=0; if(mSeekable) -#ifdef DBOX +#ifdef USE_TREMOR mSlotTime[mWriteSlot] = ov_time_tell(&vf); #else mSlotTime[mWriteSlot] = (ogg_int64_t)(1000 * ov_time_tell(&vf)); #endif do { -#ifdef DBOX +#ifdef USE_TREMOR rval = ov_read(&vf, mPcmSlots[mWriteSlot]+bytes, mSlotSize-bytes, &bitstream); #else rval = ov_read(&vf, mPcmSlots[mWriteSlot]+bytes, mSlotSize-bytes, 0, 2, 1, &bitstream); @@ -286,7 +286,7 @@ void COggDec::SetMetaData(OggVorbis_File* vf, CAudioMetaData* m) m->bitrate = ov_info(vf,0)->bitrate_nominal; m->samplerate = ov_info(vf,0)->rate; if(mSeekable) -#ifdef DBOX +#ifdef USE_TREMOR m->total_time = (time_t) ov_time_total(vf, 0) / 1000; #else m->total_time = (time_t) ov_time_total(vf, 0); diff --git a/src/driver/audiodec/oggdec.h b/src/driver/audiodec/oggdec.h index 2860b4b7e..e08189bf3 100644 --- a/src/driver/audiodec/oggdec.h +++ b/src/driver/audiodec/oggdec.h @@ -38,7 +38,7 @@ #include #include #include -#ifdef DBOX +#ifdef USE_TREMOR #include #include #else