mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
Merge remote-tracking branch 'check/cst-next'
Origin commit data
------------------
Branch: ni/coolstream
Commit: 22dd798325
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2015-02-25 (Wed, 25 Feb 2015)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -196,7 +196,9 @@ extern void cnxtfb_register_evnt_clbk(cnxtfb_notify pfnotify);
|
|||||||
#define FB_TEST_HW_ACCELERATION
|
#define FB_TEST_HW_ACCELERATION
|
||||||
|
|
||||||
#define FBIOGET_CNXTFBHANDLE 0x4620
|
#define FBIOGET_CNXTFBHANDLE 0x4620
|
||||||
|
#ifndef FBIO_WAITFORVSYNC
|
||||||
#define FBIO_WAITFORVSYNC 0x4621
|
#define FBIO_WAITFORVSYNC 0x4621
|
||||||
|
#endif
|
||||||
#define FBIO_STARTDISPLAY 0x4622
|
#define FBIO_STARTDISPLAY 0x4622
|
||||||
#define FBIO_STOPDISPLAY 0x4623
|
#define FBIO_STOPDISPLAY 0x4623
|
||||||
#define FBIO_SETBLENDMODE 0x4624
|
#define FBIO_SETBLENDMODE 0x4624
|
||||||
|
@@ -1099,10 +1099,25 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in
|
|||||||
//printf("paintIcon: error while loading icon: %s\n", newname.c_str());
|
//printf("paintIcon: error while loading icon: %s\n", newname.c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
read(lfd, &header, sizeof(struct rawHeader));
|
|
||||||
|
ssize_t s = read(lfd, &header, sizeof(struct rawHeader));
|
||||||
|
if (s < 0) {
|
||||||
|
perror("read");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (s < (ssize_t) sizeof(rawHeader)){
|
||||||
|
printf("paintIcon: error while loading icon: %s, header too small\n", newname.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
tmpIcon.width = width = (header.width_hi << 8) | header.width_lo;
|
tmpIcon.width = width = (header.width_hi << 8) | header.width_lo;
|
||||||
tmpIcon.height = height = (header.height_hi << 8) | header.height_lo;
|
tmpIcon.height = height = (header.height_hi << 8) | header.height_lo;
|
||||||
|
if (!width || !height) {
|
||||||
|
printf("paintIcon: error while loading icon: %s, wrong dimensions (%dHx%dW)\n", newname.c_str(), height, width);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int dsize = width*height*sizeof(fb_pixel_t);
|
int dsize = width*height*sizeof(fb_pixel_t);
|
||||||
|
|
||||||
@@ -1810,7 +1825,15 @@ void * CFrameBuffer::int_convertRGB2FB(unsigned char *rgbbuff, unsigned long x,
|
|||||||
{
|
{
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
unsigned int *fbbuff;
|
unsigned int *fbbuff;
|
||||||
unsigned long count = x * y;
|
unsigned long count;
|
||||||
|
|
||||||
|
if (!x || !y) {
|
||||||
|
printf("convertRGB2FB%s: Error: invalid dimensions (%luX x %luY)\n",
|
||||||
|
((alpha) ? " (Alpha)" : ""), x, y);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
count = x * y;
|
||||||
|
|
||||||
fbbuff = (unsigned int *) cs_malloc_uncached(count * sizeof(unsigned int));
|
fbbuff = (unsigned int *) cs_malloc_uncached(count * sizeof(unsigned int));
|
||||||
if(fbbuff == NULL) {
|
if(fbbuff == NULL) {
|
||||||
|
@@ -562,11 +562,10 @@ _done:
|
|||||||
write_indexxml_footer(indexfile);
|
write_indexxml_footer(indexfile);
|
||||||
fclose(indexfile);
|
fclose(indexfile);
|
||||||
|
|
||||||
printf("[sectionsd] Writing Information finished\n");
|
|
||||||
|
|
||||||
filename = (std::string)epgdir + "/index.xml";
|
filename = (std::string)epgdir + "/index.xml";
|
||||||
|
|
||||||
rename(tmpname.c_str(), filename.c_str());
|
rename(tmpname.c_str(), filename.c_str());
|
||||||
|
|
||||||
|
sync();
|
||||||
|
printf("[sectionsd] Writing Information finished\n");
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
@@ -101,6 +101,7 @@ CUserMenu::~CUserMenu()
|
|||||||
bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
||||||
{
|
{
|
||||||
int button = -1;
|
int button = -1;
|
||||||
|
int dummy = 0;
|
||||||
unsigned ums = g_settings.usermenu.size();
|
unsigned ums = g_settings.usermenu.size();
|
||||||
for (unsigned int i = 0; i < ums; i++)
|
for (unsigned int i = 0; i < ums; i++)
|
||||||
if (g_settings.usermenu[i]->key == msg) {
|
if (g_settings.usermenu[i]->key == msg) {
|
||||||
@@ -236,7 +237,7 @@ bool CUserMenu::showUserMenu(neutrino_msg_t msg)
|
|||||||
break;
|
break;
|
||||||
case SNeutrinoSettings::ITEM_EPG_MISC:
|
case SNeutrinoSettings::ITEM_EPG_MISC:
|
||||||
{
|
{
|
||||||
int dummy = g_Sectionsd->getIsScanningActive();
|
dummy = g_Sectionsd->getIsScanningActive();
|
||||||
keyhelper.get(&key,&icon);
|
keyhelper.get(&key,&icon);
|
||||||
// new CMenuOptionChooser(LOCALE_VIDEOMENU_VIDEOMODE, &g_settings.video_Mode, VIDEOMENU_VIDEOMODE_OPTIONS, VIDEOMENU_VIDEOMODE_OPTION_COUNT, true, this, CRCInput::RC_nokey, "", true);
|
// new CMenuOptionChooser(LOCALE_VIDEOMENU_VIDEOMODE, &g_settings.video_Mode, VIDEOMENU_VIDEOMODE_OPTIONS, VIDEOMENU_VIDEOMODE_OPTION_COUNT, true, this, CRCInput::RC_nokey, "", true);
|
||||||
menu_item = new CMenuOptionChooser(LOCALE_MAINMENU_PAUSESECTIONSD, &dummy, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this , key, icon );
|
menu_item = new CMenuOptionChooser(LOCALE_MAINMENU_PAUSESECTIONSD, &dummy, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, this , key, icon );
|
||||||
|
@@ -227,7 +227,7 @@ t_channel_id CNeutrinoAPI::ChannelNameToChannelId(std::string search_channel_nam
|
|||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// Get functions
|
// Get functions
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
#if 0 /* unused funktion*/
|
||||||
bool CNeutrinoAPI::GetStreamInfo(int bitInfo[10])
|
bool CNeutrinoAPI::GetStreamInfo(int bitInfo[10])
|
||||||
{
|
{
|
||||||
char /* *key,*/ *tmpptr, buf[100];
|
char /* *key,*/ *tmpptr, buf[100];
|
||||||
@@ -261,7 +261,7 @@ bool CNeutrinoAPI::GetStreamInfo(int bitInfo[10])
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
bool CNeutrinoAPI::GetChannelEvents(void)
|
bool CNeutrinoAPI::GetChannelEvents(void)
|
||||||
|
@@ -53,7 +53,9 @@ class CNeutrinoAPI
|
|||||||
|
|
||||||
// get functions to collect data
|
// get functions to collect data
|
||||||
bool GetChannelEvents(void);
|
bool GetChannelEvents(void);
|
||||||
|
#if 0 /* unused funktion*/
|
||||||
bool GetStreamInfo(int bitinfo[10]);
|
bool GetStreamInfo(int bitinfo[10]);
|
||||||
|
#endif
|
||||||
std::string GetServiceName(t_channel_id channel_id);
|
std::string GetServiceName(t_channel_id channel_id);
|
||||||
CZapitClient::BouquetChannelList *GetBouquet(unsigned int BouquetNr, int Mode);
|
CZapitClient::BouquetChannelList *GetBouquet(unsigned int BouquetNr, int Mode);
|
||||||
CZapitClient::BouquetChannelList *GetChannelList(int Mode);
|
CZapitClient::BouquetChannelList *GetChannelList(int Mode);
|
||||||
|
@@ -165,7 +165,7 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
|
|||||||
int globalProgressBegin = 0;
|
int globalProgressBegin = 0;
|
||||||
|
|
||||||
if(g_settings.epg_save)
|
if(g_settings.epg_save)
|
||||||
CNeutrinoApp::getInstance()->saveEpg(false);
|
CNeutrinoApp::getInstance()->saveEpg(true);
|
||||||
|
|
||||||
if(statusViewer)
|
if(statusViewer)
|
||||||
statusViewer->showLocalStatus(0);
|
statusViewer->showLocalStatus(0);
|
||||||
|
@@ -62,8 +62,11 @@ void *cSysLoad::Run(void *arg)
|
|||||||
while (getline(in, line)) {
|
while (getline(in, line)) {
|
||||||
unsigned long _stat_user, _stat_nice, _stat_system, _stat_idle;
|
unsigned long _stat_user, _stat_nice, _stat_system, _stat_idle;
|
||||||
if (4 == sscanf(line.c_str(), "cpu %lu %lu %lu %lu", &_stat_user, &_stat_nice, &_stat_system, &_stat_idle)) {
|
if (4 == sscanf(line.c_str(), "cpu %lu %lu %lu %lu", &_stat_user, &_stat_nice, &_stat_system, &_stat_idle)) {
|
||||||
|
unsigned long _stat_total = _stat_user + _stat_nice + _stat_system + _stat_idle;
|
||||||
if (stat_total) {
|
if (stat_total) {
|
||||||
unsigned long div = _stat_user + _stat_nice + _stat_system + _stat_idle - stat_total;
|
unsigned long div = _stat_total - stat_total;
|
||||||
|
if (!div) // prevent division by zero if previous stat_total is equal to new.
|
||||||
|
break;
|
||||||
caller->data_last = (int)(1000 - 1000 * (_stat_idle - stat_idle) / div);
|
caller->data_last = (int)(1000 - 1000 * (_stat_idle - stat_idle) / div);
|
||||||
if (caller->data_avail < caller->data_size) {
|
if (caller->data_avail < caller->data_size) {
|
||||||
caller->data[caller->data_avail++] = caller->data_last;
|
caller->data[caller->data_avail++] = caller->data_last;
|
||||||
@@ -73,7 +76,7 @@ void *cSysLoad::Run(void *arg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stat_idle = _stat_idle;
|
stat_idle = _stat_idle;
|
||||||
stat_total = _stat_user + _stat_nice + _stat_system + _stat_idle;
|
stat_total = _stat_total;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user