X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/aef6f8e1b1f0dd1e69c79932e5e712cf03e05cdd..85c657f6b19abcc0c33bde1e308f969b1f1dee55:/lib/dvb/scan.cpp diff --git a/lib/dvb/scan.cpp b/lib/dvb/scan.cpp index 2a08bf79..379ab8e9 100644 --- a/lib/dvb/scan.cpp +++ b/lib/dvb/scan.cpp @@ -40,6 +40,8 @@ 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: @@ -205,7 +207,7 @@ RESULT eDVBScan::startFilter() if (m_ready_all & readyPAT) { m_PAT = new eTable(m_scan_debug); - if (m_PAT->start(m_demux, eDVBPATSpec())) + if (m_PAT->start(m_demux, eDVBPATSpec(4000))) return -1; CONNECT(m_PAT->tableReady, eDVBScan::PATready); } @@ -376,7 +378,7 @@ void eDVBScan::PMTready(int err) } if (m_pmt_in_progress != m_pmts_to_read.end()) - m_PMT->start(m_demux, eDVBPMTSpec(m_pmt_in_progress->second.pmtPid, m_pmt_in_progress->first)); + m_PMT->start(m_demux, eDVBPMTSpec(m_pmt_in_progress->second.pmtPid, m_pmt_in_progress->first, 4000)); else { m_PMT = 0; @@ -738,11 +740,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: @@ -758,12 +769,13 @@ void eDVBScan::channelDone() SCAN_eDebug("name '%s', provider_name '%s'", sname, pname); service->m_service_name = convertDVBUTF8(sname); service->genSortName(); - service->m_provider_name = pname; + service->m_provider_name = convertDVBUTF8(pname); } 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 +932,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 +1064,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) {