SendProtobuf

Function Usage

Sends protobuf data to the native appsrc plugin of the input element on a specified stream. Multi-thread concurrency is not supported.

This API must be used together with GetProtobuf. Otherwise, data stacking may occur.

Prototype

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

Parameters

Parameter

Input/Output

Description

streamName

Input

Stream name.

inPluginId

Input

ID of the object input plugin, that is, the ID of the appsrc element.

elementName

Input

Name of the input plugin. Only appsrc can be used as the input plugin.

protoVec

Input

For details about the sent protobuf data list, see MxstProtobufIn.

Response Parameters

Data Structure

Description

APP_ERROR

For details about the returned error codes, see APP_ERROR Description.