mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-28 16:00:58 +02:00
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:
@@ -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);
|
||||
@@ -1108,7 +1125,7 @@ bool cVideo::SetCECMode(VIDEO_HDMI_CEC_MODE _deviceType)
|
||||
physicalAddress[0] = 0x10;
|
||||
physicalAddress[1] = 0x00;
|
||||
logicalAddress = 1;
|
||||
|
||||
|
||||
if (_deviceType == VIDEO_HDMI_CEC_MODE_OFF)
|
||||
{
|
||||
if (hdmiFd >= 0) {
|
||||
@@ -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()
|
||||
|
Reference in New Issue
Block a user