vdr  1.7.27
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
cDvbSdFfOsd Class Reference

List of all members.

Public Member Functions

 cDvbSdFfOsd (int Left, int Top, int OsdDev, uint Level)
virtual ~cDvbSdFfOsd ()
virtual eOsdError CanHandleAreas (const tArea *Areas, int NumAreas)
virtual eOsdError SetAreas (const tArea *Areas, int NumAreas)
virtual void Flush (void)

Protected Member Functions

virtual void SetActive (bool On)

Private Member Functions

void Cmd (OSD_Command cmd, int color=0, int x0=0, int y0=0, int x1=0, int y1=0, const void *data=NULL)

Private Attributes

int osdDev
int osdMem
bool shown

Detailed Description

Definition at line 21 of file dvbsdffosd.c.


Constructor & Destructor Documentation

cDvbSdFfOsd::cDvbSdFfOsd ( int  Left,
int  Top,
int  OsdDev,
uint  Level 
)

Definition at line 37 of file dvbsdffosd.c.

References esyslog, MAXOSDMEMORY, osdDev, osdMem, and shown.

Definition at line 56 of file dvbsdffosd.c.

References SetActive().


Member Function Documentation

eOsdError cDvbSdFfOsd::CanHandleAreas ( const tArea Areas,
int  NumAreas 
) [virtual]

Checks whether the OSD can display the given set of sub-areas.

The return value indicates whether a call to SetAreas() with this set of areas will succeed. CanHandleAreas() may be called with an OSD that is already in use with other areas and will not interfere with the current operation of the OSD. A derived class must first call the base class CanHandleAreas() to check the basic conditions, like not overlapping etc.

Reimplemented from cOsd.

Definition at line 85 of file dvbsdffosd.c.

References tArea::bpp, tArea::Height(), cOsd::Height(), MAXNUMWINDOWS, oeBppNotSupported, oeOk, oeOutOfMemory, oeTooManyAreas, oeWrongAlignment, oeWrongAreaSize, osdMem, tArea::Width(), and cOsd::Width().

void cDvbSdFfOsd::Cmd ( OSD_Command  cmd,
int  color = 0,
int  x0 = 0,
int  y0 = 0,
int  x1 = 0,
int  y1 = 0,
const void *  data = NULL 
) [private]

Definition at line 119 of file dvbsdffosd.c.

References osdDev.

Referenced by Flush(), SetActive(), and SetAreas().

void cDvbSdFfOsd::Flush ( void  ) [virtual]

Actually commits all data to the OSD hardware.

Flush() should return as soon as possible. For a true color OSD using the default implementation with in memory pixmaps, the Flush() function should basically do something like this:

LOCK_PIXMAPS; while (cPixmapMemory *pm = RenderPixmaps()) { int w = pm->ViewPort().Width(); int h = pm->ViewPort().Height(); int d = w * sizeof(tColor); MyOsdDrawPixmap(Left() + pm->ViewPort().X(), Top() + pm->ViewPort().Y(), pm->Data(), w, h, h * d); delete pm; }

Reimplemented from cOsd.

Definition at line 134 of file dvbsdffosd.c.

References cOsd::Active(), cPalette::Bpp(), cBitmap::Clean(), Cmd(), cPalette::Colors(), cBitmap::Data(), cBitmap::Dirty(), cOsd::GetBitmap(), cBitmap::Height(), cOsd::Height(), cOsd::Left(), shown, cOsd::Top(), cBitmap::Width(), cOsd::Width(), cBitmap::X0(), and cBitmap::Y0().

Referenced by SetActive().

void cDvbSdFfOsd::SetActive ( bool  On) [protected, virtual]

Sets this OSD to be the active one.

A derived class must call cOsd::SetActive(On).

Reimplemented from cOsd.

Definition at line 61 of file dvbsdffosd.c.

References cOsd::Active(), Cmd(), Flush(), cOsd::GetBitmap(), MAXNUMWINDOWS, and shown.

Referenced by ~cDvbSdFfOsd().

eOsdError cDvbSdFfOsd::SetAreas ( const tArea Areas,
int  NumAreas 
) [virtual]

Sets the sub-areas to the given areas.

The return value indicates whether the operation was successful. If an error is reported, nothing will have changed and the previous OSD (if any) will still be displayed as before. If the OSD has been divided into several sub-areas, all areas that are part of the rectangle that surrounds a given drawing operation will be drawn into, with the proper offsets. A new call overwrites any previous settings To set up a true color OSD, exactly one area must be requested, with its coordinates set to the full area the OSD shall cover, and the bpp value set to 32.

Reimplemented from cOsd.

Definition at line 107 of file dvbsdffosd.c.

References Cmd(), cOsd::GetBitmap(), and shown.


Member Data Documentation

int cDvbSdFfOsd::osdDev [private]

Definition at line 23 of file dvbsdffosd.c.

Referenced by cDvbSdFfOsd(), and Cmd().

int cDvbSdFfOsd::osdMem [private]

Definition at line 24 of file dvbsdffosd.c.

Referenced by CanHandleAreas(), and cDvbSdFfOsd().

bool cDvbSdFfOsd::shown [private]

Definition at line 25 of file dvbsdffosd.c.

Referenced by cDvbSdFfOsd(), Flush(), SetActive(), and SetAreas().


The documentation for this class was generated from the following file: