Merge branch 'check/next-cc'

Compiles on most platforms, starts. Not really tested.

Conflicts:
	acinclude.m4
	lib/libdvbsub/Makefile.am
	lib/libtriple/Makefile.am
	lib/libtuxtxt/Makefile.am
	src/Makefile.am
	src/create_rcsim_h.sh
	src/daemonc/Makefile.am
	src/driver/Makefile.am
	src/driver/audiodec/Makefile.am
	src/driver/pictureviewer/Makefile.am
	src/eitd/Makefile.am
	src/gui/Makefile.am
	src/gui/bouquetlist.cpp
	src/gui/channellist.cpp
	src/gui/scan_setup.cpp
	src/gui/streaminfo2.cpp
	src/gui/streaminfo2.h
	src/gui/update.cpp
	src/gui/widget/Makefile.am
	src/gui/widget/listbox.cpp
	src/neutrino.cpp
	src/nhttpd/tuxboxapi/coolstream/Makefile.am
	src/rcsim.c
	src/system/Makefile.am
	src/zapit/src/Makefile.am
	src/zapit/src/frontend.cpp
	src/zapit/src/zapit.cpp


Origin commit data
------------------
Branch: ni/coolstream
Commit: d244a5991a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-10-21 (Mon, 21 Oct 2013)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-10-21 22:58:55 +02:00
186 changed files with 12758 additions and 2268 deletions

View File

