FFmpeg——filters

简要分析 ffmpeg最基本的5个过滤器组合 (仅以音频处理为例)

AVFilterContext* [5]: 其实真正意义上的filter只有 abuffer和 abuffersink;
某种意义上说 buffer是数据入口,buffersink是数据出口

AVFilterContext* [0]->name = "Parsed_anull_0" 
AVFilterContext* [0]->filter->name = "anull" 
AVFilterContext* [0]->filter->description = "Pass the source unchanged to the output."  
AVFilterContext* [1]->name = "graph_0_in_0_0" 
AVFilterContext* [1]->filter->name = "abuffer" 
AVFilterContext* [1]->filter->description = "buffer the audio frames, and make them accessible to the filterchain."  
AVFilterContext* [2]->name = "out_0_0" 
AVFilterContext* [2]->filter->name = "abuffersink" 
AVFilterContext* [2]->filter->description = "buffer the audio frames, and make them avaliable to the end of the filter graph."  
AVFilterContext* [3]->name = "format_out_0_0" 
AVFilterContext* [3]->filter->name = "aformat" 
AVFilterContext* [3]->filter->description = "Convert the input audio to one of the specified formats"  
AVFilterContext* [4]->name = "auto_resampler_0" 
AVFilterContext* [4]->filter->name = "aresampler" 
AVFilterContext* [4]->filter->description = "Resample audio data."  

关于 int av_buffersink_get_frame_flags(AVFilterContext *ctx, AVFrame *frame, int flags);

从buffersink过滤器,即ctx中读取filters处理过的 raw data 到frame中
flags:
#define AV_BUFFERSINK_FLAG_PEEK 1 : 仅仅是读数据,不会将数据从buffersink中移除,通常用来测试。
#define AV_BUFFERSINK_FLAG_NO_REQUEST 2:告诉filters入口不要再读数据进来,同时如果buffersink中有数据,那就读取数据(并移除数据)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值