FFmpeg
Data Structures | Macros | Functions | Variables
libcdio.c File Reference
#include "config.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavformat/avformat.h"
#include "libavformat/demux.h"
#include "libavformat/internal.h"

Go to the source code of this file.

Data Structures

struct  CDIOContext
 

Macros

#define OFFSET(x)   offsetof(CDIOContext, x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static av_cold int read_header (AVFormatContext *ctx)
 
static int read_packet (AVFormatContext *ctx, AVPacket *pkt)
 
static av_cold int read_close (AVFormatContext *ctx)
 
static int read_seek (AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
 

Variables

static const AVOption options []
 
static const AVClass libcdio_class
 
const FFInputFormat ff_libcdio_demuxer
 

Detailed Description

libcdio CD grabbing

Definition in file libcdio.c.

Macro Definition Documentation

◆ OFFSET

#define OFFSET (   x)    offsetof(CDIOContext, x)

Definition at line 162 of file libcdio.c.

◆ DEC

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 163 of file libcdio.c.

Function Documentation

◆ read_header()

static av_cold int read_header ( AVFormatContext ctx)
static

Definition at line 54 of file libcdio.c.

◆ read_packet()

static int read_packet ( AVFormatContext ctx,
AVPacket pkt 
)
static

Definition at line 115 of file libcdio.c.

◆ read_close()

static av_cold int read_close ( AVFormatContext ctx)
static

Definition at line 143 of file libcdio.c.

◆ read_seek()

static int read_seek ( AVFormatContext ctx,
int  stream_index,
int64_t  timestamp,
int  flags 
)
static

Definition at line 151 of file libcdio.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "speed", "set drive reading speed", OFFSET(speed), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, DEC },
{ "paranoia_mode", "set error recovery mode", OFFSET(paranoia_mode), AV_OPT_TYPE_FLAGS, { .i64 = PARANOIA_MODE_DISABLE }, INT_MIN, INT_MAX, DEC, .unit = "paranoia_mode" },
{ "disable", "apply no fixups", 0, AV_OPT_TYPE_CONST, { .i64 = PARANOIA_MODE_DISABLE }, 0, 0, DEC, .unit = "paranoia_mode" },
{ "verify", "verify data integrity in overlap area", 0, AV_OPT_TYPE_CONST, { .i64 = PARANOIA_MODE_VERIFY }, 0, 0, DEC, .unit = "paranoia_mode" },
{ "overlap", "perform overlapped reads", 0, AV_OPT_TYPE_CONST, { .i64 = PARANOIA_MODE_OVERLAP }, 0, 0, DEC, .unit = "paranoia_mode" },
{ "neverskip", "do not skip failed reads", 0, AV_OPT_TYPE_CONST, { .i64 = PARANOIA_MODE_NEVERSKIP }, 0, 0, DEC, .unit = "paranoia_mode" },
{ "full", "apply all recovery modes", 0, AV_OPT_TYPE_CONST, { .i64 = PARANOIA_MODE_FULL }, 0, 0, DEC, .unit = "paranoia_mode" },
{ NULL },
}

Definition at line 164 of file libcdio.c.

◆ libcdio_class

const AVClass libcdio_class
static
Initial value:
= {
.class_name = "libcdio indev",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 175 of file libcdio.c.

◆ ff_libcdio_demuxer

const FFInputFormat ff_libcdio_demuxer
Initial value:
= {
.p.name = "libcdio",
.p.flags = AVFMT_NOFILE,
.p.priv_class = &libcdio_class,
.read_header = read_header,
.read_packet = read_packet,
.read_close = read_close,
.read_seek = read_seek,
.priv_data_size = sizeof(CDIOContext),
}

Definition at line 183 of file libcdio.c.

CDIOContext
Definition: libcdio.c:43
read_seek
static int read_seek(AVFormatContext *ctx, int stream_index, int64_t timestamp, int flags)
Definition: libcdio.c:151
read_close
static av_cold int read_close(AVFormatContext *ctx)
Definition: libcdio.c:143
OFFSET
#define OFFSET(x)
Definition: libcdio.c:162
AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT
@ AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT
Definition: log.h:43
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
read_header
static av_cold int read_header(AVFormatContext *ctx)
Definition: libcdio.c:54
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:237
AVFMT_NOFILE
#define AVFMT_NOFILE
Demuxer will use avio_open, no opened file should be provided by the caller.
Definition: avformat.h:468
options
static const AVOption options[]
Definition: libcdio.c:164
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
read_packet
static int read_packet(AVFormatContext *ctx, AVPacket *pkt)
Definition: libcdio.c:115
DEC
#define DEC
Definition: libcdio.c:163
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:234
libcdio_class
static const AVClass libcdio_class
Definition: libcdio.c:175
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:244