public static int USNTDVR_RealPlay_V30(int lUserID, ref NET_DVR_CLIENTINFO lpClientInfo, RealDataCallBack_V30 realDataCallBack, IntPtr pUser, int bBlocked) { if (_isX64) { return(USNTDvrDll64.USNTDVR_RealPlay_V30(lUserID, ref lpClientInfo, realDataCallBack, pUser, bBlocked)); } else { return(USNTDvrDll32.USNTDVR_RealPlay_V30(lUserID, ref lpClientInfo, realDataCallBack, pUser, bBlocked)); } }
internal int RealPlay_V30(ref NET_DVR_CLIENTINFO lpClientInfo, RealDataCallBack_V30 realDataCallBack, IntPtr pUser, int bBlocked) { if (Dvr.IsHik) { return(NetDvrDll.NET_DVR_RealPlay_V30(Dvr.Handle, ref lpClientInfo, realDataCallBack, pUser, bBlocked)); } else { return(UsntDvrDll.USNTDVR_RealPlay_V30(Dvr.Handle, ref lpClientInfo, realDataCallBack, pUser, bBlocked)); } }
private void realPlay(int channel, bool isSubStream, IntPtr handle) { NET_DVR_CLIENTINFO ci = new NET_DVR_CLIENTINFO(); ci.lChannel = channel; if (isSubStream) { ci.lLinkMode = 0x80000000; } ci.hPlayWnd = handle; _realDataCallBack = onRealData; _playHandle = _serial.RealPlay_V30(ref ci, _realDataCallBack, IntPtr.Zero, 0); Console.WriteLine("Play Handle: " + _playHandle); _serial.GetError(); if (_playHandle < 0) { throw new InvalidOperationException("视频播放失败!"); } }
public static extern int USNTDVR_RealPlay_V30(int lUserID, ref NET_DVR_CLIENTINFO lpClientInfo, RealDataCallBack_V30 realDataCallBack, IntPtr pUser, int bBlocked);