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 User johns
Date: Date:
Fix OSD bugs.
Add some VA-API VPP info outputs. Add some VA-API VPP info outputs.
Remove build files for old unstable VDR. Remove build files for old unstable VDR.

View File

@ -266,10 +266,12 @@ class cSoftOsd:public cOsd
{ {
public: public:
static volatile char Dirty; ///< flag force redraw everything 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 cSoftOsd(int, int, uint); ///< osd constructor
virtual ~ cSoftOsd(void); ///< osd destructor 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 Flush(void); ///< commits all data to the hardware
virtual void SetActive(bool); ///< sets OSD to be the active one virtual void SetActive(bool); ///< sets OSD to be the active one
}; };
@ -295,11 +297,6 @@ void cSoftOsd::SetActive(bool on)
} }
cOsd::SetActive(on); cOsd::SetActive(on);
// ignore sub-title if menu is open
if (OsdLevel >= OSD_LEVEL_SUBTITLES && IsOpen()) {
return;
}
if (on) { if (on) {
Dirty = 1; Dirty = 1;
// only flush here if there are already bitmaps // only flush here if there are already bitmaps
@ -331,7 +328,6 @@ cSoftOsd::cSoftOsd(int left, int top, uint level)
#endif #endif
OsdLevel = level; OsdLevel = level;
SetActive(true);
} }
/** /**
@ -362,6 +358,31 @@ cSoftOsd::~cSoftOsd(void)
#endif #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. ** Actually commits all data to the OSD hardware.
*/ */
@ -377,10 +398,6 @@ void cSoftOsd::Flush(void)
if (!Active()) { // this osd is not active if (!Active()) { // this osd is not active
return; return;
} }
// don't draw sub-title if menu is active
if (OsdLevel >= OSD_LEVEL_SUBTITLES && IsOpen()) {
return;
}
#ifdef USE_YAEPG #ifdef USE_YAEPG
// support yaepghd, video window // support yaepghd, video window
if (vidWin.bpp) { if (vidWin.bpp) {
@ -396,17 +413,6 @@ void cSoftOsd::Flush(void)
} }
#endif #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()) { if (!IsTrueColor()) {
cBitmap *bitmap; cBitmap *bitmap;
int i; int i;
@ -483,7 +489,7 @@ void cSoftOsd::Flush(void)
// FIXME: reuse argb // FIXME: reuse argb
free(argb); free(argb);
} }
cSoftOsd::Dirty = 0; Dirty = 0;
return; return;
} }
@ -507,7 +513,7 @@ void cSoftOsd::Flush(void)
delete pm; delete pm;
} }
cSoftOsd::Dirty = 0; Dirty = 0;
} }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////