FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
f_graphmonitor.c File Reference
#include "float.h"
#include "libavutil/pixdesc.h"
#include "libavutil/eval.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/timestamp.h"
#include "libavutil/xga_font_data.h"
#include "avfilter.h"
#include "filters.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  GraphMonitorContext
 

Macros

#define OFFSET(x)   offsetof(GraphMonitorContext, x)
 
#define VF   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Enumerations

enum  {
  MODE_QUEUE = 1 << 0, MODE_FCIN = 1 << 1, MODE_FCOUT = 1 << 2, MODE_PTS = 1 << 3,
  MODE_TIME = 1 << 4, MODE_TB = 1 << 5, MODE_FMT = 1 << 6, MODE_SIZE = 1 << 7,
  MODE_RATE = 1 << 8
}
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static void clear_image (GraphMonitorContext *s, AVFrame *out, AVFilterLink *outlink)
 
static void drawtext (AVFrame *pic, int x, int y, const char *txt, uint8_t *color)
 
static int filter_have_queued (AVFilterContext *filter)
 
static void draw_items (AVFilterContext *ctx, AVFrame *out, int xpos, int ypos, AVFilterLink *l, size_t frames)
 
static int create_frame (AVFilterContext *ctx, int64_t pts)
 
static int activate (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 

Variables

static const AVOption graphmonitor_options []
 

Macro Definition Documentation

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

Definition at line 64 of file f_graphmonitor.c.

Definition at line 65 of file f_graphmonitor.c.

Enumeration Type Documentation

anonymous enum
Enumerator
MODE_QUEUE 
MODE_FCIN 
MODE_FCOUT 
MODE_PTS 
MODE_TIME 
MODE_TB 
MODE_FMT 
MODE_SIZE 
MODE_RATE 

Definition at line 52 of file f_graphmonitor.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 92 of file f_graphmonitor.c.

Referenced by config_output().

static void clear_image ( GraphMonitorContext s,
AVFrame out,
AVFilterLink outlink 
)
static

Definition at line 108 of file f_graphmonitor.c.

Referenced by create_frame().

static void drawtext ( AVFrame pic,
int  x,
int  y,
const char *  txt,
uint8_t color 
)
static

Definition at line 117 of file f_graphmonitor.c.

Referenced by create_frame(), and draw_items().

static int filter_have_queued ( AVFilterContext filter)
static

Definition at line 147 of file f_graphmonitor.c.

Referenced by create_frame().

static void draw_items ( AVFilterContext ctx,
AVFrame out,
int  xpos,
int  ypos,
AVFilterLink l,
size_t  frames 
)
static

Definition at line 168 of file f_graphmonitor.c.

Referenced by create_frame().

static int create_frame ( AVFilterContext ctx,
int64_t  pts 
)
static

Definition at line 240 of file f_graphmonitor.c.

Referenced by activate().

static int activate ( AVFilterContext ctx)
static

Definition at line 307 of file f_graphmonitor.c.

Referenced by config_output().

static int config_output ( AVFilterLink outlink)
static

Definition at line 341 of file f_graphmonitor.c.

Variable Documentation

const AVOption graphmonitor_options[]
static
Initial value:
= {
{ "size", "set monitor size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="hd720"}, 0, 0, VF },
{ "s", "set monitor size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str="hd720"}, 0, 0, VF },
{ "opacity", "set video opacity", OFFSET(opacity), AV_OPT_TYPE_FLOAT, {.dbl=.9}, 0, 1, VF },
{ "o", "set video opacity", OFFSET(opacity), AV_OPT_TYPE_FLOAT, {.dbl=.9}, 0, 1, VF },
{ "mode", "set mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, VF, "mode" },
{ "m", "set mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, VF, "mode" },
{ "full", NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, VF, "mode" },
{ "compact", NULL, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, VF, "mode" },
{ "flags", "set flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64=MODE_QUEUE}, 0, INT_MAX, VF, "flags" },
{ "f", "set flags", OFFSET(flags), AV_OPT_TYPE_FLAGS, {.i64=MODE_QUEUE}, 0, INT_MAX, VF, "flags" },
{ "queue", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_QUEUE}, 0, 0, VF, "flags" },
{ "frame_count_in", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_FCOUT}, 0, 0, VF, "flags" },
{ "frame_count_out", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_FCIN}, 0, 0, VF, "flags" },
{ "pts", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_PTS}, 0, 0, VF, "flags" },
{ "time", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_TIME}, 0, 0, VF, "flags" },
{ "timebase", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_TB}, 0, 0, VF, "flags" },
{ "format", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_FMT}, 0, 0, VF, "flags" },
{ "size", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_SIZE}, 0, 0, VF, "flags" },
{ "rate", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_RATE}, 0, 0, VF, "flags" },
{ "rate", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, VF },
{ "r", "set video rate", OFFSET(frame_rate), AV_OPT_TYPE_VIDEO_RATE, {.str = "25"}, 0, INT_MAX, VF },
{ NULL }
}
#define NULL
Definition: coverity.c:32
uint8_t w
Definition: llviddspenc.c:38
offset must point to AVRational
Definition: opt.h:236
offset must point to two consecutive integers
Definition: opt.h:233
#define flags(name, subs,...)
Definition: cbs_av1.c:561
#define VF
#define OFFSET(x)
mode
Use these values in ebur128_init (or&#39;ed).
Definition: ebur128.h:83

Definition at line 67 of file f_graphmonitor.c.