FFmpeg  2.6.3
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions | Variables
alsa-audio-enc.c File Reference

ALSA input and output: output. More...

#include <alsa/asoundlib.h>
#include "libavutil/time.h"
#include "libavformat/internal.h"
#include "avdevice.h"
#include "alsa-audio.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)
 
static int audio_write_frame (AVFormatContext *s1, int stream_index, AVFrame **frame, unsigned flags)
 
static void audio_get_output_timestamp (AVFormatContext *s1, int stream, int64_t *dts, int64_t *wall)
 
static int audio_get_device_list (AVFormatContext *h, AVDeviceInfoList *device_list)
 

Variables

static const AVClass alsa_muxer_class
 
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-audio-enc.c.

Function Documentation

static av_cold int audio_write_header ( AVFormatContext s1)
static

Definition at line 47 of file alsa-audio-enc.c.

static int audio_write_packet ( AVFormatContext s1,
AVPacket pkt 
)
static

Definition at line 80 of file alsa-audio-enc.c.

Referenced by audio_write_frame().

static int audio_write_frame ( AVFormatContext s1,
int  stream_index,
AVFrame **  frame,
unsigned  flags 
)
static

Definition at line 116 of file alsa-audio-enc.c.

static void audio_get_output_timestamp ( AVFormatContext s1,
int  stream,
int64_t *  dts,
int64_t *  wall 
)
static

Definition at line 135 of file alsa-audio-enc.c.

static int audio_get_device_list ( AVFormatContext h,
AVDeviceInfoList device_list 
)
static

Definition at line 145 of file alsa-audio-enc.c.

Variable Documentation

const AVClass alsa_muxer_class
static
Initial value:
= {
.class_name = "ALSA muxer",
.item_name = av_default_item_name,
}
#define LIBAVUTIL_VERSION_INT
Definition: version.h:62
av_default_item_name

Definition at line 150 of file alsa-audio-enc.c.

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_uncoded_frame = audio_write_frame,
.get_output_timestamp = audio_get_output_timestamp,
.priv_class = &alsa_muxer_class,
}
static int audio_get_device_list(AVFormatContext *h, AVDeviceInfoList *device_list)
static const AVClass alsa_muxer_class
av_cold int ff_alsa_close(AVFormatContext *s1)
Close the ALSA PCM.
static void audio_get_output_timestamp(AVFormatContext *s1, int stream, int64_t *dts, int64_t *wall)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:180
static int write_trailer(AVFormatContext *s1)
Definition: v4l2enc.c:94
static av_cold int audio_write_header(AVFormatContext *s1)
static int get_device_list(AVOpenCLDeviceList *device_list)
Definition: opencl.c:193
static int audio_write_frame(AVFormatContext *s1, int stream_index, AVFrame **frame, unsigned flags)
static int audio_write_packet(AVFormatContext *s1, AVPacket *pkt)
static int flags
Definition: cpu.c:47
#define DEFAULT_CODEC_ID
Definition: alsa-audio.h:42
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:418
static void write_header(FFV1Context *f)
Definition: ffv1enc.c:493
static int write_packet(AVFormatContext *s1, AVPacket *pkt)
Definition: v4l2enc.c:86

Definition at line 157 of file alsa-audio-enc.c.