use enum for setAVInput

Origin commit data
------------------
Branch: master
Commit: acf02c7dbd
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2018-05-19 (Sat, 19 May 2018)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Jacek Jendrzej
2018-05-19 19:21:22 +02:00
committed by max_10
parent 161597e49b
commit 2ad3047c82

View File

@@ -300,12 +300,9 @@ int image_to_mpeg2(const char *image_name, int fd)
av_free(formatContext);
return ret;
}
enum{ENCODER,AUX};
void setAVInput(int val)
{
if (val != 0 && val != 1)
return;
int input_fd = open("/proc/stb/avs/0/input", O_WRONLY);
if(input_fd){
const char *input[] = {"encoder", "aux"};
@@ -337,7 +334,7 @@ cVideo::cVideo(int, void *, void *, unsigned int unit)
cVideo::~cVideo(void)
{
if(fd >= 0)
setAVInput(1);
setAVInput(AUX);
if (standby_cec_activ && fd >= 0)
SetCECState(true);
@@ -634,14 +631,12 @@ void cVideo::Standby(unsigned int bOn)
if (bOn)
{
closeDevice();
if(fd < 0)
setAVInput(1);
setAVInput(AUX);
}
else
{
openDevice();
if(fd >= 0)
setAVInput(0);
setAVInput(ENCODER);
}
video_standby = bOn;
SetCECState(video_standby);