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

◆ OFFSET

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

Definition at line 180 of file vf_scroll.c.

◆ FLAGS

Definition at line 181 of file vf_scroll.c.

◆ VFT

Definition at line 182 of file vf_scroll.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 45 of file vf_scroll.c.

◆ scroll_slice()

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().

◆ scroll()

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

Definition at line 111 of file vf_scroll.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 141 of file vf_scroll.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 160 of file vf_scroll.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( scroll  )

Variable Documentation

◆ scroll_options

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 }
}

Definition at line 184 of file vf_scroll.c.

◆ scroll_inputs

const AVFilterPad scroll_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 196 of file vf_scroll.c.

◆ scroll_outputs

const AVFilterPad scroll_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 206 of file vf_scroll.c.

◆ ff_vf_scroll

AVFilter ff_vf_scroll
Initial value:
= {
.name = "scroll",
.description = NULL_IF_CONFIG_SMALL("Scroll input video."),
.priv_size = sizeof(ScrollContext),
.priv_class = &scroll_class,
}

Definition at line 214 of file vf_scroll.c.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_scroll.c:141
scroll_inputs
static const AVFilterPad scroll_inputs[]
Definition: vf_scroll.c:196
scroll_outputs
static const AVFilterPad scroll_outputs[]
Definition: vf_scroll.c:206
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_scroll.c:45
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
inputs
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: filter_design.txt:243
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_acrusher.c:336
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_scroll.c:160
ff_filter_process_command
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:882
OFFSET
#define OFFSET(x)
Definition: vf_scroll.c:180
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#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:126
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
ScrollContext
Definition: vf_scroll.c:28
FLAGS
#define FLAGS
Definition: vf_scroll.c:181
VFT
#define VFT
Definition: vf_scroll.c:182
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561