FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_astats.c File Reference
#include <float.h>
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ChannelStats
 
struct  AudioStatsContext
 

Macros

#define OFFSET(x)   offsetof(AudioStatsContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define LINEAR_TO_DB(x)   (log10(x) * 20)
 

Functions

 AVFILTER_DEFINE_CLASS (astats)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static void update_stat (AudioStatsContext *s, ChannelStats *p, double d)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static void print_stats (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption astats_options []
 
static const AVFilterPad astats_inputs []
 
static const AVFilterPad astats_outputs []
 
AVFilter avfilter_af_astats
 

Macro Definition Documentation

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

Definition at line 49 of file af_astats.c.

Definition at line 50 of file af_astats.c.

#define LINEAR_TO_DB (   x)    (log10(x) * 20)

Definition at line 176 of file af_astats.c.

Referenced by print_stats().

Function Documentation

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

Definition at line 59 of file af_astats.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 86 of file af_astats.c.

static void update_stat ( AudioStatsContext s,
ChannelStats p,
double  d 
)
inlinestatic

Definition at line 108 of file af_astats.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 146 of file af_astats.c.

static void print_stats ( AVFilterContext ctx)
static

Definition at line 178 of file af_astats.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 239 of file af_astats.c.

Variable Documentation

const AVOption astats_options[]
static
Initial value:
= {
{ "length", "set the window length", OFFSET(time_constant), AV_OPT_TYPE_DOUBLE, {.dbl=.05}, .01, 10, FLAGS },
{NULL},
}

Definition at line 52 of file af_astats.c.

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

Definition at line 247 of file af_astats.c.

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

Definition at line 256 of file af_astats.c.

AVFilter avfilter_af_astats
Initial value:
= {
.name = "astats",
.description = NULL_IF_CONFIG_SMALL("Show time domain statistics about audio frames."),
.query_formats = query_formats,
.priv_size = sizeof(AudioStatsContext),
.priv_class = &astats_class,
}

Definition at line 265 of file af_astats.c.