mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
Merge branch 'master' of https://github.com/tuxbox-neutrino/gui-neutrino into ni/mp/tuxbox
Conflicts:
src/Makefile.am
src/driver/scanepg.cpp
src/gui/audioplayer.cpp
src/gui/infoviewer.cpp
src/gui/movieplayer.cpp
src/neutrino.cpp
src/neutrino.h
src/nhttpd/tuxboxapi/controlapi.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: 265771c9a2
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-23 (Thu, 23 Nov 2017)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -334,7 +334,6 @@ void CEpgScan::EnterStandby()
|
|||||||
CZapit::getInstance()->SetCurrentChannelID(live_channel_id);
|
CZapit::getInstance()->SetCurrentChannelID(live_channel_id);
|
||||||
CNeutrinoApp::getInstance()->standbyToStandby();
|
CNeutrinoApp::getInstance()->standbyToStandby();
|
||||||
|
|
||||||
//NI
|
|
||||||
if (g_settings.epg_save && g_settings.epg_save_standby)
|
if (g_settings.epg_save && g_settings.epg_save_standby)
|
||||||
CNeutrinoApp::getInstance()->saveEpg(NeutrinoModes::mode_standby);
|
CNeutrinoApp::getInstance()->saveEpg(NeutrinoModes::mode_standby);
|
||||||
}
|
}
|
||||||
|
@@ -55,6 +55,21 @@ CComponentsTimer::~CComponentsTimer()
|
|||||||
stopTimer();
|
stopTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CComponentsTimer::getSleep(long miliseconds)
|
||||||
|
{
|
||||||
|
struct timespec req, rem;
|
||||||
|
|
||||||
|
if(miliseconds > 999){
|
||||||
|
req.tv_sec = (time_t)(miliseconds / 1000);
|
||||||
|
req.tv_nsec = (miliseconds - ((long)req.tv_sec * 1000)) * 1000000;
|
||||||
|
}else{
|
||||||
|
req.tv_sec = 0;
|
||||||
|
req.tv_nsec = miliseconds * 1000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nanosleep(&req , &rem);
|
||||||
|
}
|
||||||
|
|
||||||
void CComponentsTimer::runSharedTimerAction()
|
void CComponentsTimer::runSharedTimerAction()
|
||||||
{
|
{
|
||||||
//start loop
|
//start loop
|
||||||
@@ -63,10 +78,18 @@ void CComponentsTimer::runSharedTimerAction()
|
|||||||
while(tm_enable && tm_interval > 0) {
|
while(tm_enable && tm_interval > 0) {
|
||||||
tm_mutex.lock();
|
tm_mutex.lock();
|
||||||
OnTimer();
|
OnTimer();
|
||||||
if (!tm_enable_nano)
|
if (!tm_enable_nano){
|
||||||
sleep(tm_interval);
|
sleep(tm_interval);
|
||||||
else
|
}else{
|
||||||
usleep((useconds_t)tm_interval);
|
//behavior is different on cst hardware
|
||||||
|
long corr_factor = 1;
|
||||||
|
#if ! HAVE_COOL_HARDWARE
|
||||||
|
corr_factor = 10;
|
||||||
|
#endif
|
||||||
|
int res = getSleep(tm_interval * corr_factor);
|
||||||
|
if (res != 0)
|
||||||
|
dprintf(DEBUG_NORMAL,"\033[33m[CComponentsTimer] [%s - %d] ERROR: returns [%d] \033[0m\n", __func__, __LINE__, res);
|
||||||
|
}
|
||||||
tm_mutex.unlock();
|
tm_mutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -70,6 +70,9 @@ class CComponentsTimer : public sigc::trackable
|
|||||||
OpenThreads::Mutex tm_mutex;
|
OpenThreads::Mutex tm_mutex;
|
||||||
///slot for restart signals
|
///slot for restart signals
|
||||||
sigc::slot0<bool> sl_stop_timer;
|
sigc::slot0<bool> sl_stop_timer;
|
||||||
|
|
||||||
|
///sleep generated with nanosleep
|
||||||
|
int getSleep(long miliseconds);
|
||||||
public:
|
public:
|
||||||
/**Constructor for timer class
|
/**Constructor for timer class
|
||||||
*
|
*
|
||||||
|
@@ -55,6 +55,8 @@ int main(int argc, char **argv)
|
|||||||
fp.timer_minutes_hi = fp_timer >> 8;;
|
fp.timer_minutes_hi = fp_timer >> 8;;
|
||||||
fp.timer_minutes_lo = fp_timer & 0xFF;
|
fp.timer_minutes_lo = fp_timer & 0xFF;
|
||||||
|
|
||||||
|
system("/etc/init.d/rcK");
|
||||||
|
|
||||||
fd = open("/dev/display", O_RDONLY);
|
fd = open("/dev/display", O_RDONLY);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
perror("/dev/display");
|
perror("/dev/display");
|
||||||
|
Reference in New Issue
Block a user