GenerateStaticInputPortsInfo

Function Usage

Generates static input port information, including the number of ports and port format. When an element is created, the static port is automatically created and the port must be connected. Otherwise, the stream fails to be created.

Prototype

static void GenerateStaticInputPortsInfo(const std::vector<std::vector<std::string>>& portsDesc, MxpiPortInfo& inputPortInfo);

Parameter Description

Parameter

Description

portsDesc

Port description. For example, in {{"metadata/object","metadata/class"}, {"image/jpeg"}} indicates that two input ports are registered. The first port supports the object and class formats, and the second port supports the JPEG format.

inputPortInfo

Output parameter, which contains the input port information.