summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c19
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)