FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vsrc_testsrc.c File Reference

Misc test sources. More...

#include <float.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"

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
 

Functions

static av_cold int init (AVFilterContext *ctx, const char *args)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int config_props (AVFilterLink *outlink)
 
static int request_frame (AVFilterLink *outlink)
 

Variables

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 is by Paul B Mahol.

Definition in file vsrc_testsrc.c.

Macro Definition Documentation

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

Definition at line 75 of file vsrc_testsrc.c.

Definition at line 76 of file vsrc_testsrc.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx,
const char *  args 
)
static

Definition at line 97 of file vsrc_testsrc.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 148 of file vsrc_testsrc.c.

static int config_props ( AVFilterLink outlink)
static

Definition at line 156 of file vsrc_testsrc.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 169 of file vsrc_testsrc.c.

Variable Documentation

const AVOption options[]
static
Initial 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_str), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, FLAGS },
{ "r", "set video rate", OFFSET(frame_rate_str), AV_OPT_TYPE_STRING, {.str = "25"}, 0, 0, FLAGS },
{ "duration", "set video duration", OFFSET(duration_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },
{ "d", "set video duration", OFFSET(duration_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS },
{ "sar", "set video sample aspect ratio", OFFSET(sar), AV_OPT_TYPE_RATIONAL, {.dbl= 1}, 0, INT_MAX, FLAGS },
{ "color", "set color", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "c", "set color", OFFSET(color_str), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{ "decimals", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGS },
{ "n", "set number of decimals to show", OFFSET(nb_decimals), AV_OPT_TYPE_INT, {.i64=0}, INT_MIN, INT_MAX, FLAGS },
{ NULL },
}

Definition at line 78 of file vsrc_testsrc.c.