#include <AudioToolbox/AudioToolbox.h>
#include "config.h"
#include "config_components.h"
#include "avcodec.h"
#include "ac3_parser_internal.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "mpegaudiodecheader.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/mem.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_get_channel_id (AudioChannelLabel label) |
|
static int | ffat_compare_channel_descriptions (const void *a, const void *b) |
|
static AudioChannelLayout * | ffat_convert_layout (AudioChannelLayout *layout, UInt32 *size) |
|
static int | ffat_update_ctx (AVCodecContext *avctx) |
|
static void | put_descr (PutByteContext *pb, int tag, unsigned int size) |
|
static uint8_t * | ffat_get_magic_cookie (AVCodecContext *avctx, UInt32 *cookie_size) |
|
static av_cold int | ffat_usable_extradata (AVCodecContext *avctx) |
|
static int | ffat_set_extradata (AVCodecContext *avctx) |
|
static av_cold int | ffat_create_decoder (AVCodecContext *avctx, const AVPacket *pkt) |
|
static av_cold int | ffat_init_decoder (AVCodecContext *avctx) |
|
static OSStatus | ffat_decode_callback (AudioConverterRef converter, UInt32 *nb_packets, AudioBufferList *data, AudioStreamPacketDescription **packets, void *inctx) |
|
static void | ffat_copy_samples (AVCodecContext *avctx, AVFrame *frame) |
|
static int | ffat_decode (AVCodecContext *avctx, AVFrame *frame, int *got_frame_ptr, AVPacket *avpkt) |
|
static av_cold void | ffat_decode_flush (AVCodecContext *avctx) |
|
static av_cold int | ffat_close_decoder (AVCodecContext *avctx) |
|
◆ kAudioFormatEnhancedAC3
#define kAudioFormatEnhancedAC3 'ec-3' |
◆ COPY_SAMPLES
#define COPY_SAMPLES |
( |
|
type | ) |
|
Value: type *in_ptr = (
type*)at->decoded_data; \
type *end_ptr = in_ptr +
frame->nb_samples * avctx->ch_layout.nb_channels; \
for (; in_ptr < end_ptr; in_ptr += avctx->ch_layout.nb_channels, out_ptr += avctx->ch_layout.nb_channels) { \
for (
c = 0;
c < avctx->ch_layout.nb_channels;
c++) \
out_ptr[
c] = in_ptr[at->channel_map[
c]]; \
}
Definition at line 469 of file audiotoolboxdec.c.
◆ FFAT_DEC_CLASS
#define FFAT_DEC_CLASS |
( |
|
NAME | ) |
|
◆ FFAT_DEC
#define FFAT_DEC |
( |
|
NAME, |
|
|
|
ID, |
|
|
|
bsf_name |
|
) |
| |
Value:
const
FFCodec ff_##NAME##_at_decoder = { \
CODEC_LONG_NAME(#NAME " (AudioToolbox)"), \
.p.priv_class = &ffat_##NAME##_dec_class, \
.bsfs = bsf_name, \
.p.wrapper_name = "at", \
};
Definition at line 595 of file audiotoolboxdec.c.
◆ ffat_get_format_id()
static UInt32 ffat_get_format_id |
( |
enum AVCodecID |
codec, |
|
|
int |
profile |
|
) |
| |
|
static |
◆ ffat_get_channel_id()
static int ffat_get_channel_id |
( |
AudioChannelLabel |
label | ) |
|
|
static |
◆ ffat_compare_channel_descriptions()
static int ffat_compare_channel_descriptions |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
◆ ffat_convert_layout()
static AudioChannelLayout* ffat_convert_layout |
( |
AudioChannelLayout * |
layout, |
|
|
UInt32 * |
size |
|
) |
| |
|
static |
◆ ffat_update_ctx()
◆ put_descr()
static void put_descr |
( |
PutByteContext * |
pb, |
|
|
int |
tag, |
|
|
unsigned int |
size |
|
) |
| |
|
static |
◆ ffat_get_magic_cookie()
static uint8_t* ffat_get_magic_cookie |
( |
AVCodecContext * |
avctx, |
|
|
UInt32 * |
cookie_size |
|
) |
| |
|
static |
◆ ffat_usable_extradata()
◆ ffat_set_extradata()
◆ ffat_create_decoder()
◆ ffat_init_decoder()
◆ ffat_decode_callback()
static OSStatus ffat_decode_callback |
( |
AudioConverterRef |
converter, |
|
|
UInt32 * |
nb_packets, |
|
|
AudioBufferList * |
data, |
|
|
AudioStreamPacketDescription ** |
packets, |
|
|
void * |
inctx |
|
) |
| |
|
static |
◆ ffat_copy_samples()
◆ ffat_decode()
◆ ffat_decode_flush()
◆ ffat_close_decoder()
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
AVCodec p
The public AVCodec.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
#define FF_CODEC_DECODE_CB(func)
#define LIBAVUTIL_VERSION_INT
Describe the class of an AVClass context structure.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
#define AV_CODEC_CAP_CHANNEL_CONF
Codec should fill in channel configuration and samplerate instead of container.
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
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...
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...