Data Structures | Macros | Functions | Variables
af_asr.c File Reference
#include <pocketsphinx/pocketsphinx.h>
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ASRContext


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


static int filter_frame (AVFilterLink *inlink, AVFrame *in)
static int config_input (AVFilterLink *inlink)
static av_cold int asr_init (AVFilterContext *ctx)
static int query_formats (AVFilterContext *ctx)
static av_cold void asr_uninit (AVFilterContext *ctx)


static const AVOption asr_options []
static const AVFilterPad asr_inputs []
static const AVFilterPad asr_outputs []
AVFilter ff_af_asr

Macro Definition Documentation

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

Definition at line 48 of file af_asr.c.

Definition at line 49 of file af_asr.c.

Function Documentation

static int filter_frame ( AVFilterLink inlink,
AVFrame in 

Definition at line 63 of file af_asr.c.

static int config_input ( AVFilterLink inlink)

Definition at line 87 of file af_asr.c.

static av_cold int asr_init ( AVFilterContext ctx)

Definition at line 97 of file af_asr.c.

static int query_formats ( AVFilterContext ctx)

Definition at line 124 of file af_asr.c.

static av_cold void asr_uninit ( AVFilterContext ctx)

Definition at line 143 of file af_asr.c.

Variable Documentation

const AVOption asr_options[]
Initial value:
= {
{ "rate", "set sampling rate", OFFSET(rate), AV_OPT_TYPE_INT, {.i64=16000}, 0, INT_MAX, .flags = FLAGS },
{ "hmm", "set directory containing acoustic model files", OFFSET(hmm), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "dict", "set pronunciation dictionary", OFFSET(dict), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "lm", "set language model file", OFFSET(lm), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "lmctl", "set language model set", OFFSET(lmctl), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "lmname","set which language model to use", OFFSET(lmname), AV_OPT_TYPE_STRING, {.str=NULL}, .flags = FLAGS },
{ "logfn", "set output for log messages", OFFSET(logfn), AV_OPT_TYPE_STRING, {.str="/dev/null"}, .flags = FLAGS },
{ NULL }
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: af_asr.c:49
#define OFFSET(x)
Definition: af_asr.c:48

Definition at line 50 of file af_asr.c.

const AVFilterPad asr_inputs[]
Initial value:
= {
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
{ NULL }
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)
Definition: af_asr.c:87
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_asr.c:63

Definition at line 153 of file af_asr.c.

const AVFilterPad asr_outputs[]
Initial value:
= {
.name = "default",
{ NULL }
#define NULL
Definition: coverity.c:32

Definition at line 163 of file af_asr.c.

AVFilter ff_af_asr
Initial value:
= {
.name = "asr",
.description = NULL_IF_CONFIG_SMALL("Automatic Speech Recognition."),
.priv_size = sizeof(ASRContext),
.priv_class = &asr_class,
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static av_cold int uninit(AVCodecContext *avctx)
Definition: crystalhd.c:279
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:153
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static av_cold int asr_init(AVFilterContext *ctx)
Definition: af_asr.c:97
static av_cold void asr_uninit(AVFilterContext *ctx)
Definition: af_asr.c:143
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
static const AVFilterPad asr_outputs[]
Definition: af_asr.c:163
static const AVFilterPad asr_inputs[]
Definition: af_asr.c:153
static int query_formats(AVFilterContext *ctx)
Definition: af_asr.c:124

Definition at line 171 of file af_asr.c.