af_volumedetect.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/avassert.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"
Include dependency graph for af_volumedetect.c:

Go to the source code of this file.

Data Structures

struct  VolDetectContext
 

Macros

#define MAX_DB   91
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *samples)
 
static double logdb (uint64_t v)
 
static void print_stats (AVFilterContext *ctx)
 
static void uninit (AVFilterContext *ctx)
 

Variables

static const AVFilterPad volumedetect_inputs []
 
static const AVFilterPad volumedetect_outputs []
 
AVFilter avfilter_af_volumedetect
 

Macro Definition Documentation

#define MAX_DB   91

Definition at line 76 of file af_volumedetect.c.

Referenced by logdb(), and print_stats().

Function Documentation

static int filter_frame ( AVFilterLink inlink,
AVFrame samples 
)
static

Definition at line 52 of file af_volumedetect.c.

static double logdb ( uint64_t  v)
inlinestatic

Definition at line 78 of file af_volumedetect.c.

Referenced by print_stats().

static void print_stats ( AVFilterContext ctx)
static

Definition at line 86 of file af_volumedetect.c.

Referenced by uninit().

static int query_formats ( AVFilterContext ctx)
static

Definition at line 36 of file af_volumedetect.c.

static void uninit ( AVFilterContext ctx)
static

Definition at line 129 of file af_volumedetect.c.

Variable Documentation

AVFilter avfilter_af_volumedetect
Initial value:
= {
.name = "volumedetect",
.description = NULL_IF_CONFIG_SMALL("Detect audio volume."),
.priv_size = sizeof(VolDetectContext),
}
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
static int query_formats(AVFilterContext *ctx)
static void uninit(AVFilterContext *ctx)
static const AVFilterPad volumedetect_outputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const AVFilterPad volumedetect_inputs[]
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 at line 152 of file af_volumedetect.c.

const AVFilterPad volumedetect_inputs[]
static
Initial value:
= {
{
.name = "default",
.get_audio_buffer = ff_null_get_audio_buffer,
.filter_frame = filter_frame,
},
{ NULL }
}
static int filter_frame(AVFilterLink *inlink, AVFrame *samples)
AVFrame * ff_null_get_audio_buffer(AVFilterLink *link, int nb_samples)
get_audio_buffer() handler for filters which simply pass audio along
Definition: audio.c:36
NULL
Definition: eval.c:55

Definition at line 134 of file af_volumedetect.c.

const AVFilterPad volumedetect_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
NULL
Definition: eval.c:55

Definition at line 144 of file af_volumedetect.c.