Libav
Functions | Variables
alsa_enc.c File Reference

ALSA input and output: output. More...

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

Go to the source code of this file.

Functions

static av_cold int audio_write_header (AVFormatContext *s1)
 
static int audio_write_packet (AVFormatContext *s1, AVPacket *pkt)
 

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 allows to 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.

Definition in file alsa_enc.c.

Function Documentation

◆ audio_write_header()

static av_cold int audio_write_header ( AVFormatContext s1)
static

Definition at line 48 of file alsa_enc.c.

◆ audio_write_packet()

static int audio_write_packet ( AVFormatContext s1,
AVPacket pkt 
)
static

Definition at line 75 of file alsa_enc.c.

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,
}
static av_cold int audio_write_header(AVFormatContext *s1)
Definition: alsa_enc.c:48
static int flags
Definition: log.c:50
static int write_trailer(AVFormatContext *s)
Definition: assenc.c:64
#define DEFAULT_CODEC_ID
Definition: alsa.h:41
Definition: alsa.h:45
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: alsa_enc.c:75
static void write_packet(OutputFile *of, AVPacket *pkt, OutputStream *ost)
Definition: avconv.c:278
av_cold int ff_alsa_close(AVFormatContext *s1)
Close the ALSA PCM.
Definition: alsa.c:318
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:412
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:373

Definition at line 107 of file alsa_enc.c.