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) }); }
public static Channel ToNET(WCFChannel channel) { return(new ChannelDVBT { AudioDecoderDevice = channel.AudioDecoderDevice, AudioDecoderType = (TV2Lib.ChannelDVB.AudioType)channel.AudioDecoderType, AudioPid = channel.AudioPid, AudioPids = channel.AudioPids, AudioRendererDevice = channel.AudioRendererDevice, Bandwidth = channel.Bandwidth, CaptureDevice = channel.CaptureDevice, ChannelNumber = channel.ChannelNumber, EcmPid = channel.EcmPid, EcmPids = channel.EcmPids, Frequency = channel.Frequency, Guard = (DirectShowLib.BDA.GuardInterval)channel.Guard, H264DecoderDevice = channel.H264DecoderDevice, HAlpha = (DirectShowLib.BDA.HierarchyAlpha)channel.HAlpha, InnerFEC = (DirectShowLib.BDA.FECMethod)channel.InnerFEC, InnerFECRate = (DirectShowLib.BDA.BinaryConvolutionCodeRate)channel.InnerFECRate, Logo = channel.Logo, LPInnerFEC = (DirectShowLib.BDA.FECMethod)channel.LPInnerFEC, LPInnerFECRate = (DirectShowLib.BDA.BinaryConvolutionCodeRate)channel.LPInnerFECRate, Mode = (DirectShowLib.BDA.TransmissionMode)channel.Mode, Modulation = (DirectShowLib.BDA.ModulationType)channel.Modulation, MPEG2DecoderDevice = channel.MPEG2DecoderDevice, Name = channel.Name, ONID = channel.ONID, OtherFrequencyInUse = channel.OtherFrequencyInUse, OuterFEC = (DirectShowLib.BDA.FECMethod)channel.OuterFEC, OuterFECRate = (DirectShowLib.BDA.BinaryConvolutionCodeRate)channel.OuterFECRate, PcrPid = channel.PcrPid, PmtPid = channel.PmtPid, ReferenceClock = (TV2Lib.ChannelDVB.Clock)channel.ReferenceClock, SID = channel.SID, SymbolRate = channel.SymbolRate, TeletextPid = channel.TeletextPid, TSID = channel.TSID, TunerDevice = channel.TunerDevice, VideoAspectRatioFactor = channel.VideoAspectRatioFactor, VideoDecoderType = (TV2Lib.ChannelDVB.VideoType)channel.VideoDecoderType, VideoKeepAspectRatio = channel.VideoKeepAspectRatio, VideoOffset = NetWCFConverter.ToNET(channel.VideoOffset), VideoPid = channel.VideoPid, VideoRendererDevice = channel.VideoRendererDevice, VideoZoom = channel.VideoZoom, VideoZoomMode = (VideoSizeMode)channel.VideoZoom }); }