SendProtobuf
Function Usage
Sends protobuf data to the input element (appsrc) of the stream. To use this API, you need to install protobuf 4.25.1 by running the pip3 install protobuf-4.25.1 command.
Prototype
1 2 | def SendProtobuf(streamName: bytes, inPluginId: int, protobufVec: list) -> int: pass |
1 2 | def SendProtobuf(streamName: bytes, elementName: bytes, protobufVec: list) -> int: pass |
Input Parameters
Parameter |
Type |
Description |
|---|---|---|
streamName |
bytes |
Stream name. |
inPluginId |
int |
ID of the input plugin, that is, the ID of the appsrc element. |
protobufVec |
MxProtobufIn list |
MxProtobufIn list to be sent. The key, type, and value of the protobuf are sent to the mxStream. The value is the bytes after the protobuf is serialized. |
elementName |
bytes |
Name of the input plugin. Only appsrc can be used as the input plugin. |
Response Parameters
Data Structure |
Description |
|---|---|
int |
For details about the returned error codes, see APP_ERROR Description. |
Parent topic: StreamManagerApi