webtv channels integration port,

initial code (C) martii,
initial patch from jacek
This commit is contained in:
[CST] Focus
2014-08-27 17:32:26 +04:00
parent 415d516465
commit a473fe8194
49 changed files with 1000 additions and 190 deletions

View File

@@ -710,7 +710,7 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
int ChanNumYPos = BoxStartY + ChanHeight;
if (g_settings.infobar_sat_display) {
std::string name = CServiceManager::getInstance()->GetSatelliteName(satellitePosition);
std::string name = (IS_WEBTV(channel_id))? "WebTV" : CServiceManager::getInstance()->GetSatelliteName(satellitePosition);
int satNameWidth = g_SignalFont->getRenderWidth (name);
std::string satname_tmp = name;
if (satNameWidth > (ChanWidth - 4)) {
@@ -788,6 +788,17 @@ void CInfoViewer::showTitle (const int ChanNum, const std::string & Channel, con
if (fileplay) {
show_Data ();
} else if (IS_WEBTV(new_channel_id)) {
CZapitChannel * channel = CServiceManager::getInstance()->FindChannel(new_channel_id);
if (channel) {
const char *current = channel->getDesc().c_str();
const char *next = channel->getUrl().c_str();
if (!current) {
current = next;
next = "";
}
display_Info(current, next, true, false, 0, NULL, NULL, NULL, NULL, true, true);
}
} else {
show_current_next(new_chan,epgpos);
}
@@ -824,6 +835,7 @@ void CInfoViewer::setInfobarTimeout(int timeout_ext)
switch (mode)
{
case NeutrinoMessages::mode_tv:
case NeutrinoMessages::mode_webtv:
timeoutEnd = CRCInput::calcTimeoutEnd (g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] == 0 ? 0xFFFF : g_settings.timing[SNeutrinoSettings::TIMING_INFOBAR] + timeout_ext);
break;
case NeutrinoMessages::mode_radio:
@@ -1295,7 +1307,7 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
int duration = CMoviePlayerGui::getInstance().GetDuration();
snprintf(runningRest, sizeof(runningRest), "%d / %d %s", (curr_pos + 30000) / 60000, (duration - curr_pos + 30000) / 60000, unit_short_minute);
display_Info(NULL, NULL, true, false, CMoviePlayerGui::getInstance().file_prozent, NULL, runningRest);
} else {
} else if (!IS_WEBTV(channel_id)) {
show_Data( true );
}
}
@@ -1395,6 +1407,14 @@ void CInfoViewer::sendNoEpg(const t_channel_id for_channel_id)
CSectionsdClient::CurrentNextInfo CInfoViewer::getEPG (const t_channel_id for_channel_id, CSectionsdClient::CurrentNextInfo &info)
{
/* to clear the oldinfo for channels without epg, call getEPG() with for_channel_id = 0 */
if (for_channel_id == 0 || IS_WEBTV(for_channel_id))
{
oldinfo.current_uniqueKey = 0;
return info;
}
CEitManager::getInstance()->getCurrentNextServiceKey(for_channel_id, info);
//printf("CInfoViewer::getEPG: old uniqueKey %llx new %llx\n", oldinfo.current_uniqueKey, info.current_uniqueKey);