FFmpeg
Loading...
Searching...
No Matches
audiotoolbox.m File Reference

AudioToolbox output device. More...

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 },
}
#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:351
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition opt.h:326

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,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
@ AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT
Definition log.h:43

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,
}
static av_cold int at_write_trailer(AVFormatContext *avctx)
static const AVClass at_class
static av_cold int at_write_header(AVFormatContext *avctx)
static int at_write_packet(AVFormatContext *avctx, AVPacket *pkt)
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition avformat.h:488
@ AV_CODEC_ID_PCM_S16LE
Definition codec_id.h:330
@ AV_CODEC_ID_NONE
Definition codec_id.h:48
@ AV_CODEC_ID_PCM_S16BE
Definition codec_id.h:331
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
#define AV_NE(be, le)
Definition macros.h:33

Definition at line 303 of file audiotoolbox.m.