|
你好,这里用平台检索录像举例。通过调用BVCU.h中的BVCU_SendCmd发送命令接口,发送BVCU_SUBMETHOD_SEARCH_LIST命令:
BVCU_Search_Request stSearchReq; memset(&stSearchReq, 0x00, sizeof(stSearchReq));
stSearchReq.stSearchInfo.iType = BVCU_SEARCH_TYPE_FILE; // 类型为文件检索
stSearchReq.stSearchInfo.iPostition = 0; // 从0开始
stSearchReq.stSearchInfo.iCount = 128; // 本次检索的条数
// stFilter是检索文件的过滤条件,具体见注释
stSearchReq.stFilter.stFileFilter.iChannelIndex = 0; // 通道号
stSearchReq.stFilter.stFileFilter.iFileType = BVCU_STORAGE_FILE_TYPE_RECORD; // 检索录像文件
BVCU_Command cmdInfo;
memset(&cmdInfo, 0, sizeof(cmdInfo));
cmdInfo.iSize = sizeof(cmdInfo);
cmdInfo.iMethod = BVCU_METHOD_QUERY;
cmdInfo.iSubMethod = BVCU_SUBMETHOD_SEARCH_LIST;
cmdInfo.OnEvent = cmd_OnEvent;
cmdInfo.stMsgContent.pData = &stSearchReq;
cmdInfo.stMsgContent.iDataCount = 1;
return BVCU_SendCmd(m_session, &cmdInfo);
发送命令成功后,在cmd_OnEvent回调中返回检索结果,即获取到的平台录像。可基于stSearchReq.stFilter.stFileFilter 结构体条件自行填写过滤条件。具体注释有说明
|
|