mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 23:42:43 +02:00
azbox: improve cVideo::setAspectRatio
Origin commit data
------------------
Branch: master
Commit: 07ba8c9eb9
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-06-23 (Sat, 23 Jun 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -166,7 +166,8 @@ void cVideo::closeDevice(void)
|
|||||||
int cVideo::setAspectRatio(int aspect, int mode)
|
int cVideo::setAspectRatio(int aspect, int mode)
|
||||||
{
|
{
|
||||||
static const char *a[] = { "n/a", "4:3", "14:9", "16:9" };
|
static const char *a[] = { "n/a", "4:3", "14:9", "16:9" };
|
||||||
static const char *m[] = { "panscan", "letterbox", "bestfit", "nonlinear", "(unset)" };
|
/* { "panscan", "letterbox", "fullscreen", "14:9", "(unset)" } */
|
||||||
|
static const char *m[] = { "1", "2", "0", "1", "(unset)" };
|
||||||
int n;
|
int n;
|
||||||
lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]);
|
lt_debug("%s: a:%d m:%d %s\n", __func__, aspect, mode, m[(mode < 0||mode > 3) ? 4 : mode]);
|
||||||
|
|
||||||
@@ -183,8 +184,8 @@ int cVideo::setAspectRatio(int aspect, int mode)
|
|||||||
if (mode == -1)
|
if (mode == -1)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
lt_debug("%s: /proc/stb/video/policy -> %s\n", __func__, m[mode]);
|
lt_debug("%s: /proc/scalingmode -> %s\n", __func__, m[mode]);
|
||||||
n = proc_put("/proc/stb/video/policy", m[mode], strlen(m[mode]));
|
n = proc_put("/proc/scalingmode", m[mode], strlen(m[mode]));
|
||||||
if (n < 0)
|
if (n < 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user