From bad892af5f789da98c503db2a77b33f01ce3fd69 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 26 Jan 2014 20:30:41 +0100 Subject: [PATCH 01/11] revert 8919d0aba0f9473a1c0f4ab110e907ef3712ebb2 use an easier solution, based up neutrino-mp Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/bcf4e4fbf95668ccf945ce517838160be5564cb9 Author: Thilo Graf Date: 2014-01-26 (Sun, 26 Jan 2014) ------------------ This commit was generated by Migit --- src/gui/bedit/bouqueteditor_bouquets.cpp | 6 ++---- src/gui/bookmarkmanager.cpp | 4 ++-- src/gui/bouquetlist.cpp | 4 ++-- src/gui/eventlist.cpp | 9 +++++---- src/gui/pictureviewer.cpp | 7 +++---- src/gui/timerlist.cpp | 9 +++++---- 6 files changed, 19 insertions(+), 20 deletions(-) diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index 804ccea25..98d9d4949 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -121,14 +121,12 @@ void CBEBouquetWidget::paint() frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); int sbc= ((Bouquets->size()- 1)/ listmaxshow)+ 1; + int sbs= (selected/listmaxshow); if (sbc < 1) sbc = 1; - int sbh = ((sb - 4) * 1024) / sbc; - int sbs= (selected/listmaxshow); - //scrollbar - frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); } void CBEBouquetWidget::paintHead() diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 3a0ccb791..45dbee7e3 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -36,6 +36,7 @@ #include #include + #include #include #include @@ -456,9 +457,8 @@ void CBookmarkManager::paint() int sbc= ((bookmarks.size()- 1)/ listmaxshow)+ 1; if (sbc < 1) sbc = 1; - int sbh = ((sb - 4) * 1024) / sbc; - frameBuffer->paintBoxRel(x+width-13, ypos+2+(page_nr*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); } paintFoot(); diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 10150efaa..bc8257e33 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -50,6 +50,7 @@ #include #include #include + #include #include @@ -634,8 +635,7 @@ void CBouquetList::paint() frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); int sbc= ((bsize - 1)/ listmaxshow)+ 1; /* bsize is > 0, so sbc is also > 0 */ - int sbh = ((sb - 4) * 1024) / sbc; int sbs= (selected/listmaxshow); - frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); } diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 712174f44..5b0815f69 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -32,6 +32,7 @@ #include #include #include + #include #include @@ -48,6 +49,7 @@ #include #include + #include #include #include @@ -918,13 +920,11 @@ void CNeutrinoEventList::paint(t_channel_id channel_id) frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); int sbc= ((evtlist.size()- 1)/ listmaxshow)+ 1; + int sbs= (selected/listmaxshow); if (sbc < 1) sbc = 1; - int sbh = ((sb - 4) * 1024) / sbc; - int sbs= (selected/listmaxshow); - - frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); } @@ -969,6 +969,7 @@ void CNeutrinoEventList::showFunctionBar (bool show, t_channel_id channel_id) buttons[btn_cnt].locale = LOCALE_EVENTFINDER_SEARCH; // search button btn_cnt++; } + // Button: Timer Channelswitch if ((uint) g_settings.key_channelList_addremind != CRCInput::RC_nokey) { if (!g_settings.minimode) { diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index ceb216b61..10e5b1123 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -64,6 +64,7 @@ #include #include + #include #include @@ -757,13 +758,11 @@ void CPictureViewerGui::paint() frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); int sbc= ((playlist.size()- 1)/ listmaxshow)+ 1; + int sbs= (selected/listmaxshow); if (sbc < 1) sbc = 1; - int sbh = ((sb - 4) * 1024) / sbc; - int sbs= (selected/listmaxshow); - - frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ sbs * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3); paintFoot(); paintInfo(); diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 983c9d3c3..a841b56ba 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -47,8 +47,10 @@ #include #include + #include #include + #include #include #include @@ -376,7 +378,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) parent->hide(); const char *action_str = "RecDir1"; if(chooserDir(timerlist[selected].recordingDir, true, action_str, sizeof(timerlist[selected].recordingDir)-1)) { - printf("[%s] new %s dir %s\n",__FILE__, action_str, timerlist[selected].recordingDir); + printf("[timerlist] new %s dir %s\n", action_str, timerlist[selected].recordingDir); } return menu_return::RETURN_REPAINT; } @@ -384,7 +386,7 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) parent->hide(); const char *action_str = "RecDir2"; if(chooserDir(timerNew.recordingDir, true, action_str, sizeof(timerNew.recordingDir)-1)) { - printf("[%s] new %s dir %s\n",__FILE__, action_str, timerNew.recordingDir); + printf("[timerlist] new %s dir %s\n", action_str, timerNew.recordingDir); } return menu_return::RETURN_REPAINT; } @@ -917,9 +919,8 @@ void CTimerList::paint() frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); int sbc= ((timerlist.size()- 1)/ listmaxshow)+ 1; - int sbh = ((sb - 4) * 1024) / sbc; - frameBuffer->paintBoxRel(x+width-13, ypos+2+(page_nr*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); + frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); } paintFoot(); From 3cd295aa3ea1488e2a8a0c7553c0c299650ee527 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 26 Jan 2014 20:36:41 +0100 Subject: [PATCH 02/11] CBookmarkManager: init bookmarksmodified in constructor var bookmarksmodified was not intitialized Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/6e92392e1131271c6a2aa2e8fbab6f367a76fece Author: Thilo Graf Date: 2014-01-26 (Sun, 26 Jan 2014) ------------------ This commit was generated by Migit --- src/gui/bookmarkmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 45dbee7e3..89ee000c6 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -165,6 +165,7 @@ void CBookmarkManager::writeBookmarkFile() { CBookmarkManager::CBookmarkManager() : bookmarkfile ('\t') { + bookmarksmodified = false; readBookmarkFile(); } From 40f236846afda088864c3c41d8a33b62fe3499aa Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 26 Jan 2014 16:09:48 +0100 Subject: [PATCH 03/11] helpers: add a function to find an executable in $PATH Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/e37e425674d494000eb2b633ad579f806f2b6222 Author: Stefan Seyfried Date: 2014-01-26 (Sun, 26 Jan 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/system/helpers.cpp | 29 +++++++++++++++++++++++++++++ src/system/helpers.h | 2 ++ 2 files changed, 31 insertions(+) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index 5dea11f92..faaab6451 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -290,6 +290,35 @@ bool get_mem_usage(unsigned long &kbtotal, unsigned long &kbfree) return true; } +std::string find_executable(const char *name) +{ + struct stat s; + char *path = getenv("PATH"); + char *p, *n; + if (! path) + path = strdupa("/bin:/usr/bin:/sbin:/usr/sbin"); + if (name[0] == '/') { /* full path given */ + if (!access(name, X_OK) && !stat(name, &s) && S_ISREG(s.st_mode)) + return std::string(name); + return ""; + } + + p = path; + while (p) { + n = strchr(p, ':'); + if (n) + *n++ = '\0'; + if (*p != '\0') { + std::string tmp = std::string(p) + "/" + std::string(name); + const char *f = tmp.c_str(); + if (!access(f, X_OK) && !stat(f, &s) && S_ISREG(s.st_mode)) + return tmp; + } + p = n; + } + return ""; +} + std::string _getPathName(std::string &path, std::string sep) { size_t pos = path.find_last_of(sep); diff --git a/src/system/helpers.h b/src/system/helpers.h index e1f870772..ed9f191ff 100644 --- a/src/system/helpers.h +++ b/src/system/helpers.h @@ -41,6 +41,8 @@ bool get_fs_usage(const char * dir, uint64_t &btotal, uint64_t &bused, long *bsi bool get_mem_usage(unsigned long &total, unsigned long &free); void mySleep(int sec); +std::string find_executable(const char *name); + std::string getPathName(std::string &path); std::string getBaseName(std::string &path); std::string getFileName(std::string &file); From 9c7209e62305cf8f6c7499d0ae4fc6fd0b295e1f Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 26 Jan 2014 21:06:40 +0100 Subject: [PATCH 04/11] sectionsd: don't hardcode ntpdate and ntpd path Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1acddb37bf02daae0cc7a8dd41f7da1515b9f330 Author: Stefan Seyfried Date: 2014-01-26 (Sun, 26 Jan 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/eitd/sectionsd.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index b2f6c93e0..b4e3bacda 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include "eitd.h" #include "sectionsd.h" @@ -2098,8 +2099,8 @@ bool CEitManager::Start() oldEventsAre = config.epg_old_events*60L*60L; //hours max_events = config.epg_max_events; - if (access("/sbin/ntpdate", F_OK)) - ntp_system_cmd_prefix = "/sbin/ntpd -n -q -p "; + if (find_executable("ntpdate").empty()) + ntp_system_cmd_prefix = "ntpd -n -q -p "; printf("[sectionsd] Caching: %d days, %d hours Extended Text, max %d events, Events are old %d hours after end time\n", config.epg_cache, config.epg_extendedcache, config.epg_max_events, config.epg_old_events); From e9643a6d05ed0e6c48dc8588154222d5d01661a9 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sun, 26 Jan 2014 19:29:17 +0100 Subject: [PATCH 05/11] add webif option dont use CEC with standbyoff Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/4be0273083a05e79028056f0bee87033fd785f2a Author: Jacek Jendrzej Date: 2014-01-26 (Sun, 26 Jan 2014) Origin message was: ------------------ -add webif option dont use CEC with standbyoff ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/rcinput.cpp | 4 ++++ src/neutrino.cpp | 6 ++++++ src/neutrinoMessages.h | 2 ++ src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 18 ++++++++++++++++++ .../tuxboxapi/coolstream/neutrinoapi.cpp | 1 + 5 files changed, 31 insertions(+) diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 6f2344c7a..5d24f69c6 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -857,6 +857,10 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint6 *msg = NeutrinoMessages::RELOAD_SETUP; *data = 0; break; + case NeutrinoMessages::EVT_HDMI_CEC_ON: + *msg = NeutrinoMessages::EVT_HDMI_CEC_ON; + *data = 0; + break; default: printf("[neutrino] event INITID_HTTPD - unknown eventID 0x%x\n", emsg.eventID ); } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 2761eec41..fdfa4ea33 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -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), // 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)) delete [] (unsigned char*) data; diff --git a/src/neutrinoMessages.h b/src/neutrinoMessages.h index ce90d5b46..28c60dd58 100644 --- a/src/neutrinoMessages.h +++ b/src/neutrinoMessages.h @@ -151,6 +151,8 @@ struct NeutrinoMessages { /* sectionsd */ EVT_EIT_COMPLETE = CRCInput::RC_WithData + 24, /* 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 { diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index 61f01bd0e..e31bb44a3 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -48,6 +48,8 @@ // nhttpd #include "neutrinoapi.h" #include "controlapi.h" +#include +extern cVideo * videoDecoder; extern CPlugins *g_PluginList;//for relodplugins extern CBouquetManager *g_bouquetManager; @@ -422,6 +424,13 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh) { 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(CNeutrinoApp::getInstance()->getMode() != 4) @@ -430,10 +439,19 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh) } 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); if(CNeutrinoApp::getInstance()->getMode() == 4) NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD); 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 hh->SendError(); diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp index beb863407..dd571c050 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp @@ -130,6 +130,7 @@ CNeutrinoAPI::CNeutrinoAPI() 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::RELOAD_SETUP, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock");//reload neutrino conf + EventServer->registerEvent2( NeutrinoMessages::EVT_HDMI_CEC_ON, CEventServer::INITID_HTTPD, "/tmp/neutrino.sock"); } //------------------------------------------------------------------------- From 33e52be164e20c76486ff78e2675bd150a781663 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 27 Jan 2014 11:47:40 +0100 Subject: [PATCH 06/11] CLuaInstance::MenuAddItem: separation of "separator" and "separatorline" Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/73446dbc520c28eea8738b4ebc4dcfc555c453c2 Author: vanhofen Date: 2014-01-27 (Mon, 27 Jan 2014) Origin message was: ------------------ - CLuaInstance::MenuAddItem: separation of "separator" and "separatorline" ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/luainstance.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 08d8f1a95..ed83ca2b3 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -887,6 +887,8 @@ int CLuaInstance::MenuAddItem(lua_State *L) if (type == "back") { m->m->addItem(GenericMenuBack); } else if (type == "separator") { + m->m->addItem(GenericMenuSeparator); + } else if (type == "separatorline") { if (!b->name.empty()) { m->m->addItem(new CMenuSeparator(CMenuSeparator::STRING | CMenuSeparator::LINE, b->name.c_str(), NONEXISTANT_LOCALE)); } else { From 7e4f69a5a736645b18e1433c2d5bdbebbc178bf9 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Mon, 27 Jan 2014 15:40:05 +0400 Subject: [PATCH 07/11] driver/framebuffer.cpp: try to load icons first from /var/tuxbox/icons/ Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1ee458e461cb7d27cd18d93e5271feb81cd10517 Author: [CST] Focus Date: 2014-01-27 (Mon, 27 Jan 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/framebuffer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index 31f008a17..e01dbd85e 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -58,6 +58,7 @@ extern cVideo * videoDecoder; extern CPictureViewer * g_PicViewer; #define ICON_CACHE_SIZE 1024*1024*2 // 2mb +#define ICONDIR_VAR "/var/tuxbox/icons/" #define BACKGROUNDIMAGEWIDTH 720 @@ -953,7 +954,9 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in /* we cache and check original name */ it = icon_cache.find(filename); if(it == icon_cache.end()) { - std::string newname = iconBasePath + filename.c_str() + ".png"; + std::string newname = std::string(ICONDIR_VAR) + filename + ".png"; + if (access(newname.c_str(), F_OK)) + newname = iconBasePath + filename + ".png"; //printf("CFrameBuffer::paintIcon: check for %s\n", newname.c_str());fflush(stdout); data = g_PicViewer->getIcon(newname, &width, &height); @@ -972,7 +975,9 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in goto _display; } - newname = iconBasePath + filename.c_str() + ".raw"; + newname = std::string(ICONDIR_VAR) + filename + ".raw"; + if (access(newname.c_str(), F_OK)) + newname = iconBasePath + filename + ".raw"; int lfd = open(newname.c_str(), O_RDONLY); From af60d821cc2c7259eb8fa4631ef05bf237cdab99 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Mon, 27 Jan 2014 12:55:25 +0100 Subject: [PATCH 08/11] helpers.cpp: fix find_executable - function made the environment variable PATH broken Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/356feceb9c93db4eedbf718267f4eecb44b5ae5e Author: Michael Liebmann Date: 2014-01-27 (Mon, 27 Jan 2014) ------------------ This commit was generated by Migit --- src/system/helpers.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/system/helpers.cpp b/src/system/helpers.cpp index faaab6451..01e76b513 100644 --- a/src/system/helpers.cpp +++ b/src/system/helpers.cpp @@ -293,9 +293,11 @@ bool get_mem_usage(unsigned long &kbtotal, unsigned long &kbfree) std::string find_executable(const char *name) { struct stat s; - char *path = getenv("PATH"); - char *p, *n; - if (! path) + char *tmpPath = getenv("PATH"); + char *p, *n, *path; + if (tmpPath) + path = strdupa(tmpPath); + else path = strdupa("/bin:/usr/bin:/sbin:/usr/sbin"); if (name[0] == '/') { /* full path given */ if (!access(name, X_OK) && !stat(name, &s) && S_ISREG(s.st_mode)) From 109dcc31431dc8c3befd785dbfa003f37412797d Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 27 Jan 2014 17:11:27 +0100 Subject: [PATCH 09/11] fix CMenuDForwarder option change Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/3dc41ac047ca5e6e32d9b51e0ba813cd3ab41778 Author: Jacek Jendrzej Date: 2014-01-27 (Mon, 27 Jan 2014) Origin message was: ------------------ -fix CMenuDForwarder option change ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/miscsettings_menu.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/miscsettings_menu.cpp b/src/gui/miscsettings_menu.cpp index 0ad001558..c707e6ff6 100644 --- a/src/gui/miscsettings_menu.cpp +++ b/src/gui/miscsettings_menu.cpp @@ -343,7 +343,7 @@ int CMiscMenue::showMiscSettingsMenuEnergy() if (shutdown_count.length() < 3) shutdown_count.insert(0, 3 - shutdown_count.length(), ' '); CStringInput * miscSettings_shutdown_count = new CStringInput(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, &shutdown_count, 3, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT1, LOCALE_MISCSETTINGS_SHUTDOWN_COUNT_HINT2, "0123456789 "); - CMenuForwarder *m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, shutdown_count.c_str(), miscSettings_shutdown_count); + CMenuForwarder *m2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_SHUTDOWN_COUNT, !g_settings.shutdown_real, shutdown_count, miscSettings_shutdown_count); m2->setHint("", LOCALE_MENU_HINT_SHUTDOWN_COUNT); COnOffNotifier * miscNotifier = new COnOffNotifier(1); @@ -400,21 +400,21 @@ void CMiscMenue::showMiscSettingsMenuEpg(CMenuWidget *ms_epg) if (epg_extendedcache.length() < 3) epg_extendedcache.insert(0, 3 - epg_extendedcache.length(), ' '); CStringInput * miscSettings_epg_cache_e = new CStringInput(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, &epg_extendedcache, 3,LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT1, LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE_HINT2 , "0123456789 ", sectionsdConfigNotifier); - CMenuForwarder * mf1 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, true, epg_extendedcache.c_str(), miscSettings_epg_cache_e); + CMenuForwarder * mf1 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_EXTENDEDCACHE, true, epg_extendedcache, miscSettings_epg_cache_e); mf1->setHint("", LOCALE_MENU_HINT_EPG_EXTENDEDCACHE); epg_old_events = to_string(g_settings.epg_old_events); if (epg_old_events.length() < 3) epg_old_events.insert(0, 3 - epg_old_events.length(), ' '); CStringInput * miscSettings_epg_old_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, &epg_old_events, 3,LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_OLD_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier); - CMenuForwarder * mf2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, true, epg_old_events.c_str(), miscSettings_epg_old_events); + CMenuForwarder * mf2 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_OLD_EVENTS, true, epg_old_events, miscSettings_epg_old_events); mf2->setHint("", LOCALE_MENU_HINT_EPG_OLD_EVENTS); epg_max_events = to_string(g_settings.epg_max_events); if (epg_max_events.length() < 6) epg_max_events.insert(0, 6 - epg_max_events.length(), ' '); CStringInput * miscSettings_epg_max_events = new CStringInput(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, &epg_max_events, 6,LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT1, LOCALE_MISCSETTINGS_EPG_MAX_EVENTS_HINT2 , "0123456789 ", sectionsdConfigNotifier); - CMenuForwarder * mf3 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, true, epg_max_events.c_str(), miscSettings_epg_max_events); + CMenuForwarder * mf3 = new CMenuDForwarder(LOCALE_MISCSETTINGS_EPG_MAX_EVENTS, true, epg_max_events, miscSettings_epg_max_events); mf3->setHint("", LOCALE_MENU_HINT_EPG_MAX_EVENTS); CMenuForwarder * mf4 = new CMenuForwarder(LOCALE_MISCSETTINGS_EPG_DIR, g_settings.epg_save, g_settings.epg_dir, this, "epgdir"); From 973a0732c84d10bef8187b4fa2b40705992cb16d Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 27 Jan 2014 18:13:13 +0100 Subject: [PATCH 10/11] mSHTDCNT init var Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/231e51fce10d50ed8d65e06280160bd75d0cb794 Author: Jacek Jendrzej Date: 2014-01-27 (Mon, 27 Jan 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/shutdown_count.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/driver/shutdown_count.cpp b/src/driver/shutdown_count.cpp index 92fcc1c6f..0bd113656 100644 --- a/src/driver/shutdown_count.cpp +++ b/src/driver/shutdown_count.cpp @@ -39,6 +39,8 @@ SHTDCNT::SHTDCNT() { + sleep_cnt = 0; + shutdown_cnt = 0; } SHTDCNT* SHTDCNT::getInstance() From 267405c5f7a087d395cbb4a5c74d5a7d361b1c5f Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 27 Jan 2014 20:26:46 +0100 Subject: [PATCH 11/11] supplement to e9643a6d05ed0e6c48dc8588154222d5d01661a9 cec option in standby off and on Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/372b367b8b2c68ffaa51f6c1c50203d40c6b6ebb Author: Jacek Jendrzej Date: 2014-01-27 (Mon, 27 Jan 2014) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index e31bb44a3..e843696df 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -430,6 +430,10 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh) CEC_HDMI_off = true; } } + //dont use CEC with standbyoff --- use: control/standby?off&cec=off + if(g_settings.hdmi_cec_view_on && CEC_HDMI_off){ + videoDecoder->SetCECAutoView(0); + } if (hh->ParamList["1"] == "on") // standby mode on { @@ -439,22 +443,17 @@ void CControlAPI::StandbyCGI(CyhookHandler *hh) } 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); if(CNeutrinoApp::getInstance()->getMode() == 4) NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::STANDBY_OFF, CEventServer::INITID_HTTPD); 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 hh->SendError(); + + 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 if(CNeutrinoApp::getInstance()->getMode() == 4)//mode_standby = 4