diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | softhddevice.cpp | 23 |
2 files changed, 23 insertions, 5 deletions
@@ -24,13 +24,16 @@ SCREENSAVER ?= 1 # use ffmpeg libswresample SWRESAMPLE ?= $(shell pkg-config --exists libswresample && echo 1) -CONFIG := # -DDEBUG #-DOSD_DEBUG +CONFIG := # -DDEBUG #-DOSD_DEBUG # enable debug output+functions +#CONFIG += -DSTILL_DEBUG=2 # still picture debug verbose level + CONFIG += -DAV_INFO -DAV_INFO_TIME=3000 # info/debug a/v sync CONFIG += -DUSE_PIP # PIP support #CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np #CONFIG += -DNO_TS_AUDIO # disable ts audio parser #CONFIG += -DUSE_TS_VIDEO # build new ts video parser #CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets +#CONFIG += -DUSE_VDR_SPU # use VDR SPU decoder. ifeq ($(ALSA),1) CONFIG += -DUSE_ALSA diff --git a/softhddevice.cpp b/softhddevice.cpp index 1f7dadb..ad42607 100644 --- a/softhddevice.cpp +++ b/softhddevice.cpp @@ -2078,7 +2078,7 @@ class cSoftHdDevice:public cDevice virtual uchar *GrabImage(int &, bool, int, int, int); -#if 0 +#ifdef USE_VDR_SPU // SPU facilities private: cDvbSpuDecoder * spuDecoder; @@ -2090,18 +2090,27 @@ class cSoftHdDevice:public cDevice virtual void MakePrimaryDevice(bool); }; +/** +** Constructor device. +*/ cSoftHdDevice::cSoftHdDevice(void) { //dsyslog("[softhddev]%s\n", __FUNCTION__); -#if 0 +#ifdef USE_VDR_SPU spuDecoder = NULL; #endif } +/** +** Destructor device. +*/ cSoftHdDevice::~cSoftHdDevice(void) { //dsyslog("[softhddev]%s:\n", __FUNCTION__); +#ifdef USE_VDR_SPU + delete spuDecoder; +#endif } /** @@ -2127,13 +2136,19 @@ void cSoftHdDevice::MakePrimaryDevice(bool on) } } -#if 0 +#ifdef USE_VDR_SPU +/** +** Get the device SPU decoder. +** +** @returns a pointer to the device's SPU decoder (or NULL, if this +** device doesn't have an SPU decoder) +*/ cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void) { dsyslog("[softhddev]%s:\n", __FUNCTION__); - if (IsPrimaryDevice() && !spuDecoder) { + if (!spuDecoder && IsPrimaryDevice()) { spuDecoder = new cDvbSpuDecoder(); } return spuDecoder; |