//获取视频参数 public Int32 GetVideoParams(ref Int32 _iBri, ref Int32 _iCon, ref Int32 _iSat, ref Int32 _iHue) { Int32 iRet = -1; if (m_lHandle != -1) { DefVsClient.PARAM_SET_DATA ParamSetData = new DefVsClient.PARAM_SET_DATA(); DefVsClient.CHANNEL_CONINFOR sChConInfor = GetChConInfor(); ParamSetData.m_sNetLinkInfo = sChConInfor.m_sNetLinkInfo; ParamSetData.m_iChNo = sChConInfor.m_iChNo; ParamSetData.m_iCommand = (Int32)ParamCmdType.cmdViParam; ParamSetData.m_iPriority = 1; iRet = VsClientAPI.VSSP_ClientGetDevParam(ref ParamSetData); if (iRet == 0) { byte[] byteArray = ParamSetData.m_pchParams; _iBri = byteArray[0]; _iCon = byteArray[1]; _iSat = byteArray[2]; _iHue = byteArray[3]; } else { _iBri = 0; _iCon = 0; _iSat = 0; _iHue = 0; } } return(iRet); }
//设置视频参数 public Int32 SetVideoParams(Int32 _iBri, Int32 _iCon, Int32 _iSat, Int32 _iHue) { Int32 iRet = -1; if (m_lHandle != -1) { DefVsClient.PARAM_SET_DATA ParamSetData = new DefVsClient.PARAM_SET_DATA(); DefVsClient.CHANNEL_CONINFOR sChConInfor = GetChConInfor(); ParamSetData.m_sNetLinkInfo = sChConInfor.m_sNetLinkInfo; ParamSetData.m_iChNo = sChConInfor.m_iChNo; ParamSetData.m_iCommand = (Int32)ParamCmdType.cmdViParam; ParamSetData.m_iPriority = 1; byte[] byteArray = new byte[4096]; byteArray[0] = (byte)_iBri; byteArray[1] = (byte)_iCon; byteArray[2] = (byte)_iSat; byteArray[3] = (byte)_iHue; ParamSetData.m_pchParams = byteArray; iRet = VsClientAPI.VSSP_ClientSetDevParam(ref ParamSetData); } return(iRet); }