Fix OSD bugs.

This commit is contained in:
Johns 2014-02-12 14:37:35 +01:00
parent 450c9b6309
commit 3d3a88e76c
2 changed files with 31 additions and 24 deletions

View File

@ -1,6 +1,7 @@
User johns
Date:
Fix OSD bugs.
Add some VA-API VPP info outputs.
Remove build files for old unstable VDR.

View File

@ -266,10 +266,12 @@ class cSoftOsd:public cOsd
{
public:
static volatile char Dirty; ///< flag force redraw everything
int OsdLevel; ///< current osd level
int OsdLevel; ///< current osd level FIXME: remove
cSoftOsd(int, int, uint); ///< osd constructor
virtual ~ cSoftOsd(void); ///< osd destructor
/// set the sub-areas to the given areas
virtual eOsdError SetAreas(const tArea *, int);
virtual void Flush(void); ///< commits all data to the hardware
virtual void SetActive(bool); ///< sets OSD to be the active one
};
@ -295,11 +297,6 @@ void cSoftOsd::SetActive(bool on)
}
cOsd::SetActive(on);
// ignore sub-title if menu is open
if (OsdLevel >= OSD_LEVEL_SUBTITLES && IsOpen()) {
return;
}
if (on) {
Dirty = 1;
// only flush here if there are already bitmaps
@ -331,7 +328,6 @@ cSoftOsd::cSoftOsd(int left, int top, uint level)
#endif
OsdLevel = level;
SetActive(true);
}
/**
@ -362,6 +358,31 @@ cSoftOsd::~cSoftOsd(void)
#endif
}
/**
+* Set the sub-areas to the given areas
*/
eOsdError cSoftOsd::SetAreas(const tArea * areas, int n)
{
#ifdef OSD_DEBUG
dsyslog("[softhddev]%s: %d areas \n", __FUNCTION__, n);
#endif
// clear old OSD, when new areas are set
if (!IsTrueColor()) {
cBitmap *bitmap;
int i;
for (i = 0; (bitmap = GetBitmap(i)); i++) {
bitmap->Clean();
}
}
if (Active()) {
VideoOsdClear();
Dirty = 1;
}
return cOsd::SetAreas(areas, n);
}
/**
** Actually commits all data to the OSD hardware.
*/
@ -377,10 +398,6 @@ void cSoftOsd::Flush(void)
if (!Active()) { // this osd is not active
return;
}
// don't draw sub-title if menu is active
if (OsdLevel >= OSD_LEVEL_SUBTITLES && IsOpen()) {
return;
}
#ifdef USE_YAEPG
// support yaepghd, video window
if (vidWin.bpp) {
@ -396,17 +413,6 @@ void cSoftOsd::Flush(void)
}
#endif
//
// VDR draws subtitle without clearing the old
//
if (OsdLevel >= OSD_LEVEL_SUBTITLES) {
VideoOsdClear();
cSoftOsd::Dirty = 1;
#ifdef OSD_DEBUG
dsyslog("[softhddev]%s: subtitle clear\n", __FUNCTION__);
#endif
}
if (!IsTrueColor()) {
cBitmap *bitmap;
int i;
@ -483,7 +489,7 @@ void cSoftOsd::Flush(void)
// FIXME: reuse argb
free(argb);
}
cSoftOsd::Dirty = 0;
Dirty = 0;
return;
}
@ -507,7 +513,7 @@ void cSoftOsd::Flush(void)
delete pm;
}
cSoftOsd::Dirty = 0;
Dirty = 0;
}
//////////////////////////////////////////////////////////////////////////////