pub unsafe extern "C" fn OH_VideoDecoder_QueryOutputBuffer(
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 output buffer.
The obtained buffer handle through OH_VideoDecoder_GetOutputBuffer must be:
- Return to the decoder via
OH_VideoDecoder_FreeOutputBuffer, or - Rendered using
OH_VideoDecoder_RenderOutputBuffer, or - Scheduled for rendering with
OH_VideoDecoder_RenderOutputBufferAtTime
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 output 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_STREAM_CHANGED], stream format changed, callOH_VideoDecoder_GetOutputDescriptionto retrieve new steam information. [AV_ERR_TRY_AGAIN_LATER], query failed, recommended retry after delay.
Available since API-level: 20