libavdevice/alsa-audio.h File Reference

ALSA input and output: definitions and structures. More...

#include <alsa/asoundlib.h>
#include "config.h"
#include "libavformat/avformat.h"

Go to the source code of this file.

Data Structures

struct  AlsaData

Defines

#define DEFAULT_CODEC_ID   CODEC_ID_PCM_S16LE

Functions

int ff_alsa_open (AVFormatContext *s, int mode, unsigned int *sample_rate, int channels, int *codec_id)
 Opens an ALSA PCM.
int ff_alsa_close (AVFormatContext *s1)
 Closes the ALSA PCM.
int ff_alsa_xrun_recover (AVFormatContext *s1, int err)
 Tries to recover from ALSA buffer underrun.


Detailed Description

ALSA input and output: definitions and structures.

Author:
Luca Abeni ( lucabe72 email it )

Benoit Fouet ( benoit fouet free fr )

Definition in file alsa-audio.h.


Define Documentation

#define DEFAULT_CODEC_ID   CODEC_ID_PCM_S16LE

Definition at line 43 of file alsa-audio.h.

Referenced by ff_alsa_open().


Function Documentation

int ff_alsa_close ( AVFormatContext s1  ) 

Closes the ALSA PCM.

Parameters:
s1 media file handle
Returns:
0

Definition at line 159 of file alsa-audio-common.c.

int ff_alsa_open ( AVFormatContext s,
int  mode,
unsigned int *  sample_rate,
int  channels,
int *  codec_id 
)

Opens an ALSA PCM.

Parameters:
s media file handle
mode either SND_PCM_STREAM_CAPTURE or SND_PCM_STREAM_PLAYBACK
sample_rate in: requested sample rate; out: actually selected sample rate
channels number of channels
codec_id in: requested CodecID or CODEC_ID_NONE; out: actually selected CodecID, changed only if CODEC_ID_NONE was requested
Returns:
0 if OK, AVERROR_xxx on error

Definition at line 46 of file alsa-audio-common.c.

Referenced by audio_read_header(), and audio_write_header().

int ff_alsa_xrun_recover ( AVFormatContext s1,
int  err 
)

Tries to recover from ALSA buffer underrun.

Parameters:
s1 media file handle
err error code reported by the previous ALSA call
Returns:
0 if OK, AVERROR_xxx on error

Definition at line 167 of file alsa-audio-common.c.

Referenced by audio_read_packet(), and audio_write_packet().


Generated on Fri Oct 26 02:35:45 2012 for FFmpeg by  doxygen 1.5.8