FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
avf_avectorscope.c File Reference

audio to video multimedia vectorscope filter More...

#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avfilter.h"
#include "formats.h"
#include "audio.h"
#include "video.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  AudioVectorScopeContext
 

Macros

#define OFFSET(x)   offsetof(AudioVectorScopeContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Enumerations

enum  VectorScopeMode { LISSAJOUS, LISSAJOUS_XY, MODE_NB }
 

Functions

 AVFILTER_DEFINE_CLASS (avectorscope)
 
static void draw_dot (AudioVectorScopeContext *p, unsigned x, unsigned y)
 
static void fade (AudioVectorScopeContext *p)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *insamples)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption avectorscope_options []
 
static const AVFilterPad audiovectorscope_inputs []
 
static const AVFilterPad audiovectorscope_outputs []
 
AVFilter ff_avf_avectorscope
 

Detailed Description

audio to video multimedia vectorscope filter

Definition in file avf_avectorscope.c.

Macro Definition Documentation

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

Definition at line 54 of file avf_avectorscope.c.

Definition at line 55 of file avf_avectorscope.c.

Enumeration Type Documentation

Enumerator:
LISSAJOUS 
LISSAJOUS_XY 
MODE_NB 

Definition at line 36 of file avf_avectorscope.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( avectorscope  )
static void draw_dot ( AudioVectorScopeContext p,
unsigned  x,
unsigned  y 
)
static

Definition at line 78 of file avf_avectorscope.c.

Referenced by filter_frame().

static void fade ( AudioVectorScopeContext p)
static

Definition at line 97 of file avf_avectorscope.c.

Referenced by avfilter_register_all(), filter_frame(), and parse_time_sequence().

static int query_formats ( AVFilterContext ctx)
static

Definition at line 115 of file avf_avectorscope.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 145 of file avf_avectorscope.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 159 of file avf_avectorscope.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame insamples 
)
static

Definition at line 174 of file avf_avectorscope.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 239 of file avf_avectorscope.c.

Variable Documentation

const AVOption avectorscope_options[]
static
Initial value:
= {
{ "mode", "set mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=LISSAJOUS}, 0, MODE_NB-1, FLAGS, "mode" },
{ "m", "set mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=LISSAJOUS}, 0, MODE_NB-1, FLAGS, "mode" },
{ "lissajous", "", 0, AV_OPT_TYPE_CONST, {.i64=LISSAJOUS}, 0, 0, FLAGS, "mode" },
{ "lissajous_xy", "", 0, AV_OPT_TYPE_CONST, {.i64=LISSAJOUS_XY}, 0, 0, FLAGS, "mode" },
{ "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str="25"}, 0, 0, FLAGS },
{ "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str="25"}, 0, 0, FLAGS },
{ "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="400x400"}, 0, 0, FLAGS },
{ "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="400x400"}, 0, 0, FLAGS },
{ "rc", "set red contrast", OFFSET(contrast[0]), AV_OPT_TYPE_INT, {.i64=40}, 0, 255, FLAGS },
{ "gc", "set green contrast", OFFSET(contrast[1]), AV_OPT_TYPE_INT, {.i64=160}, 0, 255, FLAGS },
{ "bc", "set blue contrast", OFFSET(contrast[2]), AV_OPT_TYPE_INT, {.i64=80}, 0, 255, FLAGS },
{ "rf", "set red fade", OFFSET(fade[0]), AV_OPT_TYPE_INT, {.i64=15}, 0, 255, FLAGS },
{ "gf", "set green fade", OFFSET(fade[1]), AV_OPT_TYPE_INT, {.i64=10}, 0, 255, FLAGS },
{ "bf", "set blue fade", OFFSET(fade[2]), AV_OPT_TYPE_INT, {.i64=5}, 0, 255, FLAGS },
{ "zoom", "set zoom factor", OFFSET(zoom), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 1, 10, FLAGS },
{ NULL }
}

Definition at line 57 of file avf_avectorscope.c.

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

Definition at line 246 of file avf_avectorscope.c.

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

Definition at line 256 of file avf_avectorscope.c.

AVFilter ff_avf_avectorscope
Initial value:
= {
.name = "avectorscope",
.description = NULL_IF_CONFIG_SMALL("Convert input audio to vectorscope video output."),
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(AudioVectorScopeContext),
.priv_class = &avectorscope_class,
}

Definition at line 265 of file avf_avectorscope.c.