下载
中文
注册

GetProtobuf

函数功能

获得Stream上的输出元件的protobuf结果给appsink,appsink阻塞式获取队列中的数据,若队列中数据为空,则阻塞,不支持多线程并发。

该接口需要与SendProtobuf接口配套使用,否则会有数据堆积的风险。

函数原型

std::vector<MxstProtobufOut> MxStreamManager::GetProtobuf(const std::string& streamName, int outPluginId, const std::vector<std::string>& keyVec);

参数说明

参数名

输入/输出

说明

streamName

输入

流的名称。

outPluginId

输入

目标输出插件ID,即appsrc元件的编号。

keyVec

输入

发送要获取的protobuf的key,通过该key获取对应的protobuf结果。内存由智能指针管理,不需要释放内存。

返回参数说明

数据结构

说明

std::vector<MxstProtobufOut>

推理服务输出数据列表请参见MxstProtobufOut