GetResult
Function Usage
Obtains the result of the output element (appsink) on the stream. The blocking mode is used. Multi-thread concurrency is not supported.
This API must be used together with SendData. Otherwise, data stacking may occur.
Prototype
1 | MxstDataOutput* MxStreamManager::GetResult(const std::string& streamName, int outPluginId,const uint32_t& msTimeOut = DELAY_TIME); |
1 | MxstBufferAndMetadataOutput MxStreamManager::GetResult(const std::string& streamName, const std::string& elementName,const std::vector<std::string>& dataSourceVec, const uint32_t& msTimeOut = DELAY_TIME); |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
streamName |
Input |
Stream name. |
outPluginId |
Input |
ID of the output plugin on the stream, that is, the ID of the appsink element |
msTimeOut |
Input |
Maximum waiting time, in milliseconds. The default value is 3000 ms (3s). |
elementName |
Input |
Name of the output element on the stream. |
dataSourceVec |
Input |
dataSource corresponding to the metadata, which is used to obtain the specified metadata. |
Response Parameters
Data Structure |
Description |
|---|---|
MxstDataOutput |
Output data (MxstDataOutput) of the inference service. The memory needs to be deleted. |
MxstBufferAndMetadataOutput |
Obtained buffer and metadata (MxstBufferAndMetadataOutput). |