Example #1
0
        public frmVideoPreview(string videoId)
        {
            InitializeComponent();

            if (!string.IsNullOrEmpty(videoId))
            {
                currentDefInfo = _vdefService.GetDefById(new DefGetRequest {
                    Id = videoId
                }).Data;
                if (currentDefInfo != null)
                {
                    this.txtip.Text   = currentDefInfo.IPAddress;
                    this.txtname.Text = currentDefInfo.Devname;

                    //初始化海康SDK
                    m_bInitSDK = HK32ChCNetSDK.NET_DVR_Init();

                    //初始化大华SDK
                    disConnect = new fDisConnectCallBack(DisConnectEvent);
                    blnInit    = NETClient.Init(disConnect, IntPtr.Zero, null);

                    m_RealDataCallBack           = new fRealDataCallBackEx(RealDataCallBack);                   //instance realdata callback.
                    m_RealPlayDisConnectCallBack = new fRealPlayDisConnectCallBack(RealPlayDisConnectCallBack); //instance realplay disconnect
                    m_SnapRevCallBack            = new fSnapRevCallBack(SnapRevCallBack);

                    videoLogin();
                }
            }
            else
            {
                this.StaticMsg.Caption = "没有找到相应的视频信息!";
            }
        }
Example #2
0
 public static extern bool CLIENT_SetRealDataCallBackEx(int lRealPlay, fRealDataCallBackEx cbRealData, IntPtr dwUser, uint dwFlag);
Example #3
0
 public static extern int CLIENT_StartRealPlay(int lLoginID, int nChannelID, IntPtr hWnd, REALPLAY_TYPE rType, fRealDataCallBackEx cbRealData, fRealPlayDisConnect cbDisconnect, int dwuser, int waittime = 1000);
Example #4
0
 public static extern IntPtr CLIENT_StartRealPlay(IntPtr lLoginID, int nChannelID, IntPtr hWnd, EM_RealPlayType rType, fRealDataCallBackEx cbRealData, fRealPlayDisConnectCallBack cbDisconnect, IntPtr dwUser, uint dwWaitTime);
Example #5
0
 private static extern bool CLIENT_SetRealDataCallBackEx(int lRealHandle, fRealDataCallBackEx cbRealData, IntPtr dwUser, UInt32 dwFlag);
Example #6
0
 /// <summary>
 /// Set real-time monitoring data callback expansion interface ,is complementary to the previous interface, add a callback parameter data type flag dwFlag, can be selectively to bring up the needed data,for the type of data did not set a callback callback out, when set to 0x1f with the same effect as an interface, but also done on the callback function expansion
 /// </summary>
 /// <param name="lRealHandle">CLIENT_RealPlay return value</param>
 /// <param name="cbRealData">The callback function,for outgoing various types of real-time data</param>
 /// <param name="dwFlag">
 /// Come bitwise, Can be combined, When is the 0x1f,callback of five data types 
 /// 0x00000001  Equivalent to the original raw data
 /// 0x00000002  Is the standard data MPEG4/H264
 /// 0x00000004  YUVdata
 /// 0x00000008  PCMdata
 /// 0x00000010  Original audio data</param>
 /// <param name="dwUser">user data</param>
 /// <returns>true:success;false:failure</returns>
 public static bool NETSetRealDataCallBack(int lRealHandle, fRealDataCallBackEx cbRealData,UInt32 dwFlag, IntPtr dwUser)
 {
     bool returnValue = CLIENT_SetRealDataCallBackEx(lRealHandle, cbRealData, dwUser,dwFlag);
     NETThrowLastError(returnValue);
     return returnValue;
 }
Example #7
0
 public static extern bool CLIENT_SetRealDataCallBackEx(IntPtr lRealHandle, fRealDataCallBackEx cbRealData, IntPtr dwUser, uint dwFlag);