Ejemplo n.º 1
0
        public void  Init()
        {
            TotalDSP = 0;
            int totalDSP = 0;

            IsValid = false;
            //初始化板卡
            int x    = HikVisionSDK.HW_ReleaseDecDevice();
            int iRtn = HikVisionSDK.HW_InitDecDevice(ref totalDSP);

            if (iRtn < 0)
            {
                errMessage = "设备初始化失败";
                XtraMessageBox.Show(errMessage);
                return;
            }
            TotalDSP = totalDSP;

            if (TotalDSP == 0)
            {
                //errMessage = "没有可用的通道!!您是否已经启动服务器端?";
                //XtraMessageBox.Show(errMessage);
                return;
            }

            //iRtn = HikVisionSDK.SetDefaultVideoStandard(VideoStandard_t.StandardPAL);
            //if (iRtn < 0)
            //{
            //    errMessage = "设置视频制式失败";
            //    XtraMessageBox.Show(errMessage);
            //    return;
            //}
            IsValid = true;
        }
Ejemplo n.º 2
0
        public void Close()
        {
            bool iRtn = HCNetSDK.NET_DVR_ReleaseDDraw_Card();

            HikVisionSDK.HW_ReleaseDecDevice();
        }