GetProtobuf

Function Usage

Obtains the protobuf data of the output element appsink on the stream. appsink obtains the data in the queue in block mode. If there is no data, the data is blocked. To use the API, run pip3 install protobuf-3.9.0 command to install protobuf 3.9.0 (which may be modified for later versions).

Prototype

def GetProtobuf(streamName: bytes, outPluginId: int, keyVec: list) -> list :
    pass

Input Parameter Description

Parameter

Type

Description

streamName

bytes

Stream name

outPluginId

int

ID of the output plugin, that is, the ID of the appsink element

keyVec

bytes list

Obtains the key of the protobuf data and obtains the corresponding protobuf data based on the key. The memory is managed by the smart pointer and does not need to be destroyed.

Return Parameter Description

Data Structure

Description

MxProtobufOut list

Protobuf data output by the inference service. The value of protobuf needs to be deserialized to the corresponding struct. For details, see MxProtobufOut and MxProtobufOut.