libavdevice/pulse.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"

Go to the source code of this file.

Data Structures

struct  PulseData

Defines

#define DEFAULT_CODEC_ID   AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
#define OFFSET(a)   offsetof(PulseData, a)
#define D   AV_OPT_FLAG_DECODING_PARAM

Functions

static pa_sample_format_t codec_id_to_pulse_format (int codec_id)
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_zero@gentoo.org>

Definition in file pulse.c.


Define Documentation

#define D   AV_OPT_FLAG_DECODING_PARAM

Definition at line 161 of file pulse.c.

#define DEFAULT_CODEC_ID   AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)

Definition at line 36 of file pulse.c.

#define OFFSET (  )     offsetof(PulseData, a)

Definition at line 160 of file pulse.c.


Function Documentation

static pa_sample_format_t codec_id_to_pulse_format ( int  codec_id  )  [static]

Definition at line 52 of file pulse.c.

Referenced by pulse_read_header().

static av_cold int pulse_close ( AVFormatContext s  )  [static]

Definition at line 153 of file pulse.c.

static av_cold int pulse_read_header ( AVFormatContext s  )  [static]

Definition at line 69 of file pulse.c.

static int pulse_read_packet ( AVFormatContext s,
AVPacket pkt 
) [static]

Definition at line 119 of file pulse.c.


Variable Documentation

Initial value:

 {
    .name           = "pulse",
    .long_name      = NULL_IF_CONFIG_SMALL("Pulse audio input"),
    .priv_data_size = sizeof(PulseData),
    .read_header    = pulse_read_header,
    .read_packet    = pulse_read_packet,
    .read_close     = pulse_close,
    .flags          = AVFMT_NOFILE,
    .priv_class     = &pulse_demuxer_class,
}

Definition at line 181 of file pulse.c.

const AVOption options[] [static]

Initial value:

 {
    { "server",        "pulse server name",                              OFFSET(server),        AV_OPT_TYPE_STRING, {.str = NULL},     0, 0, D },
    { "name",          "application name",                               OFFSET(name),          AV_OPT_TYPE_STRING, {.str = LIBAVFORMAT_IDENT},  0, 0, D },
    { "stream_name",   "stream description",                             OFFSET(stream_name),   AV_OPT_TYPE_STRING, {.str = "record"}, 0, 0, D },
    { "sample_rate",   "sample rate in Hz",                              OFFSET(sample_rate),   AV_OPT_TYPE_INT,    {.dbl = 48000},    1, INT_MAX, D },
    { "channels",      "number of audio channels",                       OFFSET(channels),      AV_OPT_TYPE_INT,    {.dbl = 2},        1, INT_MAX, D },
    { "frame_size",    "number of bytes per frame",                      OFFSET(frame_size),    AV_OPT_TYPE_INT,    {.dbl = 1024},     1, INT_MAX, D },
    { "fragment_size", "buffering size, affects latency and cpu usage",  OFFSET(fragment_size), AV_OPT_TYPE_INT,    {.dbl = -1},      -1, INT_MAX, D },
    { NULL },
}

Definition at line 163 of file pulse.c.

const AVClass pulse_demuxer_class [static]

Initial value:

 {
    .class_name     = "Pulse demuxer",
    .item_name      = av_default_item_name,
    .option         = options,
    .version        = LIBAVUTIL_VERSION_INT,
}

Definition at line 174 of file pulse.c.


Generated on Fri Oct 26 02:48:00 2012 for FFmpeg by  doxygen 1.5.8