📄 motiondetectiongetset.c
字号:
#include "Utility.h"
#include "SrvDepResource.h"
/*!
***************************************************************************
* \brief
* get/set motion detection rectangle
* \param tServerInfo
[in] server info
* \param atMotionInfo[3]
[in/out] array to store the motion rectangle info
* \param *piWndNumber
[out] the number of motion detection rectnagles when getting motion info
* \param bGetMotionInfo
[in] true means to get motion detection info
* \return
* \retval S_FAIL atMotionInfo is NULL
* \retval S_OK operation success
**************************************************************************/
SCODE MotionGetSet(TSERVER_INFO tServerInfo, TSERVERUTL_MODETECT_INFO atMotionInfo[3], int *piWndNumber, BOOL bGetMotionInfo)
{
HANDLE hServerUtl;
HANDLE hDevice;
char lpszModelName[64];
SCODE scRet;
if (atMotionInfo == NULL)
return S_FAIL;
scRet = ServerUtlInit(&hServerUtl, &hDevice, lpszModelName, tServerInfo);
if (scRet != S_OK)
return scRet;
if (bGetMotionInfo)
{
scRet = ServerUtl_GetMotionDetectionInfo(hDevice, atMotionInfo, piWndNumber,
FALSE, FALSE);
if (scRet != S_OK)
{
ServerUtlRelease(&hServerUtl, &hDevice);
return scRet;
}
}
else
{
scRet = ServerUtl_SetMotionDetectionInfo(hDevice, atMotionInfo, FALSE, FALSE);
if (scRet != S_OK)
{
ServerUtlRelease(&hServerUtl, &hDevice);
return scRet;
}
}
ServerUtlRelease(&hServerUtl, &hDevice);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -