mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-02 18:31:12 +02:00
zapit scan.cpp: replace parse_nit with new CNit class
Origin commit data
------------------
Branch: ni/coolstream
Commit: 59f31f3568
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-01-20 (Fri, 20 Jan 2012)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -26,14 +26,13 @@
|
|||||||
|
|
||||||
#include <zapit/client/zapitclient.h>
|
#include <zapit/client/zapitclient.h>
|
||||||
#include <zapit/debug.h>
|
#include <zapit/debug.h>
|
||||||
#include <zapit/nit.h>
|
|
||||||
#include <zapit/scan.h>
|
#include <zapit/scan.h>
|
||||||
#include <zapit/sdt.h>
|
|
||||||
#include <zapit/settings.h>
|
#include <zapit/settings.h>
|
||||||
#include <zapit/satconfig.h>
|
#include <zapit/satconfig.h>
|
||||||
#include <zapit/zapit.h>
|
#include <zapit/zapit.h>
|
||||||
#include <xmlinterface.h>
|
#include <xmlinterface.h>
|
||||||
#include <zapit/scansdt.h>
|
#include <zapit/scansdt.h>
|
||||||
|
#include <zapit/scannit.h>
|
||||||
|
|
||||||
#define NIT_THREAD
|
#define NIT_THREAD
|
||||||
|
|
||||||
@@ -263,43 +262,27 @@ _repeat:
|
|||||||
else
|
else
|
||||||
freq = tI->second.feparams.frequency/1000;
|
freq = tI->second.feparams.frequency/1000;
|
||||||
|
|
||||||
|
CNit nit(satellitePosition, freq, cable_nid);
|
||||||
#ifdef NIT_THREAD
|
#ifdef NIT_THREAD
|
||||||
pthread_t nthread;
|
|
||||||
nit_thread_args_t threadArgs(satellitePosition, freq, cable_nid);
|
|
||||||
if(scan_nit)
|
if(scan_nit)
|
||||||
if(pthread_create(&nthread, 0, nit_thread, (void*)&threadArgs)) {
|
nit.Start();
|
||||||
ERROR("pthread_create");
|
|
||||||
nthread = 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
//INFO("parsing SDT (tsid:onid %04x:%04x)", tI->second.transport_stream_id, tI->second.original_network_id);
|
|
||||||
#if 0
|
|
||||||
int status = parse_sdt(&tI->second.transport_stream_id, &tI->second.original_network_id, satellitePosition, freq /*tI->second.feparams.frequency/1000*/);
|
|
||||||
if(status < 0) {
|
|
||||||
printf("[scan] SDT failed !\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CSdt sdt(satellitePosition, freq);
|
CSdt sdt(satellitePosition, freq);
|
||||||
bool sdt_parsed = sdt.Parse(tI->second.transport_stream_id, tI->second.original_network_id);
|
bool sdt_parsed = sdt.Parse(tI->second.transport_stream_id, tI->second.original_network_id);
|
||||||
|
|
||||||
#ifdef NIT_THREAD
|
#ifdef NIT_THREAD
|
||||||
if(scan_nit && nthread) {
|
if(scan_nit)
|
||||||
if(pthread_join(nthread, NULL))
|
nit.Stop();
|
||||||
perror("pthread_join !!!!!!!!!");
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if(scan_nit) {
|
|
||||||
printf("[scan] trying to parse NIT\n");
|
|
||||||
int status = parse_nit(satellitePosition, freq /*tI->second.feparams.frequency/1000*/);
|
|
||||||
if(status < 0)
|
|
||||||
printf("[scan] NIT failed !\n");
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
if(!sdt_parsed) {
|
if(!sdt_parsed) {
|
||||||
printf("[scan] SDT failed !\n");
|
printf("[scan] SDT failed !\n");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
#ifndef NIT_THREAD
|
||||||
|
if(scan_nit)
|
||||||
|
nit.Parse();
|
||||||
|
#endif
|
||||||
|
|
||||||
TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
|
TsidOnid = CREATE_TRANSPONDER_ID_FROM_SATELLITEPOSITION_ORIGINALNETWORK_TRANSPORTSTREAM_ID(
|
||||||
freq /*tI->second.feparams.frequency/1000*/, satellitePosition, tI->second.original_network_id,
|
freq /*tI->second.feparams.frequency/1000*/, satellitePosition, tI->second.original_network_id,
|
||||||
|
Reference in New Issue
Block a user