FFmpeg
Loading...
Searching...
No Matches
lavfi.c File Reference

libavfilter virtual input device More...

Go to the source code of this file.

Data Structures

struct  LavfiContext
 

Macros

#define FAIL(ERR)
 
#define OFFSET(x)
 
#define DEC   AV_OPT_FLAG_DECODING_PARAM
 

Functions

static av_cold int lavfi_read_close (AVFormatContext *avctx)
 
static int create_subcc_streams (AVFormatContext *avctx)
 
static av_cold int lavfi_read_header (AVFormatContext *avctx)
 
static int create_subcc_packet (AVFormatContext *avctx, AVFrame *frame, int sink_idx)
 
static void lavfi_free_frame (void *opaque, uint8_t *data)
 
static int lavfi_read_packet (AVFormatContext *avctx, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass lavfi_class
 
const FFInputFormat ff_lavfi_demuxer
 

Detailed Description

libavfilter virtual input device

Definition in file lavfi.c.

Macro Definition Documentation

◆ FAIL

#define FAIL ( ERR)
Value:
{ ret = ERR; goto end; }
#define ERR(msg)
Definition avcodec.c:37

Referenced by lavfi_read_header().

◆ OFFSET

#define OFFSET ( x)
Value:
offsetof(LavfiContext, x)

Definition at line 471 of file lavfi.c.

◆ DEC

#define DEC   AV_OPT_FLAG_DECODING_PARAM

Definition at line 473 of file lavfi.c.

Function Documentation

◆ lavfi_read_close()

static av_cold int lavfi_read_close ( AVFormatContext * avctx)
static

Definition at line 61 of file lavfi.c.

◆ create_subcc_streams()

static int create_subcc_streams ( AVFormatContext * avctx)
static

Definition at line 75 of file lavfi.c.

Referenced by lavfi_read_header().

◆ lavfi_read_header()

static av_cold int lavfi_read_header ( AVFormatContext * avctx)
static

Definition at line 100 of file lavfi.c.

◆ create_subcc_packet()

static int create_subcc_packet ( AVFormatContext * avctx,
AVFrame * frame,
int sink_idx )
static

Definition at line 337 of file lavfi.c.

Referenced by lavfi_read_packet().

◆ lavfi_free_frame()

static void lavfi_free_frame ( void * opaque,
uint8_t * data )
static

Definition at line 356 of file lavfi.c.

Referenced by lavfi_read_packet().

◆ lavfi_read_packet()

static int lavfi_read_packet ( AVFormatContext * avctx,
AVPacket * pkt )
static

Definition at line 362 of file lavfi.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "graph", "set libavfilter graph", OFFSET(graph_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
{ "graph_file","set libavfilter graph filename", OFFSET(graph_filename), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC},
{ "dumpgraph", "dump graph to stderr", OFFSET(dump_graph), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, DEC },
{ NULL },
}
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
Definition opt.h:275
#define DEC
Definition librsvgdec.c:149

Definition at line 475 of file lavfi.c.

◆ lavfi_class

const AVClass lavfi_class
static
Initial value:
= {
.class_name = "lavfi 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_INPUT
Definition log.h:46

Definition at line 482 of file lavfi.c.

◆ ff_lavfi_demuxer

const FFInputFormat ff_lavfi_demuxer
Initial value:
= {
.p.name = "lavfi",
.p.long_name = NULL_IF_CONFIG_SMALL("Libavfilter virtual input device"),
.p.flags = AVFMT_NOFILE,
.p.priv_class = &lavfi_class,
.priv_data_size = sizeof(LavfiContext),
.flags_internal = FF_INFMT_FLAG_INIT_CLEANUP,
}
#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)
#define FF_INFMT_FLAG_INIT_CLEANUP
For an FFInputFormat with this flag set read_close() needs to be called by the caller upon read_heade...
Definition demux.h:35
static int read_header(FFV1Context *f, RangeCoder *c)
Definition ffv1dec.c:578
static av_cold int lavfi_read_close(AVFormatContext *avctx)
Definition lavfi.c:61
static av_cold int lavfi_read_header(AVFormatContext *avctx)
Definition lavfi.c:100
static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
Definition lavfi.c:362
static const AVClass lavfi_class
Definition lavfi.c:482
#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

Definition at line 490 of file lavfi.c.