diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2009-05-03 14:15:21 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2009-05-03 14:15:21 +0200 |
commit | f161d1b2fe69d4fcfac37581fa60b5d9ce5ded11 (patch) | |
tree | ff65b9bcb3041e0733ebb1c59bac1203002c5903 /dvbdevice.c | |
parent | 34b3d467849d0e8192c9cfbd65a630973f602863 (diff) | |
download | vdr-f161d1b2fe69d4fcfac37581fa60b5d9ce5ded11.tar.gz vdr-f161d1b2fe69d4fcfac37581fa60b5d9ce5ded11.tar.bz2 |
OSD sizes in percent; automatic update of OSD size
Diffstat (limited to 'dvbdevice.c')
-rw-r--r-- | dvbdevice.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/dvbdevice.c b/dvbdevice.c index 942abf11..84f0e97c 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.14 2009/04/10 09:54:24 kls Exp $ + * $Id: dvbdevice.c 2.15 2009/05/03 13:49:41 kls Exp $ */ #include "dvbdevice.h" @@ -746,6 +746,23 @@ eVideoSystem cDvbDevice::GetVideoSystem(void) return VideoSystem; } +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); + if (Width >= MINOSDWIDTH && Width <= MAXOSDWIDTH && Height >= MINOSDHEIGHT && Height <= MAXOSDHEIGHT) + return; + } + else + LOG_ERROR; + cDevice::GetVideoSize(Width, Height, Aspect); +} + bool cDvbDevice::SetAudioBypass(bool On) { if (setTransferModeForDolbyDigital != 1) |