#include <AudioToolbox/AudioToolbox.h>
#include "libavfilter/bufferqueue.h"
#include "config.h"
#include "audio_frame_queue.h"
#include "avcodec.h"
#include "bytestream.h"
#include "encode.h"
#include "internal.h"
#include "libavformat/isom.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "libavutil/log.h"
Go to the source code of this file.
|
static UInt32 | ffat_get_format_id (enum AVCodecID codec, int profile) |
|
static void | ffat_update_ctx (AVCodecContext *avctx) |
|
static int | read_descr (GetByteContext *gb, int *tag) |
|
static int | get_ilbc_mode (AVCodecContext *avctx) |
|
static av_cold int | get_channel_label (int channel) |
|
static int | remap_layout (AudioChannelLayout *layout, uint64_t in_layout, int count) |
|
static int | get_aac_tag (uint64_t in_layout) |
|
static av_cold int | ffat_init_encoder (AVCodecContext *avctx) |
|
static OSStatus | ffat_encode_callback (AudioConverterRef converter, UInt32 *nb_packets, AudioBufferList *data, AudioStreamPacketDescription **packets, void *inctx) |
|
static int | ffat_encode (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr) |
|
static av_cold void | ffat_encode_flush (AVCodecContext *avctx) |
|
static av_cold int | ffat_close_encoder (AVCodecContext *avctx) |
|
◆ FF_BUFQUEUE_SIZE
#define FF_BUFQUEUE_SIZE 256 |
◆ AE
◆ FFAT_ENC_CLASS
#define FFAT_ENC_CLASS |
( |
|
NAME | ) |
|
◆ FFAT_ENC
#define FFAT_ENC |
( |
|
NAME, |
|
|
|
ID, |
|
|
|
PROFILES, |
|
|
|
... |
|
) |
| |
Value:
const
AVCodec ff_##NAME##_at_encoder = { \
.priv_class = &ffat_##NAME##_enc_class, \
AV_SAMPLE_FMT_S16, \
}, \
.profiles = PROFILES, \
.wrapper_name = "at", \
};
Definition at line 619 of file audiotoolboxenc.c.
◆ ffat_get_format_id()
static UInt32 ffat_get_format_id |
( |
enum AVCodecID |
codec, |
|
|
int |
profile |
|
) |
| |
|
static |
◆ ffat_update_ctx()
◆ read_descr()
◆ get_ilbc_mode()
◆ get_channel_label()
◆ remap_layout()
static int remap_layout |
( |
AudioChannelLayout * |
layout, |
|
|
uint64_t |
in_layout, |
|
|
int |
count |
|
) |
| |
|
static |
◆ get_aac_tag()
static int get_aac_tag |
( |
uint64_t |
in_layout | ) |
|
|
static |
◆ ffat_init_encoder()
◆ ffat_encode_callback()
static OSStatus ffat_encode_callback |
( |
AudioConverterRef |
converter, |
|
|
UInt32 * |
nb_packets, |
|
|
AudioBufferList * |
data, |
|
|
AudioStreamPacketDescription ** |
packets, |
|
|
void * |
inctx |
|
) |
| |
|
static |
◆ ffat_encode()
◆ ffat_encode_flush()
◆ ffat_close_encoder()
◆ aac_profiles
◆ options
Initial value:= {
{
"aac_at_mode",
"ratecontrol mode", 0x42,
AV_OPT_TYPE_INT, {.i64 = -1}, -1, kAudioCodecBitRateControlMode_Variable,
AE,
"mode"},
{
"auto",
"VBR if global quality is given; CBR otherwise", 0,
AV_OPT_TYPE_CONST, {.i64 = -1}, INT_MIN, INT_MAX,
AE,
"mode"},
{
"cbr",
"constant bitrate", 0,
AV_OPT_TYPE_CONST, {.i64 = kAudioCodecBitRateControlMode_Constant}, INT_MIN, INT_MAX,
AE,
"mode"},
{
"abr",
"long-term average bitrate", 0,
AV_OPT_TYPE_CONST, {.i64 = kAudioCodecBitRateControlMode_LongTermAverage}, INT_MIN, INT_MAX,
AE,
"mode"},
{
"cvbr",
"constrained variable bitrate", 0,
AV_OPT_TYPE_CONST, {.i64 = kAudioCodecBitRateControlMode_VariableConstrained}, INT_MIN, INT_MAX,
AE,
"mode"},
{
"vbr" ,
"variable bitrate", 0,
AV_OPT_TYPE_CONST, {.i64 = kAudioCodecBitRateControlMode_Variable}, INT_MIN, INT_MAX,
AE,
"mode"},
{
"aac_at_quality",
"quality vs speed control", 0x42,
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 2,
AE},
}
Definition at line 598 of file audiotoolboxenc.c.
◆ aac_at_channel_layouts
const uint64_t aac_at_channel_layouts[] |
|
static |
#define AV_CH_LAYOUT_7POINT0
#define AV_CH_LAYOUT_6POINT1
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
static enum AVSampleFormat sample_fmts[]
#define AV_CH_LAYOUT_MONO
#define AV_CH_LAYOUT_6POINT0
#define AV_CODEC_CAP_ENCODER_FLUSH
This encoder can be flushed using avcodec_flush_buffers().
#define AV_CH_LAYOUT_STEREO
#define AV_CH_LAYOUT_QUAD
#define FF_PROFILE_AAC_HE_V2
#define FF_PROFILE_UNKNOWN
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
static void flush(AVCodecContext *avctx)
#define FF_PROFILE_AAC_LD
const char * av_default_item_name(void *ptr)
Return the context name.
#define AV_CH_LAYOUT_5POINT1
#define FF_PROFILE_AAC_ELD
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
#define FF_PROFILE_AAC_LOW
#define AV_CH_LAYOUT_OCTAGONAL
#define AV_CH_LAYOUT_5POINT0
AVSampleFormat
Audio sample formats.
const char * name
Name of the codec implementation.
#define FF_PROFILE_AAC_HE
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
#define AV_CH_LAYOUT_SURROUND
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
#define AV_CH_LAYOUT_4POINT0