Browse Source

0411

master
王厅 7 months ago
parent
commit
2ce6de48e6
  1. BIN
      bin/x64/Debug/AIConnectorSDK.dll
  2. BIN
      bin/x64/Release/AIConnectorSDK.dll
  3. 2
      include/AIConnectorAPI.h
  4. 26
      include/AIPVProtocol.h

BIN
bin/x64/Debug/AIConnectorSDK.dll

Binary file not shown.

BIN
bin/x64/Release/AIConnectorSDK.dll

Binary file not shown.

2
include/AIConnectorAPI.h

@ -19,7 +19,7 @@ extern "C" {
// module settings
bool KVS_API AIPV_SetModuleOperationTimeout(uint32_t handle, uint32_t milliseconds);
uint32_t KVS_API AIPV_LoadAIModule(uint32_t handle, const wchar_t* modulePath);
uint32_t KVS_API AIPV_LoadAIModule(uint32_t handle, AIPV::AIModuleType type);
bool KVS_API AIPV_SetAIModuleParam(uint32_t handle, uint32_t moduleID, const char* jsonSettings, uint32_t jsonLen);
bool KVS_API AIPV_GetAIModuleParam(uint32_t handle, uint32_t moduleID, char* jsonSettings, uint32_t& jsonLen);

26
include/AIPVProtocol.h

@ -44,7 +44,7 @@ namespace AIPV {
UploadImage = 128, // C -> S, AIPVCommandHeader + AIPVFrame
SubscribeAIResult, // C -> S, AIPVCommandHeader + AIPVSubscribeReq
PushAIResult, // S -> C, AIPVCommandHeader + AIPVResult
PushAIResult, // S -> C, AIPVCommandHeader + AIPVResult + AIPVStitchResult
LoadModule, // C -> S, AIPVCommandHeader + AIPVLoadModuleReq
ReleaseModule, // C -> S, AIPVCommandHeader + AIPVModuleIDReq
@ -101,9 +101,29 @@ namespace AIPV {
using AIPVResult = AIPVFrameHeader;
static const uint32_t AIPVResultSize = sizeof(AIPVResult);
struct AIPVStitchResultHeader {
uint16_t mWidth; //拼接之后图像宽
uint16_t mHeight; //拼接之后图像高
char mStitchImgName[AIPVMaxImgFilePathSize]; //拼接之后图像名称
uint32_t mStitchImgSize; //拼接之后图像大小
uint8_t mIsFinish; //是否拼接完成标志,为1 代表1张图拼接完成,为0 代表图还没有拼接完成,可以不用处理
uint8_t mRes[3]; //保留
//uint8_t* mStitchImgData; //拼接图像
};
static const uint32_t AIPVStitchResultHeaderSize = sizeof(AIPVStitchResultHeader);
// module
enum class AIModuleType {
ModuleNone = 0,
ModuleTest,
ModulePV,
};
std::string toStr(AIModuleType e);
struct AIPVLoadModuleReq {
char mPath[AIPVFilePathSize];
AIModuleType mType;
};
static const uint32_t AIPVLoadModuleReqSize = sizeof(AIPVLoadModuleReq);
struct AIPVModuleIDReq {
@ -126,7 +146,7 @@ namespace AIPV {
#pragma endregion
using fcbBeforeUpload = std::function<bool(AIPVFrameHeader* imgHeader, uint8_t* imgData, void* userData)>;
using fcbAIPVResult = std::function<void(AIPVResult* result, void* userData)>;
using fcbAIPVResult = std::function<void(AIPVResult* result, AIPVStitchResultHeader* stitchresult, uint8_t* mStitchImgData, void* userData)>;
}

Loading…
Cancel
Save