private CCTVControlType getControlType(VideoParser.Video._tagPanTiltUnit ptz) { if (ptz == null) { return(CCTVControlType.UnControl); } bool ctrl = ptz.EightDirections | ptz.FourDirections | ptz.Focus | ptz.Zoom | ptz.Preset | ptz.Trackable; return(ctrl ? CCTVControlType.DVR : CCTVControlType.UnControl); }
private SwitchInfo[] getAuxSwitch(VideoParser.Video._tagPanTiltUnit panTiltUnit) { if (panTiltUnit == null) { return(CCTVControlConfig.EmptySwitches); } else { return(panTiltUnit.AuxSwitchs.Select(x => new SwitchInfo() { Index = x.Index, Name = x.Name }).ToArray()); } }