Reply to thread

@ DvbBaseScanning.c : 450


[CODE=csharp]

    ///<summary>

    /// Scan NIT channel

    ///</summary>

    ///<param name="channel">Channel</param>

    ///<param name="settings">Scan Parameters</param>

    ///<returns>Found channels</returns>

    public List<IChannel> ScanNIT(IChannel channel, ScanParameters settings)

    {

      try

      {

        _card.IsScanning = true;

        _card.Scan(0, channel);

        _analyzer = GetAnalyzer();

        if (_analyzer == null)

        {

          Log.Log.WriteFile("Scan: no analyzer interface available");

          return new List<IChannel>();

        }

        _analyzer.SetCallBack(null);

        _analyzer.ScanNIT();

        Thread.Sleep(settings.TimeOutTune * 1000);

        ResetSignalUpdate();

        Log.Log.WriteFile("ScanNIT: tuner locked:{0} signal:{1} quality:{2}", _card.IsTunerLocked, _card.SignalLevel,

                          _card.SignalQuality);

        if (_card.IsTunerLocked || _card.SignalLevel > 0 || _card.SignalQuality > 0)

        {

          int count;


          _event = new ManualResetEvent(false);

          _event.WaitOne(16000, true);

          _event.Close();

          List<IChannel> channelsFound = new List<IChannel>();

          _analyzer.GetNITCount(out count);

          for (int i = 0; i < count; ++i)

          {

            int freq, pol, mod, symbolrate, bandwidth, innerfec, rollOff, chType;

            IntPtr ptrName;

            _analyzer.GetNITChannel((short)i, out chType, out freq, out pol, out mod, out symbolrate, out bandwidth,

                                    out innerfec, out rollOff, out ptrName);

            string name = DvbTextConverter.Convert(ptrName, "");

            if (chType == 0)

            {

              DVBSChannel ch = new DVBSChannel();

              ch.Name = name;

              ch.Frequency = freq;

              Log.Log.Debug("{0},{1},{2},{3}", freq, mod, pol, symbolrate);

              switch (mod)

              {

                default:

                case 0:

                  ch.ModulationType = ModulationType.ModNotSet;

                  break;

                  //case 1: ch.ModulationType = ModulationType.ModQpsk; break;

                case 2:

                  ch.ModulationType = ModulationType.Mod8Psk;

                  break;

                case 3:

                  ch.ModulationType = ModulationType.Mod16Qam;

                  break;

              }

              ch.SymbolRate = symbolrate;

              ch.InnerFecRate = (BinaryConvolutionCodeRate)innerfec;

              ch.Polarisation = (Polarisation)pol;

              ch.Rolloff = (RollOff)rollOff;

              channelsFound.Add(ch);

            }[/CODE]


We have located the hidden base...


Top Bottom