aclvencSendFrame

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Function Description

Feeds images to the encoder for encoding. This API is asynchronous.

Prototype

1
2
3
4
5
aclError aclvencSendFrame(aclvencChannelDesc *channelDesc,
acldvppPicDesc *input,
void *reserve,
aclvencFrameConfig *config,
void *userdata)

Parameters

Parameter

Input/Output

Description

channelDesc

Input

Pointer to the channel description.

The value must be the same as that of channelDesc specified when the aclvencCreateChannel API is called to create a channel.

Specify the video encoding callback function in the channel description.

input

Input

Pointer to the input image description. The user needs to allocate input buffer in advance.

reserve

Input

Reserved

config

Input

Pointer to the single-frame configuration. For details about the type definition, see aclvencFrameConfig.

userdata

Input

Pointer to the user-defined data.

Returns

0 on success; otherwise, failure. For details, see aclError.

Restrictions

  • Ensure that a channel has been created. Otherwise, an error code is returned.
  • It is not supported to feed empty packets with eos set to 0 (the stream length is 0 or the stream address is empty).
  • When an empty image with eos set to 1 is sent, the current encoding ends.
  • During encoding, the input memory can be released only after the result is obtained from the aclvencCallback callback function.

See Also

For details about the API call sequence and examples, see VENC.