diff --git a/src/Makefile.am b/src/Makefile.am index 44d8e085d..838ebfe85 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -201,15 +201,15 @@ endif if BOXTYPE_COOL bin_PROGRAMS += uncooloff uncooloff_SOURCES = uncooloff.c -if BOXMODEL_CS_HD2 -else -noinst_PROGRAMS = uncoolinit -uncoolinit_SOURCES = uncoolinit.cpp -uncoolinit_LDADD = \ - @AVFORMAT_LIBS@ \ - @AVCODEC_LIBS@ \ - @BLURAY_LIBS@ \ - -lcoolstream-mt -lca-sc -lnxp \ - -lOpenThreads -lrt -endif +# if BOXMODEL_CS_HD2 +# else +# noinst_PROGRAMS = uncoolinit +# uncoolinit_SOURCES = uncoolinit.cpp +# uncoolinit_LDADD = \ +# @AVFORMAT_LIBS@ \ +# @AVCODEC_LIBS@ \ +# @BLURAY_LIBS@ \ +# -lcoolstream-mt -lca-sc -lnxp \ +# -lOpenThreads -lrt +# endif endif diff --git a/src/driver/fb_accel_sti.cpp b/src/driver/fb_accel_sti.cpp index dfe0ac5c3..17e342faf 100644 --- a/src/driver/fb_accel_sti.cpp +++ b/src/driver/fb_accel_sti.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -333,10 +334,12 @@ void CFbAccelSTi::run() time_t last_blit = 0; blit_pending = false; blit_thread = true; - blit_mutex.lock(); set_threadname("stifb::autoblit"); while (blit_thread) { + blit_mutex.lock(); blit_cond.wait(&blit_mutex, blit_pending ? BLIT_INTERVAL_MIN : BLIT_INTERVAL_MAX); + blit_mutex.unlock(); + time_t now = time_monotonic_ms(); if (now - last_blit < BLIT_INTERVAL_MIN) { @@ -346,20 +349,22 @@ void CFbAccelSTi::run() else { blit_pending = false; - blit_mutex.unlock(); _blit(); - blit_mutex.lock(); last_blit = now; } } - blit_mutex.unlock(); printf(LOGTAG "::run end\n"); } void CFbAccelSTi::blit() { //printf(LOGTAG "::blit\n"); - blit_mutex.lock(); + int status = blit_mutex.trylock(); + if (status) { + printf(LOGTAG "::blit trylock failed: %d (%s)\n", status, + (status > 0) ? strerror(status) : strerror(errno)); + return; + } blit_cond.signal(); blit_mutex.unlock(); } diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index e2654ac56..8970e1314 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -1684,9 +1684,14 @@ const char * CRCInput::getSpecialKeyName(const unsigned int key) std::string CRCInput::getKeyName(const unsigned int key) { - std::string res(getKeyNameC(key & ~RC_Repeat)); - if ((key & RC_Repeat) && res != "unknown") - res += " (long)"; + std::string res; + if (key > RC_MaxRC) + res = getKeyNameC(key); /* will only resolve RC_nokey or "unknown" */ + else { + res = (getKeyNameC(key & ~RC_Repeat)); + if ((key & RC_Repeat) && res != "unknown") + res += " (long)"; + } return res; } @@ -1719,6 +1724,10 @@ int CRCInput::translate(int code) return RC_record; case KEY_PLAY: return RC_pause; + case KEY_CHANNELUP: + return RC_page_up; + case KEY_CHANNELDOWN: + return RC_page_down; #endif default: break; diff --git a/src/driver/screenshot.cpp b/src/driver/screenshot.cpp index 4a65e9b0a..c2642b64a 100644 --- a/src/driver/screenshot.cpp +++ b/src/driver/screenshot.cpp @@ -209,6 +209,7 @@ bool CScreenShot::startThread() void* CScreenShot::initThread(void *arg) { + set_threadname("n:screenshot"); CScreenShot *scs = static_cast(arg); pthread_cleanup_push(cleanupThread, scs); // printf("[CScreenShot::%s:%d] thread: %p\n", __func__, __LINE__, scs); @@ -243,7 +244,6 @@ void CScreenShot::cleanupThread(void *arg) /* start ::run in new thread to save file in selected format */ bool CScreenShot::Start() { - set_threadname("n:screenshot"); bool ret = false; if (GetData()) ret = startThread(); diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index d1f6b3d5d..c7cc7f411 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -1443,14 +1443,10 @@ void EpgPlus::paint() this->timeLine->paintGrid(); // paint slider - int total_pages; - int current_page; - getScrollBarData(&total_pages, ¤t_page, - this->channelList->getSize(), - this->maxNumberOfDisplayableEntries, - this->selectedChannelEntry == NULL ? 0 : this->selectedChannelEntry->index); + int total_pages = ((this->channelList->getSize() - 1) / this->maxNumberOfDisplayableEntries) + 1; + int current_page = this->selectedChannelEntry == NULL ? 0 : (this->selectedChannelEntry->index / this->maxNumberOfDisplayableEntries); - paintScrollBar(this->sliderX, this->sliderY, this->sliderWidth, this->sliderHeight, total_pages, current_page, CC_SHADOW_RIGHT_CORNER_ALL); + paintScrollBar(this->sliderX, this->sliderY, this->sliderWidth, this->sliderHeight, total_pages, current_page); } // -- EPG+ Menue Handler Class diff --git a/src/gui/widget/keychooser.h b/src/gui/widget/keychooser.h index 8c89140c7..b2cdbeb64 100644 --- a/src/gui/widget/keychooser.h +++ b/src/gui/widget/keychooser.h @@ -96,7 +96,7 @@ class CKeyChooserItemNoKey : public CMenuTarget int exec(CMenuTarget* /*parent*/, const std::string & /*actionKey*/) { - *key=(int)CRCInput::RC_nokey; + *key=(unsigned int)CRCInput::RC_nokey; return menu_return::RETURN_REPAINT; } diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index e0cd7d42f..02e9a6b66 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -2265,7 +2265,7 @@ bool CZapit::StartPlayBack(CZapitChannel *thisChannel) #if HAVE_AZBOX_HARDWARE /* new (> 20130917) AZbox drivers switch to radio mode if audio is started first */ /* start video */ - if (have_video) { + if (video_pid) { videoDecoder->Start(0, thisChannel->getPcrPid(), thisChannel->getVideoPid()); videoDemux->Start(); }