FFmpeg
Variables
alsa_enc.c File Reference

ALSA input and output: output. More...

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

Variables

AVOutputFormat ff_alsa_muxer
 

Detailed Description

ALSA input and output: output.

Author
Luca Abeni ( lucabe72 email it )
Benoit Fouet ( benoit fouet free fr )

This avdevice encoder can play audio to 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 playback period is set to the lower value available for the device, which gives a low latency suitable for real-time playback.

Variable Documentation

§ ff_alsa_muxer

AVOutputFormat ff_alsa_muxer
Initial value:
= {
.name = "alsa",
.long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"),
.priv_data_size = sizeof(AlsaData),
.audio_codec = DEFAULT_CODEC_ID,
.video_codec = AV_CODEC_ID_NONE,
.write_header = audio_write_header,
.write_packet = audio_write_packet,
.write_trailer = ff_alsa_close,
.write_uncoded_frame = audio_write_frame,
.get_device_list = audio_get_device_list,
.get_output_timestamp = audio_get_output_timestamp,
.flags = AVFMT_NOFILE,
.priv_class = &alsa_muxer_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