30 #ifndef AVDEVICE_ALSA_H 31 #define AVDEVICE_ALSA_H 33 #include <alsa/asoundlib.h> 35 #include "libavutil/log.h" 36 #include "timefilter.h" 42 #define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE) 44 typedef void (*ff_reorder_func)(
const void *,
void *, int);
46 #define ALSA_BUFFER_SIZE_MAX 131072 57 void (*reorder_func)(
const void *,
void *, int);
102 av_warn_unused_result
103 int ff_alsa_extend_reorder_buf(
AlsaData *s,
int size);
105 av_warn_unused_result
106 int ff_alsa_get_device_list(
AVDeviceInfoList *device_list, snd_pcm_stream_t stream_type);
int64_t timestamp
current timestamp, without latency applied.
Definition: alsa.h:60
Format I/O context.
Definition: avformat.h:1342
Definition: timefilter.c:30
Main libavdevice API header.
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.
Definition: alsa.c:167
AVCodecID
Identify the syntax and semantics of the bitstream.
Definition: avcodec.h:215
av_warn_unused_result int ff_alsa_xrun_recover(AVFormatContext *s1, int err)
Try to recover from ALSA buffer underrun.
Definition: alsa.c:312
int channels
number of channels set by user
Definition: alsa.h:54
int ff_alsa_close(AVFormatContext *s1)
Close the ALSA PCM.
Definition: alsa.c:299
Describe the class of an AVClass context structure.
Definition: log.h:67
List of devices.
Definition: avdevice.h:460
int period_size
preferred size for reads and writes, in frames
Definition: alsa.h:52
int frame_size
bytes per sample * channels
Definition: alsa.h:51
int sample_rate
sample rate set by user
Definition: alsa.h:53
int reorder_buf_size
in frames
Definition: alsa.h:59
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83