1 Star 0 Fork 4.9K

Cain / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CodecCallback.md 9.67 KB
一键复制 编辑 原始数据 按行查看 历史
wenjun 提交于 2020-09-08 10:08 . add OpenHarmony 1.0 baseline

CodecCallback

Overview

Related Modules:

Codec

Description:

Defines callbacks and their parameters.

Summary

Data Fields

Variable Name

Description

OnEvent )(UINTPTR comp, UINTPTR appData, EventType event, uint32_t data1, uint32_t data2, UINTPTR eventData)

int(* 

Reports an event.

InputBufferAvailable )(UINTPTR comp, UINTPTR appData, InputInfo *inBuf)

int(* 

Reports that the input data has been used.

OutputBufferAvailable )(UINTPTR comp, UINTPTR appData, OutputInfo *outBuf)

int(* 

Reports that the output is complete.

Details

Field Documentation

InputBufferAvailable

int(* CodecCallback::InputBufferAvailable) ([UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [InputInfo](InputInfo.md) *inBuf)

Description:

Reports that the input data has been used.

This callback is invoked in asynchronous mode.

Parameters:

Name

Description

hComponent Indicates the handle of the codec component.
pAppData Indicates upper-layer data, which is generally an upper-layer instance passed when this callback is set.
pBuffer Indicates the pointer to the input data that has been used.

Returns:

Returns 0 if the operation is successful; returns a non-zero value otherwise.

OnEvent

int(* CodecCallback::OnEvent) ([UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [EventType](Codec.md#ga2628ea8d12e8b2563c32f05dc7fff6fa) event, uint32_t data1, uint32_t data2, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) eventData)

Description:

Reports an event.

Reports event errors and output format changes.

Parameters:

Name

Description

hComponent Indicates the handle of the codec component.
pAppData Indicates upper-layer data, which is generally an upper-layer instance passed when this callback is set.
EVENTTYPE Indicates the event type.
nData1 Indicates the first value contained in the reported event. This parameter is optional.
nData2 Indicates the second value contained in the reported event. This parameter is optional.
pEventData Indicates the pointer to data contained in the reported event. This parameter is optional.

Returns:

Returns 0 if the operation is successful; returns a non-zero value otherwise.

OutputBufferAvailable

int(* CodecCallback::OutputBufferAvailable) ([UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) comp, [UINTPTR](Codec.md#ga58d2f4a8d12daa1dcf4eb297f3ebaabc) appData, [OutputInfo](OutputInfo.md) *outBuf)

Description:

Reports that the output is complete.

This callback is invoked in asynchronous mode.

Parameters:

Name

Description

hComponent Indicates the handle of the codec component.
pAppData Indicates upper-layer data, which is generally an upper-layer instance passed when this callback is registered.
pBuffer Indicates the pointer to the output data that has been generated.

Returns:

Returns 0 if the operation is successful; returns a non-zero value otherwise.

1
https://gitee.com/cain_qin/docs.git
git@gitee.com:cain_qin/docs.git
cain_qin
docs
docs
master

搜索帮助