FFmpeg
Data Structures | Macros | Functions | Variables
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/opt.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"

Go to the source code of this file.

Data Structures

struct  AMRWBContext
 

Macros

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

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 []
 
static const AVClass amrwb_class
 
const FFCodec ff_libvo_amrwbenc_encoder
 

Macro Definition Documentation

◆ MAX_PACKET_SIZE

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

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

Function Documentation

◆ get_wb_bitrate_mode()

static int get_wb_bitrate_mode ( int  bitrate,
void *  log_ctx 
)
static

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

Referenced by amr_wb_encode_frame(), and amr_wb_encode_init().

◆ amr_wb_encode_init()

static av_cold int amr_wb_encode_init ( AVCodecContext avctx)
static

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

◆ amr_wb_encode_close()

static int amr_wb_encode_close ( AVCodecContext avctx)
static

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

◆ amr_wb_encode_frame()

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

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

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "dtx", "Allow DTX (generate comfort noise)", 0x42, AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ NULL }
}

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

◆ amrwb_class

const AVClass amrwb_class
static
Initial value:
= {
.class_name = "libvo_amrwbenc",
.item_name = av_default_item_name,
.option = options,
}

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

◆ ff_libvo_amrwbenc_encoder

const FFCodec ff_libvo_amrwbenc_encoder
Initial value:
= {
.p.name = "libvo_amrwbenc",
CODEC_LONG_NAME("Android VisualOn AMR-WB (Adaptive Multi-Rate Wide-Band)"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.capabilities = AV_CODEC_CAP_DR1 |
.p.priv_class = &amrwb_class,
.p.wrapper_name = "libvo_amrwbenc",
.priv_data_size = sizeof(AMRWBContext),
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
}

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

amr_wb_encode_init
static av_cold int amr_wb_encode_init(AVCodecContext *avctx)
Definition: libvo-amrwbenc.c:81
FF_CODEC_CAP_NOT_INIT_THREADSAFE
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE
The codec is not known to be init-threadsafe (i.e.
Definition: codec_internal.h:34
AV_CODEC_ID_AMR_WB
@ AV_CODEC_ID_AMR_WB
Definition: codec_id.h:424
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:315
AV_OPT_FLAG_ENCODING_PARAM
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:281
amr_wb_encode_close
static int amr_wb_encode_close(AVCodecContext *avctx)
Definition: libvo-amrwbenc.c:106
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
Definition: codec.h:159
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
AV_OPT_FLAG_AUDIO_PARAM
#define AV_OPT_FLAG_AUDIO_PARAM
Definition: opt.h:283
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
amrwb_class
static const AVClass amrwb_class
Definition: libvo-amrwbenc.c:48
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:58
AMRWBContext
Definition: amrwbdec.c:51
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
amr_wb_encode_frame
static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: libvo-amrwbenc.c:114
options
static const AVOption options[]
Definition: libvo-amrwbenc.c:43