FFmpeg
Loading...
Searching...
No Matches
libfdk-xhe-aacenc.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avcodec.h"
#include "audio_frame_queue.h"
#include "codec_internal.h"
#include "encode.h"
#include "profiles.h"
#include <fdk-xhe-aac/xHEAACEnc.h>

Go to the source code of this file.

Data Structures

struct  XHEAACContext
 

Functions

static const char * xhe_aac_get_error (IIS_XHEAACENC_RETURN_CODE err)
 
static av_cold int xhe_aac_encode_close (AVCodecContext *avctx)
 
static av_cold int xhe_aac_encode_init (AVCodecContext *avctx)
 
static int xhe_aac_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

static const AVOption xhe_aac_enc_options []
 
static const AVClass xhe_aac_enc_class
 
static const AVProfile profiles []
 
static const FFCodecDefault xhe_aac_encode_defaults []
 
static const AVChannelLayout xhe_aac_ch_layouts []
 
static const int xhe_aac_sample_rates []
 
const FFCodec ff_libfdk_xhe_aac_encoder
 

Function Documentation

◆ xhe_aac_get_error()

static const char * xhe_aac_get_error ( IIS_XHEAACENC_RETURN_CODE err)
static

◆ xhe_aac_encode_close()

static av_cold int xhe_aac_encode_close ( AVCodecContext * avctx)
static

Definition at line 90 of file libfdk-xhe-aacenc.c.

◆ xhe_aac_encode_init()

static av_cold int xhe_aac_encode_init ( AVCodecContext * avctx)
static

Definition at line 108 of file libfdk-xhe-aacenc.c.

◆ xhe_aac_encode_frame()

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

Definition at line 364 of file libfdk-xhe-aacenc.c.

Variable Documentation

◆ xhe_aac_enc_options

const AVOption xhe_aac_enc_options[]
static
Initial value:
= {
{ "vbr", "VBR mode (0-6)", 0x42 , AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 6, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ "live_loudness_level", "target loudness level in live encoding mode [LUFS]", 0x42 , AV_OPT_TYPE_FLOAT, { .dbl = -24 }, -31.0, -10.0, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ "rap_interval", "Random Access Point interval", 0x42 , AV_OPT_TYPE_DURATION, { .i64 = -1 }, -1, INT64_MAX, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ "stream_id", "unique ID of this stream within one adaptation set", 0x42 , AV_OPT_TYPE_INT, {.i64 = -1}, -1, 65535, AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_ENCODING_PARAM },
{ NULL }
}
#define NULL
Definition coverity.c:32
#define AV_OPT_FLAG_AUDIO_PARAM
Definition opt.h:356
#define AV_OPT_FLAG_ENCODING_PARAM
A generic parameter which can be set by the user for muxing or encoding.
Definition opt.h:351
@ AV_OPT_TYPE_DURATION
Underlying C type is int64_t.
Definition opt.h:318
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
Definition opt.h:270
#define FF_AAC_PROFILE_OPTS
Definition profiles.h:29

Definition at line 50 of file libfdk-xhe-aacenc.c.

◆ xhe_aac_enc_class

const AVClass xhe_aac_enc_class
static
Initial value:
= {
.class_name = "libfdk_xhe_aac",
.item_name = av_default_item_name,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
static const AVOption xhe_aac_enc_options[]

Definition at line 59 of file libfdk-xhe-aacenc.c.

◆ profiles

const AVProfile profiles[]
static
Initial value:
= {
{ AV_PROFILE_AAC_USAC, "xHE-AAC" },
}
#define AV_PROFILE_UNKNOWN
Definition defs.h:65
#define AV_PROFILE_AAC_USAC
Definition defs.h:76

Definition at line 514 of file libfdk-xhe-aacenc.c.

◆ xhe_aac_encode_defaults

const FFCodecDefault xhe_aac_encode_defaults[]
static
Initial value:
= {
{ "b", "0" },
{ NULL }
}

Definition at line 519 of file libfdk-xhe-aacenc.c.

◆ xhe_aac_ch_layouts

const AVChannelLayout xhe_aac_ch_layouts[]
static
Initial value:
= {
{ 0 },
}
#define AV_CHANNEL_LAYOUT_STEREO
#define AV_CHANNEL_LAYOUT_MONO

Definition at line 524 of file libfdk-xhe-aacenc.c.

◆ xhe_aac_sample_rates

const int xhe_aac_sample_rates[]
static
Initial value:
= {
48000, 44100, 0
}

Definition at line 530 of file libfdk-xhe-aacenc.c.

◆ ff_libfdk_xhe_aac_encoder

const FFCodec ff_libfdk_xhe_aac_encoder
Initial value:
= {
.p.name = "libfdk_xhe_aac",
CODEC_LONG_NAME("Fraunhofer FDK xHE-AAC"),
.p.type = AVMEDIA_TYPE_AUDIO,
.p.id = AV_CODEC_ID_AAC,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY |
.priv_data_size = sizeof(XHEAACContext),
.p.priv_class = &xhe_aac_enc_class,
.p.profiles = profiles,
.p.wrapper_name = "libfdk-xhe-aac",
}
#define CODEC_SAMPLERATES_ARRAY(array)
#define FF_CODEC_CAP_NOT_INIT_THREADSAFE
The codec is not known to be init-threadsafe (i.e.
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
#define CODEC_SAMPLEFMTS(...)
#define CODEC_CH_LAYOUTS_ARRAY(array)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#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:79
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
#define AV_CODEC_CAP_SMALL_LAST_FRAME
Codec can be fed a final frame with a smaller size.
Definition codec.h:84
@ AV_CODEC_ID_AAC
Definition codec_id.h:459
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
@ AV_SAMPLE_FMT_FLT
float
Definition samplefmt.h:60
static const AVProfile profiles[]
static av_cold int xhe_aac_encode_close(AVCodecContext *avctx)
static const int xhe_aac_sample_rates[]
static int xhe_aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
static const AVChannelLayout xhe_aac_ch_layouts[]
static av_cold int xhe_aac_encode_init(AVCodecContext *avctx)
static const AVClass xhe_aac_enc_class
static const FFCodecDefault xhe_aac_encode_defaults[]

Definition at line 534 of file libfdk-xhe-aacenc.c.