private AlarmClient GetAlarmClient(IVideoSourceConfig vsConfig) { if (vsConfig != null && vsConfig.Type.StartsWith("HKDVR")) { return(CHKDVRDevice.GetAlarmClient(vsConfig.IP, (short)vsConfig.Port, vsConfig.UserName, vsConfig.Password)); } return(null); }
private AlarmClient GetDVRAlarmClient() { if (LampConfig != null) { return(CHKDVRDevice.GetAlarmClient(LampConfig.IP, (short)LampConfig.Port, LampConfig.UserName, LampConfig.Password)); } return(null); }
private AlarmClient GetAlarmClient() { if (AlarmOutConfig != null && !AlarmOutConfig.IP.Equals("")) { return(CHKDVRDevice.GetAlarmClient(AlarmOutConfig.IP, (short)AlarmOutConfig.Port, AlarmOutConfig.UserName, AlarmOutConfig.Password)); } return(null); }
private AlarmClient GetDVRAlarmClient() { if (TrumpetConfig != null) { return(CHKDVRDevice.GetAlarmClient(TrumpetConfig.IP, (short)TrumpetConfig.Port, TrumpetConfig.UserName, TrumpetConfig.Password)); } return(null); }
public CHKPTZCtrl(CHKDVRRealPlayer player) : base() { mDevice = player.DVRDevice; mPlayer = player; MinSpeed = 1; MaxSpeed = 7; }
public CHKPTZCtrl(CHKDVRDevice device, int playHandle, int channel) : base() { mDevice = device; mPlayHandle = playHandle; mChannel = channel; MinSpeed = 1; MaxSpeed = 7; }
public bool SyncTime(string ip, string username) { CHKDVRDevice device = GetDevice(ip, username); if (device != null) { return(device.SyncTime()); } return(false); }
public bool MakeKeyFrame() { CHKDVRDevice device = DVRDevice; if (device != null && device.IsLogin) { //CLocalSystem.WriteLog("Debug", "Call HKDVRPlayer.MakeKeyFrame()"); return(HCNetSDKWrap.NET_DVR_MakeKeyFrame(device.UserID, Channel)); } return(false); }
public override IVideoDevice GetVideoDevice(string ip, int port, string username, string password, bool checkStatus) { CHKDVRDevice device = base.GetVideoDevice(ip, port, username, password, checkStatus) as CHKDVRDevice; if (device != null) { device.GetRecordFile().OnDownProgress += new RECORDFILE_DOWNPROGRESS(DoRecordFileDownProgress); } return(device); }
public virtual IVideoDevice GetVideoDevice(string ip, int port, string username, string password, bool checkStatus) { CHKDVRDevice device = this.GetVideoDevice(ip, port, username, password) as CHKDVRDevice; if (device != null) { device.AutoCheckStatus = checkStatus; } return(device); }
public int GetStatusEventIgnoreCount(string ip, string username) { CHKDVRDevice device = GetDevice(ip, username); if (device != null) { return(device.StatusEventIgnoreCount); } return(-1); }
public bool SetStatusEventIgnoreCount(string ip, string username, int ignoreCount) { CHKDVRDevice device = GetDevice(ip, username); if (device != null) { device.StatusEventIgnoreCount = ignoreCount; return(true); } return(false); }
public CHKDVRDevice GetDevice(string ip, string username, string password, bool checkStatus) { String key = "Device_" + ip + "_" + username; lock (mDevices) { CHKDVRDevice device = (CHKDVRDevice)mDevices[key]; if (device == null) { device = new CHKDVRDevice(null); try { if (device.Login(ip, 8000, username, password)) { device.OnPlayStatusChanged += new PLAYSTATUS_CHANGED(DoPlayStatusChange); mDevices.Add(device.Key, device); } else { device.Dispose(); return(null); } } catch { device.Dispose(); return(null); } } else if (!device.IsLogin) { try { if (!device.Login(ip, 8000, username, password)) { mDevices.Remove(device.Key); device.Dispose(); return(null); } } catch { mDevices.Remove(device.Key); device.Dispose(); return(null); } } device.AutoCheckStatus = checkStatus; return(device); } }
public AlarmClient GetAlarmClient(String ip, String username, String password) { CHKDVRDevice device = GetDevice(ip, username, password, false); lock (mDevices) { if (device != null) { return(device.GetAlarmClient()); } return(null); } }
public bool Download(DateTime startTime, DateTime stopTime, string fileName) { CHKDVRDevice device = mFactory.GetVideoDevice(IP, 8000, UserName, Password, true) as CHKDVRDevice; if (device != null) { IRecordFile file = device.GetRecordFile(); if (file != null) { return(file.Download(Channel, startTime, stopTime, fileName)); } } return(false); }
public bool Download(string sFileName, string dFileName) { CHKDVRDevice device = mFactory.GetVideoDevice(IP, 8000, UserName, Password, true) as CHKDVRDevice; if (device != null) { IRecordFile file = device.GetRecordFile(); if (file != null) { return(file.Download(sFileName, dFileName)); } } return(false); }
public bool StopDownload() { CHKDVRDevice device = mFactory.GetDevice(IP, UserName); if (device != null) { IRecordFile file = device.GetRecordFile(); if (file != null) { return(file.Stop()); } } return(false); }
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)); }
public CHKDVRBackPlayer(IVideoSourceConfig config, CHKDVRDevice device, IVideoSourceFactory factory, string fileName, IntPtr hWnd) : base(config, device, factory) { RecordFile = new CHKDVRRecordFile(device); RecordFile.RemoteFileName = fileName; HWnd = hWnd; if (HWnd == IntPtr.Zero) { if (mPanel == null) { mPanel = new Panel(); } HWnd = mPanel.Handle; } mType = 1; Target = fileName; }
public CHKDVRBackPlayer(IVideoSourceConfig config, CHKDVRDevice device, IVideoSourceFactory factory, int channel, ref DateTime startTime, ref DateTime stopTime, IntPtr hWnd) : base(config, device, factory) { RecordFile = new CHKDVRRecordFile(device); RecordFile.Channel = channel; RecordFile.StartTime = startTime; RecordFile.StopTime = stopTime; HWnd = hWnd; if (HWnd == IntPtr.Zero) { if (mPanel == null) { mPanel = new Panel(); } HWnd = mPanel.Handle; } mType = 2; mTStartTime = startTime; mStartTime.dwYear = startTime.Year; mStartTime.dwMonth = startTime.Month; mStartTime.dwDay = startTime.Day; mStartTime.dwHour = startTime.Hour; mStartTime.dwMinute = startTime.Minute; mStartTime.dwSecond = startTime.Second; mTStopTime = stopTime; mStopTime.dwYear = stopTime.Year; mStopTime.dwMonth = stopTime.Month; mStopTime.dwDay = stopTime.Day; mStopTime.dwHour = stopTime.Hour; mStopTime.dwMinute = stopTime.Minute; mStopTime.dwSecond = stopTime.Second; Target = (Int32)channel; }
public CHKDVRRealPlayer(IVideoSourceConfig config, CHKDVRDevice device, IVideoSourceFactory factory, int channel, uint linkmode, IntPtr hWnd, string multiCastIP) : base(config, device, factory) { HWnd = hWnd; if (HWnd == IntPtr.Zero) { if (mPanel == null) { mPanel = new Panel(); } HWnd = mPanel.Handle; } /* 最高位(31)为0表示主码流,为1表示子码流,0-30位表示码流连接方式:0:TCP方式,1:UDP方式,2:多播方式,3 - RTP方式,4—音视频分开 */ //子码流: 0x80000000 mClientInfo.lLinkMode = linkmode; mClientInfo.sMultiCastIP = multiCastIP; mClientInfo.hPlayWnd = HWnd; PTZCtrl = new CHKPTZCtrl(this); Target = (Int32)channel; }
protected override bool CleanupAction() { mDVRDevice = null; return(true); }
public RecordFileInfo[] ListFile() { return(CHKDVRDevice.ListFile(DVRDevice.UserID, Channel, ref mTStartTime, ref mTStopTime)); }
public RecordFileInfo[] ListFile(ref DateTime startTime, ref DateTime stopTime) { return(CHKDVRDevice.ListFile(DVRDevice.UserID, Channel, ref startTime, ref stopTime)); }
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); }