pub unsafe extern "C" fn OH_VideoDecoder_QueryInputBuffer(
codec: *mut OH_AVCodec,
index: *mut u32,
timeoutUs: i64,
) -> OH_AVErrCodeAvailable on crate feature
api-20 only.Expand description
Queries the index of the next available input buffer.
This API must be followed by calling OH_VideoDecoder_GetInputBuffer to obtain the buffer handle,
which should then be passed to the decoder via OH_VideoDecoder_PushInputBuffer.
Note: This operation is only supported in synchronous mode.
Required System Capabilities: SystemCapability.Multimedia.Media.VideoDecoder
§Arguments
-
codec- Pointer to an OH_AVCodec instance. -
index- The index of the input buffer. -
timeoutUs- Timeout duration in microseconds, negative value indicates infinite wait.
§Returns
- Returns AV_ERR_OK if the execution is successful,
otherwise returns a specific error code, refer to
OH_AVErrCode. [AV_ERR_NO_MEMORY], internal errors in the input decode instance, such as an abnormal NULL. [AV_ERR_INVALID_VAL], the decoder is nullptr or invalid. [AV_ERR_UNKNOWN], unknown error. [AV_ERR_SERVICE_DIED], avcodec service is died. [AV_ERR_INVALID_STATE], this interface was called in invalid state.
[AV_ERR_OPERATE_NOT_PERMIT], not permitted in asynchronous mode.
[AV_ERR_TRY_AGAIN_LATER], query failed, recommended retry after delay.
Available since API-level: 20