下载
中文
注册

GetMetadataWithType

函数功能

从MxpiBuffer获取Key对应的Metadata,同时进行元数据类型的校验。如果类型不匹配,打印错误并返回空指针。此方法需要配套插件开发用,不可单独调用。

函数原型

std::shared_ptr<void> MxpiMetadataManager::GetMetadataWithType(const std::string& key, std::string type);

参数说明

参数名

说明

key

要挂载到Buffer上的Metadata的键名。

type

待校验的protobuf类型名,如“MxpiVisionList”。

返回参数说明

数据结构

说明

shared_ptr<void>

存放Metadata数据的智能指针。