hi_mpi_vpss_get_chn_frame
The
The
Description
Obtains a processed frame of image from a channel.
Restrictions
- A VPSS group must have been created. For details, see hi_mpi_vpss_create_grp.
- Images can be obtained only when the user mode is set by calling hi_mpi_vpss_get_chn_attr and the queue depth is not 0.
- Calling this API to obtain images does not affect the modules bound to the backend. If the backend is bound to the VO for display, images can be obtained during display, without affecting the VO display.
- In a decoding or playback scenario, frame loss is not allowed. As long as there is one VPSS channel that does not process new images when the channel is enabled, the entire VPSS stops processing new images. For example, assume that channel 0 and channel 1 are enabled without being bound to the backend and the length of the channel image queue is set to 2. A maximum of two frames of buffered images can be obtained from channel 0, because channel 1 stops processing new images after buffering two frames. Therefore, the entire VPSS stops processing new images.
Prototype
hi_s32 hi_mpi_vpss_get_chn_frame(hi_vpss_grp grp, hi_vpss_chn chn, hi_video_frame_info *frame_info, hi_s32 milli_sec);
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
grp |
Input |
VPSS group ID. The value range is [0, 264). If the 3DNR function is enabled by setting the hi_vpss_grp_attr.nr_en parameter of the hi_mpi_vpss_create_grp API, the value range of the VPSS group ID is [256, 268). |
chn |
Input |
VPSS channel ID. Value range: [0, 2) |
frame_info |
Output |
Image information. |
milli_sec |
Input |
Timeout interval. The options are as follows:
|
Returns
- 0: success
- Other values: failure. For details, see VPSS Return Codes.
Parent topic: VPSS