SendData

Function Usage

Data transmission method. This method can be called in Process to send data to the next plugin.

Prototype

APP_ERROR SendData(int index, MxpiBuffer& mxpiBuffer);

Parameter Description

Parameter

Description

index

Number of the output port.

mxpiBuffer

Data sent to the next plugin.

The member data (for example, GstBuffer) under this data structure must be properly configured. Do not manually configure the memory data.

mxpiBuffer must use the heap memory, which must be allocated by the new operator. Otherwise, the application will crash. This API frees the heap memory of mxpiBuffer. You do not need to deallocate the memory after this API is returned. Otherwise, the application will crash.

Return Parameter Description

Data Structure

Description

APP_ERROR

Error code returned during program execution. For details, see the MxBase/ErrorCode/ErrorCode.h file.