AddProtoMetadata
Function Usage
Mounts proto metadata to MxpiBuffer and add data to the serialization plugin.
Before calling this API, ensure that the content to which the metadata pointer points is ready and will not be modified.
Prototype
APP_ERROR AddProtoMetadata(const std::string& key, std::shared_ptr<void> metadata);
Parameter Description
Parameter |
Description |
|---|---|
key |
Key name of the proto metadata to be mounted to the buffer. |
metadata |
Proto metadata to be mounted to the buffer. The metadata must be a smart pointer of the protobuf message type. Otherwise, the program may be abnormal. |
Return Parameter Description
Data Structure |
Description |
|---|---|
APP_ERROR |
Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file. |
Parent topic: MxpiMetadataManager