FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_random.c File Reference
#include "libavutil/lfg.h"
#include "libavutil/opt.h"
#include "libavutil/random_seed.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  RandomContext
 

Macros

#define MAX_FRAMES   512
 
#define OFFSET(x)   offsetof(RandomContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (random)
 
static av_cold int init (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int request_frame (AVFilterLink *outlink)
 

Variables

static const AVOption random_options []
 
static const AVFilterPad random_inputs []
 
static const AVFilterPad random_outputs []
 
AVFilter ff_vf_random
 

Macro Definition Documentation

#define MAX_FRAMES   512

Definition at line 29 of file vf_random.c.

#define OFFSET (   x)    offsetof(RandomContext, x)

Definition at line 43 of file vf_random.c.

Definition at line 44 of file vf_random.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( random  )
static av_cold int init ( AVFilterContext ctx)
static

Definition at line 54 of file vf_random.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 67 of file vf_random.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 92 of file vf_random.c.

Variable Documentation

const AVOption random_options[]
static
Initial value:
= {
{ "frames", "set number of frames in cache", OFFSET(nb_frames), AV_OPT_TYPE_INT, {.i64=30}, 2, MAX_FRAMES, FLAGS },
{ "seed", "set the seed", OFFSET(random_seed), AV_OPT_TYPE_INT64, {.i64=-1}, -1, UINT32_MAX, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_random.c:43
#define FLAGS
Definition: vf_random.c:44
#define MAX_FRAMES
Definition: vf_random.c:29

Definition at line 46 of file vf_random.c.

const AVFilterPad random_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_random.c:67

Definition at line 111 of file vf_random.c.

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

Definition at line 120 of file vf_random.c.

AVFilter ff_vf_random
Initial value:
= {
.name = "random",
.description = NULL_IF_CONFIG_SMALL("Return random frames."),
.priv_size = sizeof(RandomContext),
.priv_class = &random_class,
.init = init,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static av_cold int init(AVFilterContext *ctx)
Definition: vf_random.c:54
static const AVFilterPad random_outputs[]
Definition: vf_random.c:120
static const AVFilterPad random_inputs[]
Definition: vf_random.c:111

Definition at line 129 of file vf_random.c.