libavfilter/fifo.c File Reference

FIFO buffering filter. More...

#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
#include "libavutil/samplefmt.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"
#include "video.h"
Include dependency graph for libavfilter/fifo.c:

Go to the source code of this file.

Data Structures

struct  Buf
 
struct  FifoContext
 

Typedefs

typedef struct Buf Buf
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int add_to_queue (AVFilterLink *inlink, AVFrame *frame)
 
static void queue_pop (FifoContext *s)
 
static void buffer_offset (AVFilterLink *link, AVFrame *frame, int offset)
 Move data pointers and pts offset samples forward. More...
 
static int calc_ptr_alignment (AVFrame *frame)
 
static int return_audio_frame (AVFilterContext *ctx)
 
static int request_frame (AVFilterLink *outlink)
 

Variables

static const AVFilterPad avfilter_vf_fifo_inputs []
 
static const AVFilterPad avfilter_vf_fifo_outputs []
 
AVFilter avfilter_vf_fifo
 
static const AVFilterPad avfilter_af_afifo_inputs []
 
static const AVFilterPad avfilter_af_afifo_outputs []
 
AVFilter avfilter_af_afifo
 

Detailed Description

FIFO buffering filter.

Definition in file libavfilter/fifo.c.

Typedef Documentation

typedef struct Buf Buf

Function Documentation

static int add_to_queue ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 76 of file libavfilter/fifo.c.

static void buffer_offset ( AVFilterLink link,
AVFrame frame,
int  offset 
)
static

Move data pointers and pts offset samples forward.

Definition at line 104 of file libavfilter/fifo.c.

Referenced by return_audio_frame().

static int calc_ptr_alignment ( AVFrame frame)
static

Definition at line 129 of file libavfilter/fifo.c.

Referenced by return_audio_frame().

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 54 of file libavfilter/fifo.c.

static void queue_pop ( FifoContext s)
static

Definition at line 92 of file libavfilter/fifo.c.

Referenced by request_frame(), and return_audio_frame().

static int request_frame ( AVFilterLink outlink)
static

Definition at line 222 of file libavfilter/fifo.c.

static int return_audio_frame ( AVFilterContext ctx)
static

Definition at line 146 of file libavfilter/fifo.c.

Referenced by request_frame().

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 62 of file libavfilter/fifo.c.

Variable Documentation

AVFilter avfilter_af_afifo
Initial value:
= {
.name = "afifo",
.description = NULL_IF_CONFIG_SMALL("Buffer input frames and send them when they are requested."),
.init = init,
.uninit = uninit,
.priv_size = sizeof(FifoContext),
}
static av_cold int init(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad avfilter_af_afifo_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVFilterPad avfilter_af_afifo_outputs[]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs

Definition at line 294 of file libavfilter/fifo.c.

const AVFilterPad avfilter_af_afifo_inputs[]
static
Initial value:
= {
{
.name = "default",
.get_audio_buffer = ff_null_get_audio_buffer,
.filter_frame = add_to_queue,
},
{ NULL }
}
static int add_to_queue(AVFilterLink *inlink, AVFrame *frame)
AVFrame * ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
get_audio_buffer() handler for filters which simply pass audio along
Definition: audio.c:36
NULL
Definition: eval.c:55

Definition at line 275 of file libavfilter/fifo.c.

const AVFilterPad avfilter_af_afifo_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int request_frame(AVFilterLink *outlink)

Definition at line 285 of file libavfilter/fifo.c.

AVFilter avfilter_vf_fifo
Initial value:
= {
.name = "fifo",
.description = NULL_IF_CONFIG_SMALL("Buffer input images and send them when they are requested."),
.init = init,
.uninit = uninit,
.priv_size = sizeof(FifoContext),
}
static av_cold int init(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
static const AVFilterPad avfilter_vf_fifo_inputs[]
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad avfilter_vf_fifo_outputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs

Definition at line 262 of file libavfilter/fifo.c.

const AVFilterPad avfilter_vf_fifo_inputs[]
static
Initial value:
= {
{
.name = "default",
.get_video_buffer = ff_null_get_video_buffer,
.filter_frame = add_to_queue,
},
{ NULL }
}
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
Definition: video.c:35
static int add_to_queue(AVFilterLink *inlink, AVFrame *frame)
NULL
Definition: eval.c:55

Definition at line 243 of file libavfilter/fifo.c.

const AVFilterPad avfilter_vf_fifo_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int request_frame(AVFilterLink *outlink)

Definition at line 253 of file libavfilter/fifo.c.