X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a34ef895210161a8820e96829ac87806566e7858..c5bb99fa2019da12a8fbaa1766189af520b9e79a:/lib/dvb/scan.cpp diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index 71893f95..0948c503 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -40,10 +40,14 @@ int eDVBScan::isValidONIDTSID(int orbital_position, eOriginalNetworkID onid, eTr case 0: case 0x1111: return 0; + case 0x13E: // workaround for 11258H and 11470V on hotbird with same ONID/TSID (0x13E/0x578) + return orbital_position != 130 || tsid != 0x578; case 1: return orbital_position == 192; case 0x00B1: return tsid != 0x00B0; + case 0x00eb: + return tsid != 0x4321; case 0x0002: return abs(orbital_position-282) < 6; default: @@ -135,7 +139,7 @@ RESULT eDVBScan::nextChannel() RESULT eDVBScan::startFilter() { bool startSDT=true; - assert(m_demux); + ASSERT(m_demux); /* only start required filters filter */ @@ -161,7 +165,7 @@ RESULT eDVBScan::startFilter() { std::vector::const_iterator i = m_PAT->getSections().begin(); - assert(i != m_PAT->getSections().end()); + ASSERT(i != m_PAT->getSections().end()); tsid = (*i)->getTableIdExtension(); // in PAT this is the transport stream id m_pat_tsid = eTransportStreamID(tsid); for (; i != m_PAT->getSections().end(); ++i) @@ -738,11 +742,20 @@ void eDVBScan::channelDone() } case iDVBFrontend::feTerrestrial: { + ePtr fe; eDVBFrontendParametersTerrestrial parm; m_ch_current->getDVBT(parm); snprintf(sname, 255, "%d SID 0x%02x", parm.frequency/1000, m_pmt_in_progress->first); + if (!m_channel->getFrontend(fe)) + { + ePyObject tp_dict = PyDict_New(); + fe->getTransponderData(tp_dict, false); + m_corrected_frequencys[m_chid_current] = + PyInt_AsLong(PyDict_GetItemString(tp_dict, "frequency")); + Py_DECREF(tp_dict); + } break; } case iDVBFrontend::feCable: @@ -763,7 +776,8 @@ void eDVBScan::channelDone() if (!(m_flags & scanOnlyFree) || !m_pmt_in_progress->second.scrambled) { SCAN_eDebug("add not scrambled!"); - std::pair >::iterator, bool> i = m_new_services.insert(std::pair >(ref, service)); + std::pair >::iterator, bool> i = + m_new_services.insert(std::pair >(ref, service)); if (i.second) { m_last_service = i.first; @@ -920,6 +934,24 @@ void eDVBScan::insertInto(iDVBChannelList *db, bool dontRemoveOldFlags) for (std::map >::const_iterator ch(m_new_channels.begin()); ch != m_new_channels.end(); ++ch) { + int system; + ch->second->getSystem(system); + if (system == iDVBFrontend::feTerrestrial) + { + std::map::iterator it = m_corrected_frequencys.find(ch->first); + if (it != m_corrected_frequencys.end()) + { + eDVBFrontendParameters *p = (eDVBFrontendParameters*)&(*ch->second); + eDVBFrontendParametersTerrestrial parm; + p->getDVBT(parm); + eDebug("corrected freq for tsid %04x, onid %04x, ns %08x is %d, old was %d", + ch->first.transport_stream_id.get(), ch->first.original_network_id.get(), + ch->first.dvbnamespace.get(), it->second, parm.frequency); + parm.frequency = it->second; + p->setDVBT(parm); + m_corrected_frequencys.erase(it); + } + } if (m_flags & scanOnlyFree) { eDVBFrontendParameters *ptr = (eDVBFrontendParameters*)&(*ch->second); @@ -1034,7 +1066,8 @@ RESULT eDVBScan::processSDT(eDVBNamespace dvbnamespace, const ServiceDescription } } - std::pair >::iterator, bool> i = m_new_services.insert(std::pair >(ref, service)); + std::pair >::iterator, bool> i = + m_new_services.insert(std::pair >(ref, service)); if (i.second) {