mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 15:02:43 +02:00
[spark] fix setting psi controls
Origin commit data
------------------
Branch: master
Commit: cf8f9bc8af
Author: martii <m4rtii@gmx.de>
Date: 2014-01-19 (Sun, 19 Jan 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -175,6 +175,11 @@ cVideo::cVideo(int, void *, void *, unsigned int unit)
|
||||
{
|
||||
lt_debug("%s unit %u\n", __func__, unit);
|
||||
|
||||
brightness = -1;
|
||||
contrast = -1;
|
||||
saturation = -1;
|
||||
hue = -1;
|
||||
|
||||
//croppingMode = VID_DISPMODE_NORM;
|
||||
//outputformat = VID_OUTFMT_RGBC_SVIDEO;
|
||||
scartvoltage = -1;
|
||||
@@ -298,7 +303,16 @@ int cVideo::Start(void * /*PcrChannel*/, unsigned short /*PcrPid*/, unsigned sho
|
||||
#endif
|
||||
playstate = VIDEO_PLAYING;
|
||||
fop(ioctl, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_DEMUX);
|
||||
return fop(ioctl, VIDEO_PLAY);
|
||||
int res = fop(ioctl, VIDEO_PLAY);
|
||||
if (brightness > -1)
|
||||
SetControl(VIDEO_CONTROL_BRIGHTNESS, brightness);
|
||||
if (contrast > -1)
|
||||
SetControl(VIDEO_CONTROL_CONTRAST, contrast);
|
||||
if (saturation > -1)
|
||||
SetControl(VIDEO_CONTROL_SATURATION, saturation);
|
||||
if (hue > -1)
|
||||
SetControl(VIDEO_CONTROL_HUE, hue);
|
||||
return res;
|
||||
}
|
||||
|
||||
int cVideo::Stop(bool blank)
|
||||
@@ -719,15 +733,19 @@ void cVideo::SetControl(int control, int value) {
|
||||
const char *p = NULL;
|
||||
switch (control) {
|
||||
case VIDEO_CONTROL_BRIGHTNESS:
|
||||
brightness = value;
|
||||
p = "/proc/stb/video/plane/psi_brightness";
|
||||
break;
|
||||
case VIDEO_CONTROL_CONTRAST:
|
||||
contrast = value;
|
||||
p = "/proc/stb/video/plane/psi_contrast";
|
||||
break;
|
||||
case VIDEO_CONTROL_SATURATION:
|
||||
saturation = value;
|
||||
p = "/proc/stb/video/plane/psi_saturation";
|
||||
break;
|
||||
case VIDEO_CONTROL_HUE:
|
||||
hue = value;
|
||||
p = "/proc/stb/video/plane/psi_tint";
|
||||
break;
|
||||
}
|
||||
|
@@ -149,6 +149,8 @@ class cVideo
|
||||
int video_standby;
|
||||
int64_t GetPTS(void);
|
||||
|
||||
int brightness, contrast, saturation, hue;
|
||||
|
||||
void openDevice(void);
|
||||
void closeDevice(void);
|
||||
public:
|
||||
|
Reference in New Issue
Block a user