#include <alsa/asoundlib.h>
#include "libavformat/avformat.h"
#include "alsa-audio.h"
Go to the source code of this file.
Functions | |
static av_cold snd_pcm_format_t | codec_id_to_pcm_format (int codec_id) |
av_cold int | ff_alsa_open (AVFormatContext *ctx, snd_pcm_stream_t mode, unsigned int *sample_rate, int channels, enum CodecID *codec_id) |
Opens an ALSA PCM. | |
av_cold 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. |
Definition in file alsa-audio-common.c.
static av_cold snd_pcm_format_t codec_id_to_pcm_format | ( | int | codec_id | ) | [static] |
av_cold int ff_alsa_close | ( | AVFormatContext * | s1 | ) |
Closes the ALSA PCM.
s1 | media file handle |
Definition at line 161 of file alsa-audio-common.c.
av_cold int ff_alsa_open | ( | AVFormatContext * | s, | |
snd_pcm_stream_t | mode, | |||
unsigned int * | sample_rate, | |||
int | channels, | |||
enum CodecID * | codec_id | |||
) |
Opens 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 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.
s1 | media file handle | |
err | error code reported by the previous ALSA call |
Definition at line 169 of file alsa-audio-common.c.
Referenced by audio_read_packet(), and audio_write_packet().