summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--osd.c16
-rw-r--r--osd.h4
4 files changed, 19 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 249546b1..f921d575 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1090,6 +1090,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
in some syslog calls
for a patch that was used to implement handling the "component descriptor" ("genre")
for a patch that was used to implement handling the "parental rating descriptor"
+ suggesting to add plain text error messages to log entries from cOsd::SetAreas()
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
diff --git a/HISTORY b/HISTORY
index febccc8d..89060194 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6287,3 +6287,5 @@ Video Disk Recorder Revision History
is opened only for the local host (thanks to Manuel Reimer).
- Renamed 'runvdr' to 'runvdr.template' and no longer copying it to the BINDIR
in 'make install' (thanks to Martin Dauskardt).
+- Added plain text error messages to log entries from cOsd::SetAreas() (suggested
+ by Rolf Ahrenberg).
diff --git a/osd.c b/osd.c
index 5529f121..80cbbaa2 100644
--- a/osd.c
+++ b/osd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: osd.c 2.6 2009/12/06 11:33:47 kls Exp $
+ * $Id: osd.c 2.7 2010/01/17 13:27:24 kls Exp $
*/
#include "osd.h"
@@ -724,6 +724,18 @@ void cBitmap::ShrinkBpp(int NewBpp)
// --- cOsd ------------------------------------------------------------------
+static const char *OsdErrorTexts[] = {
+ "ok",
+ "too many areas",
+ "too many colors",
+ "bpp not supported",
+ "areas overlap",
+ "wrong alignment",
+ "out of memory",
+ "wrong area size",
+ "unknown",
+ };
+
int cOsd::osdLeft = 0;
int cOsd::osdTop = 0;
int cOsd::osdWidth = 0;
@@ -814,7 +826,7 @@ eOsdError cOsd::SetAreas(const tArea *Areas, int NumAreas)
}
}
else
- esyslog("ERROR: cOsd::SetAreas returned %d", Result);
+ esyslog("ERROR: cOsd::SetAreas returned %d (%s)", Result, Result < oeUnknown ? OsdErrorTexts[Result] : OsdErrorTexts[oeUnknown]);
return Result;
}
diff --git a/osd.h b/osd.h
index f10247ea..aa8a35ab 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 2.4 2009/05/08 13:41:03 kls Exp $
+ * $Id: osd.h 2.5 2010/01/17 13:23:50 kls Exp $
*/
#ifndef __OSD_H
@@ -36,7 +36,7 @@ enum {
clrWhite = 0xFFFCFCFC,
};
-enum eOsdError { oeOk,
+enum eOsdError { oeOk, // see also OsdErrorTexts in osd.c
oeTooManyAreas,
oeTooManyColors,
oeBppNotSupported,