mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
use enum for setAVInput
This commit is contained in:
@@ -300,12 +300,9 @@ int image_to_mpeg2(const char *image_name, int fd)
|
|||||||
av_free(formatContext);
|
av_free(formatContext);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
enum{ENCODER,AUX};
|
||||||
void setAVInput(int val)
|
void setAVInput(int val)
|
||||||
{
|
{
|
||||||
if (val != 0 && val != 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
int input_fd = open("/proc/stb/avs/0/input", O_WRONLY);
|
int input_fd = open("/proc/stb/avs/0/input", O_WRONLY);
|
||||||
if(input_fd){
|
if(input_fd){
|
||||||
const char *input[] = {"encoder", "aux"};
|
const char *input[] = {"encoder", "aux"};
|
||||||
@@ -337,7 +334,7 @@ cVideo::cVideo(int, void *, void *, unsigned int unit)
|
|||||||
cVideo::~cVideo(void)
|
cVideo::~cVideo(void)
|
||||||
{
|
{
|
||||||
if(fd >= 0)
|
if(fd >= 0)
|
||||||
setAVInput(1);
|
setAVInput(AUX);
|
||||||
if (standby_cec_activ && fd >= 0)
|
if (standby_cec_activ && fd >= 0)
|
||||||
SetCECState(true);
|
SetCECState(true);
|
||||||
|
|
||||||
@@ -634,14 +631,12 @@ void cVideo::Standby(unsigned int bOn)
|
|||||||
if (bOn)
|
if (bOn)
|
||||||
{
|
{
|
||||||
closeDevice();
|
closeDevice();
|
||||||
if(fd < 0)
|
setAVInput(AUX);
|
||||||
setAVInput(1);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
openDevice();
|
openDevice();
|
||||||
if(fd >= 0)
|
setAVInput(ENCODER);
|
||||||
setAVInput(0);
|
|
||||||
}
|
}
|
||||||
video_standby = bOn;
|
video_standby = bOn;
|
||||||
SetCECState(video_standby);
|
SetCECState(video_standby);
|
||||||
|
Reference in New Issue
Block a user