hi_mpi_vdec_set_display_mode
Applicability
Product |
Supported |
|---|---|
☓ |
|
☓ |
|
√ |
|
☓ |
|
☓ |
Description
Sets the display mode if hi_mpi_sys_bind is called to bind the data receiver VPSS to the data source VDEC. If the display mode is not set, the playback mode is used by default.
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
- 0: success
- Other values: failure. For details, see Common Return Codes and VDEC/JPEGD Return Codes.
Restrictions
- Before setting the display mode, ensure that a channel has been created. Otherwise, the error code HI_ERR_VDEC_UNEXIT is returned.
- Preview mode (HI_VIDEO_DISPLAY_MODE_PREVIEW): In this mode, the back-end module (such as the VPSS) bound to the VDEC receives decoded images in non-blocking mode. That is, when the image buffer of the VPSS is full (or when there are more decoding frame buffers than VPSS buffer queues), the VPSS discards the new images received from the VDEC. This prevents backpressure on the VDEC and enables real-time preview. Note that when there are fewer decoding frame buffers than VPSS buffer queues, the VPSS still exerts backpressure on the 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 stops receiving new images from the VDEC. When the VDEC detects an image transmission failure, it retries until the image is successfully transmitted. The back-end module exerts backpressure on the VDEC, ensuring that each decoded image is displayed.
Parent topic: Video Decoder (VDEC) and JPEG Decoder (JPEGD)