harmony 鸿蒙native_avbuffer.h

  • 2025-06-12
  • 浏览 (3)

native_avbuffer.h

Overview

The native_avbuffer.h file declares the functions of the media struct AVBuffer.

Library: libnative_media_core.so

System capability: SystemCapability.Multimedia.Media.Core

Since: 11

Related module: Core

Summary

Types

Name Description
typedef struct OH_AVBuffer OH_AVBuffer Defines a struct that describes a native object for the media memory interface.
typedef struct OH_NativeBuffer OH_NativeBuffer Defines a struct that describes a native object for the graphics memory interface.

Functions

Name Description
OH_AVBuffer * OH_AVBuffer_Create (int32_t capacity) Creates an OH_AVBuffer instance. You must call OH_AVBuffer_Destroy to manually release the OH_AVBuffer instance returned.
OH_AVErrCode OH_AVBuffer_Destroy (OH_AVBuffer *buffer) Releases an OH_AVBuffer instance.
OH_AVErrCode OH_AVBuffer_GetBufferAttr (OH_AVBuffer *buffer, OH_AVCodecBufferAttr *attr) Obtains the basic attributes, including pts, size, offset, and flags, of a buffer.
OH_AVErrCode OH_AVBuffer_SetBufferAttr (OH_AVBuffer *buffer, const OH_AVCodecBufferAttr *attr) Sets the basic attributes, including pts, size, offset, and flags, of a buffer.
OH_AVFormat * OH_AVBuffer_GetParameter (OH_AVBuffer *buffer) Obtains parameters except basic attributes of a buffer. The information is carried in an OH_AVFormat instance.
OH_AVErrCode OH_AVBuffer_SetParameter (OH_AVBuffer *buffer, const OH_AVFormat *format) Sets parameters except basic attributes of a buffer. The information is carried in an OH_AVFormat instance.
uint8_t * OH_AVBuffer_GetAddr (OH_AVBuffer *buffer) Obtains the virtual address of a data buffer.
int32_t OH_AVBuffer_GetCapacity (OH_AVBuffer *buffer) Obtains the capacity (in bytes) of a buffer.
OH_NativeBuffer * OH_AVBuffer_GetNativeBuffer (OH_AVBuffer *buffer) Obtains the pointer to an OH_NativeBuffer instance.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙AVCodec Kit

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVSource

harmony 鸿蒙AudioCodec

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