mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
descriptors: use new pat/pmt classes;
use CServiceScan API to get frontend;
Origin commit data
------------------
Branch: ni/coolstream
Commit: 985a14dfc0
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-01-13 (Fri, 13 Jan 2012)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -251,7 +251,8 @@ int satellite_delivery_system_descriptor(const unsigned char * const buffer, t_t
|
|||||||
transponder_id_t TsidOnid;
|
transponder_id_t TsidOnid;
|
||||||
int modulationSystem, modulationType, rollOff, fec_inner;
|
int modulationSystem, modulationType, rollOff, fec_inner;
|
||||||
|
|
||||||
if (CFrontend::getInstance()->getInfo()->type != FE_QPSK)
|
CFrontend * frontend = CServiceScan::getInstance()->GetFrontend();
|
||||||
|
if (frontend->getInfo()->type != FE_QPSK)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
feparams.frequency =
|
feparams.frequency =
|
||||||
@@ -315,7 +316,8 @@ int satellite_delivery_system_descriptor(const unsigned char * const buffer, t_t
|
|||||||
int cable_delivery_system_descriptor(const unsigned char * const buffer, t_transport_stream_id transport_stream_id, t_original_network_id original_network_id, t_satellite_position satellitePosition, freq_id_t freq)
|
int cable_delivery_system_descriptor(const unsigned char * const buffer, t_transport_stream_id transport_stream_id, t_original_network_id original_network_id, t_satellite_position satellitePosition, freq_id_t freq)
|
||||||
{
|
{
|
||||||
transponder_id_t TsidOnid;
|
transponder_id_t TsidOnid;
|
||||||
if (CFrontend::getInstance()->getInfo()->type != FE_QAM)
|
CFrontend * frontend = CServiceScan::getInstance()->GetFrontend();
|
||||||
|
if (frontend->getInfo()->type != FE_QAM)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
FrontendParameters feparams;
|
FrontendParameters feparams;
|
||||||
@@ -442,6 +444,9 @@ void service_descriptor(const unsigned char * const buffer, const t_service_id s
|
|||||||
CZapitChannel *channel = NULL;
|
CZapitChannel *channel = NULL;
|
||||||
bool tpchange = false;
|
bool tpchange = false;
|
||||||
static transponder_id_t last_tpid = 0;
|
static transponder_id_t last_tpid = 0;
|
||||||
|
|
||||||
|
static CPat pat;
|
||||||
|
|
||||||
//scrambled
|
//scrambled
|
||||||
if(free_ca && scan_fta_flag){
|
if(free_ca && scan_fta_flag){
|
||||||
return;
|
return;
|
||||||
@@ -624,7 +629,8 @@ void service_descriptor(const unsigned char * const buffer, const t_service_id s
|
|||||||
CZapitBouquet* bouquet;
|
CZapitBouquet* bouquet;
|
||||||
int bouquetId;
|
int bouquetId;
|
||||||
char pname[100];
|
char pname[100];
|
||||||
if (CFrontend::getInstance()->getInfo()->type == FE_QPSK)
|
CFrontend * frontend = CServiceScan::getInstance()->GetFrontend();
|
||||||
|
if (frontend->getInfo()->type == FE_QPSK)
|
||||||
snprintf(pname, 100, "[%c%03d.%d] %s", satellitePosition > 0? 'E' : 'W', abs(satellitePosition)/10, abs(satellitePosition)%10, providerName.c_str());
|
snprintf(pname, 100, "[%c%03d.%d] %s", satellitePosition > 0? 'E' : 'W', abs(satellitePosition)/10, abs(satellitePosition)%10, providerName.c_str());
|
||||||
else
|
else
|
||||||
snprintf(pname, 100, "%s", providerName.c_str());
|
snprintf(pname, 100, "%s", providerName.c_str());
|
||||||
@@ -654,10 +660,14 @@ void service_descriptor(const unsigned char * const buffer, const t_service_id s
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if(CZapit::getInstance()->scanPids()) {
|
if(CZapit::getInstance()->scanPids()) {
|
||||||
if(tpchange)
|
if(tpchange) {
|
||||||
parse_pat();
|
//parse_pat();
|
||||||
|
pat.Reset();
|
||||||
|
pat.Parse();
|
||||||
|
}
|
||||||
|
|
||||||
channel->resetPids();
|
channel->resetPids();
|
||||||
|
#if 0
|
||||||
if(!pat_get_pmt_pid(channel)) {
|
if(!pat_get_pmt_pid(channel)) {
|
||||||
if(!parse_pmt(channel)) {
|
if(!parse_pmt(channel)) {
|
||||||
//if(channel->getPreAudioPid() == 0 && channel->getVideoPid() == 0)
|
//if(channel->getPreAudioPid() == 0 && channel->getVideoPid() == 0)
|
||||||
@@ -667,6 +677,15 @@ void service_descriptor(const unsigned char * const buffer, const t_service_id s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
if(pat.Parse(channel)) {
|
||||||
|
CPmt pmt;
|
||||||
|
if(!pmt.parse_pmt(channel)) {
|
||||||
|
if ((channel->getPreAudioPid() != 0) || (channel->getVideoPid() != 0)) {
|
||||||
|
channel->setPidsFlag();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(service_type == ST_DIGITAL_TELEVISION_SERVICE && !channel->scrambled) {
|
if(service_type == ST_DIGITAL_TELEVISION_SERVICE && !channel->scrambled) {
|
||||||
CZapit::getInstance()->SetCurrentChannelID(channel->getChannelID());
|
CZapit::getInstance()->SetCurrentChannelID(channel->getChannelID());
|
||||||
@@ -851,11 +870,12 @@ void subtitling_descriptor(const unsigned char * const)
|
|||||||
/* 0x5A */
|
/* 0x5A */
|
||||||
int terrestrial_delivery_system_descriptor(const unsigned char * const)
|
int terrestrial_delivery_system_descriptor(const unsigned char * const)
|
||||||
{
|
{
|
||||||
if (CFrontend::getInstance()->getInfo()->type != FE_OFDM)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
/* TODO */
|
/* TODO */
|
||||||
|
#if 0
|
||||||
|
CFrontend * frontend = CServiceScan::getInstance()->GetFrontend();
|
||||||
|
if (frontend->getInfo()->type != FE_OFDM)
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user