Re: Channels and pid update possible bug

Message ID 4399A7D4.9080200@cadsoft.de
State New
Headers

Commit Message

Klaus Schmidinger Dec. 9, 2005, 3:50 p.m. UTC
  Suur Karu wrote:
> Klaus Schmidinger wrote:
> 
>>> I have same porblem with vdr-1.3.37 When I choose names and pids 
>>> option vdr change names of lots of channels. All of names are 
>>> incoorect also like [13AD], [13FF] etc. I think it cannot parse pmt 
>>> of transponder correctly.
>>
>>
>>
>> Can you check whether it is actually VDR that can't parse the data,
>> or whether the data is in any way flawed?
>>
> 
> Is it right info You needed?
> 
> root@vdr:~/.scan# dvbscan -a0 -v Amos-4W
> scanning Amos-4W
> using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0'
> initial transponder 10722000 H 27500000 3
> initial transponder 10762000 H 23250000 3
>  >>> tune to: 10722:h:0:27500
> DiSEqC: switch pos 0, 18V, loband (index 1)
>  >>> tuning status == 0x1f
> PAT
> PMT 0x0600 for service 0x0006
> PMT 0x0200 for service 0x0002
> PMT 0x0700 for service 0x0007
> PMT 0x0300 for service 0x0003
> NIT (actual TS)
> Network Name 'KRRT'
> SDT (actual TS)
> 0x0000 0x0001: pmt_pid 0x0100 SPACECOM -- K1 (running)
> 0x0000 0x0002: pmt_pid 0x0200 SPACECOM -- OTV (running)
> 0x0000 0x0003: pmt_pid 0x0300 SPACECOM -- 1PLUS1 (running)
> 0x0000 0x0004: pmt_pid 0x0400 SPACECOM -- TV KYIV (running)
> 0x0000 0x0005: pmt_pid 0x0500 SPACECOM -- MEGASPORT (running, scrambled)
> 0x0000 0x0006: pmt_pid 0x0600 SPACECOM -- K2 (running)
> 0x0000 0x0007: pmt_pid 0x0700 SPACECOM -- TEST (running)
> PMT 0x0400 for service 0x0004
> PMT 0x0500 for service 0x0005
> PMT 0x0100 for service 0x0001
>  >>> tune to: 10762:h:0:23250
> DiSEqC: switch pos 0, 18V, loband (index 1)
>  >>> tuning status == 0x1f
> PAT
> NIT (actual TS)
> Network Name 'SCOPUS NET'
> PMT 0x0060 for service 0x0005
> PMT 0x0040 for service 0x0003
> PMT 0x0070 for service 0x0006
> PMT 0x0020 for service 0x0001
> PMT 0x0080 for service 0x0007
> PMT 0x0030 for service 0x0002
> SDT (actual TS)
> 0x0000 0x0001: pmt_pid 0x0020 SCOPUS PROVIDER -- KIEV STB (running)
> 0x0000 0x0002: pmt_pid 0x0030 SCOPUS PROVIDER -- M1 (running)
> 0x0000 0x0003: pmt_pid 0x0040 SCOPUS PROVIDER -- TONIS (running)
> 0x0000 0x0005: pmt_pid 0x0060 SCOPUS PROVIDER -- ICTV (running)
> 0x0000 0x0006: pmt_pid 0x0070 SCOPUS PROVIDER -- M1 INT-L TEST (running, 
> scrambled)
> 0x0000 0x0007: pmt_pid 0x0080 SCOPUS PROVIDER -- TRK SVIT (running)
> dumping lists (13 services)
> K1:10722:h:0:27500:257:258:1
> OTV:10722:h:0:27500:513:514:2
> 1PLUS1:10722:h:0:27500:769:770:3
> TV KYIV:10722:h:0:27500:1025:1026:4
> MEGASPORT:10722:h:0:27500:1281:1282:5
> K2:10722:h:0:27500:1537:1538:6
> TEST:10722:h:0:27500:1793:1794:7
> KIEV STB:10762:h:0:23250:33:34:1
> M1:10762:h:0:23250:49:50:2
> TONIS:10762:h:0:23250:65:66:3
> ICTV:10762:h:0:23250:97:98:5
> M1 INT-L TEST:10762:h:0:23250:113:114:6
> TRK SVIT:10762:h:0:23250:129:130:7
> Done.
> 
> Regards,
> SK

Looks good to me.

Please replace the function cChannels::GetByChannelID() in
channels.c with the attached code, then run VDR and switch
from transponder 10722 to 10762 and post what gets printed
to stdout.

Klaus
  

Comments

