[TV] - Improving the DiseqC Support for KNC TV-Station card

Discussion in 'Improvement Suggestions' started by Django.edwards, May 22, 2013.

  1. Django.edwards

    Django.edwards Portal Pro

    Joined:
    October 22, 2009
    Messages:
    457
    Likes Received:
    47
    Gender:
    Male
    Location:
    Eupen
    Ratings:
    +55 / 0
    Home Country:
    Belgium Belgium
    Show System Specs
    Hi all,
    since some days ago I started to merge the KNC branch https://github.com/MediaPortal/MediaPortal-1/tree/KNC
    into the MP 1.2.3 and so one code.
    Since there are only 16 changed files between the KNC branch and the 1.2.3 source, I replaced all the files from the KNC branch into the source of 1.2.3.
    After compiling everything seems to be fine, except when I try to tune to a channel I got the following error:
    I found out, that the exception is generated in the following module: .\TvEngine3\TVLibrary\TVLibrary\Implementations\DVB\ConditionalAccess\ConditionalAccess.cs
    in this area:
    Code (C):
    1.  
    2.     /// <summary>
    3.     /// Instructs the cam/ci module to use hardware filter and only send the pids listed in pids to the pc
    4.     /// </summary>
    5.     /// <param name="subChannel">The sub channel id</param>
    6.     /// <param name="channel">The current tv/radio channel.</param>
    7.     /// <param name="pids">The pids.</param>
    8.     /// <remarks>when the pids array is empty, pid filtering is disabled and all pids are received</remarks>
    9.     public void SendPids(int subChannel, DVBBaseChannel channel, List<ushort> pids)
    10.     {
    11.       try
    12.       {
    13.         List<ushort> HwPids = new List<ushort>();
    14.  
    15.         _mapSubChannels[subChannel].Pids = pids;
    16.  
    17.         Dictionary<int, ConditionalAccessContext>.Enumerator enSubch = _mapSubChannels.GetEnumerator();
    18.         while (enSubch.MoveNext())
    19.         {
    20.           List<ushort> enPid = enSubch.Current.Value.Pids;
    21.           if (enPid != null)
    22.           {
    23.             for (int i = 0; i < enPid.Count; ++i)
    24.             {
    25.               if (!HwPids.Contains(enPid[i]))
    26.                 HwPids.Add(enPid[i]);
    27.             }
    28.           }
    29.         }
    30.  
    31.         if (_digitalEveryWhere != null)
    32.         {
    33.           bool isDvbc = ((channel as DVBCChannel) != null);
    34.           bool isDvbt = ((channel as DVBTChannel) != null);
    35.           bool isDvbs = ((channel as DVBSChannel) != null);
    36.           bool isAtsc = ((channel as ATSCChannel) != null);
    37.  
    38.           // It is not ideal to have to enable hardware PID filtering because
    39.           // doing so can limit the number of channels that can be viewed/recorded
    40.           // simultaneously. However, it does seem that there is a need for filtering
    41.           // on transponders with high data rates. Problems have been observed with
    42.           // transponders on Thor 5/6, Intelsat 10-02 (0.8W) if the filter is not enabled:
    43.           //  Symbol Rate: 27500, Modulation: 8 PSK, FEC rate: 5/6, Pilot: On, Roll-Off: 0.35
    44.           //  Symbol Rate: 30000, Modulation: 8 PSK, FEC rate: 3/4, Pilot: On, Roll-Off: 0.35
    45.           if (pids.Count != 0 && isDvbs &&
    46.               (((DVBSChannel)channel).ModulationType == ModulationType.Mod8Psk ||
    47.               ((DVBSChannel)channel).ModulationType == ModulationType.Mod16Apsk ||
    48.               ((DVBSChannel)channel).ModulationType == ModulationType.Mod32Apsk)
    49.           )
    50.           {
    51.             for (int i = 0; i < HwPids.Count; ++i)
    52.             {
    53.               Log.Log.Info("FireDTV: HW Filtered Pid : 0x{0:X}", HwPids[i]);
    54.             }
    55.             _digitalEveryWhere.SetHardwarePidFiltering(isDvbc, isDvbt, true, isAtsc, HwPids);
    56.           }
    57.           else
    58.           {
    59.             pids.Clear();
    60.             Log.Log.Info("FireDTV: HW Filtering disabled.");
    61.             _digitalEveryWhere.SetHardwarePidFiltering(isDvbc, isDvbt, isDvbs, isAtsc, pids);
    62.           }
    63.         }
    64.       }
    65.       catch (Exception ex)
    66.       {
    67.         Log.Log.Write(ex);
    68.       }
    69.     }
    70.  
    at the following line: _mapSubChannels[subChannel].Pids = pids;



    Since I'm an absolute beginner, I can't find out why this happens. It seems that the called key is not in the Directory. But I don't know if this is ok or not.

    It would be really gret if somebody could help me out, as this is the only Problem that I have, and so I could use my tv Card with the latest release without having to wait for TVE3.5 coming out.

    Maybe @mm1352000 could me give a hint.

    Any help would be very appreciated.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,541
    Likes Received:
    4,752
    Ratings:
    +8,220 / 17
    Home Country:
    New Zealand New Zealand
    The error is specific to some of my older branches. It is completely harmless.
    Hardware PID filtering is irrelevant for KNC tuners, so you can just directly return from that function:
    Code (Text):
    1. public void SendPids(int subChannel, DVBBaseChannel channel, List<ushort> pids)
    2. {
    3. }
    Glad to hear you managed to merge it. :)
     
    Last edited: May 22, 2013
    • Like Like x 1
  4. Django.edwards

    Django.edwards Portal Pro

    Joined:
    October 22, 2009
    Messages:
    457
    Likes Received:
    47
    Gender:
    Male
    Location:
    Eupen
    Ratings:
    +55 / 0
    Home Country:
    Belgium Belgium
    Show System Specs
    Hi mm, thanks for your quick Response. Yes I'm glad too :)
    What do you think, would it be possible to merge this branch into the future Releases of Mepo? Since the release date of TVE3.5 is not know (for me) it would be nice to have your improvement in the offical Releases too.
    As I can see any Problems for the stability of the existing code..... it have only to be done.
    As I'm not really familiar with git and opening a own branch or something else, I don't know how to go further with this.
    What's your opinion?
     
  5. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,541
    Likes Received:
    4,752
    Ratings:
    +8,220 / 17
    Home Country:
    New Zealand New Zealand
    That branch definitely doesn't have support for multi-channel decryption, and as I recall it also has bugs with the KNC Twin support. Really, it is only a solution for your specific problem. Further, if we merge it to TVE3, it causes problems for TVE3.5 => I'd prefer not merge.
     
    • Like Like x 1
  6. Django.edwards

    Django.edwards Portal Pro

    Joined:
    October 22, 2009
    Messages:
    457
    Likes Received:
    47
    Gender:
    Male
    Location:
    Eupen
    Ratings:
    +55 / 0
    Home Country:
    Belgium Belgium
    Show System Specs
    OK, I absolutely agree! It was just a question.

    I have to thank you again for your Support, it is always appreciated! (y) So Keep going on with some awesome new Features in TVE3.5 ;)
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!