Ejemplo n.º 1
0
        public override bool Ptz_LenCamera(VideoControl vc, PTZ.LenType lenType)
        {
            ControlInfo_Preview info = this.m_ControlTable[vc] as ControlInfo_Preview;

            if (info == null)
            {
                return(false);
            }


            string ptzCmd = "";

            PTZ.LenType d = lenType;
            if (d == PTZ.LenType.Stop)
            {
                d = (PTZ.LenType)info.LastLenType;
            }
            switch (d)
            {
            case PTZ.LenType.LensTele:
                ptzCmd = "ZOOMIN";
                break;

            case PTZ.LenType.LensWide:
                ptzCmd = "ZOOMOUT";
                break;

            default:
                break;
            }
            if (lenType == PTZ.LenType.Stop)
            {
                ptzCmd += "_STOP";
            }
            info.LastLenType = (int)lenType;

            return(Hik_Open8200API.Std_PtzCtrl((int)info.LoginHandle, info.Camera.CameraCode, ptzCmd, 49, 0, 0) >= 0 ? true : false);
        }
Ejemplo n.º 2
0
 public virtual bool Ptz_LenCamera(VideoControl vc, PTZ.LenType lenType)
 {
     this.LogModule?.Error("不支持镜头控制");
     return(false);
 }