FFmpeg
Data Structures | Functions | Variables
audiotoolbox.m File Reference
#import <AudioToolbox/AudioToolbox.h>
#include <pthread.h>
#include "libavutil/opt.h"
#include "libavformat/internal.h"
#include "libavutil/internal.h"
#include "avdevice.h"

Go to the source code of this file.

Data Structures

struct  ATContext
 

Functions

static int check_status (AVFormatContext *avctx, OSStatus *status, const char *msg)
 
static void queue_callback (void *atctx, AudioQueueRef inAQ, AudioQueueBufferRef inBuffer)
 
static av_cold int at_write_header (AVFormatContext *avctx)
 
static int at_write_packet (AVFormatContext *avctx, AVPacket *pkt)
 
static av_cold int at_write_trailer (AVFormatContext *avctx)
 

Variables

static const AVOption options []
 
static const AVClass at_class
 
AVOutputFormat ff_audiotoolbox_muxer
 

Detailed Description

AudioToolbox output device

Author
Thilo Borgmann thilo.nosp@m..bor.nosp@m.gmann.nosp@m.@mai.nosp@m.l.de

Definition in file audiotoolbox.m.

Function Documentation

◆ check_status()

static int check_status ( AVFormatContext avctx,
OSStatus *  status,
const char *  msg 
)
static

Definition at line 50 of file audiotoolbox.m.

Referenced by at_write_header(), at_write_packet(), and at_write_trailer().

◆ queue_callback()

static void queue_callback ( void *  atctx,
AudioQueueRef  inAQ,
AudioQueueBufferRef  inBuffer 
)
static

Definition at line 61 of file audiotoolbox.m.

Referenced by at_write_header().

◆ at_write_header()

static av_cold int at_write_header ( AVFormatContext avctx)
static

Definition at line 73 of file audiotoolbox.m.

◆ at_write_packet()

static int at_write_packet ( AVFormatContext avctx,
AVPacket pkt 
)
static

Definition at line 232 of file audiotoolbox.m.

◆ at_write_trailer()

static av_cold int at_write_trailer ( AVFormatContext avctx)
static

Definition at line 267 of file audiotoolbox.m.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "list_devices", "list available audio devices", 0x42, AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, AV_OPT_FLAG_ENCODING_PARAM },
{ "audio_device_index", "select audio device by index (starts at 0)", 0x42, AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}

Definition at line 283 of file audiotoolbox.m.

◆ at_class

const AVClass at_class
static
Initial value:
= {
.class_name = "AudioToolbox",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 289 of file audiotoolbox.m.

◆ ff_audiotoolbox_muxer

AVOutputFormat ff_audiotoolbox_muxer
Initial value:
= {
.name = "audiotoolbox",
.long_name = NULL_IF_CONFIG_SMALL("AudioToolbox output device"),
.priv_data_size = sizeof(ATContext),
.video_codec = AV_CODEC_ID_NONE,
.write_header = at_write_header,
.write_packet = at_write_packet,
.write_trailer = at_write_trailer,
.flags = AVFMT_NOFILE,
.priv_class = &at_class,
}

Definition at line 297 of file audiotoolbox.m.

AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:313
at_write_trailer
static av_cold int at_write_trailer(AVFormatContext *avctx)
Definition: audiotoolbox.m:267
at_write_packet
static int at_write_packet(AVFormatContext *avctx, AVPacket *pkt)
Definition: audiotoolbox.m:232
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:314
AV_OPT_FLAG_ENCODING_PARAM
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:278
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
at_class
static const AVClass at_class
Definition: audiotoolbox.m:289
at_write_header
static av_cold int at_write_header(AVFormatContext *avctx)
Definition: audiotoolbox.m:73
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:458
ATContext
Definition: audiotoolbox.m:36
AV_NE
#define AV_NE(be, le)
Definition: common.h:50
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:47
AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT
@ AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT
Definition: log.h:43
options
static const AVOption options[]
Definition: audiotoolbox.m:283
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:242