spark: use ioctl instead of /proc to get video format

This commit is contained in:
Stefan Seyfried
2012-02-23 23:27:53 +01:00
parent 63eb51a028
commit 3e37ee54a6

View File

@@ -194,11 +194,14 @@ int cVideo::setAspectRatio(int aspect, int mode)
int cVideo::getAspectRatio(void) int cVideo::getAspectRatio(void)
{ {
int ratio = 0; /* proc: 0 = 4:3, 1 = 16:9 */ video_size_t s;
ratio = proc_get_hex("/proc/stb/vmpeg/0/aspect"); if (fop(ioctl, VIDEO_GET_SIZE, &s) < 0)
if (ratio >= 0) {
return ratio * 2 + 1; /* return: 1 = 4:3, 3 = 16:9 */ lt_info("%s: VIDEO_GET_SIZE %m\n", __func__);
return ratio; return -1;
}
lt_debug("%s: %d\n", __func__, s.aspect_ratio);
return s.aspect_ratio * 2 + 1;
} }
int cVideo::setCroppingMode(int /*vidDispMode_t format*/) int cVideo::setCroppingMode(int /*vidDispMode_t format*/)