summaryrefslogtreecommitdiff
path: root/dvbosd.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-11-21 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2004-11-21 18:00:00 +0100
commit630ba21dc198e3fbf8c15c59f7ea852f7174c476 (patch)
treee22596d33f241fb414204c962c004c605a838a1b /dvbosd.c
parent23ed5a5ed3824b01cbf66699ff0b34f72ddb9826 (diff)
downloadvdr-patch-lnbsharing-630ba21dc198e3fbf8c15c59f7ea852f7174c476.tar.gz
vdr-patch-lnbsharing-630ba21dc198e3fbf8c15c59f7ea852f7174c476.tar.bz2
Version 1.3.17vdr-1.3.17
- Fixed cRemux::ScanVideoPacket() to make sure it doesn't access memory beyond the end of the given buffer, which has caused some unjustified "unknown picture type errors" (thanks to Marco Schlüßler). - Fixed a possible crash when pausing live video and the recording was unable to start, maybe because there was no lock on the device (thanks to Andreas Brugger for reporting this one). - Fixed some characters in the iso8859-2 font file (thanks to Dino Ravnic). - Fixed some errors in the Croatian language texts (thanks to Dino Ravnic). - Fixed a possible recursion in cControl::Shutdown() (thanks to Sascha Volkenandt). - Now setting the VPID before the APID in live mode to avoid unnecessary overhead in the firmware (thanks to Werner Fink). - Now checking available OSD memory at runtime (thanks to Oliver Endriss). - Fixed some typos in the Makefile's 'font' target (thanks to Olaf Titz). - Fixed handling childTid in cThread to avoid possible race conditions (thanks to Stefan Huelswitt for pointing this out). - Fixed toggling the "Day" item in the "Timers" menu, so that it selects the right day of week for timers in the future. - Some improvements to cPoller (thanks to Marco Schlüßler).
Diffstat (limited to 'dvbosd.c')
-rw-r--r--dvbosd.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/dvbosd.c b/dvbosd.c
index 973298d..fbf6f61 100644
--- a/dvbosd.c
+++ b/dvbosd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbosd.c 1.24 2004/07/18 13:51:42 kls Exp $
+ * $Id: dvbosd.c 1.25 2004/11/20 14:29:25 kls Exp $
*/
#include "dvbosd.h"
@@ -18,11 +18,12 @@
// --- cDvbOsd ---------------------------------------------------------------
#define MAXNUMWINDOWS 7 // OSD windows are counted 1...7
-#define MAXOSDMEMORY 92000 // number of bytes available to the OSD (depends on firmware version, but there is no way of determining the actual value)
+#define MAXOSDMEMORY 92000 // number of bytes available to the OSD (for unmodified DVB cards)
class cDvbOsd : public cOsd {
private:
int osdDev;
+ int osdMem;
bool shown;
void Cmd(OSD_Command cmd, int color = 0, int x0 = 0, int y0 = 0, int x1 = 0, int y1 = 0, const void *data = NULL);
public:
@@ -40,6 +41,14 @@ cDvbOsd::cDvbOsd(int Left, int Top, int OsdDev)
if (osdDev < 0)
esyslog("ERROR: illegal OSD device handle (%d)!", osdDev);
else {
+ osdMem = MAXOSDMEMORY;
+#ifdef OSD_CAP_MEMSIZE
+ // modified DVB cards may have more OSD memory:
+ osd_cap_t cap;
+ cap.cmd = OSD_CAP_MEMSIZE;
+ if (ioctl(osdDev, OSD_GET_CAPABILITY, &cap) == 0)
+ osdMem = cap.val;
+#endif
// must clear all windows here to avoid flashing effects - doesn't work if done
// in Flush() only for the windows that are actually used...
for (int i = 0; i < MAXNUMWINDOWS; i++) {
@@ -74,7 +83,7 @@ eOsdError cDvbOsd::CanHandleAreas(const tArea *Areas, int NumAreas)
return oeWrongAlignment;
TotalMemory += Areas[i].Width() * Areas[i].Height() / (8 / Areas[i].bpp);
}
- if (TotalMemory > MAXOSDMEMORY)
+ if (TotalMemory > osdMem)
return oeOutOfMemory;
}
return Result;