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
8For details about the development guide, see step 4 in surface mode or step 3 in buffer mode in [Video Encoding](../../media/avcodec/video-encoding.md).
9
10**System capability**: SystemCapability.Multimedia.Media.CodecBase
11
12**Since**: 11
13
14**Related module**: [CodecBase](_codec_base.md)
15
16
17## Summary
18
19
20### Member Variables
21
22| Name| Description|
23| -------- | -------- |
24| [OH_AVCodecOnError](_codec_base.md#oh_avcodeconerror) [onError](#onerror) | Defines the callback used to report a codec operation error.|
25| [OH_AVCodecOnStreamChanged](_codec_base.md#oh_avcodeconstreamchanged) [onStreamChanged](#onstreamchanged) | Defines the callback used to report a codec stream change.|
26| [OH_AVCodecOnNeedInputBuffer](_codec_base.md#oh_avcodeconneedinputbuffer) [onNeedInputBuffer](#onneedinputbuffer) | Defines the callback used to report input data required.|
27| [OH_AVCodecOnNewOutputBuffer](_codec_base.md#oh_avcodeconnewoutputbuffer) [onNewOutputBuffer](#onnewoutputbuffer) | Defines the callback used to report output data generated.|
28
29
30## Member Variable Description
31
32
33### onError
34
35**Description**
36
37Defines the callback used to report a codec operation error.
38
39**Since**: 11
40
41
42### onNeedInputBuffer
43
44**Description**
45
46Defines the callback used to report input data required.
47
48**Since**: 11
49
50
51### onNewOutputBuffer
52
53**Description**
54
55Defines the callback used to report output data generated.
56
57**Since**: 11
58
59
60### onStreamChanged
61
62**Description**
63
64Defines the callback used to report a codec stream change.
65
66**Since**: 11
67