Пример #1
0
        public static WCFChannel ToWCF(Channel channel)
        {
            ChannelDVBT ch = channel as ChannelDVBT;

            return(new WCFChannel
            {
                AudioDecoderDevice = ch.AudioDecoderDevice,
                AudioDecoderType = Convert.ToInt32(ch.AudioDecoderType),
                AudioPid = ch.AudioPid,
                AudioPids = ch.AudioPids,
                AudioRendererDevice = ch.AudioRendererDevice,
                Bandwidth = ch.Bandwidth,
                CaptureDevice = ch.CaptureDevice,
                ChannelNumber = ch.ChannelNumber,
                EcmPid = ch.EcmPid,
                EcmPids = ch.EcmPids,
                Frequency = ch.Frequency,
                Guard = Convert.ToInt32(ch.Guard),
                H264DecoderDevice = ch.H264DecoderDevice,
                HAlpha = Convert.ToInt32(ch.HAlpha),
                InnerFEC = Convert.ToInt32(ch.InnerFEC),
                InnerFECRate = Convert.ToInt32(ch.InnerFECRate),
                Logo = ch.Logo,
                LPInnerFEC = Convert.ToInt32(ch.LPInnerFEC),
                LPInnerFECRate = Convert.ToInt32(ch.LPInnerFECRate),
                Mode = Convert.ToInt32(ch.Mode),
                Modulation = Convert.ToInt32(ch.Modulation),
                MPEG2DecoderDevice = ch.MPEG2DecoderDevice,
                Name = ch.Name,
                ONID = ch.ONID,
                OtherFrequencyInUse = ch.OtherFrequencyInUse,
                OuterFEC = Convert.ToInt32(ch.OuterFEC),
                OuterFECRate = Convert.ToInt32(ch.OuterFECRate),
                PcrPid = ch.PcrPid,
                PmtPid = ch.PmtPid,
                ReferenceClock = Convert.ToInt32(ch.ReferenceClock),
                SID = ch.SID,
                SymbolRate = ch.SymbolRate,
                TeletextPid = ch.TeletextPid,
                TSID = ch.TSID,
                TunerDevice = ch.TunerDevice,
                VideoAspectRatioFactor = ch.VideoAspectRatioFactor,
                VideoDecoderType = Convert.ToInt32(ch.VideoDecoderType),
                VideoKeepAspectRatio = ch.VideoKeepAspectRatio,
                VideoOffset = NetWCFConverter.ToWCF(ch.VideoOffset),
                VideoPid = ch.VideoPid,
                VideoRendererDevice = ch.VideoRendererDevice,
                VideoZoom = ch.VideoZoom,
                VideoZoomMode = Convert.ToInt32(ch.VideoZoom)
            });
        }