diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 0b918a57..8dfaa1a9 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1101,6 +1101,7 @@ Marco Schl 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 for reporting a bug in displaying the current channel when switching via the SVDRP diff --git a/HISTORY b/HISTORY index 36ba52f4..c8ceb322 100644 --- a/HISTORY +++ b/HISTORY @@ -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). diff --git a/dvbspu.c b/dvbspu.c index a244578c..44cb7b33 100644 --- a/dvbspu.c +++ b/dvbspu.c @@ -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 @@ -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) diff --git a/dvbspu.h b/dvbspu.h index 078f432e..88812347 100644 --- a/dvbspu.h +++ b/dvbspu.h @@ -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 ------------------------------------------- diff --git a/spu.h b/spu.h index 053cf1a9..9ab4da5b 100644 --- a/spu.h +++ b/spu.h @@ -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