FFmpeg
|
af_silencedetect.c File Reference
Audio silence detector. More...
#include <float.h>
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/timestamp.h"
#include "audio.h"
#include "formats.h"
#include "avfilter.h"
#include "internal.h"
Include dependency graph for af_silencedetect.c:
Go to the source code of this file.
Data Structures | |
struct | SilenceDetectContext |
Macros | |
#define | OFFSET(x) offsetof(SilenceDetectContext, x) |
#define | FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_AUDIO_PARAM |
Functions | |
AVFILTER_DEFINE_CLASS (silencedetect) | |
static char * | get_metadata_val (AVFrame *insamples, const char *key) |
static int | filter_frame (AVFilterLink *inlink, AVFrame *insamples) |
static int | query_formats (AVFilterContext *ctx) |
Variables | |
static const AVOption | silencedetect_options [] |
static const AVFilterPad | silencedetect_inputs [] |
static const AVFilterPad | silencedetect_outputs [] |
AVFilter | avfilter_af_silencedetect |
Detailed Description
Audio silence detector.
Definition in file af_silencedetect.c.
Macro Definition Documentation
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_AUDIO_PARAM |
Definition at line 46 of file af_silencedetect.c.
#define OFFSET | ( | x | ) | offsetof(SilenceDetectContext, x) |
Definition at line 45 of file af_silencedetect.c.
Function Documentation
AVFILTER_DEFINE_CLASS | ( | silencedetect | ) |
|
static |
Definition at line 63 of file af_silencedetect.c.
|
static |
Definition at line 57 of file af_silencedetect.c.
Referenced by filter_frame().
|
static |
Definition at line 114 of file af_silencedetect.c.
Variable Documentation
AVFilter avfilter_af_silencedetect |
Initial value:
= {
.name = "silencedetect",
.description = NULL_IF_CONFIG_SMALL("Detect silence."),
.priv_size = sizeof(SilenceDetectContext),
.priv_class = &silencedetect_class,
}
static const AVFilterPad silencedetect_inputs[]
Definition: af_silencedetect.c:141
static const AVFilterPad silencedetect_outputs[]
Definition: af_silencedetect.c:151
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
Definition: af_silencedetect.c:36
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:216
Definition at line 159 of file af_silencedetect.c.
|
static |
Initial value:
= {
{
.name = "default",
.type = AVMEDIA_TYPE_AUDIO,
.get_audio_buffer = ff_null_get_audio_buffer,
.filter_frame = filter_frame,
},
{ NULL }
}
static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
Definition: af_silencedetect.c:63
Definition: avutil.h:144
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
Definition at line 141 of file af_silencedetect.c.
|
static |
Initial value:
= {
{ "noise", "set noise tolerance", OFFSET(noise), AV_OPT_TYPE_DOUBLE, {.dbl=0.001}, 0, DBL_MAX, FLAGS },
{ "d", "set minimum duration in seconds", OFFSET(duration), AV_OPT_TYPE_DOUBLE, {.dbl=2.}, 0, 24*60*60, FLAGS },
{ "duration", "set minimum duration in seconds", OFFSET(duration), AV_OPT_TYPE_DOUBLE, {.dbl=2.}, 0, 24*60*60, FLAGS },
{ NULL },
}
static int noise(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx, const char *args, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size, int keyframe)
Definition: noise_bsf.c:28
Definition: opt.h:224
Definition at line 47 of file af_silencedetect.c.
|
static |
Initial value:
Definition at line 151 of file af_silencedetect.c.
Generated on Fri Dec 20 2024 06:56:10 for FFmpeg by 1.8.11