1# OH_AVCodecCallback
2
3
4## Overview
5
6The **OH_AVCodecCallback** struct defines all the asynchronous callback function pointers of an **OH_AVCodec** instance. To ensure the normal running of **OH_AVCodec**, you must register the instance of this struct with the **OH_AVCodec** instance and process the information reported by the callback function.
7
8**System capability**: SystemCapability.Multimedia.Media.CodecBase
9
10**Since**: 11
11
12**Related module**: [CodecBase](_codec_base.md)
13
14
15## Summary
16
17
18### Member Variables
19
20| Name| Description| 
21| -------- | -------- |
22| [OH_AVCodecOnError](_codec_base.md#oh_avcodeconerror) [onError](#onerror) | Defines the callback used to report a codec operation error.| 
23| [OH_AVCodecOnStreamChanged](_codec_base.md#oh_avcodeconstreamchanged) [onStreamChanged](#onstreamchanged) | Defines the callback used to report a codec stream change.| 
24| [OH_AVCodecOnNeedInputBuffer](_codec_base.md#oh_avcodeconneedinputbuffer) [onNeedInputBuffer](#onneedinputbuffer) | Defines the callback used to report input data required.| 
25| [OH_AVCodecOnNewOutputBuffer](_codec_base.md#oh_avcodeconnewoutputbuffer) [onNewOutputBuffer](#onnewoutputbuffer) | Defines the callback used to report output data generated.| 
26
27
28## Member Variable Description
29
30
31### onError
32
33**Description**
34
35Defines the callback used to report a codec operation error.
36
37**Since**: 11
38
39
40### onNeedInputBuffer
41
42**Description**
43
44Defines the callback used to report input data required.
45
46**Since**: 11
47
48
49### onNewOutputBuffer
50
51**Description**
52
53Defines the callback used to report output data generated.
54
55**Since**: 11
56
57
58### onStreamChanged
59
60**Description**
61
62Defines the callback used to report a codec stream change.
63
64**Since**: 11
65