mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
spark video: implement SetControl
Origin commit data
------------------
Branch: master
Commit: 6e8bdf5c34
Author: martii <you@example.com>
Date: 2012-07-13 (Fri, 13 Jul 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -643,3 +643,28 @@ int64_t cVideo::GetPTS(void)
|
||||
lt_info("%s: GET_PTS failed (%m)\n", __func__);
|
||||
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
|
||||
|
Reference in New Issue
Block a user