FFmpeg
Data Structures | Macros | Functions | Variables
vf_scroll.c File Reference
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ScrollContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define OFFSET(x)   offsetof(ScrollContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define VFT   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int scroll_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static void scroll (AVFilterContext *ctx, AVFrame *in, AVFrame *out)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (scroll)
 

Variables

static const AVOption scroll_options []
 
static const AVFilterPad scroll_inputs []
 
static const AVFilterPad scroll_outputs []
 
AVFilter ff_vf_scroll
 

Macro Definition Documentation

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

Definition at line 180 of file vf_scroll.c.

Definition at line 181 of file vf_scroll.c.

Definition at line 182 of file vf_scroll.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 45 of file vf_scroll.c.

static int scroll_slice ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 79 of file vf_scroll.c.

Referenced by scroll().

static void scroll ( AVFilterContext ctx,
AVFrame in,
AVFrame out 
)
static

Definition at line 111 of file vf_scroll.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 141 of file vf_scroll.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 160 of file vf_scroll.c.

AVFILTER_DEFINE_CLASS ( scroll  )

Variable Documentation

const AVOption scroll_options[]
static
Initial value:
= {
{ "horizontal", "set the horizontal scrolling speed", OFFSET(h_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., VFT },
{ "h", "set the horizontal scrolling speed", OFFSET(h_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., VFT },
{ "vertical", "set the vertical scrolling speed", OFFSET(v_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., VFT },
{ "v", "set the vertical scrolling speed", OFFSET(v_speed), AV_OPT_TYPE_FLOAT, {.dbl=0.}, -1., 1., VFT },
{ "hpos", "set initial horizontal position", OFFSET(h_ipos), AV_OPT_TYPE_FLOAT, {.dbl=0.}, 0, 1., FLAGS },
{ "vpos", "set initial vertical position", OFFSET(v_ipos), AV_OPT_TYPE_FLOAT, {.dbl=0.}, 0, 1., FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: vf_scroll.c:181
#define OFFSET(x)
Definition: vf_scroll.c:180
#define VFT
Definition: vf_scroll.c:182

Definition at line 184 of file vf_scroll.c.

const AVFilterPad scroll_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_scroll.c:141
static int config_input(AVFilterLink *inlink)
Definition: vf_scroll.c:160

Definition at line 196 of file vf_scroll.c.

const AVFilterPad scroll_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 206 of file vf_scroll.c.

AVFilter ff_vf_scroll
Initial value:
= {
.name = "scroll",
.description = NULL_IF_CONFIG_SMALL("Scroll input video."),
.priv_size = sizeof(ScrollContext),
.priv_class = &scroll_class,
}
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
static int query_formats(AVFilterContext *ctx)
Definition: vf_scroll.c:45
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options...
Definition: avfilter.c:885
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad scroll_outputs[]
Definition: vf_scroll.c:206
static const AVFilterPad scroll_inputs[]
Definition: vf_scroll.c:196
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
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
#define flags(name, subs,...)
Definition: cbs_av1.c:560
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_afftdn.c:1374

Definition at line 214 of file vf_scroll.c.