FFmpeg
Loading...
Searching...
No Matches
oss_dec.c File Reference
#include "config.h"
#include <stdint.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "avdevice.h"
#include "libavformat/demux.h"
#include "libavformat/internal.h"
#include "oss.h"

Go to the source code of this file.

Functions

static int audio_read_header (AVFormatContext *s1)
 
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
 
const FFInputFormat ff_oss_demuxer
 

Function Documentation

◆ audio_read_header()

static int audio_read_header ( AVFormatContext * s1)
static

Definition at line 43 of file oss_dec.c.

◆ audio_read_packet()

static int audio_read_packet ( AVFormatContext * s1,
AVPacket * pkt )
static

Definition at line 69 of file oss_dec.c.

◆ audio_read_close()

static int audio_read_close ( AVFormatContext * s1)
static

Definition at line 112 of file oss_dec.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "sample_rate", "", 0x42 , AV_OPT_TYPE_INT, {.i64 = 48000}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ "channels", "", 0x42 , AV_OPT_TYPE_INT, {.i64 = 2}, 1, INT_MAX, AV_OPT_FLAG_DECODING_PARAM },
{ NULL },
}
#define NULL
Definition coverity.c:32
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
Definition opt.h:355
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258

Definition at line 120 of file oss_dec.c.

◆ oss_demuxer_class

const AVClass oss_demuxer_class
static
Initial value:
= {
.class_name = "OSS indev",
.item_name = av_default_item_name,
.option = options,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85
@ AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT
Definition log.h:44

Definition at line 126 of file oss_dec.c.

◆ ff_oss_demuxer

const FFInputFormat ff_oss_demuxer
Initial value:
= {
.p.name = "oss",
.p.long_name = NULL_IF_CONFIG_SMALL("OSS (Open Sound System) capture"),
.p.flags = AVFMT_NOFILE,
.p.priv_class = &oss_demuxer_class,
.priv_data_size = sizeof(OSSAudioData),
}
static av_cold int audio_read_header(AVFormatContext *s1)
Definition alsa_dec.c:61
static int audio_read_packet(AVFormatContext *s1, AVPacket *pkt)
Definition alsa_dec.c:106
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition avformat.h:488
static int read_packet(void *opaque, uint8_t *buf, int buf_size)
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
static int audio_read_close(AVFormatContext *context)
Definition jack.c:323
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
static av_cold int read_close(AVFormatContext *ctx)
Definition libcdio.c:143
static const AVClass oss_demuxer_class
Definition oss_dec.c:126

Definition at line 134 of file oss_dec.c.