hi_mpi_venc_query_status
Applicability
|
Product |
Supported |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
☓ |
Description
Queries the status of an encoding channel.
Prototype
hi_s32 hi_mpi_venc_query_status (hi_venc_chn chn, hi_venc_chn_status *status)
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
chn |
Input |
Encoding channel ID. |
|
status |
Output |
Pointer to the encoding channel status. |
Returns
- 0: success
- Other values: failure. For details, see VENC/JPEGE Return Codes.
Restrictions
- Ensure that a channel has been created. Otherwise, a failure is returned.
- The output status points to the following information:
- In the encoding channel status struct, left_pics indicates the number of remaining frames to be encoded. Before any attempt to reset an encoding channel, use this API call to make sure that all frames have been encoded.
- In the encoding channel status struct, left_stream_bytes indicates the number of remaining bytes in the stream buffer.
Before any attempt to reset an encoding channel, use this API call to ensure that the stream has been completely encoded.
- In the encoding channel status struct, left_stream_frames indicates the number of remaining frames in the stream buffer.
Before any attempt to reset an encoding channel, use this API call to ensure that the stream has been completely encoded.
- In the encoding channel status struct, cur_packs indicates the number of packets of the current frame. Prior to the hi_mpi_venc_get_stream call, use this API call to ensure that cur_packs is greater than 0.
For stream fetching in packet mode, the current frame could be incomplete. For stream fetching in frame mode, cur_packs indicates the number of packets of a complete frame (the value 0 indicates that no frame is available). To query the number of packets of a complete frame, use the query function call after the select function call is successful.
- In the encoding channel status struct, left_recv_pics indicates the number of remaining frames to be received after the hi_mpi_venc_start_chn call.
- In the encoding channel status struct, left_enc_pics indicates the number of remaining frames to be encoded after the hi_mpi_venc_start_chn call.
- If no receive limit is specified in the hi_mpi_venc_start_chn call, the values of left_recv_pics and left_enc_pics remain 0.