Commit 4c66c407 authored by Anton Khirnov's avatar Anton Khirnov

lavfi: add an audio buffer source.

parent 720c6b78
......@@ -151,6 +151,33 @@ anullsrc=48000:4
anullsrc=48000:mono
@end example
@section abuffer
Buffer audio frames, and make them available to the filter chain.
This source is not intended to be part of user-supplied graph descriptions but
for insertion by calling programs through the interface defined in
@file{libavfilter/buffersrc.h}.
It accepts the following named parameters:
@table @option
@item time_base
Timebase which will be used for timestamps of submitted frames. It must be
either a floating-point number or in @var{numerator}/@var{denominator} form.
@item sample_rate
Audio sample rate.
@item sample_fmt
Name of the sample format, as returned by @code{av_get_sample_fmt_name()}.
@item channel_layout
Channel layout of the audio data, in the form that can be accepted by
@code{av_get_channel_layout()}.
@end table
All the parameters need to be explicitly defined.
@c man end AUDIO SOURCES
@chapter Audio Sinks
......
......@@ -95,6 +95,10 @@ void avfilter_register_all(void)
extern AVFilter avfilter_vsrc_buffer;
avfilter_register(&avfilter_vsrc_buffer);
}
{
extern AVFilter avfilter_asrc_abuffer;
avfilter_register(&avfilter_asrc_abuffer);
}
{
extern AVFilter avfilter_vsink_buffer;
avfilter_register(&avfilter_vsink_buffer);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment