libavdevice/openal-dec.c File Reference

OpenAL 1.1 capture device for libavdevice. More...

#include <AL/al.h>
#include <AL/alc.h>
#include "libavutil/opt.h"
#include "libavformat/internal.h"
#include "avdevice.h"

Go to the source code of this file.

Data Structures

struct  al_data
struct  al_format_info

Defines

#define LOWEST_AL_FORMAT   FFMIN(FFMIN(AL_FORMAT_MONO8,AL_FORMAT_MONO16),FFMIN(AL_FORMAT_STEREO8,AL_FORMAT_STEREO16))
#define OFFSET(x)   offsetof(al_data, x)

Functions

static al_format_infoget_al_format_info (ALCenum al_fmt)
 Get information about an AL_FORMAT value.
static int al_get_error (ALCdevice *device, const char **error_msg_ret)
 Get the OpenAL error code, translated into an av/errno error code.
static void print_al_capture_devices (void *log_ctx)
 Print out a list of OpenAL capture devices on this system.
static int read_header (AVFormatContext *ctx, AVFormatParameters *ap)
static int read_packet (AVFormatContext *ctx, AVPacket *pkt)
static int read_close (AVFormatContext *ctx)

Variables

static const AVOption options []
class {
      class_name = "openal"
      item_name = av_default_item_name
      option = options
}; 
AVInputFormat ff_openal_demuxer


Detailed Description

OpenAL 1.1 capture device for libavdevice.

Definition in file openal-dec.c.


Define Documentation

#define LOWEST_AL_FORMAT   FFMIN(FFMIN(AL_FORMAT_MONO8,AL_FORMAT_MONO16),FFMIN(AL_FORMAT_STEREO8,AL_FORMAT_STEREO16))

Definition at line 55 of file openal-dec.c.

Referenced by get_al_format_info().

#define OFFSET (  )     offsetof(al_data, x)

Definition at line 222 of file openal-dec.c.


Function Documentation

static int al_get_error ( ALCdevice *  device,
const char **  error_msg_ret 
) [inline, static]

Get the OpenAL error code, translated into an av/errno error code.

Parameters:
device The ALC device to check for errors.
error_msg_ret A pointer to a char* in which to return the error message, or NULL if desired.
Returns:
The error code, or 0 if there is no error.

Definition at line 80 of file openal-dec.c.

Referenced by read_header(), and read_packet().

static al_format_info* get_al_format_info ( ALCenum  al_fmt  )  [inline, static]

Get information about an AL_FORMAT value.

Parameters:
al_fmt the AL_FORMAT value to find information about.
Returns:
A pointer to a structure containing information about the AL_FORMAT value.

Definition at line 62 of file openal-dec.c.

Referenced by read_header().

static void print_al_capture_devices ( void *  log_ctx  )  [inline, static]

Print out a list of OpenAL capture devices on this system.

Definition at line 107 of file openal-dec.c.

Referenced by read_header().

static int read_close ( AVFormatContext ctx  )  [static]

Definition at line 211 of file openal-dec.c.

static int read_header ( AVFormatContext ctx,
AVFormatParameters ap 
) [static]

Definition at line 120 of file openal-dec.c.

static int read_packet ( AVFormatContext ctx,
AVPacket pkt 
) [static]

Definition at line 182 of file openal-dec.c.


Variable Documentation

const { ... } [static]

class_name = "openal"

Definition at line 235 of file openal-dec.c.

Initial value:

 {
    .name = "openal",
    .long_name = NULL_IF_CONFIG_SMALL("OpenAL audio capture device"),
    .priv_data_size = sizeof(al_data),
    .read_probe = NULL,
    .read_header = read_header,
    .read_packet = read_packet,
    .read_close = read_close,
    .flags = AVFMT_NOFILE,
    .priv_class = &class
}

Definition at line 241 of file openal-dec.c.

item_name = av_default_item_name

Definition at line 236 of file openal-dec.c.

Definition at line 237 of file openal-dec.c.

const AVOption options[] [static]

Initial value:

 {
    {"channels", "set number of channels",     OFFSET(channels),     AV_OPT_TYPE_INT, {.dbl=2},     1, 2,      AV_OPT_FLAG_DECODING_PARAM },
    {"sample_rate", "set sample rate",         OFFSET(sample_rate),  AV_OPT_TYPE_INT, {.dbl=44100}, 1, 192000, AV_OPT_FLAG_DECODING_PARAM },
    {"sample_size", "set sample size",         OFFSET(sample_size),  AV_OPT_TYPE_INT, {.dbl=16},    8, 16,     AV_OPT_FLAG_DECODING_PARAM },
    {"list_devices", "list available devices", OFFSET(list_devices), AV_OPT_TYPE_INT, {.dbl=0},     0, 1,      AV_OPT_FLAG_DECODING_PARAM, "list_devices"  },
    {"true",  "", 0, AV_OPT_TYPE_CONST, {.dbl=1}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
    {"false", "", 0, AV_OPT_TYPE_CONST, {.dbl=0}, 0, 0, AV_OPT_FLAG_DECODING_PARAM, "list_devices" },
    {NULL},
}

Definition at line 224 of file openal-dec.c.


Generated on Fri Oct 26 02:46:11 2012 for FFmpeg by  doxygen 1.5.8