下载
中文
注册

SendProtobuf

函数功能

向指定Stream上的输入元件发送protobuf数据给appsrc原生插件,不支持多线程并发。

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

函数原型

APP_ERROR MxStreamManager::SendProtobuf(const std::string& streamName, int inPluginId, std::vector<MxstProtobufIn>& protoVec);
APP_ERROR MxStreamManager::SendProtobuf(const std::string& streamName, const std::string& elementName, std::vector<MxstProtobufIn>& protoVec);

参数说明

参数名

输入/输出

说明

streamName

输入

流的名称。

inPluginId

输入

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

elementName

输入

输入插件的名称,只支持appsrc当做输入插件。

protoVec

输入

发送的protobuf数据列表请参见MxstProtobufIn

返回参数说明

数据结构

说明

APP_ERROR

程序执行返回的错误码,请参考APP_ERROR说明