m_chid_current = eDVBChannelID();
m_channel_state = iDVBChannel::state_idle;
+
if (fe->tune(*m_ch_current))
- {
return nextChannel();
- m_event(evtFail);
- return -EINVAL;
- }
-
+
m_event(evtUpdate);
return 0;
}
if (startSDT && (m_ready_all & readySDT))
{
m_SDT = new eTable<ServiceDescriptionSection>();
+ int tsid=-1;
if (m_ready & readyPAT && m_ready & validPAT)
{
std::vector<ProgramAssociationSection*>::const_iterator i =
m_PAT->getSections().begin();
assert(i != m_PAT->getSections().end());
- int tsid = (*i)->getTableIdExtension(); // in PAT this is the transport stream id
- if (m_SDT->start(m_demux, eDVBSDTSpec(tsid, true)))
- return -1;
+ tsid = (*i)->getTableIdExtension(); // in PAT this is the transport stream id
+
+ // KabelBW HACK ... on 618Mhz and 626Mhz the transport stream id in PAT and SDT is different
+ {
+ int type;
+ m_ch_current->getSystem(type);
+ if (type == iDVBFrontend::feCable)
+ {
+ eDVBFrontendParametersCable parm;
+ m_ch_current->getDVBC(parm);
+ if ((tsid == 0x00d7 && abs(parm.frequency-618000) < 2000) ||
+ (tsid == 0x00d8 && abs(parm.frequency-626000) < 2000))
+ tsid = -1;
+ }
+ }
}
- else if (m_SDT->start(m_demux, eDVBSDTSpec()))
+ if (tsid == -1 && m_SDT->start(m_demux, eDVBSDTSpec()))
+ return -1;
+ else if (m_SDT->start(m_demux, eDVBSDTSpec(tsid, true)))
return -1;
CONNECT(m_SDT->tableReady, eDVBScan::SDTready);
}
return m_channel->getFrontend(fe);
fe = 0;
return -1;
-}
\ No newline at end of file
+}
+
+RESULT eDVBScan::getCurrentTransponder(ePtr<iDVBFrontendParameters> &tp)
+{
+ if (m_ch_current)
+ {
+ tp = m_ch_current;
+ return 0;
+ }
+ tp = 0;
+ return -1;
+}