diff options
author | scop <scop> | 2007-09-03 20:24:51 +0000 |
---|---|---|
committer | scop <scop> | 2007-09-03 20:24:51 +0000 |
commit | 0e5b4396f1a68baa3a3abffd4d882b147420c7a0 (patch) | |
tree | 1f3b2dfb5dcaf68e58ccc0b437908e27349be716 /dxr3osd_subpicture.c | |
parent | ec8536a105076f10a77f686d8a198153411561f3 (diff) | |
download | vdr-plugin-dxr3-0e5b4396f1a68baa3a3abffd4d882b147420c7a0.tar.gz vdr-plugin-dxr3-0e5b4396f1a68baa3a3abffd4d882b147420c7a0.tar.bz2 |
Implement OSD level for VDR >= 1.5.9 (Luca Olivetti)
Diffstat (limited to 'dxr3osd_subpicture.c')
-rw-r--r-- | dxr3osd_subpicture.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dxr3osd_subpicture.c b/dxr3osd_subpicture.c index a7c6c0f..edb2f84 100644 --- a/dxr3osd_subpicture.c +++ b/dxr3osd_subpicture.c @@ -46,19 +46,46 @@ cDxr3SubpictureOsd::cDxr3SubpictureOsd(int Left, int Top, uint Level) last->Set(-cDxr3ConfigData::Instance().GetOsdFlushRate()); Spu = &cSPUEncoder::Instance(); +#if APIVERSNUM < 10509 //Clears the OSD screen image Spu->Clear(); +#endif } // ================================== cDxr3SubpictureOsd::~cDxr3SubpictureOsd() { +#if APIVERSNUM < 10509 //Remove the OSD from the screen Spu->StopSpu(); +#else + SetActive(false); +#endif delete Palette; delete last; } +#if APIVERSNUM >= 10509 +// ================================== +void cDxr3SubpictureOsd::SetActive(bool On) +{ + if (On != Active()) + { + // Clears the OSD screen image when it becomes active + // removes it from screen when it becomes inactive + cOsd::SetActive(On); + if (On) + { + Spu->Clear(); + } + else + { + Spu->StopSpu(); + } + } +} +#endif + // ================================== eOsdError cDxr3SubpictureOsd::CanHandleAreas(const tArea *Areas, int NumAreas) { @@ -93,6 +120,10 @@ eOsdError cDxr3SubpictureOsd::CanHandleAreas(const tArea *Areas, int NumAreas) // ================================== void cDxr3SubpictureOsd::Flush() { +#if APIVERSNUM >= 10509 + if (!Active()) + return; +#endif if (last->Elapsed() < cDxr3ConfigData::Instance().GetOsdFlushRate()) return; last->Set(); |