FFmpeg
Data Structures | Macros | Functions | Variables
vf_tpad.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"
#include "internal.h"
#include "formats.h"
#include "drawutils.h"

Go to the source code of this file.

Data Structures

struct  TPadContext
 

Macros

#define OFFSET(x)   offsetof(TPadContext, x)
 
#define VF   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (tpad)
 
static int query_formats (AVFilterContext *ctx)
 
static int activate (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption tpad_options []
 
static const AVFilterPad tpad_inputs []
 
static const AVFilterPad tpad_outputs []
 
AVFilter ff_vf_tpad
 

Macro Definition Documentation

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

Definition at line 49 of file vf_tpad.c.

Definition at line 50 of file vf_tpad.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( tpad  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 67 of file vf_tpad.c.

static int activate ( AVFilterContext ctx)
static

Definition at line 72 of file vf_tpad.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 168 of file vf_tpad.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 184 of file vf_tpad.c.

Variable Documentation

const AVOption tpad_options[]
static
Initial value:
= {
{ "start", "set the number of frames to delay input", OFFSET(pad_start), AV_OPT_TYPE_INT, {.i64=0}, 0, INT_MAX, VF },
{ "stop", "set the number of frames to add after input finished", OFFSET(pad_stop), AV_OPT_TYPE_INT, {.i64=0}, -1, INT_MAX, VF },
{ "start_mode", "set the mode of added frames to start", OFFSET(start_mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, VF, "mode" },
{ "add", "add solid-color frames", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, VF, "mode" },
{ "clone", "clone first/last frame", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, VF, "mode" },
{ "stop_mode", "set the mode of added frames to end", OFFSET(stop_mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, VF, "mode" },
{ "start_duration", "set the duration to delay input", OFFSET(start_duration), AV_OPT_TYPE_DURATION, {.i64=0}, 0, INT64_MAX, VF },
{ "stop_duration", "set the duration to pad input", OFFSET(stop_duration), AV_OPT_TYPE_DURATION, {.i64=0}, 0, INT64_MAX, VF },
{ "color", "set the color of the added frames", OFFSET(rgba_color), AV_OPT_TYPE_COLOR, {.str="black"}, 0, 0, VF },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_tpad.c:49
#define VF
Definition: vf_tpad.c:50

Definition at line 52 of file vf_tpad.c.

const AVFilterPad tpad_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)
Definition: vf_tpad.c:168

Definition at line 191 of file vf_tpad.c.

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

Definition at line 200 of file vf_tpad.c.

AVFilter ff_vf_tpad
Initial value:
= {
.name = "tpad",
.description = NULL_IF_CONFIG_SMALL("Temporarily pad video frames."),
.priv_size = sizeof(TPadContext),
.priv_class = &tpad_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_tpad.c:184
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int activate(AVFilterContext *ctx)
Definition: vf_tpad.c:72
static const AVFilterPad tpad_outputs[]
Definition: vf_tpad.c:200
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
static const AVFilterPad tpad_inputs[]
Definition: vf_tpad.c:191
static int query_formats(AVFilterContext *ctx)
Definition: vf_tpad.c:67

Definition at line 208 of file vf_tpad.c.