hi_mpi_vdec_set_display_mode

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

The Atlas Training Series Product does not support this API.

Description

Sets the display mode if hi_mpi_sys_bind is called to bind the data receiver VPSS to the data source VDEC. If no display mode is set, the playback mode is used by default.

Restrictions

  • Before setting the display mode, ensure that a channel is created. Otherwise, the error code HI_ERR_VDEC_UNEXIT is returned, indicating that no channel is created.
  • Preview mode (HI_VIDEO_DISPLAY_MODE_PREVIEW): In this mode, the back-end module (such as the VPSS) bound to the VDEC receives decoded pictures in non-blocking mode. That is, when the image buffer of the VPSS is full (or when the number of decoding frame buffers is larger than that of VPSS buffer queues), the VPSS discards the new images received from the VDEC. This prevents backpressure on VDEC and implements real-time preview. Note that when the number of decoding frame buffers is smaller than that of VPSS buffer queues, the VPSS still performs backpressure on VDEC even if the preview mode is enabled.
  • Playback mode (HI_VIDEO_DISPLAY_MODE_PLAYBACK): In this mode, the back-end module (such as the VPSS) bound to the VDEC receives decoded images in blocking mode. That is, when the image buffer of the VPSS is full, the VPSS refuses to receive new images from the VDEC. When the VDEC detects that the current image fails to be transmitted, it starts the retransmission mechanism until the image is successfully transmitted. The back-end module exerts backpressure on VDEC, ensuring that each decoded picture is displayed.

Prototype

hi_s32 hi_mpi_vdec_set_display_mode(hi_vdec_chn chn, hi_video_display_mode display_mode)

Parameters

Parameter

Input/Output

Description

chn

Input

Decoding channel ID.

display_mode

Input

Defines the display mode.

Returns