hi_mpi_vi_send_pipe_raw
The
The
Description
Sends RAW data through a VI pipe.
Restrictions
- Before calling this API, create a pipe by calling hi_mpi_vi_create_pipe and then start the pipe by calling hi_mpi_vi_start_pipe. When creating a pipe by calling hi_mpi_vi_create_pipe, ensure that the isp_bypass attribute of the pipe is set to HI_FALSE.
- Before sending RAW data, set the data source of the pipe to HI_VI_PIPE_FRAME_SOURCE_USER by calling hi_mpi_vi_set_pipe_frame_source. In this case, the data from the sensor is not sent to the ISP BE for processing, and the ISP BE processes only the frame data sent by the user.
- In WDR mode, the sequence of storing the RAW data of each pipe in frame_info must be the same as that when the pipes are bound by calling hi_mpi_vi_set_dev_bind_pipe. This ensures that the sequence of the long and short exposure frames is correct and the RAW attributes (width, height, pixel format, and compression) of each pipe are the same as those set when hi_mpi_vi_create_pipe is called.
- When RAW data is sent by calling this API, the RAW data must meet the following requirements:
- The RAW frame information that is sent must be authentic and valid, which is obtained by calling hi_mpi_vi_pipe_get_buffer.
- The pixel format and image size of the RAW data must be the same as those configured when a pipe is created by calling hi_mpi_vi_create_pipe.
- field of the RAW data must be set to HI_VIDEO_FIELD_FRAME.
- video_format of the RAW data must be set to HI_VIDEO_FORMAT_LINEAR.
- The compress_mode of RAW data can only be HI_COMPRESS_MODE_NONE, HI_COMPRESS_MODE_LINE, or HI_COMPRESS_MODE_FRAME.
- The dynamic_range of the RAW data must be set to HI_DYNAMIC_RANGE_SDR8.
Prototype
hi_s32 hi_mpi_vi_send_pipe_raw(hi_u32 pipe_num, hi_vi_pipe pipe_id[], const hi_video_frame_info *frame_info[], hi_s32 milli_sec)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
pipe_num |
Input |
Number of pipes. When the working mode is linear mode, its value is 1. When the working mode is WDR mode, the value must be the same as the number of pipes of the WDR. The specific mode is specified in WDR attributes by calling hi_mpi_vi_set_dev_attr. |
pipe_id |
Input |
Pipe ID array. The number of elements in the array must be the same as the value of pipe_num. |
frame_info |
Input |
Raw data information. |
milli_sec |
Input |
Timeout parameter.
|
Returns
- 0: success
- Other values: failure. For details, see VI Return Codes.
Parent topic: VI