#include <alsa/asoundlib.h>
#include "config.h"
#include "libavutil/log.h"
#include "timefilter.h"
#include "avdevice.h"
Go to the source code of this file.
Data Structures | |
struct | AlsaData |
Defines | |
#define | DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE) |
#define | ALSA_BUFFER_SIZE_MAX 65536 |
Typedefs | |
typedef void(* | ff_reorder_func )(const void *, void *, int) |
Functions | |
int | ff_alsa_open (AVFormatContext *s, snd_pcm_stream_t mode, unsigned int *sample_rate, int channels, enum CodecID *codec_id) |
Open an ALSA PCM. | |
int | ff_alsa_close (AVFormatContext *s1) |
Close the ALSA PCM. | |
int | ff_alsa_xrun_recover (AVFormatContext *s1, int err) |
Try to recover from ALSA buffer underrun. | |
int | ff_alsa_extend_reorder_buf (AlsaData *s, int size) |
Definition in file alsa-audio.h.
#define ALSA_BUFFER_SIZE_MAX 65536 |
#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE) |
typedef void(* ff_reorder_func)(const void *, void *, int) |
Definition at line 44 of file alsa-audio.h.
int ff_alsa_close | ( | AVFormatContext * | s1 | ) |
Close the ALSA PCM.
s1 | media file handle |
Definition at line 318 of file alsa-audio-common.c.
int ff_alsa_extend_reorder_buf | ( | AlsaData * | s, | |
int | size | |||
) |
int ff_alsa_open | ( | AVFormatContext * | s, | |
snd_pcm_stream_t | mode, | |||
unsigned int * | sample_rate, | |||
int | channels, | |||
enum CodecID * | codec_id | |||
) |
Open an ALSA PCM.
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 |
Definition at line 186 of file alsa-audio-common.c.
Referenced by audio_read_header(), and audio_write_header().
int ff_alsa_xrun_recover | ( | AVFormatContext * | s1, | |
int | err | |||
) |
Try to recover from ALSA buffer underrun.
s1 | media file handle | |
err | error code reported by the previous ALSA call |
Definition at line 329 of file alsa-audio-common.c.
Referenced by audio_read_packet(), and audio_write_packet().