FFmpeg  2.1.1
Data Structures | Macros | Functions | Variables
pulse_audio_dec.c File Reference

PulseAudio input using the simple API. More...

#include <pulse/simple.h>
#include <pulse/rtclock.h>
#include <pulse/error.h>
#include "libavformat/avformat.h"
#include "libavformat/internal.h"
#include "libavutil/opt.h"
#include "pulse_audio_common.h"

Go to the source code of this file.

Data Structures

struct  PulseData
 

Macros

#define DEFAULT_CODEC_ID   AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)
 
#define OFFSET(a)   offsetof(PulseData, a)
 
#define D   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static av_cold int pulse_read_header (AVFormatContext *s)
 
static int pulse_read_packet (AVFormatContext *s, AVPacket *pkt)
 
static av_cold int pulse_close (AVFormatContext *s)
 

Variables

static const AVOption options []
 
static const AVClass pulse_demuxer_class
 
AVInputFormat ff_pulse_demuxer
 

Detailed Description

PulseAudio input using the simple API.

Author
Luca Barbato lu_ze.nosp@m.ro@g.nosp@m.entoo.nosp@m..org

Definition in file pulse_audio_dec.c.

Macro Definition Documentation

#define DEFAULT_CODEC_ID   AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)

Definition at line 36 of file pulse_audio_dec.c.

Referenced by pulse_read_header().

#define OFFSET (   a)    offsetof(PulseData, a)

Definition at line 143 of file pulse_audio_dec.c.

Definition at line 144 of file pulse_audio_dec.c.

Function Documentation

static av_cold int pulse_read_header ( AVFormatContext s)
static

Definition at line 52 of file pulse_audio_dec.c.

static int pulse_read_packet ( AVFormatContext s,
AVPacket pkt 
)
static

Definition at line 102 of file pulse_audio_dec.c.

static av_cold int pulse_close ( AVFormatContext s)
static

Definition at line 136 of file pulse_audio_dec.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "server", "set PulseAudio server", OFFSET(server), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, D },
{ "name", "set application name", OFFSET(name), AV_OPT_TYPE_STRING, {.str = LIBAVFORMAT_IDENT}, 0, 0, D },
{ "stream_name", "set stream description", OFFSET(stream_name), AV_OPT_TYPE_STRING, {.str = "record"}, 0, 0, D },
{ "sample_rate", "set sample rate in Hz", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 48000}, 1, INT_MAX, D },
{ "channels", "set number of audio channels", OFFSET(channels), AV_OPT_TYPE_INT, {.i64 = 2}, 1, INT_MAX, D },
{ "frame_size", "set number of bytes per frame", OFFSET(frame_size), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX, D },
{ "fragment_size", "set buffering size, affects latency and cpu usage", OFFSET(fragment_size), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, D },
{ NULL },
}
const char * name
Definition: avisynth_c.h:675
#define LIBAVFORMAT_IDENT
Definition: version.h:44
static const uint8_t frame_size[4]
Definition: g723_1_data.h:58
#define OFFSET(a)
sample_rate
#define D
Definition: options_table.h:39

Definition at line 146 of file pulse_audio_dec.c.

const AVClass pulse_demuxer_class
static
Initial value:
= {
.class_name = "Pulse demuxer",
.item_name = av_default_item_name,
.option = options,
}
#define LIBAVUTIL_VERSION_INT
Definition: avcodec.h:820
const char * av_default_item_name(void *ctx)
Return the context name.
Definition: log.c:145
const OptionDef options[]
Definition: ffserver.c:4682

Definition at line 157 of file pulse_audio_dec.c.

AVInputFormat ff_pulse_demuxer
Initial value:
= {
.name = "pulse",
.long_name = NULL_IF_CONFIG_SMALL("Pulse audio input"),
.priv_data_size = sizeof(PulseData),
.priv_class = &pulse_demuxer_class,
}
static av_cold int pulse_close(AVFormatContext *s)
static const AVClass pulse_demuxer_class
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:145
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:347
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:151
static int read_header(FFV1Context *f)
Definition: ffv1dec.c:592
static av_cold int pulse_read_header(AVFormatContext *s)
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:114
static int flags
Definition: cpu.c:45
static int pulse_read_packet(AVFormatContext *s, AVPacket *pkt)

Definition at line 164 of file pulse_audio_dec.c.