Suur Karu Dec. 9, 2005, 6:49 p.m. UTC | #1
Klaus Schmidinger wrote:
> Please replace the function cChannels::GetByChannelID() in
> channels.c with the attached code, then run VDR and switch
> from transponder 10722 to 10762 and post what gets printed
> to stdout.

Here we are.

 From 10722 to 10762:
---------------------------------------
GetByChannelID: S4.0W-4369-1-1 0 0
   sid = 1
GetByChannelID: S4.0W-0-110762-1 0 0
   sid = 1
GetByChannelID: S4.0W-4369-1-2 0 0
   sid = 2
GetByChannelID: S4.0W-0-110762-2 0 0
   sid = 2
GetByChannelID: S4.0W-4369-1-3 0 0
   sid = 3
GetByChannelID: S4.0W-0-110762-3 0 0
   sid = 3
GetByChannelID: S4.0W-4369-1-5 0 0
   sid = 5
GetByChannelID: S4.0W-0-110762-5 0 0
   sid = 5
GetByChannelID: S4.0W-4369-1-6 0 0
   sid = 6
GetByChannelID: S4.0W-0-110762-6 0 0
   sid = 6
GetByChannelID: S4.0W-4369-1-7 0 0
   sid = 7
GetByChannelID: S4.0W-0-110762-7 0 0
   sid = 7
---------------------------------------

 From 10762 to 10722:
---------------------------------------

GetByChannelID: S4.0W-4369-1-1 0 0
   sid = 1
GetByChannelID: S4.0W-0-110722-1 0 0
   sid = 1
GetByChannelID: S4.0W-4369-1-2 0 0
   sid = 2
GetByChannelID: S4.0W-0-110722-2 0 0
   sid = 2
GetByChannelID: S4.0W-4369-1-3 0 0
   sid = 3
GetByChannelID: S4.0W-0-110722-3 0 0
   sid = 3
GetByChannelID: S4.0W-4369-1-4 0 0
   sid = 4
GetByChannelID: S4.0W-0-110722-4 0 0
   sid = 4
GetByChannelID: S4.0W-4369-1-5 0 0
   sid = 5
GetByChannelID: S4.0W-0-110722-5 0 0
   sid = 5
GetByChannelID: S4.0W-4369-1-6 0 0
   sid = 6
GetByChannelID: S4.0W-0-110722-6 0 0
   sid = 6
GetByChannelID: S4.0W-4369-1-7 0 0
   sid = 7
GetByChannelID: S4.0W-0-110722-7 0 0
   sid = 7
---------------------------------------


Regards,
SK
  
Suur Karu Dec. 9, 2005, 9:43 p.m. UTC | #2
Suur Karu wrote:
> Klaus Schmidinger wrote:
> 
>> Please replace the function cChannels::GetByChannelID() in
>> channels.c with the attached code, then run VDR and switch
>> from transponder 10722 to 10762 and post what gets printed
>> to stdout.
> 
> 
> Here we are.
> 
>  From 10722 to 10762:
> ---------------------------------------
> GetByChannelID: S4.0W-4369-1-1 0 0
>   sid = 1
> GetByChannelID: S4.0W-0-110762-1 0 0
>   sid = 1
> GetByChannelID: S4.0W-4369-1-2 0 0
>   sid = 2
> GetByChannelID: S4.0W-0-110762-2 0 0
>   sid = 2
> GetByChannelID: S4.0W-4369-1-3 0 0
>   sid = 3
> GetByChannelID: S4.0W-0-110762-3 0 0
>   sid = 3
> GetByChannelID: S4.0W-4369-1-5 0 0
>   sid = 5
> GetByChannelID: S4.0W-0-110762-5 0 0
>   sid = 5
> GetByChannelID: S4.0W-4369-1-6 0 0
>   sid = 6
> GetByChannelID: S4.0W-0-110762-6 0 0
>   sid = 6
> GetByChannelID: S4.0W-4369-1-7 0 0
>   sid = 7
> GetByChannelID: S4.0W-0-110762-7 0 0
>   sid = 7

Sorry, I forgot set RID back to zero. With default value of it I got 
different result:
--------------------
GetByChannelID: S4.0W-4369-1-1 0 0
   sid = 1
   channel->Sid() = 1
   channel->Nid() = 4369
   channel->Tid() = 1
   channel->Transponder() = 110722
   channel->GetChannelID() = S4.0W-4369-1-1
GetByChannelID: S4.0W-4369-1-2 0 0
   sid = 2
   channel->Sid() = 2
   channel->Nid() = 4369
   channel->Tid() = 1
   channel->Transponder() = 110722
   channel->GetChannelID() = S4.0W-4369-1-2
GetByChannelID: S4.0W-4369-1-3 0 0
   sid = 3
   channel->Sid() = 3
   channel->Nid() = 4369
   channel->Tid() = 1
   channel->Transponder() = 110722
   channel->GetChannelID() = S4.0W-4369-1-3
