FFmpeg
Data Structures | Functions | Variables
apac.c File Reference
#include "libavutil/audio_fifo.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"

Go to the source code of this file.

Data Structures

struct  ChContext
 
struct  APACContext
 

Functions

static av_cold int apac_close (AVCodecContext *avctx)
 
static av_cold int apac_init (AVCodecContext *avctx)
 
static int get_code (ChContext *c, GetBitContext *gb)
 
static int apac_decode (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt)
 

Variables

const FFCodec ff_apac_decoder
 

Function Documentation

◆ apac_close()

static av_cold int apac_close ( AVCodecContext avctx)
static

Definition at line 52 of file apac.c.

◆ apac_init()

static av_cold int apac_init ( AVCodecContext avctx)
static

Definition at line 68 of file apac.c.

◆ get_code()

static int get_code ( ChContext c,
GetBitContext gb 
)
static

Definition at line 103 of file apac.c.

Referenced by apac_decode().

◆ apac_decode()

static int apac_decode ( AVCodecContext avctx,
AVFrame frame,
int got_frame_ptr,
AVPacket pkt 
)
static

Definition at line 127 of file apac.c.

Variable Documentation

◆ ff_apac_decoder

const FFCodec ff_apac_decoder
Initial value:
= {
.p.name = "apac",
CODEC_LONG_NAME("Marian's A-pac audio"),
.p.type = AVMEDIA_TYPE_AUDIO,
.priv_data_size = sizeof(APACContext),
.close = apac_close,
.p.capabilities = AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SUBFRAMES |
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
.p.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
}

Definition at line 262 of file apac.c.

AV_CODEC_ID_APAC
@ AV_CODEC_ID_APAC
Definition: codec_id.h:542
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: codec_internal.h:42
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
apac_init
static av_cold int apac_init(AVCodecContext *avctx)
Definition: apac.c:68
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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_U8P
@ AV_SAMPLE_FMT_U8P
unsigned 8 bits, planar
Definition: samplefmt.h:63
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AV_SAMPLE_FMT_S16P
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
Definition: samplefmt.h:64
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
APACContext
Definition: apac.c:39
apac_close
static av_cold int apac_close(AVCodecContext *avctx)
Definition: apac.c:52
AV_CODEC_CAP_DELAY
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
Definition: codec.h:76
apac_decode
static int apac_decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *pkt)
Definition: apac.c:127