Re: [patch] channels with same pids

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
1. cChannel::PluginParam() need for iptv plugin.
sorry, i was attached bad version for native vdr.
See attach for this message.

2. You right of cause, the triplet SID/NID/TID is supposed to be unique
within one satellite, but in really we have incorrect pid tables on many
satellites, and in local iptv networks. Example, see
http://www.lyngsat.com/eam2.html, some channels have equal pids:
11650V, 11190H, and 11044H too.
This is fault of sat providers, but we have it as is. And be a fine, if
vdr can works correct with such channels, without editing channel.conf
manually.



On Sat, 23/02/2008 18:03 +0100, Klaus Schmidinger wrote:
> On 02/22/08 04:29, ua0lnj wrote:
> > Hi.
> > Some satellites have many channels with same sid, nid, tid on different
> > transponders. This is incorrect pid table, and vdr works with it not
> > good, need scan channels and change rid manually, but if you select
> > "transponder update" all you settings will be rewrite and channels
> > deleted as duplicate.
> > I have this trouble on ABS1 75.0 E and Express AM2 80.0 E, and I have
> > very many channels with same pids on my iptv stream.
> > After this patch, vdr parsing duplicate pids, and if transponders is
> > not equal, channel not deleted, but rid wil be increased. If pids and
> > transponders are equal, channel will be deleted as duplicate.
> > Patch was made for vdr-1.5.12, but works with 1.5.15 too.
> > Attached 3 patches, for native vdr and vdr + iptv plugin patched and for
> > native reelchannelscan-0.4.1 plugin (include patch for 1.5.xx).
> 
> First of all, there is no cChannel::PluginParam() in plain vanilla VDR 1.5.15.
> 
> Secondly, as far as I understand this, the triplet SID/NID/TID is supposed
> to be unique within one satellite.
> Can you point me to a standard document that would indicate otherwise?
> 
> Klaus
> 
> _______________________________________________
> vdr mailing list
> vdr@xxxxxxxxxxx
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

diff -Nup vdr-1.5.12/channels.c vdr-1.5.12mod/channels.c
--- vdr-1.5.12/channels.c	2007-10-13 01:40:53.000000000 +1100
+++ vdr-1.5.12mod/channels.c	2008-01-08 23:41:56.000000000 +1000
@@ -876,6 +876,7 @@ cChannels::cChannels(void)
   modified = CHANNELSMOD_NONE;
 }
 
+
 void cChannels::DeleteDuplicateChannels(void)
 {
   cList<cChannelSorter> ChannelSorter;
@@ -887,12 +888,21 @@ void cChannels::DeleteDuplicateChannels(
   cChannelSorter *cs = ChannelSorter.First();
   while (cs) {
         cChannelSorter *next = ChannelSorter.Next(cs);
-        if (next && cs->channelID == next->channelID) {
+        if (next && cs->channelID == next->channelID && cs->channel->Transponder() == next->channel->Transponder()) {
            dsyslog("deleting duplicate channel %s", *next->channel->ToText());
            Del(next->channel);
            }
-        cs = next;
-        }
+        else  if (next && cs->channelID == next->channelID) {
+           dsyslog("deleting duplicate id %s", *next->channel->ToText());
+           int sid = cs->channel->Sid();
+           int nid = cs->channel->Nid();
+           int tid = cs->channel->Tid();
+           int rid = cs->channel->Rid();
+           next->channel->SetId(nid, tid, sid, rid+1);
+           }
+       cs = next;
+       }
+       Channels.Save();
 }
 
 bool cChannels::Load(const char *FileName, bool AllowComments, bool MustExist)
diff -Nup vdr-1.5.12/nit.c vdr-1.5.12mod/nit.c
--- vdr-1.5.12/nit.c	2007-08-18 01:02:45.000000000 +1100
+++ vdr-1.5.12mod/nit.c	2007-12-29 13:39:39.000000000 +1000
@@ -143,7 +143,7 @@ void cNitFilter::Process(u_short Pid, u_
                  if (Setup.UpdateChannels >= 5) {
                     bool found = false;
                     for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) {
-                        if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) {
+                        if (!Channel->GroupSep() && Channel->Source() == Source && Channel->Transponder() == Transponder() && Channel->Nid() == ts.getOriginalNetworkId() && Channel->Tid() == ts.getTransportStreamId()) { 
                            int transponder = Channel->Transponder();
                            if (!ISTRANSPONDER(cChannel::Transponder(Frequency, Polarization), transponder)) {
                               for (int n = 0; n < NumFrequencies; n++) {
diff -Nup vdr-1.5.12/sdt.c vdr-1.5.12mod/sdt.c
--- vdr-1.5.12/sdt.c	2007-06-10 19:50:49.000000000 +1100
+++ vdr-1.5.12mod/sdt.c	2008-01-08 23:48:59.000000000 +1000
@@ -78,7 +78,7 @@ void cSdtFilter::Process(u_short Pid, u_
                         char *pp = compactspace(ProviderNameBuf);
                         if (channel) {
                            channel->SetId(sdt.getOriginalNetworkId(), sdt.getTransportStreamId(), SiSdtService.getServiceId());
-                           if (Setup.UpdateChannels == 1 || Setup.UpdateChannels >= 3)
+                           if ((Setup.UpdateChannels == 1 || Setup.UpdateChannels >= 3) && channel->Transponder() == Transponder())
                               channel->SetName(pn, ps, pp);
                            // Using SiSdtService.getFreeCaMode() is no good, because some
                            // tv stations set this flag even for non-encrypted channels :-(
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux