FFmpeg
|
ALSA input and output: definitions and structures. More...
#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 |
Macros | |
#define | DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE) |
#define | ALSA_BUFFER_SIZE_MAX 65536 |
Typedefs | |
typedef void(* | ff_reorder_func )(const void *, void *, int) |
Functions | |
av_warn_unused_result int | ff_alsa_open (AVFormatContext *s, snd_pcm_stream_t mode, unsigned int *sample_rate, int channels, enum AVCodecID *codec_id) |
Open an ALSA PCM. More... | |
int | ff_alsa_close (AVFormatContext *s1) |
Close the ALSA PCM. More... | |
av_warn_unused_result int | ff_alsa_xrun_recover (AVFormatContext *s1, int err) |
Try to recover from ALSA buffer underrun. More... | |
av_warn_unused_result int | ff_alsa_extend_reorder_buf (AlsaData *s, int size) |
av_warn_unused_result int | ff_alsa_get_device_list (AVDeviceInfoList *device_list, snd_pcm_stream_t stream_type) |
ALSA input and output: definitions and structures.
Definition in file alsa.h.
#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE) |
Definition at line 42 of file alsa.h.
Referenced by ff_alsa_open().
#define ALSA_BUFFER_SIZE_MAX 65536 |
Definition at line 46 of file alsa.h.
Referenced by ff_alsa_open().
av_warn_unused_result int ff_alsa_open | ( | AVFormatContext * | s, |
snd_pcm_stream_t | mode, | ||
unsigned int * | sample_rate, | ||
int | channels, | ||
enum AVCodecID * | 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 AVCodecID or AV_CODEC_ID_NONE; out: actually selected AVCodecID, changed only if AV_CODEC_ID_NONE was requested |
Definition at line 167 of file alsa.c.
Referenced by audio_read_header(), and audio_write_header().
int ff_alsa_close | ( | AVFormatContext * | s1 | ) |
av_warn_unused_result 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 312 of file alsa.c.
Referenced by audio_read_packet(), and audio_write_packet().
av_warn_unused_result int ff_alsa_extend_reorder_buf | ( | AlsaData * | s, |
int | size | ||
) |
Definition at line 333 of file alsa.c.
Referenced by audio_write_packet().
av_warn_unused_result int ff_alsa_get_device_list | ( | AVDeviceInfoList * | device_list, |
snd_pcm_stream_t | stream_type | ||
) |
Definition at line 350 of file alsa.c.
Referenced by audio_get_device_list().