venc_release_stream

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas training product

x

Atlas inference product

Atlas 200I/500 A2 inference product

Description

Frees the stream buffer.

Prototype

  • C Prototype
    1
    hi_s32 hi_mpi_venc_release_stream(hi_venc_chn chn, hi_venc_stream *stream);
    
  • Python Function
    1
    ret = acl.himpi.venc_release_stream(chn, stream)
    

Parameters

Parameter

Description

chn

Int, decoding channel ID.

stream

Dict, stream dictionary. If stream is left empty, the error code HI_ERR_VENC_NULL_PTR is returned.

Return Value

Return Value

Description

ret

Int, error code.

Restrictions

  • Ensure that a channel has been created. Otherwise, the error code HI_ERR_VENC_UNEXIST is returned.
  • Use this API in pair with acl.himpi.venc_get_stream. Free the stream buffer in a timely manner to avoid encoding suspension due to stream buffer insufficiency. In addition, you must comply with the principle of "first obtained, first released".
  • When an encoding channel is reset, the stream buffer becomes invalid, even if the packets are not released.
  • An attempt to free the buffer of an invalid stream returns the HI_ERR_VENC_ILLEGAL_PARAM error.

Reference

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