diff options
author | Johns <johns98@gmx.net> | 2013-03-11 12:18:11 +0100 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2013-03-11 12:18:11 +0100 |
commit | f09a37a94172a301babb587c62491768c5471d37 (patch) | |
tree | ff4defd2e219d1e088e25680af2733de71d60191 /softhddevice.cpp | |
parent | a7562eb2bef200b5e28f919ffbe04bf9ce5738df (diff) | |
download | vdr-plugin-softhddevice-f09a37a94172a301babb587c62491768c5471d37.tar.gz vdr-plugin-softhddevice-f09a37a94172a301babb587c62491768c5471d37.tar.bz2 |
Enable optional VDR-SPU deocder support.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r-- | softhddevice.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
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; |