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, MODE_EOF = 1 << 9
}
 

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

◆ OFFSET

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

Definition at line 67 of file f_graphmonitor.c.

◆ VF

Definition at line 68 of file f_graphmonitor.c.

Enumeration Type Documentation

◆ anonymous enum

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

Definition at line 54 of file f_graphmonitor.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 96 of file f_graphmonitor.c.

◆ clear_image()

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

Definition at line 112 of file f_graphmonitor.c.

Referenced by create_frame().

◆ drawtext()

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

Definition at line 121 of file f_graphmonitor.c.

Referenced by create_frame(), and draw_items().

◆ filter_have_queued()

static int filter_have_queued ( AVFilterContext filter)
static

Definition at line 151 of file f_graphmonitor.c.

Referenced by create_frame().

◆ draw_items()

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

Definition at line 172 of file f_graphmonitor.c.

Referenced by create_frame().

◆ create_frame()

static int create_frame ( AVFilterContext ctx,
int64_t  pts 
)
static

Definition at line 249 of file f_graphmonitor.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 316 of file f_graphmonitor.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 354 of file f_graphmonitor.c.

Variable Documentation

◆ graphmonitor_options

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" },
{ "eof", NULL, 0, AV_OPT_TYPE_CONST, {.i64=MODE_EOF}, 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 }
}

Definition at line 70 of file f_graphmonitor.c.

MODE_TB
@ MODE_TB
Definition: f_graphmonitor.c:60
MODE_SIZE
@ MODE_SIZE
Definition: f_graphmonitor.c:62
MODE_RATE
@ MODE_RATE
Definition: f_graphmonitor.c:63
AV_OPT_TYPE_VIDEO_RATE
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
Definition: opt.h:238
w
uint8_t w
Definition: llviddspenc.c:39
OFFSET
#define OFFSET(x)
Definition: f_graphmonitor.c:67
MODE_FCOUT
@ MODE_FCOUT
Definition: f_graphmonitor.c:57
MODE_FCIN
@ MODE_FCIN
Definition: f_graphmonitor.c:56
MODE_TIME
@ MODE_TIME
Definition: f_graphmonitor.c:59
NULL
#define NULL
Definition: coverity.c:32
AV_OPT_TYPE_IMAGE_SIZE
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
Definition: opt.h:235
VF
#define VF
Definition: f_graphmonitor.c:68
MODE_EOF
@ MODE_EOF
Definition: f_graphmonitor.c:64
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
MODE_QUEUE
@ MODE_QUEUE
Definition: f_graphmonitor.c:55
MODE_PTS
@ MODE_PTS
Definition: f_graphmonitor.c:58
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
MODE_FMT
@ MODE_FMT
Definition: f_graphmonitor.c:61
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:224
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:234