Esempio n. 1
0
 public override bool NeedToRebuildTheGraph(ChannelTV newChannel)
 {
     return(!(newChannel is ChannelAnalogic) ||
            base.NeedToRebuildTheGraph(newChannel) ||
            (newChannel as ChannelAnalogic).VideoCaptureDeviceName != VideoCaptureDeviceName ||
            (newChannel as ChannelAnalogic).AudioCaptureDeviceName != AudioCaptureDeviceName ||
            !(newChannel as ChannelAnalogic).FormatOfCapture.Equals(FormatOfCapture));
 }
Esempio n. 2
0
        public virtual bool NeedToRebuildTheGraph(Channel newChannel)
        {
            if (!(newChannel is ChannelTV) || !(this.currentChannel is ChannelTV))
            {
                return(true);
            }

            ChannelTV channelNew     = newChannel as ChannelTV;
            ChannelTV channelCurrent = this.currentChannel as ChannelTV;

            return(channelCurrent.NeedToRebuildTheGraph(channelNew));
        }
Esempio n. 3
0
 public override bool NeedToRebuildTheGraph(ChannelTV newChannel)
 {
     return(!(newChannel is ChannelDVB) ||
            base.NeedToRebuildTheGraph(newChannel) ||
            (newChannel as ChannelDVB).AudioDecoderType != AudioDecoderType ||
            (newChannel as ChannelDVB).AudioDecoderDevice != AudioDecoderDevice ||
            (newChannel as ChannelDVB).VideoDecoderType != VideoDecoderType ||
            (newChannel as ChannelDVB).H264DecoderDevice != H264DecoderDevice ||
            (newChannel as ChannelDVB).MPEG2DecoderDevice != MPEG2DecoderDevice ||
            (newChannel as ChannelDVB).TunerDevice != TunerDevice ||
            (newChannel as ChannelDVB).CaptureDevice != CaptureDevice ||
            (newChannel as ChannelDVB).ReferenceClock != ReferenceClock);
 }
Esempio n. 4
0
 public override bool NeedToRebuildTheGraph(ChannelTV newChannel)
 {
     return(!(newChannel is ChannelDVBS) || base.NeedToRebuildTheGraph(newChannel));
 }
Esempio n. 5
0
 public virtual bool NeedToRebuildTheGraph(ChannelTV newChannel)
 {
     return(newChannel.AudioRendererDevice != AudioRendererDevice);
 }
Esempio n. 6
0
        public static void PopulateChannelWithTransponderSettings(ref ChannelTV channel, string frequency)
        {
            string[] fields = frequency.Split(new char[] { ',' });
            if (channel is ChannelDVBT)
            {
                //Channelname,Frequency(KHz),Inversion(0,1),0,Bandwidth (7MHz=1, 8MHz=2)
                //C05,177.500,0,0,1
                ChannelDVBT channelDVBT = channel as ChannelDVBT;
                channelDVBT.Frequency = int.Parse(fields[1].Trim().Replace(".", ""));
                channelDVBT.Bandwidth = (fields[4].Trim() == "1" ? 7 : 8);
            }
            else if (channel is ChannelDVBC)
            {
                //Frequency(KHz), Symbolrate(Ks/s), QAM
                //50500,6900,0
                //57500,6900,64
                ChannelDVBC channelDVBC = channel as ChannelDVBC;
                channelDVBC.Frequency  = int.Parse(fields[0].Trim().Replace(".", ""));
                channelDVBC.SymbolRate = int.Parse(fields[1].Trim());
                int modulation = int.Parse(fields[2].Trim());
                switch (modulation)
                {
                case 0: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.ModNotSet; break;

                case 16: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod16Qam; break;

                case 32: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod32Qam; break;

                case 64: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod64Qam; break;

                case 80: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod80Qam; break;

                case 96: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod96Qam; break;

                case 112: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod112Qam; break;

                case 128: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod128Qam; break;

                case 160: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod160Qam; break;

                case 192: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod192Qam; break;

                case 224: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod224Qam; break;

                case 256: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod256Qam; break;

                case 320: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod320Qam; break;

                case 384: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod384Qam; break;

                case 448: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod448Qam; break;

                case 512: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod512Qam; break;

                case 640: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod640Qam; break;

                case 768: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod768Qam; break;

                case 896: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod896Qam; break;

                case 1024: channelDVBC.Modulation = DirectShowLib.BDA.ModulationType.Mod1024Qam; break;
                }
            }
            else if (channel is ChannelDVBS)
            {
                //Frequecny,polarisation,symbol rate,FEC
                //11016,H, 6284,78
                ChannelDVBS channelDVBS = channel as ChannelDVBS;

                channelDVBS.Frequency = int.Parse(fields[0].Trim().Replace(".", ""));

                string polarisation = fields[1].Trim();
                if (polarisation == "H")
                {
                    channelDVBS.SignalPolarisation = DirectShowLib.BDA.Polarisation.LinearH;
                }
                else if (polarisation == "V")
                {
                    channelDVBS.SignalPolarisation = DirectShowLib.BDA.Polarisation.LinearV;
                }
                else if (polarisation == "L")
                {
                    channelDVBS.SignalPolarisation = DirectShowLib.BDA.Polarisation.CircularL;
                }
                else if (polarisation == "R")
                {
                    channelDVBS.SignalPolarisation = DirectShowLib.BDA.Polarisation.CircularR;
                }

                channelDVBS.SymbolRate = int.Parse(fields[2].Trim());
            }
        }