# OHOS::SurfaceBuffer - [Overview](#section977729523165633) - [Summary](#section1163816034165633) - [Public Member Functions](#pub-methods) ## **Overview** **Related Modules:** [Surface](Surface.md) **Description:** Provides functions such as setting the virtual address, size, and additional attributes of shared memory. **Since:** 1.0 **Version:** 1.0 ## **Summary** ## Public Member Functions

Function

Description

GetVirAddr () const =0

virtual void *

Obtains the virtual address of shared memory for producers and consumers.

GetPhyAddr () const =0

virtual uint64_t

Obtains the physical address of shared memory.

GetSize () const =0

virtual uint32_t

Obtains the size of shared memory.

SetSize (uint32_t size)=0

virtual void

Sets the size of shared memory.

SetInt32 (uint32_t key, int32_t value)=0

virtual int32_t

Sets an extra attribute value of the int32 type.

GetInt32 (uint32_t key, int32_t &value)=0

virtual int32_t

Obtains an extra attribute value of the int32 type.

SetInt64 (uint32_t key, int64_t value)=0

virtual int32_t

Sets an extra attribute value of the int64 type.

GetInt64 (uint32_t key, int64_t &value)=0

virtual int32_t

Obtains an extra attribute value of the int64 type.