libavfilter/af_silencedetect.c File Reference

Audio silence detector. More...

#include "libavutil/opt.h"
#include "libavutil/timestamp.h"
#include "audio.h"
#include "formats.h"
#include "avfilter.h"

Go to the source code of this file.

Data Structures

struct  SilenceDetectContext

Defines

#define OFFSET(x)   offsetof(SilenceDetectContext, x)

Functions

static const char * silencedetect_get_name (void *ctx)
static av_cold int init (AVFilterContext *ctx, const char *args, void *opaque)
static void filter_samples (AVFilterLink *inlink, AVFilterBufferRef *insamples)
static int query_formats (AVFilterContext *ctx)

Variables

static const AVOption silencedetect_options []
static const AVClass silencedetect_class
AVFilter avfilter_af_silencedetect


Detailed Description

Audio silence detector.

Definition in file af_silencedetect.c.


Define Documentation

#define OFFSET (  )     offsetof(SilenceDetectContext, x)

Definition at line 42 of file af_silencedetect.c.


Function Documentation

static void filter_samples ( AVFilterLink inlink,
AVFilterBufferRef insamples 
) [static]

Definition at line 88 of file af_silencedetect.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args,
void *  opaque 
) [static]

Definition at line 62 of file af_silencedetect.c.

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 131 of file af_silencedetect.c.

static const char* silencedetect_get_name ( void *  ctx  )  [static]

Definition at line 51 of file af_silencedetect.c.


Variable Documentation

Initial value:

 {
    .name          = "silencedetect",
    .description   = NULL_IF_CONFIG_SMALL("Detect silence."),
    .priv_size     = sizeof(SilenceDetectContext),
    .init          = init,
    .query_formats = query_formats,

    .inputs = (const AVFilterPad[]) {
        { .name             = "default",
          .type             = AVMEDIA_TYPE_AUDIO,
          .get_audio_buffer = ff_null_get_audio_buffer,
          .filter_samples   = filter_samples, },
        { .name = NULL }
    },
    .outputs = (const AVFilterPad[]) {
        { .name = "default",
          .type = AVMEDIA_TYPE_AUDIO, },
        { .name = NULL }
    },
}

Definition at line 158 of file af_silencedetect.c.

const AVClass silencedetect_class [static]

Initial value:

 {
    .class_name = "SilenceDetectContext",
    .item_name  = silencedetect_get_name,
    .option     = silencedetect_options,
}

Definition at line 56 of file af_silencedetect.c.

const AVOption silencedetect_options[] [static]

Initial value:

 {
    { "n",         "set noise tolerance",              OFFSET(noise_str), AV_OPT_TYPE_STRING, {.str="-60dB"}, CHAR_MIN, CHAR_MAX },
    { "noise",     "set noise tolerance",              OFFSET(noise_str), AV_OPT_TYPE_STRING, {.str="-60dB"}, CHAR_MIN, CHAR_MAX },
    { "d",         "set minimum duration in seconds",  OFFSET(duration),  AV_OPT_TYPE_INT,    {.dbl=2},    0, INT_MAX},
    { "duration",  "set minimum duration in seconds",  OFFSET(duration),  AV_OPT_TYPE_INT,    {.dbl=2},    0, INT_MAX},
    { NULL },
}

Definition at line 43 of file af_silencedetect.c.


Generated on Fri Oct 26 02:48:00 2012 for FFmpeg by  doxygen 1.5.8