---
title: hi_mpi_vdec_get_chn_attr
description: "获取视频解码通道属性。"
url: https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/latest/Application%20Development%20Guide/aadgc/aclcppdevg_03_1016.html
sourcePath: /source/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Application Development Guide/aadgc/aclcppdevg_03_1016.html
indexId: 2114a732371f65006ae1745fb33cec1aacd01776e09ff71ab4976066187806a9105
---
# hi_mpi_vdec_get_chn_attr

#### 函数功能

获取视频解码通道属性。


#### 约束说明

获取属性前必须保证通道已创建，否则会返回通道未创建的错误码HI_ERR_VDEC_UNEXIST。


#### 函数原型

hi_s32 hi_mpi_vdec_get_chn_attr(hi_vdec_chn chn, hi_vdec_chn_attr *attr)


#### 参数说明

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


#### 返回值说明

- 0：成功
- 非0：失败，参见  VDEC视频解码/JPEGD图片解码返回码
