rename CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID to CREATE_TRANSPONDER_ID64

This commit is contained in:
[CST] Focus
2012-04-10 15:17:48 +04:00
parent e3620121bb
commit 094fd3c0b5
7 changed files with 15 additions and 11 deletions

View File

@@ -196,7 +196,7 @@ class CZapitChannel
unsigned char getServiceType(bool real=false);
bool isHD();
t_channel_id getChannelID(void) const { return channel_id; }
transponder_id_t getTransponderId(void) const { return CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(freq, satellitePosition,original_network_id,transport_stream_id); }
transponder_id_t getTransponderId(void) const { return CREATE_TRANSPONDER_ID64(freq, satellitePosition,original_network_id,transport_stream_id); }
freq_id_t getFreqId() const { return freq; }

View File

@@ -52,8 +52,12 @@ typedef uint64_t t_channel_id;
#define SCANF_CHANNEL_ID_TYPE "%llx"
typedef uint64_t transponder_id_t;
#if 0
#define CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(freq, satellitePosition,original_network_id,transport_stream_id) \
( ((uint64_t)freq << 48) | ((uint64_t) ( satellitePosition >= 0 ? satellitePosition : (uint64_t)(0xF000+ abs(satellitePosition))) << 32) | ((uint64_t)transport_stream_id << 16) | (uint64_t)original_network_id)
#endif
#define CREATE_TRANSPONDER_ID64(freq, satellitePosition,original_network_id,transport_stream_id) \
( ((uint64_t)freq << 48) | ((uint64_t) ( satellitePosition >= 0 ? satellitePosition : (uint64_t)(0xF000+ abs(satellitePosition))) << 32) | ((uint64_t)transport_stream_id << 16) | (uint64_t)original_network_id)
#define GET_TRANSPORT_STREAM_ID_FROM_CHANNEL_ID(channel_id) ((t_transport_stream_id)((channel_id) >> 32))
#define GET_ORIGINAL_NETWORK_ID_FROM_CHANNEL_ID(channel_id) ((t_original_network_id)((channel_id) >> 16))

View File

@@ -476,7 +476,7 @@ bool CServiceScan::ParseFnt(unsigned short pid, unsigned short operator_id)
process_satellite_delivery_system_descriptor(buffer + pos2, &feparams, &polarization, &satellitePosition);
freq = feparams.frequency / 1000;
TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(freq, satellitePosition, original_network_id, transport_stream_id);
TsidOnid = CREATE_TRANSPONDER_ID64(freq, satellitePosition, original_network_id, transport_stream_id);
stI = transponders.find(TsidOnid);
if(stI == transponders.end()) {
transponders.insert (

View File

@@ -326,7 +326,7 @@ void CServiceManager::ParseTransponders(xmlNodePtr node, t_satellite_position sa
freq = feparams.frequency/1000;
}
transponder_id_t tid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(freq, satellitePosition,original_network_id,transport_stream_id);
transponder_id_t tid = CREATE_TRANSPONDER_ID64(freq, satellitePosition,original_network_id,transport_stream_id);
pair<map<transponder_id_t, transponder>::iterator,bool> ret;
ret = transponders.insert (
@@ -494,7 +494,7 @@ void CServiceManager::ParseSatTransponders(fe_type_t fType, xmlNodePtr search, t
}
transponder_id_t tid =
CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
CREATE_TRANSPONDER_ID64(
freq /*feparams.frequency/1000*/, satellitePosition, fake_nid, fake_tid);
polarization &= 1;

View File

@@ -175,7 +175,7 @@ bool CServiceScan::AddTransponder(transponder_id_t TsidOnid, FrontendParameters
satellitePosition = -satellitePosition;
freq1++;
TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
TsidOnid = CREATE_TRANSPONDER_ID64(
freq1, satellitePosition, original_network_id, transport_stream_id);
printf("[scan] AddTransponder: SAME freq %d pol1 %d pol2 %d tpid %llx\n", feparams->frequency, poltmp1, poltmp2, TsidOnid);
feparams->frequency = feparams->frequency+1000;
@@ -309,7 +309,7 @@ _repeat:
nit.Parse();
#endif
TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
TsidOnid = CREATE_TRANSPONDER_ID64(
freq /*tI->second.feparams.frequency/1000*/, satellitePosition, tI->second.original_network_id,
tI->second.transport_stream_id);
@@ -434,7 +434,7 @@ bool CServiceScan::AddTransponder(xmlNodePtr transponder, uint8_t diseqc_pos, t_
feparams.u.qpsk.fec_inner = (fe_code_rate_t) xml_fec;
}
fake_tid++; fake_nid++;
AddTransponder(CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(freq, satellitePosition, fake_nid, fake_tid),
AddTransponder(CREATE_TRANSPONDER_ID64(freq, satellitePosition, fake_nid, fake_tid),
&feparams, polarization);
return true;
}
@@ -714,7 +714,7 @@ bool CServiceScan::ScanTransponder()
/* read network information table */
fake_tid++; fake_nid++;
AddTransponder(
CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(freq, satellitePosition, fake_nid, fake_tid),
CREATE_TRANSPONDER_ID64(freq, satellitePosition, fake_nid, fake_tid),
&TP->feparams, TP->polarization);
ReadNitSdt(satellitePosition);

View File

@@ -309,7 +309,7 @@ bool CNit::ParseSatelliteDescriptor(SatelliteDeliverySystemDescriptor * sd, Tran
feparams.frequency = (int) 1000 * (int) round ((double) feparams.frequency / (double) 1000);
freq_id_t freq = feparams.frequency / 1000;
transponder_id_t TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
transponder_id_t TsidOnid = CREATE_TRANSPONDER_ID64(
freq, satellitePosition, tsinfo->getTransportStreamId(), tsinfo->getOriginalNetworkId());
CServiceScan::getInstance()->AddTransponder(TsidOnid, &feparams, polarization, true);
@@ -334,7 +334,7 @@ bool CNit::ParseCableDescriptor(CableDeliverySystemDescriptor * sd, TransportStr
feparams.frequency /= 1000;
freq_id_t freq = feparams.frequency / 1000;
transponder_id_t TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
transponder_id_t TsidOnid = CREATE_TRANSPONDER_ID64(
freq, satellitePosition, tsinfo->getTransportStreamId(), tsinfo->getOriginalNetworkId());
CServiceScan::getInstance()->AddTransponder(TsidOnid, &feparams, 0, true);

View File

@@ -163,7 +163,7 @@ bool CSdt::Parse(t_transport_stream_id &tsid, t_original_network_id &onid)
original_network_id = sdt->getOriginalNetworkId();
if(!current && !updated) {
updated = true;
transponder_id_t tpid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
transponder_id_t tpid = CREATE_TRANSPONDER_ID64(
freq_id, satellitePosition, original_network_id, transport_stream_id);
ZapitChannelList satChannelList;
CServiceManager::getInstance()->GetAllTransponderChannels(satChannelList, tpid);