SendDataWithUniqueId

Function Usage

Sends data to the input element (appsrc) on the specified stream. The blocking mode is used. Multi-thread concurrency is supported by different uniqueIds.

This API must be used together with GetResultWithUniqueId. Otherwise, data stacking may occur.

Prototype

1
APP_ERROR MxStreamManager::SendDataWithUniqueId(const std::string& streamName, const std::string& elementName, MxstDataInput& dataBuffer, uint64_t& uniqueId);
1
APP_ERROR MxStreamManager::SendDataWithUniqueId(const std::string& streamName, int inPluginId, MxstDataInput& dataBuffer, uint64_t& uniqueId);

Parameters

Parameter

Input/Output

Description

streamName

Input

Stream name.

elementName

Input

Name of the input plugin. Only appsrc can be used as the input plugin.

inPluginId

Input

ID of the object input plugin, that is, the ID of the appsrc element. (The appsrc number indicates the sequence number of the appsrc element.)

dataBuffer

Input

Data to be sent. The value of dataBuffer.dataSize must be equal to the size of the memory to be sent and within the range of [1, 4294967296]. dataBuffer.dataPtr needs to be deleted.

uniqueId

Output

ID returned after data is sent. The corresponding result is obtained based on the ID by calling GetResultWithUniqueId.

Response Parameters

Data Structure

Description

APP_ERROR

For details about the returned error codes, see APP_ERROR Description.