public HKCardPlayer(IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) : base(config, null, factory) { HWnd = hWnd; Target = (Int32)config.Channel; }
public CVideoSource(IVideoSourceConfig config, IVideoDevice device, IVideoSourceFactory factory) : base() { mConfig = config; mDevice = device; mFactory = factory; }
public CVideoDevice(IVideoSourceFactory factory) : base() { mVideoSourceFactory = factory; Init(); }
public HKMP4FilePlayer(IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) : base(config, null, factory) { HWnd = hWnd; mPort = Handle % 64; mTimer.Enabled = false; mTimer.Interval = 500; mTimer.Tick += new EventHandler(OnTimerTick); Target = config.FileName; }
public ImageVideoSource(IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) : base(config, factory, hWnd) { if (HWnd != IntPtr.Zero) { mGraophics = Graphics.FromHwnd(HWnd); } mTimer.Enabled = false; mTimer.Interval = 25; mTimer.Tick += new EventHandler(OnTimerTick); Target = config.FileName; }
public IVideoSource Open(IVideoSourceConfig config, IVideoSourceType type, IntPtr hWnd) { if (config != null && config.Enabled) { IVideoSource vs = GetVideoSource(config.Name); if (vs == null) { IVideoSourceFactory vsFactory = GetVideoSourceFactory(type); if (vsFactory != null) { vs = vsFactory.CreateVideoSource(config, hWnd); if (vs != null) { lock (mVideoSources.SyncRoot) { if (vs.Open(null)) { vs.OnPlayStatusChanged += new PLAYSTATUS_CHANGED(DoPlayStausChanged); vs.OnRecordProgress += new RECORD_PROGRESS(DoRecordProgress); (vs as IKernelVideoSource).OnKernelStatus += new KERNELSTATUS_CHANGED(DoKernelStatus); mVideoSources.Add(vs.Name, vs); vs.RefreshState(); } else { return(null); } } } } } else { if (hWnd != IntPtr.Zero) { vs.HWnd = hWnd; } if (!vs.IsOpen) { vs.Open(null); } } return(vs); } return(null); }
public IVideoSource InitVideoSource(IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) { if (config != null) { lock (mVideoSourstTable.SyncRoot) { IVideoSource vs = (IVideoSource)mVideoSourstTable[config.Name]; if (vs == null) { vs = new StreamMediaPlayer(this, config, factory, hWnd); mVideoSourstTable.Add(vs.Name, vs); } return(vs); } } return(null); }
public HKCardNetPlayer(IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) : base(config, null, factory) { HWnd = hWnd; mClientVideoInfo.m_sIPAddress = config.IP; mClientVideoInfo.m_sUserName = "******"; mClientVideoInfo.m_sUserPassword = "******"; mClientVideoInfo.m_bUserCheck = false; mClientVideoInfo.m_bRemoteChannel = (byte)config.Channel; mClientVideoInfo.m_hShowVideo = hWnd; mClientVideoInfo.m_nImgFormat = 0; //0 主通道 1 子通道 mClientVideoInfo.m_bSendMode = HikClientSDKWrap.NetSendMode.TCPMODE; //mReadDataCallBack = new READDATA_CALLBACK(OnReadDataCallBack); mCapPicFun = new CAP_PIC_FUN(OnCapPicFun); Target = (Int32)config.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 AVIVideoSource(IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) : base(config, factory, hWnd) { if (HWnd != IntPtr.Zero && mGraophics == null) { mGraophics = Graphics.FromHwnd(HWnd); win32.GetClientRect(HWnd, ref mRect); } mTimer.Enabled = false; mTimer.Interval = 40; mTimer.Tick += new EventHandler(OnTimerTick); Target = config.FileName; if (Config.IsPush) { mDoEndOfFrameEvenHandle = new FileEndOfFrameEvenHandle(DoEndOfWriteFrame); } }
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; }
public CHKDVRVideoSource(IVideoSourceConfig config, IVideoDevice device, IVideoSourceFactory factory) : base(config, device, factory) { mPlayDataCallback = new PLAY_DATA_CALLBACK(DoPlayDataCallback); }
public StreamMediaVideoSource(StreamMediaClientManager manager, IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) : base(config, null, factory) { HWnd = hWnd; mStreamMidiaClientManager = manager; mHikClientPtr = Marshal.AllocHGlobal(Marshal.SizeOf(mHikClientAdviseSink)); }
public StreamMediaPlayer(StreamMediaClientManager manager, IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) : base(manager, config, factory, hWnd) { Target = "StreamMedia"; }
public FileVideoSource(IVideoSourceConfig config, IVideoSourceFactory factory, IntPtr hWnd) : base(config, null, factory) { HWnd = hWnd; }