Merge branch 'master' of https://github.com/neutrino-mp/neutrino-mp into ni/mp/tuxbox

Conflicts:
	acinclude.m4
	lib/hardware/coolstream/hardware_caps.cpp
	src/Makefile.am
	src/driver/screenshot.cpp
	src/gui/epgplus.cpp
	src/gui/scan_setup.cpp
	src/neutrino.cpp
	src/zapit/src/frontend.cpp


Origin commit data
------------------
Branch: ni/coolstream
Commit: bb00f9f2e8
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-08-25 (Fri, 25 Aug 2017)



------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-08-25 14:29:45 +02:00
7 changed files with 39 additions and 29 deletions

View File

@@ -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

View File

@@ -36,6 +36,7 @@
#include <memory.h>
#include <math.h>
#include <limits.h>
#include <errno.h>
#include <linux/kd.h>
@@ -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();
}

View File

@@ -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));
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;

View File

@@ -209,6 +209,7 @@ bool CScreenShot::startThread()
void* CScreenShot::initThread(void *arg)
{
set_threadname("n:screenshot");
CScreenShot *scs = static_cast<CScreenShot*>(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();

View File

@@ -1443,14 +1443,10 @@ void EpgPlus::paint()
this->timeLine->paintGrid();
// paint slider
int total_pages;
int current_page;
getScrollBarData(&total_pages, &current_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

View File

@@ -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;
}

View File

@@ -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();
}