spark video: implement SetControl

This commit is contained in:
martii
2012-07-13 16:26:22 +02:00
parent 249d2964ac
commit 6e8bdf5c34

View File

@@ -643,3 +643,28 @@ int64_t cVideo::GetPTS(void)
lt_info("%s: GET_PTS failed (%m)\n", __func__); lt_info("%s: GET_PTS failed (%m)\n", __func__);
return pts; return pts;
} }
#ifdef MARTII
void cVideo::SetControl(int control, int value) {
const char *p = NULL;
switch (control) {
case VIDEO_CONTROL_BRIGHTNESS:
p = "/proc/stb/video/plane/psi_brightness";
break;
case VIDEO_CONTROL_CONTRAST:
p = "/proc/stb/video/plane/psi_contrast";
break;
case VIDEO_CONTROL_SATURATION:
p = "/proc/stb/video/plane/psi_saturation";
break;
case VIDEO_CONTROL_HUE:
p = "/proc/stb/video/plane/psi_tint";
break;
}
if (p) {
char buf[20];
int len = snprintf(buf, sizeof(buf), "%d", value);
if (len < sizeof(buf))
proc_put(p, buf, len);
}
}
#endif