private Channel IsInsertAllowed(EpgChannel epgChannel)
        {
            DVBBaseChannel dvbChannel = (DVBBaseChannel)epgChannel.Channel;

            //are there any epg infos for this channel?
            if (epgChannel.Programs.Count == 0)
            {
                Log.Epg("{0}: no epg infos found for channel networkid:0x{1:X} transportid:0x{2:X} serviceid:0x{3:X}",
                        _grabberName, dvbChannel.NetworkId, dvbChannel.TransportId, dvbChannel.ServiceId);
                return(null);
            }
            //do we know a channel with these tuning details?
            Channel      dbChannel    = null;
            TuningDetail tuningDetail = _layer.GetTuningDetail(dvbChannel);

            if (tuningDetail != null)
            {
                dbChannel = tuningDetail.ReferencedChannel();
            }

            if (dbChannel == null)
            {
                Log.Epg("{0}: no channel found for networkid:0x{1:X} transportid:0x{2:X} serviceid:0x{3:X}", _grabberName,
                        dvbChannel.NetworkId, dvbChannel.TransportId, dvbChannel.ServiceId);

                /*foreach (EpgProgram ei in epgChannel.Programs)
                 * {
                 * string title = "";
                 * if (ei.Text.Count > 0)
                 * {
                 *  title = ei.Text[0].Title;
                 * }
                 * Log.Epg("                   -> {0}-{1}  {2}", ei.StartTime, ei.EndTime, title);
                 * }*/
                return(null);
            }
            //should we store epg for this channel?
            if ((dbChannel.IsRadio && _storeOnlySelectedChannelsRadio) || (!dbChannel.IsRadio && _storeOnlySelectedChannels))
            {
                if (!dbChannel.GrabEpg)
                {
                    Log.Epg("{0}: channel {1} is not configured to grab epg.", _grabberName, dbChannel.DisplayName);
                    return(null);
                }
            }
            if (_checkForLastUpdate)
            {
                //is the regrab time reached?
                TimeSpan ts = DateTime.Now - dbChannel.LastGrabTime;
                if (ts.TotalMinutes < _epgReGrabAfter)
                {
                    Log.Epg("{0}: {1} not needed lastUpdate:{2}", _grabberName, dbChannel.DisplayName, dbChannel.LastGrabTime);
                    return(null);
                }
            }
            return(dbChannel);
        }
