aclvencSetChannelDesc系列接口
产品支持情况
产品  | 
是否支持  | 
|---|---|
x  | 
|
x  | 
|
√  | 
|
√  | 
|
x  | 
|
√  | 
功能说明
设置视频编码处理通道描述信息的属性值。
函数原型
aclError aclvencSetChannelDescThreadId(aclvencChannelDesc *channelDesc, uint64_t threadId) aclError aclvencSetChannelDescCallback(aclvencChannelDesc *channelDesc, aclvencCallback callback) aclError aclvencSetChannelDescEnType(aclvencChannelDesc *channelDesc, acldvppStreamFormat enType) aclError aclvencSetChannelDescPicFormat(aclvencChannelDesc *channelDesc, acldvppPixelFormat picFormat) aclError aclvencSetChannelDescPicWidth(aclvencChannelDesc *channelDesc, uint32_t picWidth) aclError aclvencSetChannelDescPicHeight(aclvencChannelDesc *channelDesc, uint32_t picHeight) aclError aclvencSetChannelDescKeyFrameInterval(aclvencChannelDesc *channelDesc, uint32_t keyFrameInterval) aclError aclvencSetChannelDescBufAddr(aclvencChannelDesc *channelDesc, void *bufAddr) aclError aclvencSetChannelDescBufSize(aclvencChannelDesc *channelDesc, uint32_t bufSize) aclError aclvencSetChannelDescRcMode(aclvencChannelDesc *channelDesc, uint32_t rcMode) aclError aclvencSetChannelDescSrcRate(aclvencChannelDesc *channelDesc, uint32_t srcRate) aclError aclvencSetChannelDescMaxBitRate(aclvencChannelDesc *channelDesc, uint32_t maxBitRate)
参数说明
参数名  | 
输入/输出  | 
说明  | 
|---|---|---|
channelDesc  | 
输出  | 
视频编码处理通道描述信息的指针。 需提前调用aclvencCreateChannelDesc接口创建aclvencChannelDesc类型的数据。  | 
threadId  | 
输入  | 
回调线程ID。 
 说明:  
同一个进程内,在不同的Device上注册VENC编码回调函数的线程时,不能指定同一个线程ID。  | 
callback  | 
输入  | 
编码回调函数。  | 
enType  | 
输入  | 
视频编码协议。  | 
picFormat  | 
输入  | 
输入图像格式,支持如下格式: 
  | 
picWidth  | 
输入  | 
图片宽度。  | 
picHeight  | 
输入  | 
图片高度。  | 
keyFrameInterval  | 
输入  | 
关键帧间隔,取值范围[1,65536]。  | 
bufAddr  | 
输入  | 
编码输出缓存指针。 
 说明:  
在  | 
bufSize  | 
输入  | 
编码输出缓存大小,单位为Byte。 
 说明:  
在 在  | 
rcMode  | 
输入  | 
指定码率控制模式。 
  说明:  
如果不设置该参数,则采用默认值0。  | 
srcRate  | 
输入  | 
输入码流帧率,单位fps。 如果不设置该参数,默认为30;如果设置为0,表示使用默认值,即30。如果该值和实际输入码流帧率相差太大,会影响输出码率。  | 
maxBitRate  | 
输入  | 
输出码率,单位kbps。  | 
返回值说明
返回0表示成功,返回其他值表示失败,请参见aclError。