GetByChannelID: S4.0W-4369-1-5 0 0
   sid = 5
   channel->Sid() = 5
   channel->Nid() = 4369
   channel->Tid() = 1
   channel->Transponder() = 110722
   channel->GetChannelID() = S4.0W-4369-1-5
GetByChannelID: S4.0W-4369-1-6 0 0
   sid = 6
   channel->Sid() = 6
   channel->Nid() = 4369
   channel->Tid() = 1
   channel->Transponder() = 110722
   channel->GetChannelID() = S4.0W-4369-1-6
GetByChannelID: S4.0W-4369-1-7 0 0
   sid = 7
   channel->Sid() = 7
   channel->Nid() = 4369
   channel->Tid() = 1
   channel->Transponder() = 110722
   channel->GetChannelID() = S4.0W-4369-1-7
--------------------
It seems like no differents 10722->10762 or 10762->10722 switching.

Night,
SK
  
Klaus Schmidinger Dec. 11, 2005, 1:08 p.m. UTC | #3
Suur Karu wrote:
> Suur Karu wrote:
> 
>> Klaus Schmidinger wrote:
>>
>>> Please replace the function cChannels::GetByChannelID() in
>>> channels.c with the attached code, then run VDR and switch
>>> from transponder 10722 to 10762 and post what gets printed
>>> to stdout.
>>
>>
>>
>> Here we are.
>>
>>  From 10722 to 10762:
>> ---------------------------------------
>> GetByChannelID: S4.0W-4369-1-1 0 0
>>   sid = 1
>> GetByChannelID: S4.0W-0-110762-1 0 0
>>   sid = 1
>> GetByChannelID: S4.0W-4369-1-2 0 0
>>   sid = 2
>> GetByChannelID: S4.0W-0-110762-2 0 0
>>   sid = 2
>> GetByChannelID: S4.0W-4369-1-3 0 0
>>   sid = 3
>> GetByChannelID: S4.0W-0-110762-3 0 0
>>   sid = 3
>> GetByChannelID: S4.0W-4369-1-5 0 0
>>   sid = 5
>> GetByChannelID: S4.0W-0-110762-5 0 0
>>   sid = 5
>> GetByChannelID: S4.0W-4369-1-6 0 0
>>   sid = 6
>> GetByChannelID: S4.0W-0-110762-6 0 0
>>   sid = 6
>> GetByChannelID: S4.0W-4369-1-7 0 0
>>   sid = 7
>> GetByChannelID: S4.0W-0-110762-7 0 0
>>   sid = 7
> 
> 
> Sorry, I forgot set RID back to zero. With default value of it I got 
> different result:
> --------------------
> GetByChannelID: S4.0W-4369-1-1 0 0
>   sid = 1
>   channel->Sid() = 1
>   channel->Nid() = 4369
>   channel->Tid() = 1
>   channel->Transponder() = 110722
>   channel->GetChannelID() = S4.0W-4369-1-1
> GetByChannelID: S4.0W-4369-1-2 0 0
>   sid = 2
>   channel->Sid() = 2
>   channel->Nid() = 4369
>   channel->Tid() = 1
>   channel->Transponder() = 110722
>   channel->GetChannelID() = S4.0W-4369-1-2
> GetByChannelID: S4.0W-4369-1-3 0 0
>   sid = 3
>   channel->Sid() = 3
>   channel->Nid() = 4369
>   channel->Tid() = 1
>   channel->Transponder() = 110722
>   channel->GetChannelID() = S4.0W-4369-1-3
> GetByChannelID: S4.0W-4369-1-5 0 0
>   sid = 5
>   channel->Sid() = 5
>   channel->Nid() = 4369
>   channel->Tid() = 1
>   channel->Transponder() = 110722
>   channel->GetChannelID() = S4.0W-4369-1-5
> GetByChannelID: S4.0W-4369-1-6 0 0
>   sid = 6
>   channel->Sid() = 6
>   channel->Nid() = 4369
>   channel->Tid() = 1
>   channel->Transponder() = 110722
>   channel->GetChannelID() = S4.0W-4369-1-6
> GetByChannelID: S4.0W-4369-1-7 0 0
>   sid = 7
>   channel->Sid() = 7
>   channel->Nid() = 4369
>   channel->Tid() = 1
>   channel->Transponder() = 110722
>   channel->GetChannelID() = S4.0W-4369-1-7
> --------------------
> It seems like no differents 10722->10762 or 10762->10722 switching.

Well, I cant see anything wrong here.
VDR always finds exactly the channel it is looking for.

Please let me know if you get some output here that shows different
values in the "GetByChannelID:" and "channel->GetChannelID()" lines.

