pub unsafe extern "C" fn OH_VideoDecoder_SetCallback(
codec: *mut OH_AVCodec,
callback: OH_AVCodecAsyncCallback,
userData: *mut c_void,
) -> OH_AVErrCode👎Deprecated since 11
Expand description
Set the asynchronous callback function so that your application can respond to the events generated by the video decoder. This interface must be called before Prepare is called.
Required System Capabilities: SystemCapability.Multimedia.Media.VideoDecoder
§Arguments
-
codec- Pointer to an OH_AVCodec instance -
callback- A collection of all callback functions, seeOH_AVCodecAsyncCallback -
userData- User specific data
§Returns
- Returns AV_ERR_OK if the execution is successful,
otherwise returns a specific error code, refer to
OH_AVErrCode. [AV_ERR_NO_MEMORY], inner resource has already released. [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, must be called before Prepare.
Deprecated since 11 OH_VideoDecoder_RegisterCallback
Available since API-level: 9