#include <AudioToolbox/AudioToolbox.h>
#include "libavfilter/bufferqueue.h"
#include "config.h"
#include "audio_frame_queue.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.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 int  | 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, const AVChannelLayout *in_layout) | 
|   | 
| static int  | get_aac_tag (const AVChannelLayout *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,  | 
        
        
           | 
           | 
            | 
          CAPS,  | 
        
        
           | 
           | 
            | 
          CHANNEL_LAYOUTS,  | 
        
        
           | 
           | 
            | 
          CH_LAYOUTS  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Value:
    const 
FFCodec ff_##NAME##_at_encoder = { \
 
        CODEC_LONG_NAME(#NAME " (AudioToolbox)"), \
        .p.priv_class   = &ffat_##NAME##_enc_class, \
                          AV_CODEC_CAP_ENCODER_FLUSH CAPS, \
        .p.ch_layouts   = CH_LAYOUTS, \
            AV_SAMPLE_FMT_S16, \
        }, \
        .p.profiles     = PROFILES, \
        .p.wrapper_name = "at", \
    };
 
Definition at line 636 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,  | 
         
        
           | 
           | 
          const AVChannelLayout *  | 
          in_layout  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
◆ get_aac_tag()
◆ 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, .unit = 
"mode"},
 
        {
"auto", 
"VBR if global quality is given; CBR otherwise", 0, 
AV_OPT_TYPE_CONST, {.i64 = -1}, INT_MIN, INT_MAX, 
AE, .unit = 
"mode"},
 
        {
"cbr",  
"constant bitrate", 0, 
AV_OPT_TYPE_CONST, {.i64 = kAudioCodecBitRateControlMode_Constant}, INT_MIN, INT_MAX, 
AE, .unit = 
"mode"},
 
        {
"abr",  
"long-term average bitrate", 0, 
AV_OPT_TYPE_CONST, {.i64 = kAudioCodecBitRateControlMode_LongTermAverage}, INT_MIN, INT_MAX, 
AE, .unit = 
"mode"},
 
        {
"cvbr", 
"constrained variable bitrate", 0, 
AV_OPT_TYPE_CONST, {.i64 = kAudioCodecBitRateControlMode_VariableConstrained}, INT_MIN, INT_MAX, 
AE, .unit = 
"mode"},
 
        {
"vbr" , 
"variable bitrate", 0, 
AV_OPT_TYPE_CONST, {.i64 = kAudioCodecBitRateControlMode_Variable}, INT_MIN, INT_MAX, 
AE, .unit = 
"mode"},
 
 
    {
"aac_at_quality", 
"quality vs speed control", 0x42, 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 2, 
AE},
 
}
 
Definition at line 615 of file audiotoolboxenc.c.
 
 
◆ aac_at_ch_layouts
 
#define AV_CHANNEL_LAYOUT_OCTAGONAL
 
#define AV_CHANNEL_LAYOUT_STEREO
 
AVCodec p
The public AVCodec.
 
#define FF_CODEC_ENCODE_CB(func)
 
#define AV_CHANNEL_LAYOUT_SURROUND
 
#define AV_PROFILE_UNKNOWN
 
#define AV_CHANNEL_LAYOUT_4POINT0
 
#define AV_PROFILE_AAC_ELD
 
#define AV_CHANNEL_LAYOUT_7POINT1_WIDE_BACK
 
#define LIBAVUTIL_VERSION_INT
 
Describe the class of an AVClass context structure.
 
const char * av_default_item_name(void *ptr)
Return the context name.
 
int(* init)(AVBSFContext *ctx)
 
#define AV_PROFILE_AAC_LD
 
#define AV_CHANNEL_LAYOUT_6POINT0
 
#define AV_CHANNEL_LAYOUT_QUAD
 
AVSampleFormat
Audio sample formats.
 
const char * name
Name of the codec implementation.
 
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_CHANNEL_LAYOUT_7POINT0
 
#define AV_PROFILE_AAC_LOW
 
#define AV_PROFILE_AAC_HE_V2
 
#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_CHANNEL_LAYOUT_MONO
 
#define AV_PROFILE_AAC_HE
 
#define AV_CHANNEL_LAYOUT_6POINT1
 
#define AV_CHANNEL_LAYOUT_5POINT0
 
#define AV_CHANNEL_LAYOUT_5POINT1