Klaus
  
Suur Karu Dec. 11, 2005, 9:45 p.m. UTC | #4
Thank you for response.

I think I see problem.

RID set manually to not zero (and channels names not messed up):
>>>  From 10722 to 10762:
>>> ---------------------------------------
>>> GetByChannelID: S4.0W-4369-1-1 0 0
>>>   sid = 1
>>> GetByChannelID: S4.0W-0-110762-1 0 0
>>>   sid = 1
>> --------------------

Same case (10722->10762) with RID=0:
>> GetByChannelID: S4.0W-4369-1-1 0 0
>>   sid = 1
>>   channel->Sid() = 1
>>   channel->Nid() = 4369
>>   channel->Tid() = 1
>>   channel->Transponder() = 110722
>>   channel->GetChannelID() = S4.0W-4369-1-1


Transponder value is wrong. It must be 110762. Or isn't?
And in first entry each channels printed out 2 times (with and without 
transponder frequency). With RID=0 second printouts are skipped.
Sorry, I have only wery basic knowledge of C and can't understand most 
of complex sources.

Regards,
SK
  
Klaus Schmidinger Dec. 16, 2005, 3:19 p.m. UTC | #5
Suur Karu wrote:
> Thank you for response.
> 
> I think I see problem.
> 
> RID set manually to not zero (and channels names not messed up):
> 
>>>>  From 10722 to 10762:
>>>> ---------------------------------------
>>>> GetByChannelID: S4.0W-4369-1-1 0 0
>>>>   sid = 1
>>>> GetByChannelID: S4.0W-0-110762-1 0 0
>>>>   sid = 1
>>>
>>> --------------------
> 
> 
> Same case (10722->10762) with RID=0:
> 
>>> GetByChannelID: S4.0W-4369-1-1 0 0
>>>   sid = 1
>>>   channel->Sid() = 1
>>>   channel->Nid() = 4369
>>>   channel->Tid() = 1
>>>   channel->Transponder() = 110722
>>>   channel->GetChannelID() = S4.0W-4369-1-1
> 
> 
> 
> Transponder value is wrong. It must be 110762. Or isn't?

Well, the incoming channel id is S4.0W-4369-1-1, and according
to your initial channels.conf excerpt

K1;SPACECOM:10722:h:S4.0W:27500:257:258:0:0:1:4369:1:0

that channel is on transponder 10722.
The line

   channel->Transponder() = 110722

in the above output indicates that the channel that is returned
from the cChannels::GetByChannelID() call is on transponder 10722
(the first '1' represents the polarization).

So I'm afraid I can't see anything wrong.

Klaus
  

Patch

cChannel *cChannels::GetByChannelID(tChannelID ChannelID, bool TryWithoutRid, bool TryWithoutPolarization)
{
  bool x = !TryWithoutRid && !TryWithoutPolarization;//XXX
  if (x) printf("GetByChannelID: %s %d %d\n", *ChannelID.ToString(), TryWithoutRid, TryWithoutPolarization);//XXX
  int sid = ChannelID.Sid();
  if (x) printf("  sid = %d\n", sid);//XXX
  cList<cHashObject> *list = channelsHashSid.GetList(sid);
  if (list) {
     for (cHashObject *hobj = list->First(); hobj; hobj = list->Next(hobj)) {
         cChannel *channel = (cChannel *)hobj->Object();
         if (channel->Sid() == sid && channel->GetChannelID() == ChannelID)
            {//XXX
            if (x) printf("  channel->Sid() = %d\n", channel->Sid());//XXX
            if (x) printf("  channel->Nid() = %d\n", channel->Nid());//XXX
            if (x) printf("  channel->Tid() = %d\n", channel->Tid());//XXX
            if (x) printf("  channel->Transponder() = %d\n", channel->Transponder());//XXX
            if (x) printf("  channel->GetChannelID() = %s\n", *channel->GetChannelID().ToString());//XXX
            return channel;
            }//XXX
         }
     if (TryWithoutRid) {
        ChannelID.ClrRid();
        for (cHashObject *hobj = list->First(); hobj; hobj = list->Next(hobj)) {
            cChannel *channel = (cChannel *)hobj->Object();
            if (channel->Sid() == sid && channel->GetChannelID().ClrRid() == ChannelID)
               return channel;
            }
        }
     if (TryWithoutPolarization) {
        ChannelID.ClrPolarization();
        for (cHashObject *hobj = list->First(); hobj; hobj = list->Next(hobj)) {
            cChannel *channel = (cChannel *)hobj->Object();
            if (channel->Sid() == sid && channel->GetChannelID().ClrPolarization() == ChannelID)
               return channel;
            }
        }
     }
  return NULL;
}