• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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**Header file**: [native_avcodec_base.h](native__avcodec__base_8h.md)
17
18
19## Summary
20
21
22### Member Variables
23
24| Name| Description|
25| -------- | -------- |
26| [OH_AVCodecOnError](_codec_base.md#oh_avcodeconerror) [onError](#onerror) | Defines the callback used to report a codec operation error.|
27| [OH_AVCodecOnStreamChanged](_codec_base.md#oh_avcodeconstreamchanged) [onStreamChanged](#onstreamchanged) | Defines the callback used to report a codec stream change.|
28| [OH_AVCodecOnNeedInputBuffer](_codec_base.md#oh_avcodeconneedinputbuffer) [onNeedInputBuffer](#onneedinputbuffer) | Defines the callback used to report input data required.|
29| [OH_AVCodecOnNewOutputBuffer](_codec_base.md#oh_avcodeconnewoutputbuffer) [onNewOutputBuffer](#onnewoutputbuffer) | Defines the callback used to report output data generated.|
30
31
32## Member Variable Description
33
34
35### onError
36
37**Description**
38
39Defines the callback used to report a codec operation error.
40
41**Since**: 11
42
43
44### onNeedInputBuffer
45
46**Description**
47
48Defines the callback used to report input data required.
49
50**Since**: 11
51
52
53### onNewOutputBuffer
54
55**Description**
56
57Defines the callback used to report output data generated.
58
59**Since**: 11
60
61
62### onStreamChanged
63
64**Description**
65
66Defines the callback used to report a codec stream change.
67
68**Since**: 11
69