vdec_set_display_mode
Applicability
Product |
Supported (√/x) |
|---|---|
x |
|
x |
|
x |
|
x |
|
√ |
Function Usage
This API does not support the setting of the display mode. The playback mode is used by default.
Prototype
- C Prototype
1hi_s32 hi_mpi_vdec_set_display_mode(hi_vdec_chn chn, hi_video_display_mode display_mode)
- Python Function
1ret = acl.himpi.vdec_set_display_mode(chn, display_mode)
Parameter Description
Parameter |
Description |
|---|---|
chn |
Int, decoding channel ID.
|
display_mode |
Int, display mode. For details, see hi_video_display_mode. |
Return Value Description
Return Value |
Description |
|---|---|
ret |
Int.
|
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.
Parent topic: VDEC/JPEGD APIs