---
title: hi_mpi_venc_set_chn_param
description: "设置通道参数。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_1057.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_1057.html
indexId: 4c1271b87393c0ac9590294b26e4572b8240ec5e80f191109bbb79bd0a4f665c105
---
# hi_mpi_venc_set_chn_param

#### 函数功能

设置通道参数。


#### 约束说明

- 本接口在编码通道创建之后、编码通道销毁之前调用。如果针对未创建的通道，调用本接口设置参数，则返回失败。
- Atlas 200/500 A2推理产品，JPEGE图片编码场景下，不支持调用本接口。


#### 函数原型

hi_s32 hi_mpi_venc_set_chn_param(hi_venc_chn chn, const hi_venc_chn_param *chn_param)


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| chn | 输入 | 编码通道号。 Atlas 200/500 A2推理产品，编码通道号的取值范围：[0, 128)，JPEGE功能和VENC功能共用通道，且通道总数最多128。 |
| chn\_param | 输入 | VENC通道参数的指针。 |


#### 返回值说明

- 0：成功
- 非0：失败，参见  VENC视频编码/JPEGE图片编码返回码
