VideoEncoder

Function Usage

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

Prototype

1
VideoEncoder::VideoEncoder(const VideoEncodeConfig& vEncodeConfig, const int32_t deviceId = 0, const uint32_t channelId = 0);

Parameters

Parameter

Input/Output

Description

vEncodeConfig

Input

Parameters for video encoding (transferred in a structure)

For details about the structure parameters, see VideoEncodeConfig.

deviceId

Input

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

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

channelId

Input

Video stream index of the video encoder

  • Atlas 200/300/500 inference product: Only one VideoEncoder can be constructed. Therefore, you do not need to set the channel ID. If VideoEncoder is constructed repeatedly, the construction fails.
  • Atlas 200I/500 A2 inference product: Only one VideoEncoder can be constructed. Therefore, you do not need to set the channel ID. If VideoEncoder is constructed repeatedly, the construction fails.
  • Atlas inference product: The value range is [0, 127].