FFmpeg
Data Structures | Macros | Functions | Variables
af_volumedetect.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/avassert.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"

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 av_cold void uninit (AVFilterContext *ctx)
 

Variables

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

Macro Definition Documentation

◆ MAX_DB

#define MAX_DB   91

Definition at line 83 of file af_volumedetect.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 36 of file af_volumedetect.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame samples 
)
static

Definition at line 60 of file af_volumedetect.c.

◆ logdb()

static double logdb ( uint64_t  v)
inlinestatic

Definition at line 85 of file af_volumedetect.c.

Referenced by print_stats().

◆ print_stats()

static void print_stats ( AVFilterContext ctx)
static

Definition at line 93 of file af_volumedetect.c.

Referenced by uninit().

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 136 of file af_volumedetect.c.

Variable Documentation

◆ volumedetect_inputs

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

Definition at line 141 of file af_volumedetect.c.

◆ volumedetect_outputs

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

Definition at line 150 of file af_volumedetect.c.

◆ ff_af_volumedetect

AVFilter ff_af_volumedetect
Initial value:
= {
.name = "volumedetect",
.description = NULL_IF_CONFIG_SMALL("Detect audio volume."),
.priv_size = sizeof(VolDetectContext),
}

Definition at line 158 of file af_volumedetect.c.

volumedetect_outputs
static const AVFilterPad volumedetect_outputs[]
Definition: af_volumedetect.c:150
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_volumedetect.c:136
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
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: filter_design.txt:243
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:188
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_volumedetect.c:36
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *samples)
Definition: af_volumedetect.c:60
VolDetectContext
Definition: af_volumedetect.c:27
volumedetect_inputs
static const AVFilterPad volumedetect_inputs[]
Definition: af_volumedetect.c:141