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/ffmath.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/parseutils.h"
#include "libavutil/xga_font_data.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.

allyuv, 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 81 of file vsrc_testsrc.c.

Definition at line 82 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 },\
#define FLAGS
Definition: vsrc_testsrc.c:82
offset must point to two consecutive integers
Definition: opt.h:232
#define OFFSET(x)
Definition: vsrc_testsrc.c:81

Definition at line 84 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 },
int64_t duration
Definition: movenc-test.c:63
#define FLAGS
Definition: vsrc_testsrc.c:82
offset must point to AVRational
Definition: opt.h:235
#define OFFSET(x)
Definition: vsrc_testsrc.c:81

Definition at line 88 of file vsrc_testsrc.c.

#define COMMON_OPTIONS   SIZE_OPTIONS COMMON_OPTIONS_NOSIZE

Definition at line 95 of file vsrc_testsrc.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 102 of file vsrc_testsrc.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 117 of file vsrc_testsrc.c.

static int config_props ( AVFilterLink outlink)
static

Definition at line 124 of file vsrc_testsrc.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 137 of file vsrc_testsrc.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define COMMON_OPTIONS
Definition: vsrc_testsrc.c:95

Definition at line 97 of file vsrc_testsrc.c.