FFmpeg
Variables
alsa_dec.c File Reference

ALSA input and output: input. More...

#include <alsa/asoundlib.h>
#include "libavutil/internal.h"
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "libavformat/internal.h"
#include "avdevice.h"
#include "alsa.h"

Variables

AVInputFormat ff_alsa_demuxer
 

Detailed Description

ALSA input and output: input.

Author
Luca Abeni ( lucabe72 email it )
Benoit Fouet ( benoit fouet free fr )
Nicolas George ( nicolas george normalesup org )

This avdevice decoder can capture audio from an ALSA (Advanced Linux Sound Architecture) device.

The filename parameter is the name of an ALSA PCM device capable of capture, for example "default" or "plughw:1"; see the ALSA documentation for naming conventions. The empty string is equivalent to "default".

The capture period is set to the lower value available for the device, which gives a low latency suitable for real-time capture.

The PTS are an Unix time in microsecond.

Due to a bug in the ALSA library (https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4308), this decoder does not work with certain ALSA plugins, especially the dsnoop plugin.

Variable Documentation

§ ff_alsa_demuxer

AVInputFormat ff_alsa_demuxer
Initial value:
= {
.name = "alsa",
.long_name = NULL_IF_CONFIG_SMALL("ALSA audio input"),
.priv_data_size = sizeof(AlsaData),
.read_header = audio_read_header,
.read_packet = audio_read_packet,
.read_close = ff_alsa_close,
.get_device_list = audio_get_device_list,
.flags = AVFMT_NOFILE,
.priv_class = &alsa_demuxer_class,
}
Definition: alsa.h:48
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
av_cold int ff_alsa_close(AVFormatContext *s1)
Close the ALSA PCM.
Definition: alsa.c:299
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:465