Ejemplo n.º 1
0
        /// <summary>
        /// 变焦
        /// </summary>
        /// <param name="nvr"></param>
        /// <param name="cha"></param>
        /// <param name="dir"></param>
        void NvrInterface.nvrZoom(int session, int cha, ZOOM_DIR dir)
        {
            // 开始变焦
            if (dir == ZOOM_DIR.ZOOM_IN)
            {
                CHCNetSDK.NET_DVR_PTZControlWithSpeed_Other(session - 1, cha, 11, 0, 7);
            }
            else
            {
                CHCNetSDK.NET_DVR_PTZControlWithSpeed_Other(session - 1, cha, 12, 0, 7);
            }

            // 停止变焦
            CHCNetSDK.NET_DVR_PTZControlWithSpeed_Other(session - 1, cha, 11, 1, 7);
            CHCNetSDK.NET_DVR_PTZControlWithSpeed_Other(session - 1, cha, 12, 1, 7);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 变焦控制
        /// </summary>
        /// <param name="nvr"></param>
        /// <param name="channel"></param>
        /// <param name="dir"></param>
        public void zoomStart(int nvr, int channel, ZOOM_DIR dir)
        {
            NVR_INFO nvrInfo = (NVR_INFO)nvrConfig[nvr];

            if (nvrInfo == null)
            {
                return;
            }

            if (nvrInfo.session < 1)
            {
                return;
            }

            NvrInterface nvrAdp = (NvrInterface)nvrAdapters[nvrInfo.type];

            if (nvrAdp == null)
            {
                return;
            }

            nvrAdp.nvrZoom(nvrInfo.session, channel, dir);
        }