Пример #2
0
    public TuningDetail UpdateTuningDetails(Channel channel, IChannel tvChannel, TuningDetail detail)
    {
      string channelName = "";
      long channelFrequency = 0;
      int channelNumber = 0;
      int country = 31;
      bool isRadio = false;
      bool isTv = false;
      int tunerSource = 0;
      int videoInputType = 0;
      int audioInputType = 0;
      bool isVCRSignal = false;
      int symbolRate = 0;
      int modulation = 0;
      int polarisation = 0;
      int switchFrequency = 0;
      int diseqc = 0;
      int bandwidth = 8;
      bool freeToAir = true;
      int pmtPid = -1;
      int networkId = -1;
      int serviceId = -1;
      int transportId = -1;
      int minorChannel = -1;
      int majorChannel = -1;
      string provider = "";
      int channelType = 0;
      int band = 0;
      int satIndex = -1;
      int innerFecRate = (int)BinaryConvolutionCodeRate.RateNotSet;
      int pilot = (int)Pilot.NotSet;
      int rollOff = (int)RollOff.NotSet;
      string url = "";

      AnalogChannel analogChannel = tvChannel as AnalogChannel;
      if (analogChannel != null)
      {
        channelName = analogChannel.Name;
        channelFrequency = analogChannel.Frequency;
        channelNumber = analogChannel.ChannelNumber;
        country = analogChannel.Country.Index;
        isRadio = analogChannel.IsRadio;
        isTv = analogChannel.IsTv;
        tunerSource = (int)analogChannel.TunerSource;
        videoInputType = (int)analogChannel.VideoSource;
        audioInputType = (int)analogChannel.AudioSource;
        isVCRSignal = analogChannel.IsVCRSignal;
        channelType = 0;
      }
      ATSCChannel atscChannel = tvChannel as ATSCChannel;
      if (atscChannel != null)
      {
        majorChannel = atscChannel.MajorChannel;
        minorChannel = atscChannel.MinorChannel;
        channelNumber = atscChannel.PhysicalChannel;
        //videoPid = atscChannel.VideoPid;
        //audioPid = atscChannel.AudioPid;
        modulation = (int)atscChannel.ModulationType;
        channelType = 1;
      }

      DVBCChannel dvbcChannel = tvChannel as DVBCChannel;
      if (dvbcChannel != null)
      {
        symbolRate = dvbcChannel.SymbolRate;
        modulation = (int)dvbcChannel.ModulationType;
        channelNumber = dvbcChannel.LogicalChannelNumber;
        channelType = 2;
      }

      DVBSChannel dvbsChannel = tvChannel as DVBSChannel;
      if (dvbsChannel != null)
      {
        symbolRate = dvbsChannel.SymbolRate;
        polarisation = (int)dvbsChannel.Polarisation;
        switchFrequency = dvbsChannel.SwitchingFrequency;
        diseqc = (int)dvbsChannel.DisEqc;
        band = (int)dvbsChannel.BandType;
        satIndex = dvbsChannel.SatelliteIndex;
        modulation = (int)dvbsChannel.ModulationType;
        innerFecRate = (int)dvbsChannel.InnerFecRate;
        pilot = (int)dvbsChannel.Pilot;
        rollOff = (int)dvbsChannel.Rolloff;
        channelNumber = dvbsChannel.LogicalChannelNumber;
        channelType = 3;
      }

      DVBTChannel dvbtChannel = tvChannel as DVBTChannel;
      if (dvbtChannel != null)
      {
        bandwidth = dvbtChannel.BandWidth;
        channelNumber = dvbtChannel.LogicalChannelNumber;
        channelType = 4;
      }

      DVBIPChannel dvbipChannel = tvChannel as DVBIPChannel;
      if (dvbipChannel != null)
      {
        url = dvbipChannel.Url;
        channelNumber = dvbipChannel.LogicalChannelNumber;
        channelType = 7;
      }

      DVBBaseChannel dvbChannel = tvChannel as DVBBaseChannel;
      if (dvbChannel != null)
      {
        pmtPid = dvbChannel.PmtPid;
        networkId = dvbChannel.NetworkId;
        serviceId = dvbChannel.ServiceId;
        transportId = dvbChannel.TransportId;
        channelName = dvbChannel.Name;
        provider = dvbChannel.Provider;
        channelFrequency = dvbChannel.Frequency;
        isRadio = dvbChannel.IsRadio;
        isTv = dvbChannel.IsTv;
        freeToAir = dvbChannel.FreeToAir;
      }

      detail.Name = channelName;
      detail.Provider = provider;
      detail.ChannelType = channelType;
      detail.ChannelNumber = channelNumber;
      detail.Frequency = (int)channelFrequency;
      detail.CountryId = country;
      detail.IsRadio = isRadio;
      detail.IsTv = isTv;
      detail.NetworkId = networkId;
      detail.TransportId = transportId;
      detail.ServiceId = serviceId;
      detail.PmtPid = pmtPid;
      detail.FreeToAir = freeToAir;
      detail.Modulation = modulation;
      detail.Polarisation = polarisation;
      detail.Symbolrate = symbolRate;
      detail.Diseqc = diseqc;
      detail.SwitchingFrequency = switchFrequency;
      detail.Bandwidth = bandwidth;
      detail.MajorChannel = majorChannel;
      detail.MinorChannel = minorChannel;
      detail.VideoSource = videoInputType;
      detail.AudioSource = audioInputType;
      detail.IsVCRSignal = isVCRSignal;
      detail.TuningSource = tunerSource;
      detail.Band = band;
      detail.SatIndex = satIndex;
      detail.InnerFecRate = innerFecRate;
      detail.Pilot = pilot;
      detail.RollOff = rollOff;
      detail.Url = url;
      return detail;
    }
