InputParam

Description

Indicates the data structure defined by the Buffer API, which is used to create a buffer.

Structure Definition

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
struct InputParam { 
    std::string key; 
    int deviceId; 
    int dataSize; 
    void* ptrData; 
    MxpiFrameInfo mxpiFrameInfo; 
    MxpiVisionInfo mxpiVisionInfo; 
    MxpiMemoryType mxpiMemoryType;
    uint32_t dataType;
}

Parameters

Parameter

Description

key

When creating a buffer, the system automatically assembles ptrData and mxpiVisionInfo into a MxpiVisionList, and uses the key as the index of MxpiVisionList. The downstream plugin can use this index to find MxpiVisionList. Generally, the plugin name is the value of the key.

deviceId

Device ID.

dataSize

Buffer memory size, in bytes. The size must be the same as the actual size. Otherwise, a core dump may occur.

ptrData

Memory address of the buffer.

mxpiFrameInfo

Video and image frame information, such as the channel ID and frame ID.

mxpiVisionInfo

Video and image description information, such as the image format, width, and height.

mxpiMemoryType

Device memory type.

dataType

Data type.