Merge remote-tracking branch 'libstb-hal-max/master'

Origin commit data
------------------
Branch: master
Commit: 4527bb3755
Author: Frankenstone <dampf_acc@online.de>
Date: 2018-05-26 (Sat, 26 May 2018)


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

------------------
This commit was generated by Migit
This commit is contained in:
Frankenstone
2018-05-26 22:25:10 +02:00

View File

@@ -300,6 +300,16 @@ int image_to_mpeg2(const char *image_name, int fd)
av_free(formatContext);
return ret;
}
enum{ENCODER,AUX};
void setAVInput(int val)
{
int input_fd = open("/proc/stb/avs/0/input", O_WRONLY);
if(input_fd){
const char *input[] = {"encoder", "aux"};
write(input_fd, input[val], strlen(input[val]));
close(input_fd);
}
}
cVideo::cVideo(int, void *, void *, unsigned int unit)
{
@@ -323,6 +333,11 @@ cVideo::cVideo(int, void *, void *, unsigned int unit)
cVideo::~cVideo(void)
{
if(fd >= 0)
setAVInput(AUX);
if (standby_cec_activ && fd >= 0)
SetCECState(true);
closeDevice();
}
@@ -616,10 +631,12 @@ void cVideo::Standby(unsigned int bOn)
if (bOn)
{
closeDevice();
setAVInput(AUX);
}
else
{
openDevice();
setAVInput(ENCODER);
}
video_standby = bOn;
SetCECState(video_standby);
@@ -1192,11 +1209,15 @@ bool cVideo::SetCECMode(VIDEO_HDMI_CEC_MODE _deviceType)
if (ioctl(hdmiFd, CEC_S_MODE, &monitor) < 0)
lt_info("%s: CEC monitor failed (%m)\n", __func__);
GetCECAddressInfo();
if(autoview_cec_activ)
SetCECState(false);
return true;
}
GetCECAddressInfo();
return true;
return false;
}
void cVideo::GetCECAddressInfo()