154 .
name =
"buffersink",
155 .description =
NULL_IF_CONFIG_SMALL(
"Buffer video frames, and make them available to the end of the filter graph."),
159 .
inputs = avfilter_vsink_buffer_inputs,
175 .
name =
"abuffersink",
176 .description =
NULL_IF_CONFIG_SMALL(
"Buffer audio frames, and make them available to the end of the filter graph."),
180 .
inputs = avfilter_asink_abuffer_inputs,
uint8_t ** extended_data
pointers to the data planes/channels.
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
Write data to an AVAudioFifo.
AVFilterBufferRef * ff_get_audio_buffer(AVFilterLink *link, int perms, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
int av_buffersink_read_samples(AVFilterContext *ctx, AVFilterBufferRef **pbuf, int nb_samples)
Same as av_buffersink_read, but with the ability to specify the number of samples read...
static const AVFilterPad outputs[]
static av_cold void uninit(AVFilterContext *ctx)
int av_buffersink_read(AVFilterContext *ctx, AVFilterBufferRef **buf)
Get a buffer with filtered data from sink and put it in buf.
void av_audio_fifo_free(AVAudioFifo *af)
Free an AVAudioFifo.
void avfilter_unref_buffer(AVFilterBufferRef *ref)
Remove a reference to a buffer.
#define AV_PERM_READ
can read from the buffer
const char * name
Pad name.
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples)
Read data from an AVAudioFifo.
AVFilterLink ** inputs
array of pointers to input links
#define av_assert0(cond)
assert() equivalent, that is always enabled.
AVAudioFifo * audio_fifo
FIFO for audio samples.
int av_audio_fifo_size(AVAudioFifo *af)
Get the current number of samples in the AVAudioFifo available for reading.
AVFilter avfilter_vsink_buffer
int64_t pts
presentation timestamp.
A filter pad used for either input or output.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
A link between two filters.
AVAudioFifo * av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, int nb_samples)
Allocate an AVAudioFifo.
int sample_rate
samples per second
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
simple assert() macros that are a bit more flexible than ISO C assert().
static const AVFilterPad avfilter_asink_abuffer_inputs[]
audio channel layout utility functions
static int read_from_fifo(AVFilterContext *ctx, AVFilterBufferRef **pbuf, int nb_samples)
int format
agreed upon media format
int nb_samples
number of samples currently in the FIFO
AVFilterBufferRef * cur_buf
last buffer delivered on the sink
A reference to an AVFilterBuffer.
static const AVFilterPad inputs[]
rational number numerator/denominator
const char * name
filter name
int64_t next_pts
interpolating audio pts
common internal and external API header
AVFilter avfilter_asink_abuffer
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
#define AV_PERM_WRITE
can write to the buffer
AVFilterContext * dst
dest filter
static int filter_frame(AVFilterLink *link, AVFilterBufferRef *buf)
static const AVFilterPad avfilter_vsink_buffer_inputs[]
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
int ff_poll_frame(AVFilterLink *link)
Poll a frame from the filter chain.