67 for (buf = fifo->
root.
next; buf; buf = tmp) {
109 int planes = planar ? nb_channels : 1;
115 for (i = 0; i < planes; i++)
120 buf->
linesize[0] -= block_align*offset;
136 for (p = 0; p < planes; p++) {
140 if (cur_align < min_align)
141 min_align = cur_align;
182 "buffer was returned.\n");
196 nb_channels, link->
format);
267 .description =
NULL_IF_CONFIG_SMALL(
"Buffer input images and send them when they are requested."),
274 .
inputs = avfilter_vf_fifo_inputs,
275 .
outputs = avfilter_vf_fifo_outputs,
300 .description =
NULL_IF_CONFIG_SMALL(
"Buffer input frames and send them when they are requested."),
307 .
inputs = avfilter_af_afifo_inputs,
308 .
outputs = avfilter_af_afifo_outputs,
uint8_t ** extended_data
pointers to the data planes/channels.
AVFilter avfilter_vf_fifo
static void buffer_offset(AVFilterLink *link, AVFilterBufferRef *buf, int offset)
Move data pointers and pts offset samples forward.
AVFilterBufferRef * ff_get_audio_buffer(AVFilterLink *link, int perms, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
int nb_samples
number of audio samples
Buf * last
last buffered frame
AVFilterBufferRefAudioProps * audio
audio buffer specific properties
int linesize[8]
number of bytes per line
static const AVFilterPad outputs[]
static const AVFilterPad avfilter_vf_fifo_inputs[]
AVFilter avfilter_af_afifo
int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
Send a frame of data to the next filter.
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)
void avfilter_unref_buffer(AVFilterBufferRef *ref)
Remove a reference to a buffer.
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
#define AV_PERM_READ
can read from the buffer
const char * name
Pad name.
AVFilterLink ** inputs
array of pointers to input links
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static int calc_ptr_alignment(AVFilterBufferRef *buf)
void avfilter_unref_bufferp(AVFilterBufferRef **ref)
Remove a reference to a buffer and set the pointer to NULL.
static const AVFilterPad avfilter_vf_fifo_outputs[]
static const AVFilterPad avfilter_af_afifo_inputs[]
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.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
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().
void av_log(void *avcl, int level, const char *fmt,...)
int allocated_samples
number of samples buf_out was allocated for
AVFilterBufferRef * avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
Add a new reference to a buffer.
audio channel layout utility functions
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.
AVFilterContext * src
source filter
int format
agreed upon media format
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt)
Return number of bytes per sample.
A reference to an AVFilterBuffer.
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)
#define FF_ARRAY_ELEMS(a)
static const AVFilterPad inputs[]
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
Check if the sample format is planar.
rational number numerator/denominator
const char * name
filter name
AVFilterBufferRef * buf_out
When a specific number of output samples is requested, the partial buffer is stored here...
uint64_t channel_layout
channel layout of audio buffer
AVFilterLink ** outputs
array of pointers to output links
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)
#define AV_PERM_REUSE2
can output the buffer multiple times, modified each time
#define AV_PERM_WRITE
can write to the buffer
AVFilterContext * dst
dest filter
static int add_to_queue(AVFilterLink *inlink, AVFilterBufferRef *buf)
uint8_t * data[8]
picture/audio data for each plane
AVFilterBufferRef * ff_null_get_audio_buffer(AVFilterLink *link, int perms, int nb_samples)
get_audio_buffer() handler for filters which simply pass audio along
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.
AVFilterBufferRef * ff_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static av_cold int init(AVFilterContext *ctx, const char *args)
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)