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

◆ OFFSET

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

Definition at line 64 of file f_graphmonitor.c.

◆ VF

Definition at line 65 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 

Definition at line 52 of file f_graphmonitor.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 92 of file f_graphmonitor.c.

◆ clear_image()

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

Definition at line 108 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 117 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 147 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 168 of file f_graphmonitor.c.

Referenced by create_frame().

◆ create_frame()

static int create_frame ( AVFilterContext ctx,
int64_t  pts 
)
static

Definition at line 240 of file f_graphmonitor.c.

Referenced by activate().

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 307 of file f_graphmonitor.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 341 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" },
{ "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 67 of file f_graphmonitor.c.

MODE_FMT
@ MODE_FMT
Definition: f_graphmonitor.c:59
AV_OPT_TYPE_VIDEO_RATE
@ AV_OPT_TYPE_VIDEO_RATE
offset must point to AVRational
Definition: opt.h:236
w
uint8_t w
Definition: llviddspenc.c:38
OFFSET
#define OFFSET(x)
Definition: f_graphmonitor.c:64
MODE_TIME
@ MODE_TIME
Definition: f_graphmonitor.c:57
MODE_SIZE
@ MODE_SIZE
Definition: f_graphmonitor.c:60
MODE_PTS
@ MODE_PTS
Definition: f_graphmonitor.c:56
MODE_FCOUT
@ MODE_FCOUT
Definition: f_graphmonitor.c:55
NULL
#define NULL
Definition: coverity.c:32
MODE_TB
@ MODE_TB
Definition: f_graphmonitor.c:58
AV_OPT_TYPE_IMAGE_SIZE
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
Definition: opt.h:233
VF
#define VF
Definition: f_graphmonitor.c:65
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:226
MODE_RATE
@ MODE_RATE
Definition: f_graphmonitor.c:61
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
MODE_FCIN
@ MODE_FCIN
Definition: f_graphmonitor.c:54
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:222
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
MODE_QUEUE
@ MODE_QUEUE
Definition: f_graphmonitor.c:53
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:232