FFmpeg
Data Structures | Functions | Variables
cngenc.c File Reference
#include <math.h>
#include "libavutil/common.h"
#include "avcodec.h"
#include "encode.h"
#include "internal.h"
#include "lpc.h"

Go to the source code of this file.

Data Structures

struct  CNGContext
 

Functions

static av_cold int cng_encode_close (AVCodecContext *avctx)
 
static av_cold int cng_encode_init (AVCodecContext *avctx)
 
static int cng_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

const AVCodec ff_comfortnoise_encoder
 

Function Documentation

◆ cng_encode_close()

static av_cold int cng_encode_close ( AVCodecContext avctx)
static

Definition at line 37 of file cngenc.c.

◆ cng_encode_init()

static av_cold int cng_encode_init ( AVCodecContext avctx)
static

Definition at line 46 of file cngenc.c.

◆ cng_encode_frame()

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

Definition at line 68 of file cngenc.c.

Variable Documentation

◆ ff_comfortnoise_encoder

const AVCodec ff_comfortnoise_encoder
Initial value:
= {
.name = "comfortnoise",
.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"),
.capabilities = AV_CODEC_CAP_DR1,
.priv_data_size = sizeof(CNGContext),
.encode2 = cng_encode_frame,
.close = cng_encode_close,
}

Definition at line 104 of file cngenc.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
cng_encode_frame
static int cng_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: cngenc.c:68
init
static int init
Definition: av_tx.c:47
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
CNGContext
Definition: cngdec.c:32
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:59
AV_CODEC_ID_COMFORT_NOISE
@ AV_CODEC_ID_COMFORT_NOISE
Definition: codec_id.h:484
cng_encode_init
static av_cold int cng_encode_init(AVCodecContext *avctx)
Definition: cngenc.c:46
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: internal.h:50
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:58
AV_SAMPLE_FMT_S16
@ AV_SAMPLE_FMT_S16
signed 16 bits
Definition: samplefmt.h:61
cng_encode_close
static av_cold int cng_encode_close(AVCodecContext *avctx)
Definition: cngenc.c:37