Stream接收的buffer和元数据结构定义。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | struct MxstMetadataOutput { APP_ERROR errorCode = APP_ERR_OK; std::string errorMsg; std::string dataType; std::shared_ptr<google::protobuf::Message> dataPtr; void *reservedPtr = nullptr; MxstMetadataOutput() = default; explicit MxstMetadataOutput(const std::string& dataType) : dataType(std::move(dataType)) {} explicit MxstMetadataOutput(APP_ERROR errorCode, const std::string& errorMsg = "") : errorCode(errorCode), errorMsg(std::move(errorMsg)) {} void SetErrorInfo(APP_ERROR errorCodeIn, const std::string& errorMsgIn) { errorCode = errorCodeIn; errorMsg = errorMsgIn; } }; |
参数名 |
输入/输出 |
说明 |
---|---|---|
errorCode |
输入 |
错误码。 |
errorMsg |
输入 |
错误信息。 |
dataType |
输入 |
元数据类型,即protobuf定义的message名称。 |
dataPtr |
输入 |
输出元数据的智能指针。 |
reservedPtr |
输入 |
预留指针。 |