SendProtobuf
Function Usage
Sends the protobuf data to the input element appsrc of the stream. To use the API, run pip3 install protobuf-3.9.0 to install the protobuf 3.9.0 (the API may be modified for later versions).
Prototype and Input Parameter Description
def SendProtobuf(streamName: bytes, inPluginId: int, protobufVec: list) -> int:
pass
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 (described in MxProtobufIn) 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. |
def SendProtobuf(streamName: bytes, elementName: bytes, protobufVec: list) -> int:
pass
Parameter |
Type |
Description |
|---|---|---|
streamName |
bytes |
Stream name |
elementName |
bytes |
Name of the input plugin. Only appsrc can be used as the input plugin. |
protobufVec |
MxProtobufIn list |
MxProtobufIn list (described in MxProtobufIn) 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. |
Return Parameter Description
Data Structure |
Description |
|---|---|
int |
Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file. |