mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-31 09:21:18 +02:00
zapit/src/scannit.cpp: remember first seen position from satellite descriptor
This commit is contained in:
@@ -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
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user