diff --git a/HISTORY b/HISTORY index e507b651..995dacc9 100644 --- a/HISTORY +++ b/HISTORY @@ -1368,3 +1368,4 @@ Video Disk Recorder Revision History of a 'cDvbPlayerControl *' in order to allow additional players to call this function. cPlayer and cControl have been given the functions GetIndex() and GetReplayMode() to allow access to the player's status. +- Added cOsd::OpenRaw() to create a raw OSD (needed for displaying SPUs). diff --git a/osd.c b/osd.c index 1092187b..fd5abcc2 100644 --- a/osd.c +++ b/osd.c @@ -4,12 +4,13 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.c 1.29 2002/06/16 13:24:00 kls Exp $ + * $Id: osd.c 1.30 2002/07/13 12:46:30 kls Exp $ */ #include "osd.h" #include #include "device.h" +#include "dvbosd.h" #include "i18n.h" #include "status.h" @@ -19,7 +20,7 @@ WINDOW *cOsd::window = NULL; int cOsd::colorPairs[MaxColorPairs] = { 0 }; #else - cDvbOsd *cOsd::osd = NULL; + cOsdBase *cOsd::osd = NULL; #endif int cOsd::cols = 0; int cOsd::rows = 0; @@ -67,6 +68,11 @@ void cOsd::SetColor(eDvbColor colorFg, eDvbColor colorBg) } #endif +cOsdBase *cOsd::OpenRaw(int x, int y) +{ + return osd ? NULL : new cDvbOsd(cDevice::PrimaryDevice()->OsdDeviceHandle(), x, y); +} + void cOsd::Open(int w, int h) { int d = (h < 0) ? Setup.OSDheight + h : 0; @@ -95,7 +101,7 @@ void cOsd::Open(int w, int h) int x = (720 - w + charWidth) / 2; //TODO PAL vs. NTSC??? int y = (576 - Setup.OSDheight * lineHeight) / 2 + d; //XXX - osd = new cDvbOsd(cDevice::PrimaryDevice()->OsdDeviceHandle(), x, y); + osd = OpenRaw(x, y); //XXX TODO this should be transferred to the places where the individual windows are requested (there's too much detailed knowledge here!) if (h / lineHeight == 5) { //XXX channel display osd->Create(0, 0, w, h, 4); diff --git a/osd.h b/osd.h index c0621577..dac4b27e 100644 --- a/osd.h +++ b/osd.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.h 1.32 2002/06/23 09:13:17 kls Exp $ + * $Id: osd.h 1.33 2002/07/13 12:47:06 kls Exp $ */ #ifndef __OSD_H @@ -14,7 +14,7 @@ #include #endif #include "config.h" -#include "dvbosd.h" +#include "osdbase.h" #include "interface.h" #include "osdbase.h" #include "tools.h" @@ -62,12 +62,16 @@ private: static int colorPairs[MaxColorPairs]; static void SetColor(eDvbColor colorFg, eDvbColor colorBg = clrBackground); #else - static cDvbOsd *osd; + static cOsdBase *osd; #endif static int cols, rows; public: static void Initialize(void); static void Shutdown(void); + static cOsdBase *OpenRaw(int x, int y); + // Returns a raw OSD without any predefined windows or colors. + // If the "normal" OSD is currently in use, NULL will be returned. + // The caller must delete this object before the "normal" OSD is used again! static void Open(int w, int h); static void Close(void); static void Clear(void);