@@ -75,8 +75,6 @@
#include <eitd/sectionsd.h>
#include <video.h>
extern CBouquetList * bouquetList; /* neutrino.cpp */
extern CRemoteControl * g_RemoteControl; /* neutrino.cpp */
extern CPictureViewer * g_PicViewer;
@@ -88,13 +86,13 @@ extern CBouquetList * RADIObouquetList;
extern CBouquetList * RADIOsatList;
extern CBouquetList * RADIOfavList;
extern CBouquetList * RADIOallList;
extern CBouquetList * AllFavBouquetList;
extern bool autoshift;
extern CBouquetManager *g_bouquetManager;
extern int old_b_id;
extern cVideo * videoDecoder;
static CComponentsFrmClock *headerClock = NULL;
static int headerClockWidth = 0;
@@ -122,7 +120,9 @@ CChannelList::CChannelList(const char * const pName, bool phistoryMode, bool _vl
previous_channellist_additional = -1;
eventFont = SNeutrinoSettings::FONT_TYPE_CHANNELLIST_EVENT;
dline = NULL;
cc_minitv = NULL;
logo_off = 0;
pig_on_win = false;
//printf("************ NEW LIST %s : %x\n", name.c_str(), (int) this);fflush(stdout);
}
@@ -131,6 +131,8 @@ CChannelList::~CChannelList()
//printf("************ DELETE LIST %s : %x\n", name.c_str(), this);fflush(stdout);
chanlist.clear();
delete dline;
if (cc_minitv)
delete cc_minitv;
if (headerClock) {
headerClock->Stop();
if (headerClock->isPainted())
@@ -277,7 +279,9 @@ CZapitChannel* CChannelList::getChannel(t_channel_id channel_id)
int CChannelList::getKey(int id)
{
return chanlist[id]->number;
if (id > -1 && id < (int)chanlist.size())
return chanlist[id]->number;
return 0;
}
static const std::string empty_string;
@@ -294,8 +298,7 @@ t_satellite_position CChannelList::getActiveSatellitePosition(void) const
{
if (selected < chanlist.size())
return chanlist[selected]->getSatellitePosition();
else
return 0;
return 0;
}
t_channel_id CChannelList::getActiveChannel_ChannelID(void) const
@@ -309,7 +312,6 @@ t_channel_id CChannelList::getActiveChannel_ChannelID(void) const
int CChannelList::getActiveChannelNumber(void) const
{
//return (selected + 1);
if (selected < chanlist.size())
return chanlist[selected]->number;
return 0;
@@ -367,6 +369,9 @@ int CChannelList::doChannelMenu(void)
bool reset_enabled = chanlist[selected]->flags & CZapitChannel::NEW;
menu->addItem(new CMenuForwarder(LOCALE_CHANNELLIST_RESET_FLAGS, reset_enabled, NULL, selector, cnt, CRCInput::convertDigitToKey(shortcut++)), old_selected == i++);
snprintf(cnt, sizeof(cnt), "%d", i);
bool reset_all = (name == g_Locale->getText(LOCALE_BOUQUETNAME_NEW));
menu->addItem(new CMenuForwarder(LOCALE_CHANNELLIST_RESET_ALL, reset_all, NULL, selector, cnt, CRCInput::convertDigitToKey(shortcut++)), old_selected == i++);
snprintf(cnt, sizeof(cnt), "%d", i);
menu->addItem(new CMenuSeparator(CMenuSeparator::LINE));
menu->addItem(new CMenuForwarder(LOCALE_MAINMENU_SETTINGS, true, NULL, selector, cnt, CRCInput::convertDigitToKey(shortcut++)), old_selected == i++);
menu->exec(NULL, "");
@@ -424,6 +429,7 @@ int CChannelList::doChannelMenu(void)
break;
case 2: // add to
#if 0
/* default to favorites list, it makes no sense to add to autogenerated bouquets */
if (CNeutrinoApp::getInstance()->GetChannelMode() != LIST_MODE_FAV)
CNeutrinoApp::getInstance()->SetChannelMode(LIST_MODE_FAV);
@@ -431,6 +437,7 @@ int CChannelList::doChannelMenu(void)
do {
bouquet_id = bouquetList->exec(false);
} while(bouquet_id == -3);
bouquet_id = bouquetList->exec(false);
hide();
if(bouquet_id < 0)
return 0;
@@ -439,6 +446,16 @@ int CChannelList::doChannelMenu(void)
bouquet_id = g_bouquetManager->existsUBouquet(g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME), true);
else
bouquet_id = g_bouquetManager->existsBouquet(bouquetList->Bouquets[bouquet_id]->channelList->getName());
#endif
bouquet_id = AllFavBouquetList->exec(false);
hide();
if(bouquet_id < 0)
return 0;
if(!strcmp(AllFavBouquetList->Bouquets[bouquet_id]->channelList->getName(), g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME)))
bouquet_id = g_bouquetManager->existsUBouquet(g_Locale->getText(LOCALE_FAVORITES_BOUQUETNAME), true);
else
bouquet_id = g_bouquetManager->existsUBouquet(AllFavBouquetList->Bouquets[bouquet_id]->channelList->getName());
if (bouquet_id == -1)
return 0;
@@ -460,13 +477,20 @@ int CChannelList::doChannelMenu(void)
break;
case 4: // reset new
chanlist[selected]->flags &= ~CZapitChannel::NEW;
chanlist[selected]->flags = CZapitChannel::UPDATED;
CServiceManager::getInstance()->SetServicesChanged(true);
/* if make_new_list == ON, signal to re-init services */
if(g_settings.make_new_list)
return 2;
break;
case 5: // settings
case 5: // reset all new
for (unsigned int j = 0 ; j < chanlist.size(); j++) {
chanlist[j]->flags = CZapitChannel::UPDATED;
}
if (g_settings.make_new_list)
return 2;
break;
case 6: // settings
{
previous_channellist_additional = g_settings.channellist_additional;
COsdSetup osd_setup;
@@ -502,7 +526,7 @@ int CChannelList::exec()
void CChannelList::calcSize()
{
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, name.c_str());
CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8 /*, name.c_str()*/);
// recalculate theight, fheight and footerHeight for a possilble change of fontsize factor
theight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getHeight();
@@ -513,8 +537,10 @@ void CChannelList::calcSize()
fheight = 1; /* avoid div-by-zero crash on invalid font */
footerHeight = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight()+6;
pig_on_win = ( (g_settings.channellist_additional == 2) /* with miniTV */ && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) );
// calculate width
full_width = frameBuffer->getScreenWidthRel();
full_width = pig_on_win ? (frameBuffer->getScreenWidth()-2*ConnectLineBox_Width) : frameBuffer->getScreenWidthRel();
if (g_settings.channellist_additional)
width = full_width / 3 * 2;
else
@@ -526,7 +552,8 @@ void CChannelList::calcSize()
// calculate height (the infobox below mainbox is handled outside height)
info_height = 2*fheight + fdescrheight + 10;
height = frameBuffer->getScreenHeightRel() - info_height;
height = pig_on_win ? frameBuffer->getScreenHeight(): frameBuffer->getScreenHeightRel();
height = height - info_height;
// calculate x position
x = getScreenStartX(full_width);
@@ -549,7 +576,7 @@ void CChannelList::calcSize()
// calculate width/height of right info_zone and pip-box
infozone_width = full_width - width;
pig_width = infozone_width;
if ( (g_settings.channellist_additional == 2) /* with miniTV */ && (CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_ts) )
if ( pig_on_win /* with miniTV */ )
pig_height = (pig_width * 9) / 16;
else
pig_height = 0;
@@ -986,7 +1013,9 @@ void CChannelList::hide()
{
if ((g_settings.channellist_additional == 2) || (previous_channellist_additional == 2)) // with miniTV
{
videoDecoder->Pig(-1, -1, -1, -1);
if (cc_minitv)
delete cc_minitv;
cc_minitv = NULL;
}
if (headerClock) {
headerClock->Stop();
@@ -1099,7 +1128,7 @@ bool CChannelList::adjustToChannelID(const t_channel_id channel_id, bool bToo)
printf("CChannelList::adjustToChannelID me %p [%s] list size %d channel_id %" PRIx64 "\n", this, getName(), (int)chanlist.size(), channel_id);
for (i = 0; i < chanlist.size(); i++) {
if(chanlist[i] == NULL) {
printf("CChannelList::adjustToChannelID REPORT BUG !! ******************************** %d is NULL !!\n", i);
printf("CChannelList::adjustToChannelID REPORT BUG !! ******************************** %u is NULL !!\n", i);
continue;
}
if (chanlist[i]->channel_id == channel_id) {
@@ -1623,7 +1652,7 @@ void CChannelList::paintDetails(int index)
int noch = (p_event->startTime + p_event->duration - time(NULL)) / 60;
if ((noch< 0) || (noch>=10000))
noch= 0;
snprintf(cNoch, sizeof(cNoch), "(%d / %d min)", seit, noch);
snprintf(cNoch, sizeof(cNoch), "(%u / %d min)", seit, noch);
}
int seit_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cSeit, true); // UTF-8
int noch_len = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_DESCR]->getRenderWidth(cNoch, true); // UTF-8
@@ -1687,11 +1716,12 @@ void CChannelList::paintDetails(int index)
g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST]->RenderString(x+ 10, y+ height+ 5+ 2*fheight +fdescrheight, full_width - 30, desc.c_str(), COL_MENUCONTENTDARK_TEXT, 0, true);
}
else if( !displayNext && g_settings.channellist_foot == 1) { // next Event
char buf[128] = {0};
char cFrom[50] = {0}; // UTF-8
CSectionsdClient::CurrentNextInfo CurrentNext;
CEitManager::getInstance()->getCurrentNextServiceKey(chanlist[index]->channel_id, CurrentNext);
if (!CurrentNext.next_name.empty()) {
char buf[128] = {0};
char cFrom[50] = {0}; // UTF-8
struct tm *pStartZeit = localtime (& CurrentNext.next_zeit.startzeit);
snprintf(cFrom, sizeof(cFrom), "%s %02d:%02d",g_Locale->getText(LOCALE_WORD_FROM),pStartZeit->tm_hour, pStartZeit->tm_min );
snprintf(buf, sizeof(buf), "%s", CurrentNext.next_name.c_str());
@@ -1868,7 +1898,6 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
bool iscurrent = true;
bool paintbuttons = false;
unsigned int curr = liststart + pos;
int rec_mode;
fb_pixel_t c_rad_small = 0;
#if 0
if(CNeutrinoApp::getInstance()->recordingstatus && !autoshift && curr < chanlist.size()) {
@@ -1886,12 +1915,18 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
paintDetails(curr);
c_rad_small = RADIUS_LARGE;
paintbuttons = true;
}
else if (getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber() && new_zap_mode != 2/*active*/)
{
color = !displayNext ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT;
bgcolor = !displayNext ? COL_MENUCONTENT_PLUS_1 : COL_MENUCONTENTINACTIVE_PLUS_0;
c_rad_small = RADIUS_LARGE;
} else {
color = iscurrent ? COL_MENUCONTENT_TEXT : COL_MENUCONTENTINACTIVE_TEXT;
bgcolor = iscurrent ? COL_MENUCONTENT_PLUS_0 : COL_MENUCONTENTINACTIVE_PLUS_0;
}
if(!firstpaint || (curr == selected)){
if(!firstpaint || (curr == selected) || getKey(curr) == CNeutrinoApp::getInstance()->channelList->getActiveChannelNumber()){
frameBuffer->paintBoxRel(x,ypos, width- 15, fheight, bgcolor, c_rad_small);
}
@@ -1903,7 +1938,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
int title_offset=0;
fb_pixel_t tcolor=(liststart + pos == selected) ? color : COL_MENUCONTENTINACTIVE_TEXT;
int xtheight=fheight-2;
int rec_mode;
if(g_settings.channellist_extended)
{
prg_offset = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("00:00");
@@ -1968,7 +2003,7 @@ void CChannelList::paintItem(int pos, const bool firstpaint)
#endif
//calculating icons
int icon_x = (x+width-15-2) - RADIUS_LARGE/2;
int r_icon_w=0; int s_icon_h=0; int s_icon_w=0;
int r_icon_w; int s_icon_h=0; int s_icon_w=0;
frameBuffer->getIconSize(NEUTRINO_ICON_SCRAMBLED, &s_icon_w, &s_icon_h);
r_icon_w = ChannelList_Rec;
int r_icon_x = icon_x;
@@ -2097,8 +2132,7 @@ void CChannelList::paintHead()
}
headerClock->setClockFont(g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]);
headerClock->setCornerRadius(RADIUS_LARGE);
headerClock->setCornerType(CORNER_TOP_RIGHT);
headerClock->setCorner(RADIUS_LARGE, CORNER_TOP_RIGHT);
headerClock->setYPos(y);
headerClock->setHeight(theight);
headerClock->setTextColor(COL_MENUHEAD_TEXT);
@@ -2122,24 +2156,8 @@ void CChannelList::paint()
liststart = (selected/listmaxshow)*listmaxshow;
updateEvents(this->historyMode ? 0:liststart, this->historyMode ? 0:(liststart + listmaxshow));
if (g_settings.channellist_additional == 2) // with miniTV
{
// paint box for miniTV again - important!
frameBuffer->paintBoxFrame(x+width, y+theight , pig_width, pig_height, 10, COL_MENUCONTENT_PLUS_0, 0);
// 5px offset - same value as in list below
#if 0
/* focus: its possible now to scale video with still image, but on nevis
artifacts possible on SD osd */
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
#else
if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_tv) {
paint_pig(x+width+5, y+theight+5, pig_width-10, pig_height-10);
}
else if(CNeutrinoApp::getInstance()->getMode() == NeutrinoMessages::mode_radio) {
g_PicViewer->DisplayImage(DATADIR "/neutrino/icons/radiomode.jpg", x+width+5, y+theight+5, pig_width-10, pig_height-10, frameBuffer->TM_NONE);
}
#endif
}
if (pig_on_win) // with miniTV
paintPig(x+width, y+theight, pig_width, pig_height);
// paint background for main box
frameBuffer->paintBoxRel(x, y+theight, width, height-footerHeight-theight, COL_MENUCONTENT_PLUS_0);
@@ -2232,11 +2250,18 @@ std::string CChannelList::MaxChanNr()
return maxchansize;
}
void CChannelList::paint_pig (int _x, int _y, int w, int h)
void CChannelList::paintPig (int _x, int _y, int w, int h)
{
frameBuffer->paintBackgroundBoxRel (_x, _y, w, h);
//printf("CChannelList::paint_pig x %d y %d w %d h %d osd_w %d osd_w %d\n", _x, _y, w, h, frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
videoDecoder->Pig(_x, _y, w, h, frameBuffer->getScreenWidth(true), frameBuffer->getScreenHeight(true));
//init minitv object with basic properties
if (cc_minitv == NULL){
cc_minitv = new CComponentsPIP (0, 0);
cc_minitv->setPicture(NEUTRINO_ICON_AUDIOPLAY);
cc_minitv->setFrameThickness(5);
}
//set changeable minitv properties
cc_minitv->setDimensionsAll(_x, _y, w, h);
cc_minitv->setColorFrame(COL_MENUCONTENT_PLUS_0);
cc_minitv->paint(false);
}
void CChannelList::paint_events(int index)
@@ -2284,11 +2309,10 @@ void CChannelList::paint_events(int index)
//Display the remaining events
if ((y+ theight+ pig_height + i*ffheight) < (y+ theight+ pig_height + infozone_height))
{
bool first = false;
fb_pixel_t color = COL_MENUCONTENTDARK_TEXT;
if (e->eventID)
{
first = (i == 1);
bool first = (i == 1);
if ((first && g_settings.colored_events_channellist == 1 /* current */) || (!first && g_settings.colored_events_channellist == 2 /* next */))
color = COL_COLORED_EVENTS_TEXT;
struct tm *tmStartZeit = localtime(&e->startTime);
@@ -2336,8 +2360,7 @@ void CChannelList::showdescription(int index)
{
ffheight = g_Font[eventFont]->getHeight();
CZapitChannel* chan = chanlist[index];
CChannelEvent *p_event=NULL;
p_event = &chan->currentEvent;
CChannelEvent *p_event = &chan->currentEvent;
epgData.info2.clear();
epgText.clear();
CEitManager::getInstance()->getEPGid(p_event->eventID, p_event->startTime, &epgData);