67 for (buf = fifo->
root.
next; buf; buf = tmp) {
109 int planes = planar ? nb_channels : 1;
115 for (i = 0; i < planes; i++)
136 for (p = 0; p < planes; p++) {
140 if (cur_align < min_align)
141 min_align = cur_align;
155 if (!head && !s->
out)
185 "buffer was returned.\n");
199 nb_channels, link->
format);
275 .description =
NULL_IF_CONFIG_SMALL(
"Buffer input images and send them when they are requested."),
282 .
inputs = avfilter_vf_fifo_inputs,
283 .
outputs = avfilter_vf_fifo_outputs,
306 .description =
NULL_IF_CONFIG_SMALL(
"Buffer input frames and send them when they are requested."),
313 .
inputs = avfilter_af_afifo_inputs,
314 .
outputs = avfilter_af_afifo_outputs,
static int calc_ptr_alignment(AVFrame *frame)
AVFrame * out
When a specific number of output samples is requested, the partial buffer is stored here...
This structure describes decoded (raw) audio or video data.
Buf * last
last buffered frame
static av_cold int init(AVFilterContext *ctx)
static const AVFilterPad avfilter_vf_fifo_inputs[]
Main libavfilter public API header.
int request_samples
Audio only, the destination filter sets this to a non-zero value to request that buffers with the giv...
static void queue_pop(FifoContext *s)
static av_cold void uninit(AVFilterContext *ctx)
static int add_to_queue(AVFilterLink *inlink, AVFrame *frame)
int av_get_channel_layout_nb_channels(uint64_t channel_layout)
Return the number of channels in the channel layout.
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
#define AVERROR_EOF
End of file.
static const AVFilterPad avfilter_vf_fifo_outputs[]
static const AVFilterPad avfilter_af_afifo_inputs[]
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
Check if the sample format is planar.
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.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Fill an audio buffer with silence.
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
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 uint8_t offset[127][2]
int allocated_samples
number of samples out was allocated for
uint64_t channel_layout
Channel layout of the audio data.
audio channel layout utility functions
static void buffer_offset(AVFilterLink *link, AVFrame *frame, int offset)
Move data pointers and pts offset samples forward.
AVFilterContext * src
source filter
static const AVFilterPad outputs[]
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
int format
agreed upon media format
#define FF_ARRAY_ELEMS(a)
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
static const AVFilterPad inputs[]
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
int av_samples_copy(uint8_t **dst, uint8_t *const *src, int dst_offset, int src_offset, int nb_samples, int nb_channels, enum AVSampleFormat sample_fmt)
Copy samples from src to dst.
static int request_frame(AVFilterLink *outlink)
rational number numerator/denominator
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
Return number of bytes per sample.
common internal and external API header
static int return_audio_frame(AVFilterContext *ctx)
uint64_t channel_layout
channel layout of current buffer (see libavutil/channel_layout.h)
AVFilterContext * dst
dest filter
static const AVFilterPad avfilter_af_afifo_outputs[]
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 nb_samples
number of audio samples (per channel) described by this frame
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AV_NOPTS_VALUE
Undefined timestamp value.