mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Implemented displaying mandatory subtitles in the SPU decoder
This commit is contained in:
parent
45e5859ae4
commit
64623e762b
@ -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 <j.schmitz@web.de>
|
||||
for reporting a bug in displaying the current channel when switching via the SVDRP
|
||||
|
2
HISTORY
2
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).
|
||||
|
8
dvbspu.c
8
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)
|
||||
|
5
dvbspu.h
5
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 -------------------------------------------
|
||||
|
4
spu.h
4
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
|
||||
|
Loading…
Reference in New Issue
Block a user