# aclvencGetChannelDesc系列接口

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | ☓ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | ☓ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | ☓ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | ☓ |


#### 功能说明

获取视频编码处理通道的描述信息。


#### 函数原型

```
uint32_t aclvencGetChannelDescChannelId(const aclvencChannelDesc *channelDesc)
uint64_t aclvencGetChannelDescThreadId(const aclvencChannelDesc *channelDesc)
aclvencCallback aclvencGetChannelDescCallback(const aclvencChannelDesc *channelDesc)
acldvppStreamFormat aclvencGetChannelDescEnType(const aclvencChannelDesc *channelDesc)
acldvppPixelFormat aclvencGetChannelDescPicFormat(const aclvencChannelDesc *channelDesc)
uint32_t aclvencGetChannelDescPicWidth(const aclvencChannelDesc *channelDesc)
uint32_t aclvencGetChannelDescPicHeight(const aclvencChannelDesc *channelDesc)
uint32_t aclvencGetChannelDescKeyFrameInterval(const aclvencChannelDesc *channelDesc)
void *aclvencGetChannelDescBufAddr(const aclvencChannelDesc *channelDesc)
uint32_t aclvencGetChannelDescBufSize(const aclvencChannelDesc *channelDesc)
uint32_t aclvencGetChannelDescRcMode(const aclvencChannelDesc *channelDesc)
uint32_t aclvencGetChannelDescSrcRate(const aclvencChannelDesc *channelDesc)
uint32_t aclvencGetChannelDescMaxBitRate(const aclvencChannelDesc *channelDesc)
```


#### 参数说明

| 参数名 | 输入/输出 | 说明 |
| --- | --- | --- |
| channelDesc | 输入 | 视频编码处理通道描述信息的指针。 需提前调用aclvencCreateChannelDesc接口创建aclvencChannelDesc类型的数据，调用aclvencSetChannelDesc系列接口设置视频编码处理通道描述信息的属性值。 |


#### 返回值说明

| 参数名 | 说明 |
| --- | --- |
| channelId | 通道号，默认为0。 |
| threadId | 回调线程ID。 |
| callback | 编码回调函数。类型定义请参见aclvencCallback。 |
| enType | 视频编码协议。类型定义请参见acldvppStreamFormat。 |
| picFormat | 输入图像格式。类型定义请参见acldvppPixelFormat。 |
| picWidth | 图片宽度。 |
| picHeight | 图片高度。 |
| keyFrameInterval | 关键帧间隔，不能为0。 |
| bufAddr | 编码输出缓存地址。 |
| bufSize | 编码输出缓存大小，单位为Byte。 |
| rcMode | 指定码率控制模式。 1表示变码率VBR模式 2表示定码率CBR模式 |
| srcRate | 输入码流帧率，单位fps。 |
| maxBitRate | 输出码率，单位kbps。 |
