Merge branch 'uncool/dvbsi++' commit '9578e5da35f'

This is the last commit before the "menu hints" started.
Needs buildfixing...

Conflicts:
	configure.ac
	src/daemonc/remotecontrol.cpp
	src/daemonc/remotecontrol.h
	src/driver/audiodec/basedec.cpp
	src/driver/fb_window.cpp
	src/driver/rcinput.cpp
	src/driver/volume.cpp
	src/global.h
	src/gui/channellist.cpp
	src/gui/eventlist.cpp
	src/gui/infoviewer.cpp
	src/gui/keybind_setup.cpp
	src/gui/miscsettings_menu.cpp
	src/gui/movieplayer.cpp
	src/gui/osd_setup.cpp
	src/gui/plugins.cpp
	src/gui/scan.cpp
	src/gui/scan_setup.cpp
	src/gui/streaminfo2.cpp
	src/gui/videosettings.cpp
	src/gui/widget/buttons.cpp
	src/neutrino.cpp
	src/sectionsd/dmx.cpp
	src/sectionsd/dmxapi.cpp
	src/sectionsd/sectionsd.cpp
	src/system/setting_helpers.cpp
	src/zapit/include/zapit/client/zapittypes.h
	src/zapit/include/zapit/frontend_c.h
	src/zapit/include/zapit/satconfig.h
	src/zapit/include/zapit/scan.h
	src/zapit/lib/zapitclient.cpp
	src/zapit/src/Makefile.am
	src/zapit/src/frontend.cpp
	src/zapit/src/getservices.cpp
	src/zapit/src/pmt.cpp
	src/zapit/src/scan.cpp
	src/zapit/src/sdt.cpp
	src/zapit/src/zapit.cpp


Origin commit data
------------------
Commit: ae1b98aa38
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2012-07-22 (Sun, 22 Jul 2012)
This commit is contained in:
Stefan Seyfried
2012-07-22 14:09:43 +02:00
354 changed files with 17604 additions and 32020 deletions

View File

@@ -1,6 +1,8 @@
AM_CPPFLAGS = -fno-rtti -fno-exceptions
INCLUDES = \
-I$(top_builddir) \
-I$(top_srcdir) \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/src/zapit/include \
-I$(top_srcdir)/src \

View File

