VideoDecoder

Function Usage

Constructor of the VideoDecoder class. If the construction fails due to insufficient memory or an unidentified processor, the "std::runtime_error" exception occurs.

Prototype

1
VideoDecoder::VideoDecoder(const VideoDecodeConfig& vDecodeConfig, const int32_t deviceId = 0, const uint32_t channelId = 0);

Parameters

Parameter

Input/Output

Description

vDecodeConfig

Input

Parameters for video decoding (transferred in a structure)

deviceId

Input

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

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

channelId

Input

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.

    Atlas 800I A2 inference product: The value range is [0, 255]. If the same channel ID is constructed repeatedly, the channel ID is automatically adjusted. Note that a maximum of 32 video decoding channels can be occupied at the same time. If the number of occupied video decoding channels exceeds 32, new channels fail to be created.