X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fdvb%2Fpmt.cpp;h=03e400522599c980f5707c153ed11cc089827d4c;hp=74f896fa11f714eaeffe891a82731810408386ff;hb=19e45c850e3abe495d3687667d825691603ac911;hpb=c98df25121ca79d08a86c5dd8d7f740953f1a4a1 diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp index 74f896f..03e4005 100644 --- a/lib/dvb/pmt.cpp +++ b/lib/dvb/pmt.cpp @@ -225,6 +225,7 @@ void saveData(int orgid, unsigned char* data, int sectionLength) #include #include +#include #define PACK_VERSION(major,minor,micro) (((major) << 16) + ((minor) << 8) + (micro)) #define UNPACK_VERSION(version,major,minor,micro) { \ major = (version)&0xff; \ @@ -254,9 +255,11 @@ void eDVBServicePMTHandler::AITready(int error) for (; i != (*it)->getApplicationInformation()->end(); ++i) { std::string hbbtvUrl = "", applicaionName = ""; - + std::string boundaryExtension = ""; + int controlCode = (*i)->getApplicationControlCode(); ApplicationIdentifier * applicationIdentifier = (*i)->getApplicationIdentifier(); + profilecode = 0; orgid = applicationIdentifier->getOrganisationId(); appid = applicationIdentifier->getApplicationId(); eDebug("found applicaions ids >> pid : %x, orgid : %d, appid : %d", m_ait_pid, orgid, appid); @@ -314,7 +317,6 @@ void eDVBServicePMTHandler::AITready(int error) for(; interactionit != transport->getInteractionTransports()->end(); ++interactionit) { hbbtvUrl = (*interactionit)->getUrlBase()->getUrl(); - if(controlCode == 1) m_HBBTVUrl = hbbtvUrl; break; } break; @@ -342,6 +344,7 @@ void eDVBServicePMTHandler::AITready(int error) char* uu = hbbtvUrl.c_str(); if(!strncmp(uu, "http://", 7) || !strncmp(uu, "dvb://", 6) || !strncmp(uu, "https://", 8)) { + if(controlCode == 1) m_HBBTVUrl = hbbtvUrl; switch(profileVersion) { case 65793: @@ -355,6 +358,25 @@ void eDVBServicePMTHandler::AITready(int error) break; } } + else if (!boundaryExtension.empty()) { + if(boundaryExtension.at(boundaryExtension.length()-1) != '/') { + boundaryExtension += "/"; + } + boundaryExtension += hbbtvUrl; + if(controlCode == 1) m_HBBTVUrl = boundaryExtension; + switch(profileVersion) + { + case 65793: + case 66049: + m_HbbTVApplications.push_back(new HbbTVApplicationInfo(controlCode, orgid, appid, boundaryExtension, applicaionName, profilecode)); + break; + case 1280: + case 65538: + default: + m_HbbTVApplications.push_back(new HbbTVApplicationInfo((-1)*controlCode, orgid, appid, boundaryExtension, applicaionName, profilecode)); + break; + } + } } } }