diff options
author | austriancoder <austriancoder> | 2005-01-12 00:02:59 +0000 |
---|---|---|
committer | austriancoder <austriancoder> | 2005-01-12 00:02:59 +0000 |
commit | 91f6be9d3d086bed0d7b848450f2b46c7b972ab6 (patch) | |
tree | b18e3311fb355b42b5a566a3ebff5fc1656d2ed2 | |
parent | 29151c66e8ec19ada7e204a3e6adf5069c5e741f (diff) | |
download | vdr-plugin-dxr3-91f6be9d3d086bed0d7b848450f2b46c7b972ab6.tar.gz vdr-plugin-dxr3-91f6be9d3d086bed0d7b848450f2b46c7b972ab6.tar.bz2 |
added support for vdr-1.3.18
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | dxr3device.c | 22 | ||||
-rw-r--r-- | dxr3device.h | 4 | ||||
-rw-r--r-- | dxr3spudecoder.c | 6 | ||||
-rw-r--r-- | dxr3spudecoder.h | 6 |
6 files changed, 35 insertions, 5 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 623ae91..2a92bd3 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -19,5 +19,6 @@ Sascha Volkenandt Martin Dauskardt Marco Schlüßler Lars Neufurth - he doneted some money so that i could by a cheap dolby digital 5.1 system +Luca Olivetti Thanks very much :)
\ No newline at end of file @@ -274,3 +274,4 @@ NOTE: I havent found time to include all of the languages, will be done in pre2 - some little fixes in the dx3interface: if we cant open control fifo plugins retuns now correct error message - removed -lz from makefile - compiles now with 3.4.x gcc's +- added support for vdr-1.3.18 - thanks to Luca Olivetti <luca@ventoso.org>
\ No newline at end of file diff --git a/dxr3device.c b/dxr3device.c index 54f1271..6169ece 100644 --- a/dxr3device.c +++ b/dxr3device.c @@ -338,10 +338,17 @@ int cDxr3Device::PlayVideo(const uchar *Data, int Length) // ================================== // plays additional audio streams, like Dolby Digital -void cDxr3Device::PlayAudio(const uchar *Data, int Length) +#if VDRVERSNUM >= 10318 + int PlayAudio(const uchar *Data, int Length) +#else + void PlayAudio(const uchar *Data, int Length) +#endif { int retLength = 0; - +#if VDRVERSNUM >= 10318 + int origLength = Length; +#endif + #if VDRVERSNUM < 10307 if (!m_AC3Present) { @@ -355,7 +362,12 @@ void cDxr3Device::PlayAudio(const uchar *Data, int Length) m_DemuxDevice.GetTrickState() == DXR3_FREEZE) || cDxr3Interface::Instance().IsExternalReleased()) { //usleep(1000000); - return; + +#if VDRVERSNUM >= 10318 + return 0; +#else + return; +#endif } if (m_strBuf.length()) @@ -381,6 +393,10 @@ void cDxr3Device::PlayAudio(const uchar *Data, int Length) m_strBuf.append((const char*)(Data + retLength), Length); } } + +#if VDRVERSNUM >= 10318 + return origLength; +#endif } // addition functions diff --git a/dxr3device.h b/dxr3device.h index 40b8696..f0ff959 100644 --- a/dxr3device.h +++ b/dxr3device.h @@ -58,7 +58,11 @@ public: virtual void StillPicture(const uchar *Data, int Length); virtual bool Poll(cPoller &Poller, int TimeoutMs = 0); virtual int PlayVideo(const uchar *Data, int Length); +#if VDRVERSNUM >= 10318 + virtual int PlayAudio(const uchar *Data, int Length); +#else virtual void PlayAudio(const uchar *Data, int Length); +#endif // addition functions virtual bool GrabImage(const char *FileName, bool Jpeg = true, int Quality = -1, int SizeX = -1, int SizeY = -1); diff --git a/dxr3spudecoder.c b/dxr3spudecoder.c index fde5140..bb11d30 100644 --- a/dxr3spudecoder.c +++ b/dxr3spudecoder.c @@ -29,7 +29,11 @@ cDxr3SpuDecoder::cDxr3SpuDecoder() : m_Interface(cDxr3Interface::Instance()), m_ // ================================== // ! send spu data to dxr3 -void cDxr3SpuDecoder::processSPU(uint32_t pts, uint8_t * buf) +#if VDRVERSNUM >= 10318 +void cDxr3SpuDecoder::processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow) +#else +void cDxr3SpuDecoder::processSPU(uint32_t pts, uint8_t * buf) +#endif { // size are the first two bits of buf // size = (buf[0] << 8) + buf[1] diff --git a/dxr3spudecoder.h b/dxr3spudecoder.h index b05540d..a5fea45 100644 --- a/dxr3spudecoder.h +++ b/dxr3spudecoder.h @@ -49,7 +49,11 @@ public: void Hide(); void Draw(); bool IsVisible() { return m_visible; } - void processSPU(uint32_t pts, uint8_t * buf); +#if VDRVERSNUM >= 10318 + void processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow); +#else + void processSPU(uint32_t pts, uint8_t * buf); +#endif private: cDxr3Interface& m_Interface; ///< interface to dxr3 driver |