Revision 651b276e libavcodec/libvo-amrwbenc.c

View differences:

libavcodec/libvo-amrwbenc.c
23 23

  
24 24
#include "avcodec.h"
25 25
#include "libavutil/avstring.h"
26
#include "libavutil/opt.h"
26 27

  
27 28
typedef struct AMRWBContext {
29
    AVClass *av_class;
28 30
    void  *state;
29 31
    int    mode;
30 32
    int    last_bitrate;
31 33
    int    allow_dtx;
32 34
} AMRWBContext;
33 35

  
36
static const AVOption options[] = {
37
    { "dtx", "Allow DTX (generate comfort noise)", offsetof(AMRWBContext, allow_dtx), FF_OPT_TYPE_INT, 0, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
38
    { NULL }
39
};
40

  
41
static const AVClass class = {
42
    "libvo_amrwbenc", av_default_item_name, options, LIBAVUTIL_VERSION_INT
43
};
44

  
34 45
static int get_wb_bitrate_mode(int bitrate, void *log_ctx)
35 46
{
36 47
    /* make the correspondance between bitrate and mode */
......
78 89
    avctx->coded_frame = avcodec_alloc_frame();
79 90

  
80 91
    s->state     = E_IF_init();
81
    s->allow_dtx = 0;
82 92

  
83 93
    return 0;
84 94
}
......
119 129
    .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
120 130
    .long_name = NULL_IF_CONFIG_SMALL("Android VisualOn Adaptive Multi-Rate "
121 131
                                      "(AMR) Wide-Band"),
132
    .priv_class = &class,
122 133
};
123 134

  

Also available in: Unified diff