首页 > 其他 > 详细

ffmpeg函数02__swr_alloc_set_opts()

时间:2019-09-05 22:30:02      阅读:212      评论:0      收藏:0      [点我收藏+]

SwrContext *swr_alloc(void);  // 分配重采样的上下文。

SwrContext *swr_alloc_set_opts(struct SwrContext *s, int64_t out_ch_layout, AVSampleFormat out_sample_fmt, int out_sample_rate

, int64_t in_ch_layout, AVSampleFormat in_sample_fmt, int in_sample_rate, int log_offset, void *log_ctx

);

参数1:重采样上下文

参数2:输出的layout, 如:5.1声道…

参数3:输出的样本格式。Float, S16, S24

参数4:输出的样本率。可以不变。

参数5:输入的layout。

参数6:输入的样本格式。

参数7:输入的样本率。

参数8,参数9,日志,不用管,可直接传0

针对音频的播放速度,可以通过样本率的改变而改变。

 

int swr_init(struct SwrContext *s);                       // 初始化上下文

void swr_free(struct SwrContext **s);                  // 释放上下文空间

ffmpeg函数02__swr_alloc_set_opts()

原文:https://www.cnblogs.com/xpylovely/p/11470240.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!