diff --git a/bin/x64/Debug/AIConnectorSDK.dll b/bin/x64/Debug/AIConnectorSDK.dll index 0d748b5..9624307 100644 Binary files a/bin/x64/Debug/AIConnectorSDK.dll and b/bin/x64/Debug/AIConnectorSDK.dll differ diff --git a/bin/x64/Release/AIConnectorSDK.dll b/bin/x64/Release/AIConnectorSDK.dll index 07c470b..b9304d0 100644 Binary files a/bin/x64/Release/AIConnectorSDK.dll and b/bin/x64/Release/AIConnectorSDK.dll differ diff --git a/include/AIConnectorAPI.h b/include/AIConnectorAPI.h index e8b1f1d..35d6d99 100644 --- a/include/AIConnectorAPI.h +++ b/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); diff --git a/include/AIPVProtocol.h b/include/AIPVProtocol.h index ed0fa1d..55cb4fb 100644 --- a/include/AIPVProtocol.h +++ b/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; - using fcbAIPVResult = std::function; + using fcbAIPVResult = std::function; }