summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-01-08 10:01:52 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-01-08 10:01:52 +0100
commit64623e762b0d0ed28f6079ba814511274f5fb428 (patch)
treeb5a8546f63e4c8ab6a33cd51bed049e5fac8dc66
parent45e5859ae4cb9f7fd29a2acdd23ecfc5348d55fd (diff)
downloadvdr-64623e762b0d0ed28f6079ba814511274f5fb428.tar.gz
vdr-64623e762b0d0ed28f6079ba814511274f5fb428.tar.bz2
Implemented displaying mandatory subtitles in the SPU decoder
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--dvbspu.c8
-rw-r--r--dvbspu.h5
-rw-r--r--spu.h4
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
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 <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)
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