How to get a notification of a completed transponder scan?
Commit Message
Thomas Bergwinkl wrote:
> I think, I found my mistake.
> There was also a problem with scanning transponders without tv/radio
> channels. The attached patch for filter.[hc] should solve these
> problems.
Added statistics and doesn't care for Setup.UpdateChannels
Bye
Comments
Luca Olivetti wrote:
>
> Thomas Bergwinkl wrote:
>
> > I think, I found my mistake.
> > There was also a problem with scanning transponders without tv/radio
> > channels. The attached patch for filter.[hc] should solve these
> > problems.
>
> Added statistics and doesn't care for Setup.UpdateChannels
>
Sorry, was this a question (why filter.[hc] doesn't care for
Setup.UpdateChannels) or just a info (that you do no longer care for
Setup.UpdateChannels in your plugin)?
Thomas
Thomas Bergwinkl wrote:
> Luca Olivetti wrote:
[...]
>>
>>Added statistics and doesn't care for Setup.UpdateChannels
>>
>
>
> Sorry, was this a question (why filter.[hc] doesn't care for
> Setup.UpdateChannels) or just a info (that you do no longer care for
> Setup.UpdateChannels in your plugin)?
the latter.
Bye
@@ -458,6 +458,9 @@
// --- cSdtFilter ------------------------------------------------------------
+int SdtFilter::channelsFound = 0;
+int SdtFilter::newFound = 0;
+
SdtFilter::SdtFilter(PatFilter *PatFilter)
{
patFilter = PatFilter;
@@ -509,9 +512,9 @@
char *pp = compactspace(ProviderNameBuf);
sid[numSid++]=SiSdtService.getServiceId();
if (channel) {
+ channelsFound++;
channel->SetId(sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId(),channel->Rid());
- if (Setup.UpdateChannels >= 1)
- channel->SetName(pn, ps, pp);
+ channel->SetName(pn, ps, pp);
// Using SiSdtService.getFreeCaMode() is no good, because some
// tv stations set this flag even for non-encrypted channels :-(
// The special value 0xFFFF was supposed to mean "unknown encryption"
@@ -519,6 +522,8 @@
// channel->SetCa(SiSdtService.getFreeCaMode() ? 0xFFFF : 0);
}
else if (*pn) {
+ channelsFound++;
+ newFound++;
channel = Channels.NewChannel(Channel(), pn, ps, pp, sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
patFilter->Trigger();
}
@@ -527,12 +532,14 @@
}
break;
case SI::NVODReferenceDescriptorTag: {
+ channelsFound++;
SI::NVODReferenceDescriptor *nrd = (SI::NVODReferenceDescriptor *)d;
SI::NVODReferenceDescriptor::Service Service;
for (SI::Loop::Iterator it; nrd->serviceLoop.getNext(Service, it); ) {
cChannel *link = Channels.GetByChannelID(tChannelID(Source(), Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId()));
sid[numSid++]=SiSdtService.getServiceId();
if (!link) {
+ newFound++;
link = Channels.NewChannel(Channel(), "NVOD", "", "", Service.getOriginalNetworkId(), Service.getTransportStream(), Service.getServiceId());
patFilter->Trigger();
}
@@ -561,3 +568,19 @@
SetStatus(false);
}
}
+
+void SdtFilter::ResetFound(void)
+{
+ channelsFound=0;
+ newFound=0;
+}
+
+int SdtFilter::ChannelsFound(void)
+{
+ return channelsFound;
+}
+
+int SdtFilter::NewFound(void)
+{
+ return newFound;
+}
@@ -41,6 +41,8 @@
class SdtFilter : public cFilter {
friend class PatFilter;
private:
+ static int channelsFound;
+ static int newFound;
int numSid,sid[100];
cSectionSyncer sectionSyncer;
PatFilter *patFilter;
@@ -49,6 +51,9 @@
public:
SdtFilter(PatFilter *PatFilter);
virtual void SetStatus(bool On);
+ static void ResetFound(void);
+ static int ChannelsFound(void);
+ static int NewFound(void);
};
#endif