mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
spark: use ioctl instead of /proc to get video format
This commit is contained in:
@@ -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*/)
|
||||||
|
Reference in New Issue
Block a user