Пример #3
0
    public TuningDetail AddTuningDetails(Channel channel, IChannel tvChannel)
    {
      string channelName = "";
      long channelFrequency = 0;
      int channelNumber = 0;
      int country = 31;
      bool isRadio = false;
      bool isTv = false;
      int tunerSource = 0;
      int videoInputType = 0;
      int audioInputType = 0;
      bool isVCRSignal = false;
      int symbolRate = 0;
      int modulation = 0;
      int polarisation = 0;
      int switchFrequency = 0;
      int diseqc = 0;
      int bandwidth = 8;
      bool freeToAir = true;
      int pmtPid = -1;
      int networkId = -1;
      int serviceId = -1;
      int transportId = -1;
      int minorChannel = -1;
      int majorChannel = -1;
      string provider = "";
      int channelType = 0;
      int band = 0;
      int satIndex = -1;
      int innerFecRate = (int)BinaryConvolutionCodeRate.RateNotSet;
      int pilot = (int)Pilot.NotSet;
      int rollOff = (int)RollOff.NotSet;
      string url = "";

      AnalogChannel analogChannel = tvChannel as AnalogChannel;
      if (analogChannel != null)
      {
        channelName = analogChannel.Name;
        channelFrequency = analogChannel.Frequency;
        channelNumber = analogChannel.ChannelNumber;
        country = analogChannel.Country.Index;
        isRadio = analogChannel.IsRadio;
        isTv = analogChannel.IsTv;
        tunerSource = (int)analogChannel.TunerSource;
        videoInputType = (int)analogChannel.VideoSource;
        audioInputType = (int)analogChannel.AudioSource;
        isVCRSignal = analogChannel.IsVCRSignal;
        channelType = 0;
      }

      ATSCChannel atscChannel = tvChannel as ATSCChannel;
      if (atscChannel != null)
      {
        majorChannel = atscChannel.MajorChannel;
        minorChannel = atscChannel.MinorChannel;
        channelNumber = atscChannel.PhysicalChannel;
        //videoPid = atscChannel.VideoPid;
        //audioPid = atscChannel.AudioPid;
        modulation = (int)atscChannel.ModulationType;
        channelType = 1;
      }

      DVBCChannel dvbcChannel = tvChannel as DVBCChannel;
      if (dvbcChannel != null)
      {
        symbolRate = dvbcChannel.SymbolRate;
        modulation = (int)dvbcChannel.ModulationType;
        channelNumber = dvbcChannel.LogicalChannelNumber;
        channelType = 2;
      }

      DVBSChannel dvbsChannel = tvChannel as DVBSChannel;
      if (dvbsChannel != null)
      {
        symbolRate = dvbsChannel.SymbolRate;
        polarisation = (int)dvbsChannel.Polarisation;
        switchFrequency = dvbsChannel.SwitchingFrequency;
        diseqc = (int)dvbsChannel.DisEqc;
        band = (int)dvbsChannel.BandType;
        satIndex = dvbsChannel.SatelliteIndex;
        modulation = (int)dvbsChannel.ModulationType;
        innerFecRate = (int)dvbsChannel.InnerFecRate;
        pilot = (int)dvbsChannel.Pilot;
        rollOff = (int)dvbsChannel.Rolloff;
        channelNumber = dvbsChannel.LogicalChannelNumber;
        channelType = 3;
      }

      DVBTChannel dvbtChannel = tvChannel as DVBTChannel;
      if (dvbtChannel != null)
      {
        bandwidth = dvbtChannel.BandWidth;
        channelNumber = dvbtChannel.LogicalChannelNumber;
        channelType = 4;
      }

      DVBIPChannel dvbipChannel = tvChannel as DVBIPChannel;
      if (dvbipChannel != null)
      {
        url = dvbipChannel.Url;
        channelNumber = dvbipChannel.LogicalChannelNumber;
        channelType = 7;
      }

      DVBBaseChannel dvbChannel = tvChannel as DVBBaseChannel;
      if (dvbChannel != null)
      {
        pmtPid = dvbChannel.PmtPid;
        networkId = dvbChannel.NetworkId;
        serviceId = dvbChannel.ServiceId;
        transportId = dvbChannel.TransportId;
        channelName = dvbChannel.Name;
        provider = dvbChannel.Provider;
        channelFrequency = dvbChannel.Frequency;
        isRadio = dvbChannel.IsRadio;
        isTv = dvbChannel.IsTv;
        freeToAir = dvbChannel.FreeToAir;
      }

      TuningDetail detail = new TuningDetail(channel.IdChannel, channelName, provider,
                                             channelType, channelNumber, (int)channelFrequency, country, isRadio, isTv,
                                             networkId, transportId, serviceId, pmtPid, freeToAir,
                                             modulation, polarisation, symbolRate, diseqc, switchFrequency,
                                             bandwidth, majorChannel, minorChannel, videoInputType,
                                             audioInputType, isVCRSignal, tunerSource, band,
                                             satIndex,
                                             innerFecRate, pilot, rollOff, url, 0);
      detail.Persist();
      return detail;
    }
