FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
avf_avectorscope.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "audio.h"
#include "video.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
 
#define TFLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Enumerations

enum  VectorScopeMode { LISSAJOUS, LISSAJOUS_XY, POLAR, MODE_NB }
 
enum  VectorScopeDraw { DOT, LINE, AALINE, DRAW_NB }
 
enum  VectorScopeScale {
  LIN, SQRT, CBRT, LOG,
  SCALE_NB
}
 

Functions

 AVFILTER_DEFINE_CLASS (avectorscope)
 
static void draw_dot (AudioVectorScopeContext *s, unsigned x, unsigned y, int value)
 
static void draw_line (AudioVectorScopeContext *s, int x0, int y0, int x1, int y1)
 
static void draw_aaline (AudioVectorScopeContext *s, int x0, int y0, int x1, int y1)
 
static int fade (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *insamples)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

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

Detailed Description

audio to video multimedia vectorscope filter

Definition in file avf_avectorscope.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 76 of file avf_avectorscope.c.

◆ FLAGS

Definition at line 77 of file avf_avectorscope.c.

◆ TFLAGS

Definition at line 78 of file avf_avectorscope.c.

Enumeration Type Documentation

◆ VectorScopeMode

Enumerator
LISSAJOUS 
LISSAJOUS_XY 
POLAR 
MODE_NB 

Definition at line 36 of file avf_avectorscope.c.

◆ VectorScopeDraw

Enumerator
DOT 
LINE 
AALINE 
DRAW_NB 

Definition at line 43 of file avf_avectorscope.c.

◆ VectorScopeScale

Enumerator
LIN 
SQRT 
CBRT 
LOG 
SCALE_NB 

Definition at line 50 of file avf_avectorscope.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( avectorscope  )

◆ draw_dot()

static void draw_dot ( AudioVectorScopeContext s,
unsigned  x,
unsigned  y,
int  value 
)
static

Definition at line 119 of file avf_avectorscope.c.

Referenced by draw_aaline(), draw_line(), and filter_frame().

◆ draw_line()

static void draw_line ( AudioVectorScopeContext s,
int  x0,
int  y0,
int  x1,
int  y1 
)
static

Definition at line 139 of file avf_avectorscope.c.

Referenced by filter_frame().

◆ draw_aaline()

static void draw_aaline ( AudioVectorScopeContext s,
int  x0,
int  y0,
int  x1,
int  y1 
)
static

Definition at line 165 of file avf_avectorscope.c.

Referenced by filter_frame().

◆ fade()

static int fade ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 199 of file avf_avectorscope.c.

Referenced by filter_frame().

◆ query_formats()

static int query_formats ( const AVFilterContext ctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 233 of file avf_avectorscope.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 261 of file avf_avectorscope.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 271 of file avf_avectorscope.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame insamples 
)
static

Definition at line 288 of file avf_avectorscope.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 439 of file avf_avectorscope.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 466 of file avf_avectorscope.c.

Variable Documentation

◆ avectorscope_options

const AVOption avectorscope_options[]
static

Definition at line 80 of file avf_avectorscope.c.

◆ audiovectorscope_inputs

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

Definition at line 473 of file avf_avectorscope.c.

◆ audiovectorscope_outputs

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

Definition at line 481 of file avf_avectorscope.c.

◆ ff_avf_avectorscope

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

Definition at line 489 of file avf_avectorscope.c.

FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: avf_avectorscope.c:233
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
config_input
static int config_input(AVFilterLink *inlink)
Definition: avf_avectorscope.c:261
AudioVectorScopeContext
Definition: avf_avectorscope.c:58
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:94
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:900
audiovectorscope_inputs
static const AVFilterPad audiovectorscope_inputs[]
Definition: avf_avectorscope.c:473
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
config_output
static int config_output(AVFilterLink *outlink)
Definition: avf_avectorscope.c:271
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: avf_avectorscope.c:466
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:152
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
activate
static int activate(AVFilterContext *ctx)
Definition: avf_avectorscope.c:439
audiovectorscope_outputs
static const AVFilterPad audiovectorscope_outputs[]
Definition: avf_avectorscope.c:481