FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
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"

Go to the source code of this file.

Data Structures

struct  Buf
 
struct  FifoContext
 

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 ff_vf_fifo
 
static const AVFilterPad avfilter_af_afifo_inputs []
 
static const AVFilterPad avfilter_af_afifo_outputs []
 
AVFilter ff_af_afifo
 

Detailed Description

FIFO buffering filter.

Definition in file fifo.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 54 of file fifo.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 62 of file fifo.c.

static int add_to_queue ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 76 of file fifo.c.

static void queue_pop ( FifoContext s)
static

Definition at line 92 of file fifo.c.

Referenced by request_frame(), and return_audio_frame().

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 fifo.c.

Referenced by return_audio_frame().

static int calc_ptr_alignment ( AVFrame frame)
static

Definition at line 129 of file fifo.c.

Referenced by return_audio_frame().

static int return_audio_frame ( AVFilterContext ctx)
static

Definition at line 146 of file fifo.c.

Referenced by request_frame().

static int request_frame ( AVFilterLink outlink)
static

Definition at line 230 of file fifo.c.

Variable Documentation

const AVFilterPad avfilter_vf_fifo_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = add_to_queue,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int add_to_queue(AVFilterLink *inlink, AVFrame *frame)
Definition: fifo.c:76

Definition at line 255 of file fifo.c.

const AVFilterPad avfilter_vf_fifo_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int request_frame(AVFilterLink *outlink)
Definition: fifo.c:230

Definition at line 264 of file fifo.c.

AVFilter ff_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)
Definition: fifo.c:54
static const AVFilterPad avfilter_vf_fifo_inputs[]
Definition: fifo.c:255
static av_cold void uninit(AVFilterContext *ctx)
Definition: fifo.c:62
static const AVFilterPad avfilter_vf_fifo_outputs[]
Definition: fifo.c:264
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203

Definition at line 273 of file fifo.c.

const AVFilterPad avfilter_af_afifo_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = add_to_queue,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int add_to_queue(AVFilterLink *inlink, AVFrame *frame)
Definition: fifo.c:76

Definition at line 286 of file fifo.c.

const AVFilterPad avfilter_af_afifo_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int request_frame(AVFilterLink *outlink)
Definition: fifo.c:230

Definition at line 295 of file fifo.c.

AVFilter ff_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)
Definition: fifo.c:54
static av_cold void uninit(AVFilterContext *ctx)
Definition: fifo.c:62
static const AVFilterPad avfilter_af_afifo_inputs[]
Definition: fifo.c:286
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static const AVFilterPad avfilter_af_afifo_outputs[]
Definition: fifo.c:295

Definition at line 304 of file fifo.c.