---
title: SetParams
description: "设置编码器的编码参数。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/240RC1/armnative/kunpengcpsvideo_16_0057.html
sourcePath: /source/zh/kunpengboostkithistory/240RC1/armnative/kunpengcpsvideo_16_0057.html
indexId: a5e6e7faac82a858a0bb3134b8d7cf2b2cb71070e06cc369bef77dbdbc870aad79
---
# SetParams

#### 函数功能

设置编码器的编码参数。


#### 约束说明

NA


#### 函数原型

EncoderRetCode SetParams(const VmiEncoderParams&params)


#### 参数说明

| 参数名称 | 输入/输出 | 参数类型 | 参数描述 |
| --- | --- | --- | --- |
| config | 输入 | struct VmiEncoderParams | 要设置的编码参数。 |


struct VmiEncoderParams的具体定义如下：

```
struct VmiEncoderParams {
uint32_t bitRate = 3000000;
uint32_t gopSize = 30;
uint32_t profile = 1;
uint32_t keyFrame = 0;
};
```


#### 返回值说明

数据类型：EncoderRetCode

取值如下：

- VIDEO_ENCODER_SUCCESS：设置编码器成功。
-
