FFmpeg
Data Structures | Functions | Variables
dfpwmenc.c File Reference
#include "libavutil/internal.h"
#include "avcodec.h"
#include "codec_id.h"
#include "codec_internal.h"
#include "encode.h"

Go to the source code of this file.

Data Structures

struct  DFPWMState
 

Functions

static void au_compress (DFPWMState *state, int len, uint8_t *outbuf, uint8_t *inbuf)
 
static av_cold int dfpwm_enc_init (struct AVCodecContext *ctx)
 
static int dfpwm_enc_frame (struct AVCodecContext *ctx, struct AVPacket *packet, const struct AVFrame *frame, int *got_packet)
 

Variables

const FFCodec ff_dfpwm_encoder
 

Detailed Description

DFPWM1a encoder

Definition in file dfpwmenc.c.

Function Documentation

◆ au_compress()

static void au_compress ( DFPWMState state,
int  len,
uint8_t *  outbuf,
uint8_t *  inbuf 
)
static

Definition at line 42 of file dfpwmenc.c.

Referenced by dfpwm_enc_frame().

◆ dfpwm_enc_init()

static av_cold int dfpwm_enc_init ( struct AVCodecContext ctx)
static

Definition at line 78 of file dfpwmenc.c.

◆ dfpwm_enc_frame()

static int dfpwm_enc_frame ( struct AVCodecContext ctx,
struct AVPacket packet,
const struct AVFrame frame,
int got_packet 
)
static

Definition at line 92 of file dfpwmenc.c.

Variable Documentation

◆ ff_dfpwm_encoder

const FFCodec ff_dfpwm_encoder
Initial value:
= {
.p.name = "dfpwm",
.p.long_name = NULL_IF_CONFIG_SMALL("DFPWM1a audio"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(DFPWMState),
.p.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_NONE},
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 110 of file dfpwmenc.c.

init
static int init
Definition: av_tx.c:47
dfpwm_enc_frame
static int dfpwm_enc_frame(struct AVCodecContext *ctx, struct AVPacket *packet, const struct AVFrame *frame, int *got_packet)
Definition: dfpwmenc.c:92
FF_CODEC_ENCODE_CB
#define FF_CODEC_ENCODE_CB(func)
Definition: codec_internal.h:263
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
dfpwm_enc_init
static av_cold int dfpwm_enc_init(struct AVCodecContext *ctx)
Definition: dfpwmenc.c:78
AV_CODEC_CAP_VARIABLE_FRAME_SIZE
#define AV_CODEC_CAP_VARIABLE_FRAME_SIZE
Audio encoder supports receiving a different number of samples in each call.
Definition: codec.h:134
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:56
AV_SAMPLE_FMT_U8
@ AV_SAMPLE_FMT_U8
unsigned 8 bits
Definition: samplefmt.h:57
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
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: codec_internal.h:31
DFPWMState
Definition: dfpwmdec.c:34
AV_CODEC_ID_DFPWM
@ AV_CODEC_ID_DFPWM
Definition: codec_id.h:523