acl.himpi.venc_release_stream

C Prototype

hi_s32 hi_mpi_venc_release_stream(hi_venc_chn chn, hi_venc_stream *stream);

Python Function

ret = acl.himpi.venc_release_stream(chn, stream)

Function Usage

Frees the stream buffer.

The Atlas 200/300/500 Inference Product does not support this API.

The Atlas Training Series Product does not support this API.

Input Description

chn: int, encoding channel ID.

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

Return Value

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.