Fetches the encoded stream.
The Ascend 310 AI Processor does not support this API in the current version.
The Ascend 910 AI Processor does not support this API in the current version.
The size of contiguous buffer space pointing to hi_venc_pack is allocated by the caller. In packet mode, the space must be at least sizeof(hi_venc_pack). In frame mode, the space must be at least N times sizeof(hi_venc_pack), where N indicates the number of packets in the current frame, which can be obtained by using the select and hi_mpi_venc_query_status calls.
As input, this parameter specifies the number of hi_venc_pack in pack. In packet mode, pack_cnt must be at least 1. In frame mode, pack_cnt must be at least the number of packets of the current frame. In the outputs of the function call, pack_cnt indicates the actual number of packets for pack.
pack_info[1]. pack_type. h264_type = HI_VENC_H264_NALU_PPS,pack[0].pack_info[2]. pack_type. h264_type = HI_VENC_H264_NALU_SEI. The same rule applies to other protocols. data_num and pack_info are valid only in single-packet mode.
hi_s32 hi_mpi_venc_get_stream(hi_venc_chn chn, hi_venc_stream *stream, hi_s32 milli_sec)
Parameter |
Input/Output |
Description |
|---|---|---|
chn |
Input |
Encoding channel ID. The value range of the encoding channel ID is [0, 256). The maximum number of channels is 256. |
stream |
Output |
Pointer to the output stream. The configured addr address must be a memory address on the device, indicating that the output stream is stored in the device memory. In standard form, to access the output stream data after this API is called on the host, transfer the data on the device back to the host. |
milli_sec |
Input |
Timeout interval (ms).
|