summaryrefslogtreecommitdiff
path: root/dxr3osd.c
diff options
context:
space:
mode:
authorscop <scop>2005-05-28 10:10:52 +0000
committerscop <scop>2005-05-28 10:10:52 +0000
commitc331a9f175e11b99141b2392c03972bb41f18d15 (patch)
tree4eb7caf00ea5807f5540791b6dcd07dc7fe3696f /dxr3osd.c
parent35eeb86a2a0e577d789d25e63b7d860abb1d218b (diff)
downloadvdr-plugin-dxr3-c331a9f175e11b99141b2392c03972bb41f18d15.tar.gz
vdr-plugin-dxr3-c331a9f175e11b99141b2392c03972bb41f18d15.tar.bz2
Clean up non-working dead code for VDR < 1.3.8.
Diffstat (limited to 'dxr3osd.c')
-rw-r--r--dxr3osd.c124
1 files changed, 1 insertions, 123 deletions
diff --git a/dxr3osd.c b/dxr3osd.c
index d46e619..7f317f4 100644
--- a/dxr3osd.c
+++ b/dxr3osd.c
@@ -27,137 +27,15 @@
#include "dxr3vdrincludes.h"
#include "dxr3osd.h"
-
-#if VDRVERSNUM >= 10307
-
-//#include "dxr3osd_mpeg.h"
#include "dxr3osd_subpicture.h"
// ==================================
// ! create osd at (Left, Top)
cOsd *cDxr3OsdProvider::CreateOsd(int Left, int Top)
{
-// if (cDxr3ConfigData::Instance().GetMenuMode() == (eMenuMode)SUBPICTURE)
-// {
- // use subpicture
- return new cDxr3SubpictureOsd(Left, Top);
-/* }
- else
- {
- // mpeg based menu system
- return new cDxr3MpegOsd(Left, Top);
- }*/
-}
-
-#else /*VDRVERSNUM*/
-
-// ==================================
-bool cDxr3Osd::SetWindow(cWindow *Window)
-{
- if (Window)
- {
- // Window handles are counted 0...(MAXNUMWINDOWS - 1), but the actual window
- // numbers in the driver are used from 1...MAXNUMWINDOWS.
- int Handle = Window->Handle();
- if (0 <= Handle && Handle < MAXNUMWINDOWS)
- {
- Spu->Cmd(OSD_SetWindow, 0, Handle + 1);
- return true;
- }
- esyslog("ERROR: illegal window handle: %d", Handle);
-
- if (cDxr3ConfigData::Instance().GetDebug())
- {
- cLog::Instance() << "cDxr3Osd::SetWindow: illegal window handle:" << Handle << "\n";
- }
- }
- return false;
-}
-
-// ==================================
-cDxr3Osd::cDxr3Osd(int x, int y) : cOsdBase(x, y)
-{
- Spu = &cSPUEncoder::Instance();
-}
-
-// ==================================
-cDxr3Osd::~cDxr3Osd()
-{
- for (int i = 0; i < NumWindows(); i++)
- {
- CloseWindow(GetWindowNr(i));
- }
-}
-
-// ==================================
-bool cDxr3Osd::OpenWindow(cWindow *Window)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(OSD_Open, Window->Bpp(), X0() + Window->X0(), Y0() + Window->Y0(), X0() + Window->X0() + Window->Width() - 1, Y0() + Window->Y0() + Window->Height() - 1, (void *)1); // initially hidden!
- return true;
- }
- return false;
-}
-
-// ==================================
-void cDxr3Osd::CommitWindow(cWindow *Window)
-{
- if (SetWindow(Window))
- {
- int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
-
- if (Window->Dirty(x1, y1, x2, y2))
- {
- // commit colors:
- int FirstColor = 0, LastColor = 0;
- const eDvbColor *pal;
- while ((pal = Window->NewColors(FirstColor, LastColor)) != NULL)
- Spu->Cmd(OSD_SetPalette, FirstColor, LastColor, 0, 0, 0, pal);
- // commit modified data:
- Spu->Cmd(OSD_SetBlock, Window->Width(), x1, y1, x2, y2, Window->Data(x1, y1));
- }
- }
-}
-
-// ==================================
-void cDxr3Osd::ShowWindow(cWindow *Window)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(OSD_MoveWindow, 0, X0() + Window->X0(), Y0() + Window->Y0());
- }
-}
-
-// ==================================
-void cDxr3Osd::HideWindow(cWindow *Window, bool Hide)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(Hide ? OSD_Hide : OSD_Show, 0);
- }
-}
-
-// ==================================
-void cDxr3Osd::CloseWindow(cWindow *Window)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(OSD_Close);
- }
+ return new cDxr3SubpictureOsd(Left, Top);
}
-// ==================================
-void cDxr3Osd::MoveWindow(cWindow *Window, int x, int y)
-{
- if (SetWindow(Window))
- {
- Spu->Cmd(OSD_MoveWindow, 0, X0() + x, Y0() + y);
- }
-}
-
-#endif /*VDRVERSNUM*/
-
// Local variables:
// mode: c++
// c-file-style: "stroustrup"