FFmpeg
 All Data Structures Namespaces 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/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"

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 SIZE_OPTIONS
 
#define COMMON_OPTIONS_NOSIZE
 
#define COMMON_OPTIONS   SIZE_OPTIONS COMMON_OPTIONS_NOSIZE
 

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 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 OFFSET (   x)    offsetof(TestSourceContext, x)

Definition at line 79 of file vsrc_testsrc.c.

Definition at line 80 of file vsrc_testsrc.c.

#define SIZE_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 },\

Definition at line 82 of file vsrc_testsrc.c.

#define COMMON_OPTIONS_NOSIZE
Value:
{ "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 },

Definition at line 86 of file vsrc_testsrc.c.

#define COMMON_OPTIONS   SIZE_OPTIONS COMMON_OPTIONS_NOSIZE

Definition at line 93 of file vsrc_testsrc.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 100 of file vsrc_testsrc.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 115 of file vsrc_testsrc.c.

static int config_props ( AVFilterLink outlink)
static

Definition at line 122 of file vsrc_testsrc.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 135 of file vsrc_testsrc.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ NULL }
}

Definition at line 95 of file vsrc_testsrc.c.