SendData

Function Usage

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

Prototype and Input Parameter Description

def SendData(streamName: bytes, inPluginId: int, dataInput: MxDataInput) -> int:
    pass

Parameter

Type

Description

streamName

bytes

Stream name

inPluginId

int

ID of the object input plugin, that is, the ID of the appsrc element

dataBuffer

For details, see MxDataInput.

Data to be sent

def SendData(streamName: bytes, elementName: bytes, dataInput: MxDataInput) -> int:
    pass

Parameter

Type

Description

streamName

bytes

Stream name

elementName

bytes

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

dataBuffer

For details, see MxDataInput.

Data to be sent

def SendData(streamName: bytes, elementName: bytes, metadataVec: MetadataInputVector, databuffer: MxBufferInput) -> int:
    pass

Parameter

Type

Description

streamName

bytes

Stream name

elementName

bytes

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

metadataVec

MetadataInputVector

Sent metadata vector

dataBuffer

MxBufferInput

Data to be sent

Input example:

metadata = MxMetadataInput()    
metadataVec = MetadataInputVector()
metadataVec.push_back(metadata)