Пример #4
0
 public IChannel GetTuningChannel(TuningDetail detail)
 {
   switch (detail.ChannelType)
   {
     case 0: //AnalogChannel
       AnalogChannel analogChannel = new AnalogChannel();
       analogChannel.ChannelNumber = detail.ChannelNumber;
       CountryCollection collection = new CountryCollection();
       analogChannel.Country = collection.Countries[detail.CountryId];
       analogChannel.Frequency = detail.Frequency;
       analogChannel.IsRadio = detail.IsRadio;
       analogChannel.IsTv = detail.IsTv;
       analogChannel.Name = detail.Name;
       analogChannel.TunerSource = (TunerInputType)detail.TuningSource;
       analogChannel.VideoSource = (AnalogChannel.VideoInputType)detail.VideoSource;
       analogChannel.AudioSource = (AnalogChannel.AudioInputType)detail.AudioSource;
       return analogChannel;
     case 1: //ATSCChannel
       ATSCChannel atscChannel = new ATSCChannel();
       atscChannel.MajorChannel = detail.MajorChannel;
       atscChannel.MinorChannel = detail.MinorChannel;
       atscChannel.PhysicalChannel = detail.ChannelNumber;
       atscChannel.FreeToAir = detail.FreeToAir;
       atscChannel.Frequency = detail.Frequency;
       atscChannel.IsRadio = detail.IsRadio;
       atscChannel.IsTv = detail.IsTv;
       atscChannel.Name = detail.Name;
       atscChannel.NetworkId = detail.NetworkId;
       atscChannel.PmtPid = detail.PmtPid;
       atscChannel.Provider = detail.Provider;
       atscChannel.ServiceId = detail.ServiceId;
       //atscChannel.SymbolRate = detail.Symbolrate;
       atscChannel.TransportId = detail.TransportId;
       atscChannel.ModulationType = (ModulationType)detail.Modulation;
       return atscChannel;
     case 2: //DVBCChannel
       DVBCChannel dvbcChannel = new DVBCChannel();
       dvbcChannel.ModulationType = (ModulationType)detail.Modulation;
       dvbcChannel.FreeToAir = detail.FreeToAir;
       dvbcChannel.Frequency = detail.Frequency;
       dvbcChannel.IsRadio = detail.IsRadio;
       dvbcChannel.IsTv = detail.IsTv;
       dvbcChannel.Name = detail.Name;
       dvbcChannel.NetworkId = detail.NetworkId;
       dvbcChannel.PmtPid = detail.PmtPid;
       dvbcChannel.Provider = detail.Provider;
       dvbcChannel.ServiceId = detail.ServiceId;
       dvbcChannel.SymbolRate = detail.Symbolrate;
       dvbcChannel.TransportId = detail.TransportId;
       dvbcChannel.LogicalChannelNumber = detail.ChannelNumber;
       return dvbcChannel;
     case 3: //DVBSChannel
       DVBSChannel dvbsChannel = new DVBSChannel();
       dvbsChannel.DisEqc = (DisEqcType)detail.Diseqc;
       dvbsChannel.Polarisation = (Polarisation)detail.Polarisation;
       dvbsChannel.SwitchingFrequency = detail.SwitchingFrequency;
       dvbsChannel.FreeToAir = detail.FreeToAir;
       dvbsChannel.Frequency = detail.Frequency;
       dvbsChannel.IsRadio = detail.IsRadio;
       dvbsChannel.IsTv = detail.IsTv;
       dvbsChannel.Name = detail.Name;
       dvbsChannel.NetworkId = detail.NetworkId;
       dvbsChannel.PmtPid = detail.PmtPid;
       dvbsChannel.Provider = detail.Provider;
       dvbsChannel.ServiceId = detail.ServiceId;
       dvbsChannel.SymbolRate = detail.Symbolrate;
       dvbsChannel.TransportId = detail.TransportId;
       dvbsChannel.BandType = (BandType)detail.Band;
       dvbsChannel.SatelliteIndex = detail.SatIndex;
       dvbsChannel.ModulationType = (ModulationType)detail.Modulation;
       dvbsChannel.InnerFecRate = (BinaryConvolutionCodeRate)detail.InnerFecRate;
       dvbsChannel.Pilot = (Pilot)detail.Pilot;
       dvbsChannel.Rolloff = (RollOff)detail.RollOff;
       dvbsChannel.LogicalChannelNumber = detail.ChannelNumber;
       return dvbsChannel;
     case 4: //DVBTChannel
       DVBTChannel dvbtChannel = new DVBTChannel();
       dvbtChannel.BandWidth = detail.Bandwidth;
       dvbtChannel.FreeToAir = detail.FreeToAir;
       dvbtChannel.Frequency = detail.Frequency;
       dvbtChannel.IsRadio = detail.IsRadio;
       dvbtChannel.IsTv = detail.IsTv;
       dvbtChannel.Name = detail.Name;
       dvbtChannel.NetworkId = detail.NetworkId;
       dvbtChannel.PmtPid = detail.PmtPid;
       dvbtChannel.Provider = detail.Provider;
       dvbtChannel.ServiceId = detail.ServiceId;
       dvbtChannel.TransportId = detail.TransportId;
       dvbtChannel.LogicalChannelNumber = detail.ChannelNumber;
       return dvbtChannel;
     case 7: //DVBIPChannel
       DVBIPChannel dvbipChannel = new DVBIPChannel();
       dvbipChannel.FreeToAir = detail.FreeToAir;
       dvbipChannel.IsRadio = detail.IsRadio;
       dvbipChannel.IsTv = detail.IsTv;
       dvbipChannel.Name = detail.Name;
       dvbipChannel.NetworkId = detail.NetworkId;
       dvbipChannel.PmtPid = detail.PmtPid;
       dvbipChannel.Provider = detail.Provider;
       dvbipChannel.ServiceId = detail.ServiceId;
       dvbipChannel.TransportId = detail.TransportId;
       dvbipChannel.LogicalChannelNumber = detail.ChannelNumber;
       dvbipChannel.Url = detail.Url;
       return dvbipChannel;
   }
   return null;
 }
