Enable optional VDR-SPU deocder support.

This commit is contained in:
Johns 2013-03-11 12:18:11 +01:00
parent a7562eb2be
commit f09a37a941
2 changed files with 23 additions and 5 deletions

View File

@ -24,13 +24,16 @@ SCREENSAVER ?= 1
# use ffmpeg libswresample # use ffmpeg libswresample
SWRESAMPLE ?= $(shell pkg-config --exists libswresample && echo 1) 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 += -DAV_INFO -DAV_INFO_TIME=3000 # info/debug a/v sync
CONFIG += -DUSE_PIP # PIP support CONFIG += -DUSE_PIP # PIP support
#CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np #CONFIG += -DHAVE_PTHREAD_NAME # supports new pthread_setname_np
#CONFIG += -DNO_TS_AUDIO # disable ts audio parser #CONFIG += -DNO_TS_AUDIO # disable ts audio parser
#CONFIG += -DUSE_TS_VIDEO # build new ts video parser #CONFIG += -DUSE_TS_VIDEO # build new ts video parser
#CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets #CONFIG += -DUSE_MPEG_COMPLETE # support only complete mpeg packets
#CONFIG += -DUSE_VDR_SPU # use VDR SPU decoder.
ifeq ($(ALSA),1) ifeq ($(ALSA),1)
CONFIG += -DUSE_ALSA CONFIG += -DUSE_ALSA

View File

@ -2078,7 +2078,7 @@ class cSoftHdDevice:public cDevice
virtual uchar *GrabImage(int &, bool, int, int, int); virtual uchar *GrabImage(int &, bool, int, int, int);
#if 0 #ifdef USE_VDR_SPU
// SPU facilities // SPU facilities
private: private:
cDvbSpuDecoder * spuDecoder; cDvbSpuDecoder * spuDecoder;
@ -2090,18 +2090,27 @@ class cSoftHdDevice:public cDevice
virtual void MakePrimaryDevice(bool); virtual void MakePrimaryDevice(bool);
}; };
/**
** Constructor device.
*/
cSoftHdDevice::cSoftHdDevice(void) cSoftHdDevice::cSoftHdDevice(void)
{ {
//dsyslog("[softhddev]%s\n", __FUNCTION__); //dsyslog("[softhddev]%s\n", __FUNCTION__);
#if 0 #ifdef USE_VDR_SPU
spuDecoder = NULL; spuDecoder = NULL;
#endif #endif
} }
/**
** Destructor device.
*/
cSoftHdDevice::~cSoftHdDevice(void) cSoftHdDevice::~cSoftHdDevice(void)
{ {
//dsyslog("[softhddev]%s:\n", __FUNCTION__); //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) cSpuDecoder *cSoftHdDevice::GetSpuDecoder(void)
{ {
dsyslog("[softhddev]%s:\n", __FUNCTION__); dsyslog("[softhddev]%s:\n", __FUNCTION__);
if (IsPrimaryDevice() && !spuDecoder) { if (!spuDecoder && IsPrimaryDevice()) {
spuDecoder = new cDvbSpuDecoder(); spuDecoder = new cDvbSpuDecoder();
} }
return spuDecoder; return spuDecoder;