FFmpeg
Classes | Macros | Typedefs | Functions | Variables
af_silencedetect.c File Reference

Audio silence detector. More...

#include <float.h>
#include "libavutil/opt.h"
#include "libavutil/timestamp.h"
#include "audio.h"
#include "formats.h"
#include "avfilter.h"
#include "internal.h"

Classes

struct  SilenceDetectContext
 

Macros

#define OFFSET(x)   offsetof(SilenceDetectContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_AUDIO_PARAM
 
#define SILENCE_DETECT(name, type)
 

Typedefs

typedef struct SilenceDetectContext SilenceDetectContext
 

Functions

 AVFILTER_DEFINE_CLASS (silencedetect)
 

Variables

AVFilter ff_af_silencedetect
 

Detailed Description

Audio silence detector.

Macro Definition Documentation

§ SILENCE_DETECT

#define SILENCE_DETECT (   name,
  type 
)
Value:
static void silencedetect_##name(SilenceDetectContext *s, AVFrame *insamples, \
int nb_samples, int64_t nb_samples_notify, \
AVRational time_base) \
{ \
const type *p = (const type *)insamples->data[0]; \
const type noise = s->noise; \
int i; \
\
for (i = 0; i < nb_samples; i++, p++) \
update(s, insamples, *p < noise && *p > -noise, i, \
nb_samples_notify, time_base); \
}
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
Rational number (pair of numerator and denominator).
Definition: rational.h:58
Definition: af_silencedetect.c:35

Variable Documentation

§ ff_af_silencedetect

AVFilter ff_af_silencedetect
Initial value:
= {
.name = "silencedetect",
.description = NULL_IF_CONFIG_SMALL("Detect silence."),
.priv_size = sizeof(SilenceDetectContext),
.query_formats = query_formats,
.uninit = uninit,
.inputs = silencedetect_inputs,
.outputs = silencedetect_outputs,
.priv_class = &silencedetect_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
Definition: af_silencedetect.c:35