aclvdecCallback

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

Video decoding callback function. This callback function is user-defined.

Prototype

1
void (* aclvdecCallback) (acldvppStreamDesc * input, acldvppPicDesc * output, void* userData)

Parameters

Parameter

Input/Output

Description

input

Input

Pointer to the input stream description. The value is the same as that of input in the aclvdecSendFrame interface.

output

Input

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

userData

Input

Pointer to the user-defined data.

Returns

None

Restrictions

  • Do not perform channel destruction in the callback function. Doing so results in a deadlock at app runtime.
  • The delay of the callback function processing must meet the frame rate requirement. Otherwise, the real-time performance of the aclvdecSendFrame interface in processing video frames is affected.
  • The callback thread needs to be unsubscribed when all callbacks are handled. (That is, after the stream feeding thread has been unsubscribed.)
  • When the frame extraction function is used (by calling aclvdecSendSkippedFrame), the output of the corresponding frame is nullptr.

    In the case of frame extraction, the output buffer has no decoding result, and the extracted frames are output in sequence.

    In the case of no-frame extraction, the output buffer has the decoding result, and the non-extracted frames are output in sequence.

    If both frame extraction and no-frame extraction exist in the decoded stream, the system does not guarantee that the extracted frames and non-extracted frames are output in sequence.

See Also

For details about the API call sequence and example, see VDEC.