103 AVFrame *frame,
int nb_samples)
151 .
name =
"buffersink",
152 .description =
NULL_IF_CONFIG_SMALL(
"Buffer video frames, and make them available to the end of the filter graph."),
156 .
inputs = avfilter_vsink_buffer_inputs,
171 .
name =
"abuffersink",
172 .description =
NULL_IF_CONFIG_SMALL(
"Buffer audio frames, and make them available to the end of the filter graph."),
176 .
inputs = avfilter_asink_abuffer_inputs,
AVAudioFifo * av_audio_fifo_alloc(enum AVSampleFormat sample_fmt, int channels, int nb_samples)
Allocate an AVAudioFifo.
int av_audio_fifo_read(AVAudioFifo *af, void **data, int nb_samples)
Read data from an AVAudioFifo.
This structure describes decoded (raw) audio or video data.
static const AVFilterPad outputs[]
static av_cold void uninit(AVFilterContext *ctx)
Main libavfilter public API header.
static int read_from_fifo(AVFilterContext *ctx, AVFrame *frame, int nb_samples)
void av_audio_fifo_free(AVAudioFifo *af)
Free an AVAudioFifo.
void av_frame_move_ref(AVFrame *dst, AVFrame *src)
Move everything contained in src to dst and reset src.
const char * name
Pad name.
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.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
#define AVERROR_EOF
End of file.
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.
int sample_rate
samples per second
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#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[]
Context for an Audio FIFO Buffer.
common internal API header
int av_audio_fifo_size(AVAudioFifo *af)
Get the current number of samples in the AVAudioFifo available for reading.
audio channel layout utility functions
int attribute_align_arg av_buffersink_get_samples(AVFilterContext *ctx, AVFrame *frame, int nb_samples)
Same as av_buffersink_get_frame(), but with the ability to specify the number of samples read...
int format
agreed upon media format
AVFilter ff_asink_abuffer
#define attribute_align_arg
AVFrame * cur_frame
last frame delivered on the sink
static const AVFilterPad inputs[]
rational number numerator/denominator
const char * name
Filter name.
int av_audio_fifo_write(AVAudioFifo *af, void **data, int nb_samples)
Write data to an AVAudioFifo.
int64_t next_pts
interpolating audio pts
common internal and external API header
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
static int filter_frame(AVFilterLink *link, AVFrame *frame)
AVFilterContext * dst
dest filter
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.
uint8_t ** extended_data
pointers to the data planes/channels.
int attribute_align_arg av_buffersink_get_frame(AVFilterContext *ctx, AVFrame *frame)
Get a frame with filtered data from sink and put it in frame.
int nb_samples
number of audio samples (per channel) described by this frame
#define AV_NOPTS_VALUE
Undefined timestamp value.