Hello,
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 ?
Thanks Stefan Franz
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
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
Klaus Schmidinger wrote:
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).
Yes, I did understand that. But the generic cOsd::CanHandleAreas() does not check for NumAreas > MAXOSDAREAS. If some cMyOsd can handle 32 areas, and only checks for NumAreas > 32, VDR may crash.
Not a realistic scenario though. ;)
Cheers,
Udo
Udo Richter wrote:
Klaus Schmidinger wrote:
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).
Yes, I did understand that. But the generic cOsd::CanHandleAreas() does not check for NumAreas > MAXOSDAREAS. If some cMyOsd can handle 32 areas, and only checks for NumAreas > 32, VDR may crash.
Not a realistic scenario though. ;)
Ah, now I see what you meant. Of course, you have a point there. I'll include such a check.
Klaus