#include "config.h"#include <stdlib.h>#include <stdio.h>#include <stdint.h>#include <string.h>#include <errno.h>#include <sys/soundcard.h>#include <unistd.h>#include <fcntl.h>#include <sys/ioctl.h>#include <sys/time.h>#include <sys/select.h>#include "libavutil/log.h"#include "libavutil/opt.h"#include "libavcodec/avcodec.h"#include "libavformat/avformat.h"#include "libavformat/internal.h"Go to the source code of this file.
Data Structures | |
| struct | AudioData |
Defines | |
| #define | AUDIO_BLOCK_SIZE 4096 |
Functions | |
| static int | audio_open (AVFormatContext *s1, int is_output, const char *audio_device) |
| static int | audio_close (AudioData *s) |
| static int | audio_write_header (AVFormatContext *s1) |
| static int | audio_write_packet (AVFormatContext *s1, AVPacket *pkt) |
| static int | audio_write_trailer (AVFormatContext *s1) |
| static int | audio_read_header (AVFormatContext *s1, AVFormatParameters *ap) |
| static int | audio_read_packet (AVFormatContext *s1, AVPacket *pkt) |
| static int | audio_read_close (AVFormatContext *s1) |
Variables | |
| static const AVOption | options [] |
| static const AVClass | oss_demuxer_class |
| AVInputFormat | ff_oss_demuxer |
| AVOutputFormat | ff_oss_muxer |
| #define AUDIO_BLOCK_SIZE 4096 |
Definition at line 45 of file oss_audio.c.
Referenced by audio_write_packet().
| static int audio_close | ( | AudioData * | s | ) | [static] |
Definition at line 146 of file oss_audio.c.
Referenced by audio_read_close(), and audio_write_trailer().
| static int audio_open | ( | AVFormatContext * | s1, | |
| int | is_output, | |||
| const char * | audio_device | |||
| ) | [static] |
Definition at line 59 of file oss_audio.c.
Referenced by audio_read_header(), and audio_write_header().
| static int audio_read_close | ( | AVFormatContext * | s1 | ) | [static] |
Definition at line 276 of file oss_audio.c.
| static int audio_read_header | ( | AVFormatContext * | s1, | |
| AVFormatParameters * | ap | |||
| ) | [static] |
Definition at line 207 of file oss_audio.c.
| static int audio_read_packet | ( | AVFormatContext * | s1, | |
| AVPacket * | pkt | |||
| ) | [static] |
Definition at line 233 of file oss_audio.c.
| static int audio_write_header | ( | AVFormatContext * | s1 | ) | [static] |
Definition at line 153 of file oss_audio.c.
| static int audio_write_packet | ( | AVFormatContext * | s1, | |
| AVPacket * | pkt | |||
| ) | [static] |
Definition at line 170 of file oss_audio.c.
| static int audio_write_trailer | ( | AVFormatContext * | s1 | ) | [static] |
Definition at line 197 of file oss_audio.c.
{
.name = "oss",
.long_name = NULL_IF_CONFIG_SMALL("Open Sound System capture"),
.priv_data_size = sizeof(AudioData),
.read_header = audio_read_header,
.read_packet = audio_read_packet,
.read_close = audio_read_close,
.flags = AVFMT_NOFILE,
.priv_class = &oss_demuxer_class,
}
Definition at line 298 of file oss_audio.c.
{
.name = "oss",
.long_name = NULL_IF_CONFIG_SMALL("Open Sound System playback"),
.priv_data_size = sizeof(AudioData),
.audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
.video_codec = CODEC_ID_NONE,
.write_header = audio_write_header,
.write_packet = audio_write_packet,
.write_trailer = audio_write_trailer,
.flags = AVFMT_NOFILE,
}
Definition at line 311 of file oss_audio.c.
{
{ "sample_rate", "", 0x42, AV_OPT_TYPE_INT, {.dbl = 48000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ "channels", "", 0x42, AV_OPT_TYPE_INT, {.dbl = 2}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}
Definition at line 285 of file oss_audio.c.
const AVClass oss_demuxer_class [static] |
{
.class_name = "OSS demuxer",
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
}
Definition at line 291 of file oss_audio.c.