Example #1
0
        private IPTZCtrl GetPTZCtrl(IVideoSourceConfig vsConfig)
        {
            CHKDVRDevice      device = null;
            CHKDVRVideoSource vs     = vsConfig.SystemContext.VideoSourceManager.GetVideoSource(vsConfig.Name) as CHKDVRVideoSource;

            if (vs != null)
            {
                device = vs.DVRDevice;
            }
            else
            {
                device = CHKDVRDevice.GetHKDevice(vsConfig.IP, vsConfig.Port, vsConfig.UserName, vsConfig.Password);
            }

            return(device.GetPTZCtrl(vsConfig.Channel));
        }
Example #2
0
 protected override bool InitAction()
 {
     CLocalSystem.WriteDebugLog(string.Format("CPTZAction({0}).InitAction: IP={1}, Port={2}, UserName={3}, Password={4}", Name, PTZConfig.IP, PTZConfig.Port, PTZConfig.UserName, PTZConfig.Password));
     mDVRDevice = CHKDVRDevice.GetHKDevice(PTZConfig.IP, (short)PTZConfig.Port, PTZConfig.UserName, PTZConfig.Password);
     return(mDVRDevice != null);
 }