コード例 #1
0
        public bool VideoPlay()
        {
            string strUrl = GetHikStreamUrl(CurrentVideoInfo, CurrentCameraInfo);

            pdatarec = new pDataRec(MyDataRecCallBack);
            pmsgback = new pMsgBack(MyMsgRecCallBack);
            int intRet = HIKS_CreatePlayer(0, PicPlayMain.Handle, pdatarec, pmsgback, 0);

            if (intRet == -1)
            {
                VideoPlayCallback(new VideoPlayCallbackValue {
                    evType = Enum_VideoPlayEventType.VideoPlayException
                });
            }
            Temp_intHsession = intRet;
            intRet           = HIKS_OpenURL(Temp_intHsession, strUrl, 0);
            if (intRet == -1)
            {
                HIKS_Destroy(Temp_intHsession);
                VideoPlayCallback(new VideoPlayCallbackValue {
                    evType = Enum_VideoPlayEventType.VideoPlayException
                });
                return(false);
            }
            intRet = HIKS_Play(Temp_intHsession);
            VideoPlayCallback(new VideoPlayCallbackValue {
                evType = Enum_VideoPlayEventType.VideoPlay
            });
            VideoPlayState = Enum_VideoPlayState.InPlayState;
            return(true);
        }
コード例 #2
0
        /// <summary>
        /// 开始之前调用
        /// </summary>
        public int CreatePlayer(IntPtr mHand)
        {
            pMsgBack mb = new pMsgBack(MsgBack);

            playSession = HikSMClientSDK.HIKS_CreatePlayer(null, mHand, null, mb, 1);

            if (playSession == -1)
            {
                XtraMessageBox.Show("创建play句柄失败!");
            }

            return(playSession);
        }
コード例 #3
0
        /// <summary>
        /// 开始之前调用
        /// </summary>
        public int CreatePlayer(IntPtr mHand)
        {
            pMsgBack mb = new pMsgBack(MsgBack);

            playSession = HikSMClientSDK.HIKS_CreatePlayer(null, mHand, null, mb, 1);

            if (playSession == -1)
            {
                XtraMessageBox.Show("创建play句柄失败!");
            }

            return playSession;
        }
コード例 #4
0
ファイル: HikSMClientSDK.cs プロジェクト: ewin66/intvideosurv
 public static extern int HIKS_CreatePlayer(IHikClientAdviseSink pSink, IntPtr pWndSiteHandle, pDataRec pRecFunc, pMsgBack pMsgFunc, int TransMethod);
コード例 #5
0
 public static extern int HIKS_CreatePlayer(IHikClientAdviseSink pSink, IntPtr pWndSiteHandle, pDataRec pRecFunc, pMsgBack pMsgFunc, int TransMethod);
コード例 #6
0
 public static extern int HIKS_CreatePlayer(int j, IntPtr pWndSiteHandle, pDataRec pRecFunc, pMsgBack pMsgFunc, int TransMethod);