VideoDecoder

Function Usage

Constructor of the VideoDecoder class.

If the memory is insufficient, pyVdecCallBacker cannot register a callback, or the processor cannot be identified. As a result, the "std::runtime_error" exception occurs.

Prototype

1
VideoDecoder(pyVdecConfig: VideoDecodeConfig, pyVdecCallBacker: VdecCallBacker, deviceId: int, channelId: int)

Input Parameters

Parameter

Type

Description

pyVdecConfig

VideoDecodeConfig class

Parameter for video decoding

pyVdecCallBacker

VdecCallBacker class

VdecCallBacker that binds callbacks. (A call must be registered. Otherwise, VideoDecoder throws an exception.)

deviceId

int

Processor where the video decoder is deployed. The default ID is 0.

Value range: [0, Number of detected processors – 1].

channelId

int

Video stream index of the video decoder.

  • Atlas 200/300/500 inference product: The value range is [0, 31].

    If the same channel ID is constructed repeatedly, the construction fails.

  • Atlas 200I/500 A2 inference product: The value range is [0, 127].

    If the same channel ID is constructed repeatedly, the construction fails.

  • Atlas inference product: The value range is [0, 255].

    If the same channel ID is constructed repeatedly, the channel ID is automatically adjusted.

Response Parameters

VideoDecoder object