1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Checking fd_video in cDvbDevice::GetVideoSize() to avoid error messages on systems with no real primary replay device

This commit is contained in:
Klaus Schmidinger 2009-05-10 13:18:20 +02:00
parent 74646c0487
commit ac3db05853
3 changed files with 39 additions and 27 deletions

View File

@ -2450,3 +2450,7 @@ Marcel Unbehaun <frostworks@gmx.de>
Günter Niedermeier <linuxtv@ncs-online.de>
for reporting a problem with file I/O overhead during recording in TS format
Martin Neuditschko <yosuke.tomoe@gmx.net>
for reporting a problem with error messages from cDvbDevice::GetVideoSize()
on systems with no real primary replay device

View File

@ -6075,7 +6075,7 @@ Video Disk Recorder Revision History
- cFrameDetector::Analyze() now syncs on the TS packet sync bytes (thanks to
Oliver Endriss for reporting broken index generation after a buffer overflow).
2009-05-08: Version 1.7.8
2009-05-10: Version 1.7.8
- Fixed a typo in aspect ratio 2.21:1 (reported by Reinhard Nissl).
- The name of the function cDevice::GetVideoSize() wasn't very well chosen
@ -6089,3 +6089,5 @@ Video Disk Recorder Revision History
to Oliver Endriss).
- Increased MAXOSDHEIGHT to 1200 (suggested by Nicolas Huillard).
- Removed limitation to PAL resolution from SPU handling.
- Checking fd_video in cDvbDevice::GetVideoSize() to avoid error messages on
systems with no real primary replay device (reported by Martin Neuditschko).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbdevice.c 2.16 2009/05/08 14:54:27 kls Exp $
* $Id: dvbdevice.c 2.17 2009/05/10 13:13:04 kls Exp $
*/
#include "dvbdevice.h"
@ -736,6 +736,7 @@ void cDvbDevice::SetVideoFormat(bool VideoFormat16_9)
eVideoSystem cDvbDevice::GetVideoSystem(void)
{
eVideoSystem VideoSystem = vsPAL;
if (fd_video >= 0) {
video_size_t vs;
if (ioctl(fd_video, VIDEO_GET_SIZE, &vs) == 0) {
if (vs.h == 480 || vs.h == 240)
@ -743,11 +744,13 @@ eVideoSystem cDvbDevice::GetVideoSystem(void)
}
else
LOG_ERROR;
}
return VideoSystem;
}
void cDvbDevice::GetVideoSize(int &Width, int &Height, eVideoAspect &Aspect)
{
if (fd_video >= 0) {
video_size_t vs;
if (ioctl(fd_video, VIDEO_GET_SIZE, &vs) == 0) {
Width = vs.w;
@ -757,11 +760,13 @@ void cDvbDevice::GetVideoSize(int &Width, int &Height, eVideoAspect &Aspect)
}
else
LOG_ERROR;
}
cDevice::GetVideoSize(Width, Height, Aspect);
}
void cDvbDevice::GetOsdSize(int &Width, int &Height, double &Aspect)
{
if (fd_video >= 0) {
video_size_t vs;
if (ioctl(fd_video, VIDEO_GET_SIZE, &vs) == 0) {
Width = 720;
@ -775,6 +780,7 @@ void cDvbDevice::GetOsdSize(int &Width, int &Height, double &Aspect)
}
else
LOG_ERROR;
}
cDevice::GetOsdSize(Width, Height, Aspect);
}