[vdr] Different between '#define MAXOSDAREAS 16' and '#define MAXNUMWINDOWS 7'

Klaus Schmidinger Klaus.Schmidinger at cadsoft.de
Sat Oct 1 14:35:49 CEST 2005


Udo Richter wrote:
> Webmaster wrote:
> 
>> why is "#define MAXNUMWINDOWS 7" defined in dvbosd.c
>> and "#define MAXOSDAREAS 16" in osd.h ?
>> Its not the same and only 7 areas possible to create ??
>> Its a limit to the OSD/card ?
> 
> 
> MAXNUMWINDOWS=7 is the maximum number of areas that FF DVB cards 
> support. VDR however uses a more abstract interface that supports up to 
> MAXOSDAREAS=16 different areas, provide that the OSD device can handle 
> them. To know the real number of supported areas, you have to do several 
> calls to CanHendleAreas.
> 
> Unfortunately, VDR does not enforce MAXOSDAREAS itself, so you may be 
> able to call SetAreas(...,100) on a very flexible OSD device, which will 
> probably lead to a solid crash due to non-handled cOsd internal buffer 
> overruns.
> 
> Cheers,
> 
> Udo

That's what the CanHandleAreas() function is for.
cOsd::SetAreas() calls the CanHandleAreas() of the derived
cOsd class, and in there cDvbOsd checks wheter (NumAreas > MAXNUMWINDOWS).

Klaus



More information about the vdr mailing list