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

audio to video multimedia aphasemeter filter More...

#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.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  AudioPhaseMeterContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (aphasemeter)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static int get_x (float phase, int w)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption aphasemeter_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_avf_aphasemeter
 

Detailed Description

audio to video multimedia aphasemeter filter

Definition in file avf_aphasemeter.c.

Macro Definition Documentation

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

Definition at line 48 of file avf_aphasemeter.c.

Definition at line 49 of file avf_aphasemeter.c.

Function Documentation

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

Definition at line 65 of file avf_aphasemeter.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 92 of file avf_aphasemeter.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 106 of file avf_aphasemeter.c.

static int get_x ( float  phase,
int  w 
)
inlinestatic

Definition at line 126 of file avf_aphasemeter.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 131 of file avf_aphasemeter.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 203 of file avf_aphasemeter.c.

Variable Documentation

const AVOption aphasemeter_options[]
static
Initial value:
= {
{ "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str="25"}, 0, INT_MAX, FLAGS },
{ "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str="25"}, 0, INT_MAX, FLAGS },
{ "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="800x400"}, 0, 0, FLAGS },
{ "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="800x400"}, 0, 0, FLAGS },
{ "rc", "set red contrast", OFFSET(contrast[0]), AV_OPT_TYPE_INT, {.i64=2}, 0, 255, FLAGS },
{ "gc", "set green contrast", OFFSET(contrast[1]), AV_OPT_TYPE_INT, {.i64=7}, 0, 255, FLAGS },
{ "bc", "set blue contrast", OFFSET(contrast[2]), AV_OPT_TYPE_INT, {.i64=1}, 0, 255, FLAGS },
{ "mpc", "set median phase color", OFFSET(mpc_str), AV_OPT_TYPE_STRING, {.str = "none"}, 0, 0, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
#define FLAGS
offset must point to AVRational
Definition: opt.h:235
offset must point to two consecutive integers
Definition: opt.h:232

Definition at line 51 of file avf_aphasemeter.c.

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

Definition at line 210 of file avf_aphasemeter.c.

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)

Definition at line 220 of file avf_aphasemeter.c.

AVFilter ff_avf_aphasemeter
Initial value:
= {
.name = "aphasemeter",
.description = NULL_IF_CONFIG_SMALL("Convert input audio to phase meter video output."),
.uninit = uninit,
.query_formats = query_formats,
.priv_size = sizeof(AudioPhaseMeterContext),
.priv_class = &aphasemeter_class,
}
static const AVFilterPad outputs[]
static int query_formats(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static const AVFilterPad inputs[]
static av_cold void uninit(AVFilterContext *ctx)

Definition at line 229 of file avf_aphasemeter.c.