diff options
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | dvbspu.c | 8 | ||||
-rw-r--r-- | dvbspu.h | 5 | ||||
-rw-r--r-- | spu.h | 4 |
5 files changed, 13 insertions, 7 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 0b918a57..8dfaa1a9 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1101,6 +1101,7 @@ Marco Schlüßler <marco@lordzodiac.de> the end of the given buffer, which has caused some unjustified "unknown picture type errors" for some improvements to cPoller + for implementing displaying mandatory subtitles in the SPU decoder Jürgen Schmitz <j.schmitz@web.de> for reporting a bug in displaying the current channel when switching via the SVDRP @@ -3278,3 +3278,5 @@ Video Disk Recorder Revision History Gleichmann). - Fixed deleting a menu item in case the next item is not selectable (thanks to Dino Ravnic). +- Implemented displaying mandatory subtitles in the SPU decoder (thanks to Marco + Schlüßler). @@ -8,7 +8,7 @@ * * parts of this file are derived from the OMS program. * - * $Id: dvbspu.c 1.10 2005/01/08 09:53:44 kls Exp $ + * $Id: dvbspu.c 1.11 2005/01/08 09:57:03 kls Exp $ */ #include <assert.h> @@ -227,6 +227,7 @@ cDvbSpuDecoder::cDvbSpuDecoder() spu = NULL; osd = NULL; spubmp = NULL; + allowedShow = false; } cDvbSpuDecoder::~cDvbSpuDecoder() @@ -236,7 +237,7 @@ cDvbSpuDecoder::~cDvbSpuDecoder() delete osd; } -void cDvbSpuDecoder::processSPU(uint32_t pts, uint8_t * buf) +void cDvbSpuDecoder::processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow) { setTime(pts); @@ -252,6 +253,7 @@ void cDvbSpuDecoder::processSPU(uint32_t pts, uint8_t * buf) prev_DCSQ_offset = 0; clean = true; + allowedShow = AllowedShow; } void cDvbSpuDecoder::setScaleMode(cSpuDecoder::eScaleMode ScaleMode) @@ -530,7 +532,7 @@ int cDvbSpuDecoder::setTime(uint32_t pts) } else if (!clean) state = spSHOW; - if (state == spSHOW || state == spMENU) + if ((state == spSHOW && allowedShow) || state == spMENU) Draw(); if (state == spHIDE) @@ -8,7 +8,7 @@ * * parts of this file are derived from the OMS program. * - * $Id: dvbspu.h 1.6 2004/11/06 11:42:37 kls Exp $ + * $Id: dvbspu.h 1.7 2005/01/08 09:59:44 kls Exp $ */ #ifndef __DVBSPU_H @@ -120,6 +120,7 @@ class cDvbSpuDecoder:public cSpuDecoder { uint16_t prev_DCSQ_offset; cDvbSpuBitmap *spubmp; + bool allowedShow; private: int cmdOffs(void) { return ((spu[2] << 8) | spu[3]); @@ -147,7 +148,7 @@ class cDvbSpuDecoder:public cSpuDecoder { void Hide(void); void Draw(void); bool IsVisible(void) { return osd != NULL; } - void processSPU(uint32_t pts, uint8_t * buf); + void processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow); }; // --- cDvbSpuPalette ------------------------------------------- @@ -6,7 +6,7 @@ * This code is distributed under the terms and conditions of the * GNU GENERAL PUBLIC LICENSE. See the file COPYING for details. * - * $Id: spu.h 1.2 2004/06/12 12:56:27 kls Exp $ + * $Id: spu.h 1.3 2005/01/08 09:58:35 kls Exp $ */ #ifndef __SPU_VDR_H @@ -35,7 +35,7 @@ class cSpuDecoder { virtual void Hide(void) = 0; virtual void Draw(void) = 0; virtual bool IsVisible(void) = 0; - virtual void processSPU(uint32_t pts, uint8_t * buf) = 0; + virtual void processSPU(uint32_t pts, uint8_t * buf, bool AllowedShow = true) = 0; }; #endif // __SPU_VDR_H |