FFmpeg
Data Structures | Functions | Variables
audiotoolbox.m File Reference
#import <AudioToolbox/AudioToolbox.h>
#include <pthread.h>
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavformat/internal.h"
#include "libavformat/mux.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
 
const FFOutputFormat 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 52 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 63 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 75 of file audiotoolbox.m.

◆ at_write_packet()

static int at_write_packet ( AVFormatContext avctx,
AVPacket pkt 
)
static

Definition at line 238 of file audiotoolbox.m.

◆ at_write_trailer()

static av_cold int at_write_trailer ( AVFormatContext avctx)
static

Definition at line 273 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 289 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 295 of file audiotoolbox.m.

◆ ff_audiotoolbox_muxer

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

Definition at line 303 of file audiotoolbox.m.

AV_CODEC_ID_PCM_S16LE
@ AV_CODEC_ID_PCM_S16LE
Definition: codec_id.h:334
at_write_trailer
static av_cold int at_write_trailer(AVFormatContext *avctx)
Definition: audiotoolbox.m:273
at_write_packet
static int at_write_packet(AVFormatContext *avctx, AVPacket *pkt)
Definition: audiotoolbox.m:238
AV_CODEC_ID_PCM_S16BE
@ AV_CODEC_ID_PCM_S16BE
Definition: codec_id.h:335
AV_NE
#define AV_NE(be, le)
Definition: macros.h:33
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:237
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:352
at_class
static const AVClass at_class
Definition: audiotoolbox.m:295
at_write_header
static av_cold int at_write_header(AVFormatContext *avctx)
Definition: audiotoolbox.m:75
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:94
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:468
ATContext
Definition: audiotoolbox.m:38
AV_CODEC_ID_NONE
@ AV_CODEC_ID_NONE
Definition: codec_id.h:50
AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT
@ AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT
Definition: log.h:42
options
static const AVOption options[]
Definition: audiotoolbox.m:289
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition: opt.h:327