mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
libtriple: add cVideo::VideoParamWatchdog()
This commit is contained in:
@@ -492,8 +492,9 @@ int cVideo::setZoom(int zoom)
|
|||||||
memset(&s, 0, sizeof(s));
|
memset(&s, 0, sizeof(s));
|
||||||
if (zoom > 100)
|
if (zoom > 100)
|
||||||
{
|
{
|
||||||
vidDispSize_t x = (vidDispSize_t)getAspectRatio();
|
/* 1 = 4:3, 3 = 16:9, 4 = 2.21:1, 0 = unknown */
|
||||||
if (x == VID_DISPSIZE_4x3 && croppingMode == VID_DISPMODE_NORM)
|
int x = getAspectRatio();
|
||||||
|
if (x < 3 && croppingMode == VID_DISPMODE_NORM)
|
||||||
{
|
{
|
||||||
s.src.hori_size = 720;
|
s.src.hori_size = 720;
|
||||||
s.des.hori_size = 720 * 3/4 * zoom / 100;
|
s.des.hori_size = 720 * 3/4 * zoom / 100;
|
||||||
@@ -550,6 +551,23 @@ void cVideo::setZoomAspect(int index)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* this function is regularly called, checks if video parameters
|
||||||
|
changed and triggers appropriate actions */
|
||||||
|
void cVideo::VideoParamWatchdog(void)
|
||||||
|
{
|
||||||
|
static unsigned int _v_info = (unsigned int) -1;
|
||||||
|
unsigned int v_info;
|
||||||
|
if (fd == -1)
|
||||||
|
return;
|
||||||
|
fop(ioctl, MPEG_VID_GET_V_INFO_RAW, &v_info);
|
||||||
|
if (_v_info != v_info)
|
||||||
|
{
|
||||||
|
lt_debug("cVideo::VPWdog: params changed. old: %08x new: %08x\n", _v_info, v_info);
|
||||||
|
setAspectRatio(-1, -1);
|
||||||
|
}
|
||||||
|
_v_info = v_info;
|
||||||
|
}
|
||||||
|
|
||||||
void cVideo::Pig(int x, int y, int w, int h, int /*osd_w*/, int /*osd_h*/)
|
void cVideo::Pig(int x, int y, int w, int h, int /*osd_w*/, int /*osd_h*/)
|
||||||
{
|
{
|
||||||
/* x = y = w = h = -1 -> reset / "hide" PIG */
|
/* x = y = w = h = -1 -> reset / "hide" PIG */
|
||||||
|
@@ -175,6 +175,7 @@ class cVideo
|
|||||||
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
|
void Pig(int x, int y, int w, int h, int osd_w = 1064, int osd_h = 600);
|
||||||
void SetControl(int, int) { return; };
|
void SetControl(int, int) { return; };
|
||||||
int setZoom(int);
|
int setZoom(int);
|
||||||
|
void VideoParamWatchdog(void);
|
||||||
void setContrast(int val);
|
void setContrast(int val);
|
||||||
void SetVideoMode(analog_mode_t mode);
|
void SetVideoMode(analog_mode_t mode);
|
||||||
void SetDBDR(int) { return; };
|
void SetDBDR(int) { return; };
|
||||||
|
Reference in New Issue
Block a user