summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2009-05-09 10:11:16 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2009-05-09 10:11:16 +0200
commitf936db2ac64206b682de49b9d3bef853eec4e6b1 (patch)
treee63e616a35fe1d310ccf80a410a4608c8062b8a2 /dvbdevice.c
parent61c811ac709ffd56c4ce69c1c72e56fcb28b0d0c (diff)
downloadvdr-f936db2ac64206b682de49b9d3bef853eec4e6b1.tar.gz
vdr-f936db2ac64206b682de49b9d3bef853eec4e6b1.tar.bz2
Implemented cDevice::GetOsdSize(); fixed the way the OSD size is determined on full featured DVB cards
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 84f0e97c..43bc9d5b 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 2.15 2009/05/03 13:49:41 kls Exp $
+ * $Id: dvbdevice.c 2.16 2009/05/08 14:54:27 kls Exp $
*/
#include "dvbdevice.h"
@@ -751,16 +751,31 @@ void cDvbDevice::GetVideoSize(int &Width, int &Height, eVideoAspect &Aspect)
video_size_t vs;
if (ioctl(fd_video, VIDEO_GET_SIZE, &vs) == 0) {
Width = vs.w;
- if (Width < 720) // FIXME: some channels result in a With of, e.g. 544, but the final video *is* 720 wide
- Width = 720;
Height = vs.h;
Aspect = eVideoAspect(vs.aspect_ratio);
+ return;
+ }
+ else
+ LOG_ERROR;
+ cDevice::GetVideoSize(Width, Height, Aspect);
+}
+
+void cDvbDevice::GetOsdSize(int &Width, int &Height, double &Aspect)
+{
+ video_size_t vs;
+ if (ioctl(fd_video, VIDEO_GET_SIZE, &vs) == 0) {
+ Width = 720;
+ if (vs.h != 480 && vs.h != 240)
+ Height = 576; // PAL
+ else
+ Height = 480; // NTSC
+ Aspect = 1.0;
if (Width >= MINOSDWIDTH && Width <= MAXOSDWIDTH && Height >= MINOSDHEIGHT && Height <= MAXOSDHEIGHT)
return;
}
else
LOG_ERROR;
- cDevice::GetVideoSize(Width, Height, Aspect);
+ cDevice::GetOsdSize(Width, Height, Aspect);
}
bool cDvbDevice::SetAudioBypass(bool On)