diff --git a/src/zapit/include/zapit/scannit.h b/src/zapit/include/zapit/scannit.h index 39e70ee37..ad0c6f182 100644 --- a/src/zapit/include/zapit/scannit.h +++ b/src/zapit/include/zapit/scannit.h @@ -42,6 +42,7 @@ class CNit : public OpenThreads::Thread bool cable; t_satellite_position satellitePosition; + t_satellite_position orbitalPosition; freq_id_t freq_id; unsigned short nid; channel_number_map_t logical_map; @@ -66,6 +67,7 @@ class CNit : public OpenThreads::Thread channel_number_map_t & getLogicalMap() { return logical_map; }; channel_number_map_t & getHDLogicalMap() { return hd_logical_map; }; std::string GetNetworkName() { return networkName; } + t_satellite_position getOrbitalPosition() { return orbitalPosition; } }; #endif diff --git a/src/zapit/src/scannit.cpp b/src/zapit/src/scannit.cpp index 756750c84..698e8ae34 100644 --- a/src/zapit/src/scannit.cpp +++ b/src/zapit/src/scannit.cpp @@ -41,6 +41,7 @@ CNit::CNit(t_satellite_position spos, freq_id_t frq, unsigned short pnid, int dn nid = pnid; dmxnum = dnum; cable = (CServiceScan::getInstance()->GetFrontend()->getInfo()->type == FE_QAM); + orbitalPosition = 0; } CNit::~CNit() @@ -108,12 +109,18 @@ bool CNit::Read() if (dmx->sectionFilter(0x10, filter, mask, flen) < 0) { delete dmx; +#ifdef DEBUG_NIT + printf("[NIT] filter failed\n"); +#endif return false; } do { if (dmx->Read(buffer, NIT_SECTION_SIZE) < 0) { delete dmx; +#ifdef DEBUG_NIT + printf("[NIT] read failed\n"); +#endif return false; } @@ -301,6 +308,9 @@ bool CNit::ParseSatelliteDescriptor(SatelliteDeliverySystemDescriptor * sd, Tran if (abs(newSat - satellitePosition) < 5) newSat = satellitePosition; + if (!orbitalPosition) + orbitalPosition = newSat; + if(satellitePosition != newSat) { printf("NIT: different satellite position: our %d nit %d (%X)\n", satellitePosition, newSat, sd->getOrbitalPosition());