FFmpeg
|
vf_drawbox.c File Reference
Box drawing filter. More...
#include "libavutil/colorspace.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/parseutils.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
Include dependency graph for vf_drawbox.c:
Go to the source code of this file.
Data Structures | |
struct | DrawBoxContext |
Macros | |
#define | OFFSET(x) offsetof(DrawBoxContext, x) |
#define | FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Enumerations | |
enum | { Y, U, V, A } |
Functions | |
static av_cold int | init (AVFilterContext *ctx) |
static int | query_formats (AVFilterContext *ctx) |
static int | config_input (AVFilterLink *inlink) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *frame) |
AVFILTER_DEFINE_CLASS (drawbox) | |
Variables | |
static const AVOption | drawbox_options [] |
static const AVFilterPad | avfilter_vf_drawbox_inputs [] |
static const AVFilterPad | avfilter_vf_drawbox_outputs [] |
AVFilter | avfilter_vf_drawbox |
Detailed Description
Box drawing filter.
Also a nice template for a filter that needs to write in the input frame.
Definition in file vf_drawbox.c.
Macro Definition Documentation
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM |
Definition at line 136 of file vf_drawbox.c.
#define OFFSET | ( | x | ) | offsetof(DrawBoxContext, x) |
Definition at line 135 of file vf_drawbox.c.
Enumeration Type Documentation
anonymous enum |
Enumerator | |
---|---|
Y | |
U | |
V | |
A |
Definition at line 37 of file vf_drawbox.c.
Function Documentation
AVFILTER_DEFINE_CLASS | ( | drawbox | ) |
|
static |
Definition at line 82 of file vf_drawbox.c.
|
static |
Definition at line 100 of file vf_drawbox.c.
|
static |
Definition at line 48 of file vf_drawbox.c.
|
static |
Definition at line 68 of file vf_drawbox.c.
Variable Documentation
AVFilter avfilter_vf_drawbox |
Initial value:
= {
.name = "drawbox",
.description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."),
.priv_size = sizeof(DrawBoxContext),
.priv_class = &drawbox_class,
}
static const AVFilterPad avfilter_vf_drawbox_outputs[]
Definition: vf_drawbox.c:166
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
static const AVFilterPad avfilter_vf_drawbox_inputs[]
Definition: vf_drawbox.c:154
Definition: vf_drawbox.c:39
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:216
Definition at line 174 of file vf_drawbox.c.
|
static |
Initial value:
= {
{
.name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_input,
.get_video_buffer = ff_null_get_video_buffer,
.filter_frame = filter_frame,
.needs_writable = 1,
},
{ NULL }
}
AVFrame * ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
Definition: video.c:35
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: vf_drawbox.c:100
Definition: avutil.h:143
Definition at line 154 of file vf_drawbox.c.
|
static |
Initial value:
Definition at line 166 of file vf_drawbox.c.
|
static |
Initial value:
= {
{ "x", "Horizontal position of the left box edge", OFFSET(x), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FLAGS },
{ "y", "Vertical position of the top box edge", OFFSET(y), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, FLAGS },
{ "color", "Color of the box", OFFSET(color_str), AV_OPT_TYPE_STRING, { .str = "black" }, CHAR_MIN, CHAR_MAX, .flags = FLAGS },
{ "c", "Color of the box", OFFSET(color_str), AV_OPT_TYPE_STRING, { .str = "black" }, CHAR_MIN, CHAR_MAX, .flags = FLAGS },
{ "thickness", "set the box maximum thickness", OFFSET(thickness), AV_OPT_TYPE_INT, {.i64=4}, 0, INT_MAX, FLAGS },
{ "t", "set the box maximum thickness", OFFSET(thickness), AV_OPT_TYPE_INT, {.i64=4}, 0, INT_MAX, FLAGS },
{ NULL },
}
Definition: opt.h:222
Definition: opt.h:226
Definition at line 138 of file vf_drawbox.c.
Generated on Mon Nov 18 2024 06:52:10 for FFmpeg by 1.8.11