---
title: ImportBuffer
description: "从外部导入一个buffer。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/240RC1/armnative/kunpengcpsvideo_16_0084.html
sourcePath: /source/zh/kunpengboostkithistory/240RC1/armnative/kunpengcpsvideo_16_0084.html
indexId: 1e32461a022a460a7f691fa9100c2f6a297808268c5f36ba73223cb43339017479
---
# ImportBuffer

#### 函数功能

从外部导入一个buffer。


#### 约束说明

NA


#### 函数原型

int32_t ImportBuffer(FrameFormat format, uint64_t handle, GpuEncoderBufferT &buffer) = 0


#### 参数说明

| 字段名称 | 输入/输出 | 字段类型 | 字段描述 |
| --- | --- | --- | --- |
| format | 输入 | FrameFormat | 要导入的buffer对应的格式。 |
| handle | 输入 | uint64\_t | 要导入的buffer对应的句柄或显存地址。 |
| buffer | 输出 | GpuEncoderBufferT & | 导入完成后用于挂载buffer的指针。 |


#### 返回值说明

数据类型：GpuEncoderErrorCode

取值如下：

- OK：导入buffer成功。
- 其他：导入buffer失败。
