mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-01 18:01:06 +02:00
Merge remote-tracking branch 'check/cst-next'
Conflicts:
src/daemonc/remotecontrol.cpp
src/gui/luainstance.cpp
src/gui/movieplayer.cpp
src/gui/videosettings.cpp
src/neutrino.cpp
src/system/setting_helpers.cpp
src/zapit/src/zapit.cpp
Origin commit data
------------------
Branch: ni/coolstream
Commit: d37b3c0f9a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2014-12-28 (Sun, 28 Dec 2014)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -174,7 +174,7 @@ const CControlAPI::TyCgiCall CControlAPI::yCgiCallList[]=
|
||||
{"gettime", &CControlAPI::GetTimeCGI, "text/plain"},
|
||||
{"info", &CControlAPI::InfoCGI, "text/plain"},
|
||||
{"version", &CControlAPI::VersionCGI, ""},
|
||||
{"reloadsetup", &CControlAPI::ReloadNutrinoSetupfCGI, ""},
|
||||
{"reloadsetup", &CControlAPI::ReloadNeutrinoSetupCGI, ""},
|
||||
{"reloadplugins", &CControlAPI::ReloadPluginsCGI, ""},
|
||||
#ifdef SCREENSHOT
|
||||
{"screenshot", &CControlAPI::ScreenshotCGI, ""},
|
||||
@@ -1563,7 +1563,7 @@ void CControlAPI::VersionCGI(CyhookHandler *hh)
|
||||
hh->SendFile("/.version");
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
void CControlAPI::ReloadNutrinoSetupfCGI(CyhookHandler *hh)
|
||||
void CControlAPI::ReloadNeutrinoSetupCGI(CyhookHandler *hh)
|
||||
{
|
||||
NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::RELOAD_SETUP, CEventServer::INITID_HTTPD);
|
||||
hh->SendOk();
|
||||
@@ -1657,13 +1657,17 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
|
||||
CSectionsdClient::LinkageDescriptorList desc;
|
||||
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
|
||||
CEitManager::getInstance()->getCurrentNextServiceKey(current_channel, currentNextInfo);
|
||||
if (CEitManager::getInstance()->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey,desc))
|
||||
|
||||
if (currentNextInfo.flags & CSectionsdClient::epgflags::current_has_linkagedescriptors &&
|
||||
CEitManager::getInstance()->getLinkageDescriptorsUniqueKey(currentNextInfo.current_uniqueKey, desc))
|
||||
{
|
||||
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(current_channel);
|
||||
t_satellite_position satellitePosition = channel->getSatellitePosition();
|
||||
for(unsigned int i=0; i< desc.size(); i++)
|
||||
{
|
||||
t_channel_id sub_channel_id =
|
||||
CREATE_CHANNEL_ID(
|
||||
desc[i].serviceId, desc[i].originalNetworkId, desc[i].transportStreamId);
|
||||
((uint64_t) ( satellitePosition >= 0 ? satellitePosition : (uint64_t)(0xF000+ abs(satellitePosition))) << 48) |
|
||||
(uint64_t) CREATE_CHANNEL_ID(desc[i].serviceId, desc[i].originalNetworkId, desc[i].transportStreamId);
|
||||
hh->printf(PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS
|
||||
" %s\n",
|
||||
sub_channel_id,
|
||||
@@ -1671,6 +1675,17 @@ void CControlAPI::ZaptoCGI(CyhookHandler *hh)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!hh->ParamList["subchannel"].empty())
|
||||
{
|
||||
extern CRemoteControl * g_RemoteControl;
|
||||
if (!g_RemoteControl->subChannels.empty())
|
||||
{
|
||||
NeutrinoAPI->ZapToSubService(hh->ParamList["subchannel"].c_str());
|
||||
hh->SendOk();
|
||||
}
|
||||
else
|
||||
hh->SendError();
|
||||
}
|
||||
else if (hh->ParamList["name"] != "")
|
||||
{
|
||||
t_channel_id channel_id;
|
||||
|
@@ -65,7 +65,6 @@ private:
|
||||
void ExecCGI(CyhookHandler *hh);
|
||||
void SystemCGI(CyhookHandler *hh);
|
||||
void StandbyCGI(CyhookHandler *hh);
|
||||
void EsoundCGI(CyhookHandler *hh);
|
||||
void RCCGI(CyhookHandler *hh);
|
||||
void GetDateCGI(CyhookHandler *hh);
|
||||
void GetTimeCGI(CyhookHandler *hh);
|
||||
@@ -83,7 +82,7 @@ private:
|
||||
void GetBouquetsCGI(CyhookHandler *hh);
|
||||
void EpgCGI(CyhookHandler *hh);
|
||||
void VersionCGI(CyhookHandler *hh);
|
||||
void ReloadNutrinoSetupfCGI(CyhookHandler *hh);
|
||||
void ReloadNeutrinoSetupCGI(CyhookHandler *hh);
|
||||
void ReloadPluginsCGI(CyhookHandler *hh);
|
||||
void ScreenshotCGI(CyhookHandler *hh);
|
||||
void ZaptoCGI(CyhookHandler *hh);
|
||||
|
@@ -563,68 +563,109 @@ std::string CNeutrinoYParser::func_get_audio_pids_as_dropdown(CyhookHandler *,
|
||||
std::string yresult;
|
||||
static bool init_iso=true;
|
||||
bool idx_as_id=true;
|
||||
|
||||
unsigned int selected_apid = 0;
|
||||
t_channel_id current_channel_id = 0;
|
||||
CZapitChannel * channel = NULL;
|
||||
if(para == "apid")
|
||||
idx_as_id=false;
|
||||
else if(!para.empty() && ("channel="== para.substr(0,8))){
|
||||
if (sscanf(para.c_str(), "channel=%llx:audio=%i:", ¤t_channel_id,&selected_apid) == 2) {
|
||||
if(current_channel_id != 0 && CZapit::getInstance()->GetCurrentChannelID() != current_channel_id){
|
||||
channel = CServiceManager::getInstance()->FindChannel(current_channel_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(init_iso)
|
||||
{
|
||||
if(_initialize_iso639_map())
|
||||
init_iso=false;
|
||||
}
|
||||
bool eit_not_ok=true;
|
||||
CZapitClient::responseGetPIDs pids;
|
||||
if (channel){//check audio pid if current_channel != vlc live channel
|
||||
//wait for channel lock
|
||||
for (int i = 0; i < 30 && channel->getAudioChannelCount()==0;i++){
|
||||
usleep(100000);
|
||||
}
|
||||
for (unsigned int i = 0; i < channel->getAudioChannelCount(); i++) {
|
||||
CZapitAudioChannel::ZapitAudioChannelType atype = channel->getAudioChannel(i)->audioChannelType;
|
||||
std::string a_desc;
|
||||
if(!(init_iso)){
|
||||
a_desc = _getISO639Description( channel->getAudioChannel(i)->description.c_str() );
|
||||
}else{
|
||||
a_desc = channel->getAudioChannel(i)->description.c_str();
|
||||
}
|
||||
if (channel->getAudioChannel(i)->audioChannelType == CZapitAudioChannel::EAC3) {
|
||||
yresult += string_printf("<option value=%05u %s>%s %s</option>\r\n",i
|
||||
, (i==selected_apid) ? "selected=\"selected\"" : ""
|
||||
, a_desc.c_str()
|
||||
,"(EAC3)");
|
||||
} else {
|
||||
yresult += string_printf("<option value=%05u %s>%s %s</option>\r\n",i
|
||||
, (i==selected_apid) ? "selected=\"selected\"" : ""
|
||||
,a_desc.c_str()
|
||||
,atype?"(AC3)":" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
if( yresult.empty()){
|
||||
bool eit_not_ok=true;
|
||||
if(current_channel_id==0)
|
||||
current_channel_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||
|
||||
CSectionsdClient::ComponentTagList tags;
|
||||
pids.PIDs.vpid=0;
|
||||
NeutrinoAPI->Zapit->getPIDS(pids);
|
||||
CZapitClient::responseGetPIDs pids;
|
||||
CSectionsdClient::ComponentTagList tags;
|
||||
pids.PIDs.vpid=0;
|
||||
NeutrinoAPI->Zapit->getPIDS(pids);
|
||||
|
||||
t_channel_id current_channel = CZapit::getInstance()->GetCurrentChannelID();
|
||||
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
|
||||
CEitManager::getInstance()->getCurrentNextServiceKey(current_channel, currentNextInfo);
|
||||
if (CEitManager::getInstance()->getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey,tags))
|
||||
{
|
||||
for (unsigned int i=0; i< tags.size(); i++)
|
||||
CSectionsdClient::responseGetCurrentNextInfoChannelID currentNextInfo;
|
||||
CEitManager::getInstance()->getCurrentNextServiceKey(current_channel_id, currentNextInfo);
|
||||
if (CEitManager::getInstance()->getComponentTagsUniqueKey(currentNextInfo.current_uniqueKey,tags))
|
||||
{
|
||||
for (unsigned short j=0; j< pids.APIDs.size(); j++)
|
||||
unsigned int tag = 0;
|
||||
for (unsigned int i=0; i< tags.size(); i++)
|
||||
{
|
||||
if ( pids.APIDs[j].component_tag == tags[i].componentTag )
|
||||
for (unsigned short j=0; j< pids.APIDs.size(); j++)
|
||||
{
|
||||
if(!tags[i].component.empty())
|
||||
if ( pids.APIDs[j].component_tag == tags[i].componentTag )
|
||||
{
|
||||
if(!(isalnum(tags[i].component[0])))
|
||||
tags[i].component=tags[i].component.substr(1,tags[i].component.length()-1);
|
||||
yresult += string_printf("<option value=%05u>%s</option>\r\n",idx_as_id ? j : pids.APIDs[j].pid,tags[i].component.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!(init_iso))
|
||||
if(!tags[i].component.empty())
|
||||
{
|
||||
strcpy( pids.APIDs[j].desc, _getISO639Description( pids.APIDs[j].desc ) );
|
||||
if(!(isalnum(tags[i].component[0])))
|
||||
tags[i].component=tags[i].component.substr(1,tags[i].component.length()-1);
|
||||
yresult += string_printf("<option value=%05u %s>%s</option>\r\n",idx_as_id ? j : pids.APIDs[j].pid,(tag==selected_apid) ? "selected=\"selected\"" : "",tags[i].component.c_str());
|
||||
tag++;
|
||||
}
|
||||
yresult += string_printf("<option value=%05u>%s %s</option>\r\n",idx_as_id ? j : pids.APIDs[j].pid,std::string(pids.APIDs[j].desc).c_str(),pids.APIDs[j].is_ac3 ? " (AC3)": pids.APIDs[j].is_aac ? "(AAC)" : pids.APIDs[j].is_eac3 ? "(EAC3)" : " ");
|
||||
else
|
||||
{
|
||||
if(!(init_iso))
|
||||
{
|
||||
strcpy( pids.APIDs[j].desc, _getISO639Description( pids.APIDs[j].desc ) );
|
||||
}
|
||||
yresult += string_printf("<option value=%05u %s>%s %s</option>\r\n",idx_as_id ? j : pids.APIDs[j].pid,(j==selected_apid) ? "selected=\"selected\"" : "",std::string(pids.APIDs[j].desc).c_str(),pids.APIDs[j].is_ac3 ? " (AC3)": pids.APIDs[j].is_aac ? "(AAC)" : pids.APIDs[j].is_eac3 ? "(EAC3)" : " ");
|
||||
}
|
||||
eit_not_ok=false;
|
||||
break;
|
||||
}
|
||||
eit_not_ok=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(eit_not_ok)
|
||||
{
|
||||
unsigned short i = 0;
|
||||
for (CZapitClient::APIDList::iterator it = pids.APIDs.begin(); it!=pids.APIDs.end(); ++it)
|
||||
if(eit_not_ok)
|
||||
{
|
||||
if(!(init_iso))
|
||||
unsigned short i = 0;
|
||||
for (CZapitClient::APIDList::iterator it = pids.APIDs.begin(); it!=pids.APIDs.end(); ++it)
|
||||
{
|
||||
strcpy( pids.APIDs[i].desc, _getISO639Description( pids.APIDs[i].desc ) );
|
||||
if(!(init_iso))
|
||||
{
|
||||
strcpy( pids.APIDs[i].desc, _getISO639Description( pids.APIDs[i].desc ) );
|
||||
}
|
||||
yresult += string_printf("<option value=%05u %s>%s %s</option>\r\n",
|
||||
idx_as_id ? i : it->pid, (i==selected_apid) ? "selected=\"selected\"" : "",pids.APIDs[i].desc,
|
||||
pids.APIDs[i].is_ac3 ? " (AC3)": pids.APIDs[i].is_aac ? "(AAC)" : pids.APIDs[i].is_eac3 ? "(EAC3)" : " ");
|
||||
i++;
|
||||
}
|
||||
yresult += string_printf("<option value=%05u>%s %s</option>\r\n",idx_as_id ? i : it->pid,pids.APIDs[i].desc,pids.APIDs[i].is_ac3 ? " (AC3)": pids.APIDs[i].is_aac ? "(AAC)" : pids.APIDs[i].is_eac3 ? "(EAC3)" : " ");
|
||||
i++;
|
||||
}
|
||||
if(pids.APIDs.empty())
|
||||
yresult = "00000"; // shouldnt happen, but print at least one apid
|
||||
}
|
||||
|
||||
if(pids.APIDs.empty())
|
||||
yresult = "00000"; // shouldnt happen, but print at least one apid
|
||||
return yresult;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user