From 687a244b61d5b96a7843cb5e9d76d2fc0535fd07 Mon Sep 17 00:00:00 2001 From: martii Date: Mon, 20 Jan 2014 17:57:02 +0100 Subject: [PATCH] [spark] video: change psi settings on demand only --- libspark/video.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libspark/video.cpp b/libspark/video.cpp index 5ffc559..ba8c6cb 100644 --- a/libspark/video.cpp +++ b/libspark/video.cpp @@ -304,14 +304,22 @@ int cVideo::Start(void * /*PcrChannel*/, unsigned short /*PcrPid*/, unsigned sho playstate = VIDEO_PLAYING; fop(ioctl, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_DEMUX); int res = fop(ioctl, VIDEO_PLAY); - if (brightness > -1) + if (brightness > -1) { SetControl(VIDEO_CONTROL_BRIGHTNESS, brightness); - if (contrast > -1) + brightness = -1; + } + if (contrast > -1) { SetControl(VIDEO_CONTROL_CONTRAST, contrast); - if (saturation > -1) + contrast = -1; + } + if (saturation > -1) { SetControl(VIDEO_CONTROL_SATURATION, saturation); - if (hue > -1) + saturation = -1; + } + if (hue > -1) { SetControl(VIDEO_CONTROL_HUE, hue); + hue = -1; + } return res; }