-add webif option dont use CEC with standbyoff

This commit is contained in:
Jacek Jendrzej
2014-01-26 19:29:17 +01:00
parent 1acddb37bf
commit 4be0273083
5 changed files with 31 additions and 0 deletions

View File

@@ -857,6 +857,10 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6
*msg = NeutrinoMessages::RELOAD_SETUP; *msg = NeutrinoMessages::RELOAD_SETUP;
*data = 0; *data = 0;
break; break;
case NeutrinoMessages::EVT_HDMI_CEC_ON:
*msg = NeutrinoMessages::EVT_HDMI_CEC_ON;
*data = 0;
break;
default: default:
printf("[neutrino] event INITID_HTTPD - unknown eventID 0x%x\n", emsg.eventID ); printf("[neutrino] event INITID_HTTPD - unknown eventID 0x%x\n", emsg.eventID );
} }

View File

@@ -3035,6 +3035,12 @@ int CNeutrinoApp::handleMsg(const neutrino_msg_t _msg, neutrino_msg_data_t data)
// ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED), // ShowHint(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_EXTRA_ZAPIT_SDT_CHANGED),
// CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO); // CMessageBox::mbrBack,CMessageBox::mbBack, NEUTRINO_ICON_INFO);
} }
else if (msg == NeutrinoMessages::EVT_HDMI_CEC_ON) {
if(g_settings.hdmi_cec_view_on)
videoDecoder->SetCECAutoView(g_settings.hdmi_cec_view_on);
return messages_return::handled;
}
if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000)) if ((msg >= CRCInput::RC_WithData) && (msg < CRCInput::RC_WithData + 0x10000000))
delete [] (unsigned char*) data; delete [] (unsigned char*) data;

View File

@@ -151,6 +151,8 @@ struct NeutrinoMessages {
/* sectionsd */ /* sectionsd */
EVT_EIT_COMPLETE = CRCInput::RC_WithData + 24, /* data: (t_channel_id *) */ EVT_EIT_COMPLETE = CRCInput::RC_WithData + 24, /* data: (t_channel_id *) */
EVT_BACK_ZAP_COMPLETE = CRCInput::RC_WithData + 25, /* data: (t_channel_id *) */ EVT_BACK_ZAP_COMPLETE = CRCInput::RC_WithData + 25, /* data: (t_channel_id *) */
EVT_HDMI_CEC_ON = CRCInput::RC_WithData + 26
}; };
enum enum
{ {

View File

@@ -48,6 +48,8 @@
// nhttpd // nhttpd
#include "neutrinoapi.h" #include "neutrinoapi.h"
#include "controlapi.h" #include "controlapi.h"
#include <video.h>
extern cVideo * videoDecoder;
extern CPlugins *g_PluginList;//for relodplugins extern CPlugins *g_PluginList;//for relodplugins
extern CBouquetManager *g_bouquetManager; extern CBouquetManager *g_bouquetManager;
@@ -422,6 +424,13 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh)
{ {
if (!(hh->ParamList.empty())) if (!(hh->ParamList.empty()))
{ {
bool CEC_HDMI_off = false;
if (!(hh->ParamList["cec"].empty())){
if(hh->ParamList["cec"]=="off"){
CEC_HDMI_off = true;
}
}
if (hh->ParamList["1"] == "on") // standby mode on if (hh->ParamList["1"] == "on") // standby mode on
{ {
if(CNeutrinoApp::getInstance()->getMode() != 4) if(CNeutrinoApp::getInstance()->getMode() != 4)
@@ -430,10 +439,19 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh)
} }
else if (hh->ParamList["1"] == "off")// standby mode off else if (hh->ParamList["1"] == "off")// standby mode off
{ {
//dont use CEC with standbyoff --- use: control/standby?off&cec=off
if(g_settings.hdmi_cec_view_on && CEC_HDMI_off){
videoDecoder->SetCECAutoView(0);
}
NeutrinoAPI->Zapit->setStandby(false); NeutrinoAPI->Zapit->setStandby(false);
if(CNeutrinoApp::getInstance()->getMode() == 4) if(CNeutrinoApp::getInstance()->getMode() == 4)
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD); NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD);
hh->SendOk(); hh->SendOk();
if(g_settings.hdmi_cec_view_on && CEC_HDMI_off){//dont use CEC with standbyoff
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::EVT_HDMI_CEC_ON, CEventServer::INITID_HTTPD);
}
} }
else else
hh->SendError(); hh->SendError();

View File

@@ -130,6 +130,7 @@ CNeutrinoAPI::CNeutrinoAPI()
EventServer->registerEvent2( NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock"); EventServer->registerEvent2( NeutrinoMessages::LOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock"); EventServer->registerEvent2( NeutrinoMessages::UNLOCK_RC, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
EventServer->registerEvent2( NeutrinoMessages::RELOAD_SETUP, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");//reload neutrino conf EventServer->registerEvent2( NeutrinoMessages::RELOAD_SETUP, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");//reload neutrino conf
EventServer->registerEvent2( NeutrinoMessages::EVT_HDMI_CEC_ON, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------