昇腾社区首页
中文
注册

SendProtobuf

函数功能

向指定Stream上的输入元件发送protobuf数据给appsrc原生插件,不支持多线程并发,使用样例参考SendProtobuf-GetProtobuf样例代码

函数原型与参数说明

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

参数名

输入/输出

说明

streamName

输入

流的名称。

inPluginId

输入

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

protoVec

输入

发送的protobuf数据列表见 MxstProtobufIn

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

参数名

输入/输出

说明

streamName

输入

流的名称。

elementName

输入

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

protoVec

输入

发送的protobuf数据列表见 MxstProtobufIn

返回参数说明

数据结构

说明

APP_ERROR

程序执行返回的错误码,请参考“MxBase/ErrorCode/ErrorCode.h”文件。