vsrc_testsrc.c File Reference

Misc test sources. More...

#include <float.h>
#include "libavutil/avassert.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/parseutils.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
Include dependency graph for vsrc_testsrc.c:

Go to the source code of this file.

Data Structures

struct  TestSourceContext
 

Macros

#define OFFSET(x)   offsetof(TestSourceContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define COMMON_OPTIONS
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int config_props (AVFilterLink *outlink)
 
static int request_frame (AVFilterLink *outlink)
 

Variables

static const AVOption color_options []
 
static const AVOption options []
 

Detailed Description

Misc test sources.

testsrc is based on the test pattern generator demuxer by Nicolas George: http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2007-October/037845.html

rgbtestsrc is ported from MPlayer libmpcodecs/vf_rgbtest.c by Michael Niedermayer.

smptebars and smptehdbars are by Paul B Mahol.

Definition in file vsrc_testsrc.c.

Macro Definition Documentation

#define COMMON_OPTIONS
Value:
{ "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "320x240"}, 0, 0, FLAGS },\
{ "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "320x240"}, 0, 0, FLAGS },\
{ "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, FLAGS },\
{ "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, 0, FLAGS },\
{ "duration", "set video duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = -1}, -1, INT64_MAX, FLAGS },\
{ "d", "set video duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = -1}, -1, INT64_MAX, FLAGS },\
{ "sar", "set video sample aspect ratio", OFFSET(sar), AV_OPT_TYPE_RATIONAL, {.dbl= 1}, 0, INT_MAX, FLAGS },
output residual component w
static int64_t duration
Definition: ffplay.c:294
#define FLAGS
Definition: vsrc_testsrc.c:75
offset must point to AVRational
Definition: opt.h:233
offset must point to two consecutive integers
Definition: opt.h:230
#define OFFSET(x)
Definition: vsrc_testsrc.c:74

Definition at line 77 of file vsrc_testsrc.c.

Definition at line 75 of file vsrc_testsrc.c.

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

Definition at line 74 of file vsrc_testsrc.c.

Function Documentation

static int config_props ( AVFilterLink outlink)
static

Definition at line 146 of file vsrc_testsrc.c.

Referenced by request_frame().

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 105 of file vsrc_testsrc.c.

Referenced by request_frame().

static int request_frame ( AVFilterLink outlink)
static

Definition at line 159 of file vsrc_testsrc.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 139 of file vsrc_testsrc.c.

Referenced by request_frame().

Variable Documentation

const AVOption color_options[]
static
Initial value:
= {
{ "color", "set color", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str = "black"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "c", "set color", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str = "black"}, CHAR_MIN, CHAR_MAX, FLAGS },
{ NULL },
}
#define COMMON_OPTIONS
Definition: vsrc_testsrc.c:77
#define FLAGS
Definition: vsrc_testsrc.c:75
NULL
Definition: eval.c:55
#define OFFSET(x)
Definition: vsrc_testsrc.c:74

Definition at line 87 of file vsrc_testsrc.c.

const AVOption options[]
static
Initial value:
= {
{ "decimals", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.i64=0}, 0, 17, FLAGS },
{ "n", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.i64=0}, 0, 17, FLAGS },
{ NULL },
}
#define COMMON_OPTIONS
Definition: vsrc_testsrc.c:77
#define FLAGS
Definition: vsrc_testsrc.c:75
NULL
Definition: eval.c:55
#define OFFSET(x)
Definition: vsrc_testsrc.c:74

Definition at line 96 of file vsrc_testsrc.c.