Пример #5
0
 public TuningDetail AddWebStreamTuningDetails(Channel channel, string url, int bitrate)
 {
   string channelName = channel.DisplayName;
   const long channelFrequency = 0;
   const int channelNumber = 0;
   const int country = 31;
   bool isRadio = channel.IsRadio;
   bool isTv = channel.IsTv;
   const int tunerSource = 0;
   const int videoInputType = 0;
   const int audioInputType = 0;
   const bool isVCRSignal = false;
   const int symbolRate = 0;
   const int modulation = 0;
   const int polarisation = 0;
   const int switchFrequency = 0;
   const int diseqc = 0;
   const int bandwidth = 8;
   const bool freeToAir = true;
   const int pmtPid = -1;
   const int networkId = -1;
   const int serviceId = -1;
   const int transportId = -1;
   const int minorChannel = -1;
   const int majorChannel = -1;
   const string provider = "";
   const int channelType = 5;
   const int band = 0;
   const int satIndex = -1;
   const int innerFecRate = (int)BinaryConvolutionCodeRate.RateNotSet;
   const int pilot = (int)Pilot.NotSet;
   const int rollOff = (int)RollOff.NotSet;
   if (url == null)
   {
     url = "";
   }
   TuningDetail detail = new TuningDetail(channel.IdChannel, channelName, provider,
                                          channelType, channelNumber, (int)channelFrequency, country, isRadio, isTv,
                                          networkId, transportId, serviceId, pmtPid, freeToAir,
                                          modulation, polarisation, symbolRate, diseqc, switchFrequency,
                                          bandwidth, majorChannel, minorChannel, videoInputType,
                                          audioInputType, isVCRSignal, tunerSource, band,
                                          satIndex,
                                          innerFecRate, pilot, rollOff, url, bitrate);
   detail.Persist();
   return detail;
 }
        public bool comparetuningdetails(Channel channel1, Channel channel2)
        {
            #if(MP100)
            IList alltuningdetails1 = channel1.ReferringTuningDetail();
            #elif(MP101)
            IList<TuningDetail> alltuningdetails1 = channel1.ReferringTuningDetail();
            #else //MP11BETA or SVN
            IList<TuningDetail> alltuningdetails1 = channel1.ReferringTuningDetail();
            #endif

            TuningDetail[] tuningdetailarray1 = new TuningDetail[alltuningdetails1.Count];
            int i = 0;
            foreach (TuningDetail tuningdetail1 in alltuningdetails1)
            {
                tuningdetailarray1[i++] = tuningdetail1;
            }

            #if(MP100)
            IList alltuningdetails2 = channel2.ReferringTuningDetail();
            #elif(MP101)
            IList<TuningDetail> alltuningdetails2 = channel2.ReferringTuningDetail();
            #else //MP11BETA or SVN
            IList<TuningDetail> alltuningdetails2 = channel2.ReferringTuningDetail();
            #endif

            TuningDetail[] tuningdetailarray2 = new TuningDetail[alltuningdetails2.Count];
            i = 0;
            foreach (TuningDetail tuningdetail2 in alltuningdetails2)
            {
                tuningdetailarray2[i++] = tuningdetail2;
            }

            if (alltuningdetails1.Count != alltuningdetails2.Count)  //tuningdetail count not equal
                return false;

            for (i = 0; i < alltuningdetails1.Count; i++)
            {
                if (comparetuningdetail(tuningdetailarray1[i], tuningdetailarray2[i]) == false) //different tuning parameters
                    return false;
            }

            //    textoutput("Tunigdetails equal for channel " + channel1.IdChannel + " and channel " + channel2.IdChannel);

            return true;
        }
        public bool comparetuningdetail(TuningDetail tuningdetail1, TuningDetail tuningdetail2)
        {
            if ((tuningdetail1 == null) || (tuningdetail2 == null))
            {
                textoutput("Error: tuningdetail of channel is not defined");
                return false;
            }

            #if (MP12)
            #else
            if (tuningdetail1.AudioPid != tuningdetail2.AudioPid)
                return false;

            if (tuningdetail1.PcrPid != tuningdetail2.PcrPid)
                return false;

            if (tuningdetail1.VideoPid != tuningdetail2.VideoPid)
                return false;
            #endif

            if (tuningdetail1.Band != tuningdetail2.Band)
                return false;

            if (tuningdetail1.Bandwidth != tuningdetail2.Bandwidth)
                return false;

            if (tuningdetail1.Bitrate != tuningdetail2.Bitrate)
                return false;

            if (tuningdetail1.ChannelType != tuningdetail2.ChannelType)
                return false;

            if (tuningdetail1.CountryId != tuningdetail2.CountryId)
                return false;

            if (tuningdetail1.Diseqc != tuningdetail2.Diseqc)
                return false;

            if (tuningdetail1.FreeToAir != tuningdetail2.FreeToAir)
                return false;

            if (tuningdetail1.Frequency != tuningdetail2.Frequency)
                return false;

            if (tuningdetail1.InnerFecRate != tuningdetail2.InnerFecRate)
                return false;

            if (tuningdetail1.IsRadio != tuningdetail2.IsRadio)
                return false;

            if (tuningdetail1.IsTv != tuningdetail2.IsTv)
                return false;

            if (tuningdetail1.MajorChannel != tuningdetail2.MajorChannel)
                return false;

            if (tuningdetail1.MinorChannel != tuningdetail2.MinorChannel)
                return false;

            if (tuningdetail1.Modulation != tuningdetail2.Modulation)
                return false;

            if (tuningdetail1.Name != tuningdetail2.Name)
                return false;

            if (tuningdetail1.NetworkId != tuningdetail2.NetworkId)
                return false;

            if (tuningdetail1.Pilot != tuningdetail2.Pilot)
                return false;

            if (tuningdetail1.PmtPid != tuningdetail2.PmtPid)
                return false;

            if (tuningdetail1.Polarisation != tuningdetail2.Polarisation)
                return false;

            if (tuningdetail1.Provider != tuningdetail2.Provider)
                return false;

            if (tuningdetail1.RollOff != tuningdetail2.RollOff)
                return false;

            if (tuningdetail1.SatIndex != tuningdetail2.SatIndex)
                return false;

            if (tuningdetail1.ServiceId != tuningdetail2.ServiceId)
                return false;

            if (tuningdetail1.SwitchingFrequency != tuningdetail2.SwitchingFrequency)
                return false;

            if (tuningdetail1.Symbolrate != tuningdetail2.Symbolrate)
                return false;

            if (tuningdetail1.TransportId != tuningdetail2.TransportId)
                return false;

            if (tuningdetail1.TuningSource != tuningdetail2.TuningSource)
                return false;

            if (tuningdetail1.Url != tuningdetail2.Url)
                return false;

            if (tuningdetail1.VideoSource != tuningdetail2.VideoSource)
                return false;

            return true;
        }
        /// <summary>
        /// Fills in the ATSCChannel detail from the provided TuningDetail.
        /// </summary>
        /// <param name="tuneDetail">The TvDatabase.TuningDetail to use</param>
        /// <param name="atscChannel">The TvLibrary.Channels.ATSCChannel to fill in</param>
        /// <returns>true if successfully filled in the ATSCChannel Detail</returns>
        protected bool TransFormTuningDetailToATSCChannel(TuningDetail tuneDetail, ref ATSCChannel atscChannel)
        {
            if (tuneDetail.ChannelType != 1) //1=ATSC
               return false;

            atscChannel.MajorChannel    = tuneDetail.MajorChannel;
            atscChannel.MinorChannel    = tuneDetail.MinorChannel;
            atscChannel.PhysicalChannel = tuneDetail.ChannelNumber;
            atscChannel.FreeToAir       = tuneDetail.FreeToAir;
            atscChannel.Frequency       = tuneDetail.Frequency;
            atscChannel.IsRadio         = tuneDetail.IsRadio;
            atscChannel.IsTv            = tuneDetail.IsTv;
            atscChannel.Name            = tuneDetail.Name;
            atscChannel.NetworkId       = tuneDetail.NetworkId;
            atscChannel.PmtPid          = tuneDetail.PmtPid;
            atscChannel.Provider        = tuneDetail.Provider;
            atscChannel.ServiceId       = tuneDetail.ServiceId;
            //atscChannel.SymbolRate      = tuneDetail.Symbolrate;
            atscChannel.TransportId     = tuneDetail.TransportId;

            return true;
        }