Go to the source code of this file.
Audio silence detector
Definition in file af_silencedetect.c.
◆ MAX_DURATION
#define MAX_DURATION (24*3600*1000000LL) |
◆ OFFSET
◆ FLAGS
◆ SILENCE_DETECT
Value:
int nb_samples,
int64_t nb_samples_notify, \
{ \
const
type *p = (
const type *)insamples->data[0]; \
\
for (
i = 0;
i < nb_samples;
i++, p++) \
nb_samples_notify, time_base); \
}
Definition at line 120 of file af_silencedetect.c.
◆ SILENCE_DETECT_PLANAR
#define SILENCE_DETECT_PLANAR |
( |
|
name, |
|
|
|
type |
|
) |
| |
Value:
int nb_samples,
int64_t nb_samples_notify, \
{ \
const
int channels = insamples->ch_layout.nb_channels; \
\
for (
int i = 0;
i < nb_samples;
i++) { \
for (int ch = 0; ch < insamples->ch_layout.nb_channels; ch++) { \
const
type *p = (
const type *)insamples->extended_data[ch]; \
nb_samples_notify, time_base); \
} \
} \
}
Definition at line 134 of file af_silencedetect.c.
◆ AVFILTER_DEFINE_CLASS()
AVFILTER_DEFINE_CLASS |
( |
silencedetect |
| ) |
|
◆ set_meta()
static void set_meta |
( |
AVFrame * |
insamples, |
|
|
int |
channel, |
|
|
const char * |
key, |
|
|
char * |
value |
|
) |
| |
|
static |
◆ update()
◆ config_input()
◆ filter_frame()
◆ uninit()
◆ silencedetect_options
◆ silencedetect_inputs
◆ ff_af_silencedetect
Initial value:= {
.name = "silencedetect",
.priv_class = &silencedetect_class,
}
Definition at line 256 of file af_silencedetect.c.
@ AV_SAMPLE_FMT_FLTP
float, planar
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
#define FILTER_INPUTS(array)
This structure describes decoded (raw) audio or video data.
@ AV_SAMPLE_FMT_S32P
signed 32 bits, planar
static const AVFilterPad silencedetect_inputs[]
@ AV_OPT_TYPE_DURATION
Underlying C type is int64_t.
static av_cold void uninit(AVFilterContext *ctx)
static int noise(AVBSFContext *ctx, AVPacket *pkt)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
static av_always_inline void update(SilenceDetectContext *s, AVFrame *insamples, int is_silence, int current_sample, int64_t nb_samples_notify, AVRational time_base)
#define FILTER_SAMPLEFMTS(...)
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
#define FILTER_OUTPUTS(array)
Rational number (pair of numerator and denominator).
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
#define i(width, name, range_min, range_max)
@ AV_SAMPLE_FMT_S16
signed 16 bits
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
@ AV_SAMPLE_FMT_DBLP
double, planar
static int config_input(AVFilterLink *inlink)
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
@ AV_SAMPLE_FMT_DBL
double
@ AV_SAMPLE_FMT_S32
signed 32 bits