libvo-amrwbenc.c File Reference
#include <vo-amrwbenc/enc_if.h>
#include <stdio.h>
#include <stdlib.h>
#include "libavutil/avstring.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "internal.h"
Include dependency graph for libvo-amrwbenc.c:

Go to the source code of this file.

Data Structures

struct  AMRWBContext
 

Macros

#define MAX_PACKET_SIZE   (1 + (477 + 7) / 8)
 

Typedefs

typedef struct AMRWBContext AMRWBContext
 

Functions

static int get_wb_bitrate_mode (int bitrate, void *log_ctx)
 
static av_cold int amr_wb_encode_init (AVCodecContext *avctx)
 
static int amr_wb_encode_close (AVCodecContext *avctx)
 
static int amr_wb_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

static const AVOption options []
 
class {
      libvo_amrwbenc
 
      av_default_item_name
 
      options
 
}; 
 
AVCodec ff_libvo_amrwbenc_encoder
 

Macro Definition Documentation

#define MAX_PACKET_SIZE   (1 + (477 + 7) / 8)

Definition at line 33 of file libvo-amrwbenc.c.

Referenced by amr_wb_encode_frame().

Typedef Documentation

typedef struct AMRWBContext AMRWBContext

Function Documentation

static int amr_wb_encode_close ( AVCodecContext avctx)
static

Definition at line 103 of file libvo-amrwbenc.c.

static int amr_wb_encode_frame ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int *  got_packet_ptr 
)
static

Definition at line 111 of file libvo-amrwbenc.c.

static av_cold int amr_wb_encode_init ( AVCodecContext avctx)
static

Definition at line 78 of file libvo-amrwbenc.c.

static int get_wb_bitrate_mode ( int  bitrate,
void log_ctx 
)
static

Definition at line 52 of file libvo-amrwbenc.c.

Referenced by amr_wb_encode_frame(), and amr_wb_encode_init().

Variable Documentation

const { ... }
AVCodec ff_libvo_amrwbenc_encoder
Initial value:
= {
.name = "libvo_amrwbenc",
.priv_data_size = sizeof(AMRWBContext),
.encode2 = amr_wb_encode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Android VisualOn AMR-WB "
"(Adaptive Multi-Rate Wide-Band)"),
.priv_class = &class,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
signed 16 bits
Definition: samplefmt.h:52
struct AMRWBContext AMRWBContext
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49
static int amr_wb_encode_close(AVCodecContext *avctx)
static av_cold int amr_wb_encode_init(AVCodecContext *avctx)
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:700

Definition at line 139 of file libvo-amrwbenc.c.

libvo_amrwbenc
private

Definition at line 49 of file libvo-amrwbenc.c.

Referenced by avcodec_register_all().

options
static
Initial value:
= {
{ "dtx", "Allow DTX (generate comfort noise)", offsetof(AMRWBContext, allow_dtx), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ NULL }
}
#define AV_OPT_FLAG_AUDIO_PARAM
Definition: opt.h:284
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:281
NULL
Definition: eval.c:55

Definition at line 43 of file libvo-amrwbenc.c.