FFmpeg
Data Structures | Functions | Variables
audiotoolbox.m File Reference

AudioToolbox output device. More...

#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

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().

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

Definition at line 61 of file audiotoolbox.m.

Referenced by at_write_header().

static av_cold int at_write_header ( AVFormatContext avctx)
static

Definition at line 73 of file audiotoolbox.m.

static int at_write_packet ( AVFormatContext avctx,
AVPacket pkt 
)
static

Definition at line 232 of file audiotoolbox.m.

static av_cold int at_write_trailer ( AVFormatContext avctx)
static

Definition at line 267 of file audiotoolbox.m.

Variable Documentation

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 },
}
#define NULL
Definition: coverity.c:32
#define AV_OPT_FLAG_ENCODING_PARAM
a generic parameter which can be set by the user for muxing or encoding
Definition: opt.h:278

Definition at line 283 of file audiotoolbox.m.

const AVClass at_class
static
Initial value:
= {
.class_name = "AudioToolbox",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
static const AVOption options[]
Definition: audiotoolbox.m:283

Definition at line 289 of file audiotoolbox.m.

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,
}
static int at_write_packet(AVFormatContext *avctx, AVPacket *pkt)
Definition: audiotoolbox.m:232
#define AV_NE(be, le)
Definition: common.h:50
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:115
static av_cold int at_write_header(AVFormatContext *avctx)
Definition: audiotoolbox.m:73
static const AVClass at_class
Definition: audiotoolbox.m:289
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:458
static av_cold int at_write_trailer(AVFormatContext *avctx)
Definition: audiotoolbox.m:267

Definition at line 297 of file audiotoolbox.m.