@@ -138,7 +138,7 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh)
void CControlAPI::compatibility_Timer(CyhookHandler *hh)
{
log_level_printf(4,"CControlAPI Compatibility Timer Start url:%s\n",hh->UrlData["url"].c_str());
if(NeutrinoAPI->Timerd->isTimerdAvailable() && hh->ParamList.size() > 0)
if(NeutrinoAPI->Timerd->isTimerdAvailable() && !hh->ParamList.empty() )
{
if(hh->ParamList["action"] == "remove")
{
@@ -241,7 +241,7 @@ void CControlAPI::Execute(CyhookHandler *hh)
{
dprintf("Execute CGI : %s\n",filename.c_str());
for(CStringList::iterator it = hh->ParamList.begin() ;
it != hh->ParamList.end() ; it++)
it != hh->ParamList.end() ; ++it)
dprintf(" Parameter %s : %s\n",it->first.c_str(), it->second.c_str());
}
@@ -394,7 +394,7 @@ void CControlAPI::ExecCGI(CyhookHandler *hh)
hh->SetHeader(HTTP_OK, "text/xml; charset=UTF-8");
else
hh->SetHeader(HTTP_OK, "text/plain; charset=UTF-8");
if (hh->ParamList.size() > 0)
if ( !hh->ParamList.empty() )
{
script = hh->ParamList["1"];
unsigned int len = hh->ParamList.size();
@@ -761,6 +761,7 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh) {
hh->SendError();
return;
}
#if 0
unsigned int repeat = 1;
unsigned int delay = 250;
if (hh->ParamList["delay"] != "")
@@ -769,7 +770,7 @@ void CControlAPI::RCEmCGI(CyhookHandler *hh) {
repeat = atoi(hh->ParamList["duration"].c_str()) * 1000 / delay;
if (hh->ParamList["repeat"] != "")
repeat = atoi(hh->ParamList["repeat"].c_str());
#endif
int evd = open(EVENTDEV, O_RDWR);
if (evd < 0) {
hh->SendError();
@@ -1210,7 +1211,7 @@ std::string CControlAPI::channelEPGformated(CyhookHandler *hh, int bouquetnr, t_
int i = 0;
CChannelEventList::iterator eventIterator;
bool isFirstLine = true;
for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); eventIterator++, i++) {
for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); ++eventIterator, i++) {
if ((max != -1 && i >= max) || (stoptime != -1 && eventIterator->startTime >= stoptime))
break;
std::string prog = "";
@@ -1418,7 +1419,7 @@ void CControlAPI::EpgCGI(CyhookHandler *hh) {
sscanf(hh->ParamList["id"].c_str(), SCANF_CHANNEL_ID_TYPE, &channel_id);
sectionsd_getEventsServiceKey(channel_id, NeutrinoAPI->eList);
CChannelEventList::iterator eventIterator;
for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); eventIterator++) {
for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); ++eventIterator) {
CShortEPGData epg;
if (sectionsd_getEPGidShort(eventIterator->eventID, &epg)) {
hh->printf("%llu %ld %d\n", eventIterator->eventID, eventIterator->startTime, eventIterator->duration);
@@ -1519,7 +1520,7 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
for(unsigned int i=0; i< desc.size(); i++)
{
t_channel_id sub_channel_id =
CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
CREATE_CHANNEL_ID(
desc[i].serviceId, desc[i].originalNetworkId, desc[i].transportStreamId);
hh->printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
" %s\n",
@@ -1587,11 +1588,11 @@ void CControlAPI::LCDAction(CyhookHandler *hh)
//-------------------------------------------------------------------------
void CControlAPI::SendEventList(CyhookHandler *hh, t_channel_id channel_id)
{
int pos;
int pos = 0;
sectionsd_getEventsServiceKey(channel_id, NeutrinoAPI->eList);
CChannelEventList::iterator eventIterator;
for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); eventIterator++, pos++)
for (eventIterator = NeutrinoAPI->eList.begin(); eventIterator != NeutrinoAPI->eList.end(); ++eventIterator, pos++)
hh->printf("%llu %ld %d %s\n", eventIterator->eventID, eventIterator->startTime, eventIterator->duration, eventIterator->description.c_str());
}
@@ -1685,7 +1686,7 @@ void CControlAPI::SendAllCurrentVAPid(CyhookHandler *hh)
if(eit_not_ok)
{
unsigned short i = 0;
for (CZapitClient::APIDList::iterator it = pids.APIDs.begin(); it!=pids.APIDs.end(); it++)
for (CZapitClient::APIDList::iterator it = pids.APIDs.begin(); it!=pids.APIDs.end(); ++it)
{
if(!(init_iso))
{
@@ -1718,7 +1719,7 @@ void CControlAPI::SendTimers(CyhookHandler *hh)
CTimerd::TimerList::iterator timer = timerlist.begin();
for(; timer != timerlist.end(); timer++)
for(; timer != timerlist.end(); ++timer)
{
// Add Data
char zAddData[22+1] = { 0 };
@@ -1736,7 +1737,8 @@ void CControlAPI::SendTimers(CyhookHandler *hh)
{
strncpy(zAddData, NeutrinoAPI->GetServiceName(timer->channel_id).c_str(), 22);
if (zAddData[0] == 0)
strcpy(zAddData, NeutrinoAPI->Zapit->isChannelTVChannel(timer->channel_id) ? "Unknown TV-Channel" : "Unknown Radio-Channel");
strcpy(zAddData, CServiceManager::getInstance()->IsChannelTVChannel(timer->channel_id) ?
"Unknown TV-Channel" : "Unknown Radio-Channel");
}
else
sprintf(zAddData, PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timer->channel_id);
@@ -1800,7 +1802,7 @@ void CControlAPI::SendTimersXML(CyhookHandler *hh)
sort(timerlist.begin(), timerlist.end()); // sort timer
CTimerd::TimerList::iterator timer = timerlist.begin();
std::string xml_response = "";
// std::string xml_response = "";
hh->SetHeader(HTTP_OK, "text/xml; charset=UTF-8");
hh->WriteLn("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
hh->WriteLn("<timer>\n");
@@ -1819,7 +1821,7 @@ void CControlAPI::SendTimersXML(CyhookHandler *hh)
// start timer list
hh->WriteLn("\t<timer_list>\n");
for(; timer != timerlist.end(); timer++)
for(; timer != timerlist.end(); ++timer)
{
hh->WriteLn("\t\t<timer>\n");
hh->printf("\t\t\t<type>%s</type>\n",(NeutrinoAPI->timerEventType2Str(timer->eventType)).c_str());
@@ -1894,14 +1896,13 @@ void CControlAPI::SendTimersXML(CyhookHandler *hh)
// channel infos
std::string channel_name = NeutrinoAPI->GetServiceName(timer->channel_id);
if (channel_name.empty())
channel_name = NeutrinoAPI->Zapit->isChannelTVChannel(timer->channel_id) ? "Unknown TV-Channel" : "Unknown Radio-Channel";
channel_name = CServiceManager::getInstance()->IsChannelTVChannel(timer->channel_id) ? "Unknown TV-Channel" : "Unknown Radio-Channel";
// epg title
std::string title = timer->epgTitle;
if(timer->epgID!=0) {
CSectionsdClient sdc;
CEPGData epgdata;
if (sdc.getEPGid(timer->epgID, timer->epg_starttime, &epgdata))
if (sectionsd_getEPGid(timer->epgID, timer->epg_starttime, &epgdata))
title = epgdata.title;
}
@@ -2328,7 +2329,7 @@ void CControlAPI::doNewTimer(CyhookHandler *hh)
real_alarmTimeT -= pre;
}
for(; timer != timerlist.end(); timer++)
for(; timer != timerlist.end(); ++timer)
if(timer->alarmTime == real_alarmTimeT)
{
NeutrinoAPI->Timerd->removeTimerEvent(timer->eventID);
@@ -2438,7 +2439,7 @@ void CControlAPI::changeBouquetCGI(CyhookHandler *hh)
CZapitClient::BouquetChannelList BChannelList;
NeutrinoAPI->Zapit->getBouquetChannels(selected - 1, BChannelList, CZapitClient::MODE_CURRENT, true);
CZapitClient::BouquetChannelList::iterator channels = BChannelList.begin();
for(; channels != BChannelList.end(); channels++)
for(; channels != BChannelList.end(); ++channels)
{
NeutrinoAPI->Zapit->removeChannelFromBouquet(selected - 1, channels->channel_id);
}
@@ -2619,7 +2620,7 @@ void CControlAPI::ConfigCGI(CyhookHandler *hh) {
if (load) { // get and output list
conf = Config->getConfigDataMap();
ConfigDataMap::iterator it, end, start;
for (start = conf.begin(), it=start, end = conf.end(); it != end; it++) {
for (start = conf.begin(), it=start, end = conf.end(); it != end; ++it) {
std::string key = it->first;
replace(key, ".", "_dot_");
replace(key, "-", "_bind_");
@@ -2635,7 +2636,7 @@ void CControlAPI::ConfigCGI(CyhookHandler *hh) {
}
}
else { // set values and save list
for (CStringList::iterator it = hh->ParamList.begin(); it != hh->ParamList.end(); it++) {
for (CStringList::iterator it = hh->ParamList.begin(); it != hh->ParamList.end(); ++it) {
std::string key = it->first;
replace(key, "_dot_", ".");
replace(key, "_bind_", "-");

View File

@@ -11,6 +11,7 @@
// C
#include <cstdlib>
#include <cstring>
#include <unistd.h>
// C++
#include <string>
@@ -35,7 +36,7 @@
#include <dmx.h>
#include <zapit/satconfig.h>
#include <zapit/client/zapitclient.h>
#include <zapit/channel.h>
#include <zapit/zapit.h>
#include <zapit/bouquets.h>
#include <zapit/getservices.h>
@@ -183,7 +184,7 @@ void CNeutrinoAPI::ZapToChannelId(t_channel_id channel_id)
}
if (Zapit->zapTo_serviceID(channel_id) != CZapitClient::ZAP_INVALID_PARAM)
Sectionsd->setServiceChanged(channel_id&0xFFFFFFFFFFFFULL, false);
Sectionsd->setServiceChanged(channel_id, false);
}
//-------------------------------------------------------------------------
@@ -196,7 +197,7 @@ void CNeutrinoAPI::ZapToSubService(const char * const target)
&channel_id);
if (Zapit->zapTo_subServiceID(channel_id) != CZapitClient::ZAP_INVALID_PARAM)
Sectionsd->setServiceChanged(channel_id&0xFFFFFFFFFFFFULL, false);
Sectionsd->setServiceChanged(channel_id, false);
}
//-------------------------------------------------------------------------
t_channel_id CNeutrinoAPI::ChannelNameToChannelId(std::string search_channel_name)
@@ -222,7 +223,7 @@ t_channel_id CNeutrinoAPI::ChannelNameToChannelId(std::string search_channel_nam
bool CNeutrinoAPI::GetStreamInfo(int bitInfo[10])
{
char *key, *tmpptr, buf[100];
char /* *key,*/ *tmpptr, buf[100];
long value;
int pos = 0;
@@ -243,7 +244,7 @@ bool CNeutrinoAPI::GetStreamInfo(int bitInfo[10])
{
buf[strlen(buf)-1]=0;
tmpptr=buf;
key=strsep(&tmpptr,":");
//key=strsep(&tmpptr,":");
value=strtoul(tmpptr,NULL,0);
bitInfo[pos]= value;
pos++;
@@ -457,15 +458,20 @@ std::string CNeutrinoAPI::getAudioInfoAsString(void) {
//-------------------------------------------------------------------------
std::string CNeutrinoAPI::getCryptInfoAsString(void) {
extern int pmt_caids[4][11];
unsigned short i,j;
unsigned short i;
std::stringstream out;
std::string casys[11]={"Irdeto:","Betacrypt:","Seca:","Viaccess:","Nagra:","Conax: ","Cryptoworks:","Videoguard:","EBU:","XCrypt:","PowerVU:"};
for(i=0;i<4;i++){
for(j=0;j<11;j++){
if(pmt_caids[i][j]){
out << casys[j] << hex << pmt_caids[i][j]<< "\n";
}
std::string casys[11]= {"Irdeto:","Betacrypt:","Seca:","Viaccess:","Nagra:","Conax: ","Cryptoworks:","Videoguard:","EBU:","XCrypt:","PowerVU:"};
int caids[] = { 0x600, 0x1700, 0x0100, 0x0500, 0x1800, 0xB00, 0xD00, 0x900, 0x2600, 0x4a00, 0x0E00 };
CZapitChannel * channel = CZapit::getInstance()->GetCurrentChannel();
if(channel) {
for (i = 0; i < 11; i++) {
for(casys_map_iterator_t it = channel->camap.begin(); it != channel->camap.end(); ++it) {
int caid = (*it) & 0xFF00;
if(caid == caids[i])
out << casys[i] << hex << (*it) << "\n";
}
}
}
return out.str();

View File

@@ -38,6 +38,7 @@ bool sectionsd_getNVODTimesServiceKey(const t_channel_id uniqueServiceKey, CSect
void sectionsd_getCurrentNextServiceKey(t_channel_id uniqueServiceKey, CSectionsdClient::responseGetCurrentNextInfoChannelID& current_next );
bool sectionsd_getComponentTagsUniqueKey(const event_id_t uniqueKey, CSectionsdClient::ComponentTagList& tags);
bool sectionsd_getActualEPGServiceKey(const t_channel_id uniqueServiceKey, CEPGData * epgdata);
bool sectionsd_getEPGid(const event_id_t epgID, const time_t startzeit, CEPGData * epgdata);
//=============================================================================
// Constructor & Destructor & Initialization
//=============================================================================
@@ -96,7 +97,8 @@ THandleStatus CNeutrinoYParser::Hook_ReadConfig(CConfigFile *Config, CStringList
Config->setInt32("configfile.version", CONF_VERSION);
Config->saveConfig(HTTPD_CONFIGFILE);
}
std::string logo = ConfigList["TUXBOX_LOGOS_URL"];
//std::string logo =
ConfigList["TUXBOX_LOGOS_URL"];
return HANDLED_CONTINUE;
}
@@ -398,7 +400,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
{
CZapitClient::subServiceList subServiceList;
for (CSectionsdClient::NVODTimesList::iterator ni = nvod_list.begin(); ni != nvod_list.end(); ni++)
for (CSectionsdClient::NVODTimesList::iterator ni = nvod_list.begin(); ni != nvod_list.end(); ++ni)
{
CZapitClient::commandAddSubServices cmd;
CEPGData epg;
@@ -408,7 +410,7 @@ std::string CNeutrinoYParser::func_get_bouquets_with_epg(CyhookHandler *hh, std:
cmd.service_id = ntohs(ni->service_id);
cmd.transport_stream_id = ntohs(ni->transport_stream_id);
t_channel_id channel_id = CREATE_CHANNEL_ID_FROM_SERVICE_ORIGINALNETWORK_TRANSPORTSTREAM_ID(cmd.service_id, cmd.original_network_id, cmd.transport_stream_id);
t_channel_id channel_id = CREATE_CHANNEL_ID(cmd.service_id, cmd.original_network_id, cmd.transport_stream_id);
timestr = timeString(ni->zeit.startzeit); // FIXME: time is wrong (at least on little endian)!
sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epg); // FIXME: der scheissendreck geht nit!!!
@@ -577,7 +579,7 @@ std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler *,
if(eit_not_ok)
{
unsigned short i = 0;
for (CZapitClient::APIDList::iterator it = pids.APIDs.begin(); it!=pids.APIDs.end(); it++)
for (CZapitClient::APIDList::iterator it = pids.APIDs.begin(); it!=pids.APIDs.end(); ++it)
{
if(!(init_iso))
{
@@ -743,7 +745,7 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler *, std::string
int i = 1;
char classname= 'a';
CTimerd::TimerList::iterator timer = timerlist.begin();
for(; timer != timerlist.end();timer++)
for(; timer != timerlist.end();++timer)
{
classname = (i++&1)?'a':'b';
@@ -781,7 +783,7 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler *, std::string
{
sAddData = NeutrinoAPI->GetServiceName(timer->channel_id);
if (sAddData.empty())
sAddData = NeutrinoAPI->Zapit->isChannelTVChannel(timer->channel_id) ? "Unknown TV-Channel" : "Unknown Radio-Channel";
sAddData = CServiceManager::getInstance()->IsChannelTVChannel(timer->channel_id) ? "Unknown TV-Channel" : "Unknown Radio-Channel";
if( timer->apids != TIMERD_APIDS_CONF)
{
@@ -808,9 +810,8 @@ std::string CNeutrinoYParser::func_get_timer_list(CyhookHandler *, std::string
}
if(timer->epgID!=0)
{
CSectionsdClient sdc;
CEPGData epgdata;
if (sdc.getEPGid(timer->epgID, timer->epg_starttime, &epgdata))
if (sectionsd_getEPGid(timer->epgID, timer->epg_starttime, &epgdata))
sAddData+="<br/>" + epgdata.title;
else
sAddData+=std::string("<br/>")+timer->epgTitle;

View File

@@ -110,7 +110,7 @@ THandleStatus CControlAPI::Hook_SendResponse(CyhookHandler *hh)
void CControlAPI::compatibility_Timer(CyhookHandler *hh)
{
log_level_printf(4,"CControlAPI Compatibility Timer Start url:%s\n",hh->UrlData["url"].c_str());
if(NeutrinoAPI->Timerd->isTimerdAvailable() && hh->ParamList.size() > 0)
if(NeutrinoAPI->Timerd->isTimerdAvailable() && !hh->ParamList.empty() )
{
if(hh->ParamList["action"] == "remove")
{
@@ -353,7 +353,7 @@ void CControlAPI::ExecCGI(CyhookHandler *hh)
hh->SetHeader(HTTP_OK, "text/xml; charset=UTF-8");
else
hh->SetHeader(HTTP_OK, "text/plain; charset=UTF-8");
if (hh->ParamList.size() > 0)
if ( !hh->ParamList.empty() )
{
script = hh->ParamList["1"];
unsigned int len = hh->ParamList.size();