1# native_avbuffer.h 2 3 4## Overview 5 6The **native_avbuffer.h** file declares the functions of the media struct **AVBuffer**. 7 8**Library**: libnative_media_core.so 9 10**System capability**: SystemCapability.Multimedia.Media.Core 11 12**Since**: 11 13 14**Related module**: [Core](_core.md) 15 16 17## Summary 18 19 20### Functions 21 22| Name| Description| 23| -------- | -------- | 24| OH_AVBuffer \* [OH_AVBuffer_Create](_core.md#oh_avbuffer_create) (int32_t capacity) | Creates an **OH_AVBuffer** instance. The caller must call [OH_AVBuffer_Destroy](_core.md#oh_avbuffer_destroy) to manually release the **OH_AVBuffer** instance returned.| 25| [OH_AVErrCode](_core.md#oh_averrcode)[OH_AVBuffer_Destroy](_core.md#oh_avbuffer_destroy) (OH_AVBuffer \*buffer) | Releases an **OH_AVBuffer** instance.| 26| [OH_AVErrCode](_core.md#oh_averrcode)[OH_AVBuffer_GetBufferAttr](_core.md#oh_avbuffer_getbufferattr) (OH_AVBuffer \*buffer, [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) \*attr) | Obtains the high-frequency attribute of a data buffer.| 27| [OH_AVErrCode](_core.md#oh_averrcode)[OH_AVBuffer_SetBufferAttr](_core.md#oh_avbuffer_setbufferattr) (OH_AVBuffer \*buffer, const [OH_AVCodecBufferAttr](_o_h___a_v_codec_buffer_attr.md) \*attr) | Sets the high-frequency attribute for a data buffer.| 28| OH_AVFormat \* [OH_AVBuffer_GetParameter](_core.md#oh_avbuffer_getparameter) (OH_AVBuffer \*buffer) | Obtains the frame parameter of a data buffer.| 29| [OH_AVErrCode](_core.md#oh_averrcode)[OH_AVBuffer_SetParameter](_core.md#oh_avbuffer_setparameter) (OH_AVBuffer \*buffer, const OH_AVFormat \*format) | Sets the frame parameter for a data buffer.| 30| uint8_t \* [OH_AVBuffer_GetAddr](_core.md#oh_avbuffer_getaddr) (OH_AVBuffer \*buffer) | Obtains the virtual address of a data buffer.| 31| int32_t [OH_AVBuffer_GetCapacity](_core.md#oh_avbuffer_getcapacity) (OH_AVBuffer \*buffer) | Obtains the capacity of a data buffer.| 32| OH_NativeBuffer \* [OH_AVBuffer_GetNativeBuffer](_core.md#oh_avbuffer_getnativebuffer) (OH_AVBuffer \*buffer) | Obtains the pointer of an **OH_NativeBuffer** instance.| 33