From c5502997d6a24f22d70cc0aa79e92d84478ca692 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 Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/687a244b61d5b96a7843cb5e9d76d2fc0535fd07 Author: martii Date: 2014-01-20 (Mon, 20 Jan 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- 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; }