mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
[spark] fix setting psi controls
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);
|
lt_debug("%s unit %u\n", __func__, unit);
|
||||||
|
|
||||||
|
brightness = -1;
|
||||||
|
contrast = -1;
|
||||||
|
saturation = -1;
|
||||||
|
hue = -1;
|
||||||
|
|
||||||
//croppingMode = VID_DISPMODE_NORM;
|
//croppingMode = VID_DISPMODE_NORM;
|
||||||
//outputformat = VID_OUTFMT_RGBC_SVIDEO;
|
//outputformat = VID_OUTFMT_RGBC_SVIDEO;
|
||||||
scartvoltage = -1;
|
scartvoltage = -1;
|
||||||
@@ -298,7 +303,16 @@ int cVideo::Start(void * /*PcrChannel*/, unsigned short /*PcrPid*/, unsigned sho
|
|||||||
#endif
|
#endif
|
||||||
playstate = VIDEO_PLAYING;
|
playstate = VIDEO_PLAYING;
|
||||||
fop(ioctl, VIDEO_SELECT_SOURCE, VIDEO_SOURCE_DEMUX);
|
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)
|
int cVideo::Stop(bool blank)
|
||||||
@@ -719,15 +733,19 @@ void cVideo::SetControl(int control, int value) {
|
|||||||
const char *p = NULL;
|
const char *p = NULL;
|
||||||
switch (control) {
|
switch (control) {
|
||||||
case VIDEO_CONTROL_BRIGHTNESS:
|
case VIDEO_CONTROL_BRIGHTNESS:
|
||||||
|
brightness = value;
|
||||||
p = "/proc/stb/video/plane/psi_brightness";
|
p = "/proc/stb/video/plane/psi_brightness";
|
||||||
break;
|
break;
|
||||||
case VIDEO_CONTROL_CONTRAST:
|
case VIDEO_CONTROL_CONTRAST:
|
||||||
|
contrast = value;
|
||||||
p = "/proc/stb/video/plane/psi_contrast";
|
p = "/proc/stb/video/plane/psi_contrast";
|
||||||
break;
|
break;
|
||||||
case VIDEO_CONTROL_SATURATION:
|
case VIDEO_CONTROL_SATURATION:
|
||||||
|
saturation = value;
|
||||||
p = "/proc/stb/video/plane/psi_saturation";
|
p = "/proc/stb/video/plane/psi_saturation";
|
||||||
break;
|
break;
|
||||||
case VIDEO_CONTROL_HUE:
|
case VIDEO_CONTROL_HUE:
|
||||||
|
hue = value;
|
||||||
p = "/proc/stb/video/plane/psi_tint";
|
p = "/proc/stb/video/plane/psi_tint";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -149,6 +149,8 @@ class cVideo
|
|||||||
int video_standby;
|
int video_standby;
|
||||||
int64_t GetPTS(void);
|
int64_t GetPTS(void);
|
||||||
|
|
||||||
|
int brightness, contrast, saturation, hue;
|
||||||
|
|
||||||
void openDevice(void);
|
void openDevice(void);
|
||||||
void closeDevice(void);
|
void closeDevice(void);
|
||||||
public:
|
public:
|
||||||
|
Reference in New Issue
Block a user