FFmpeg  4.0
Data Structures | Macros | Enumerations | Functions
f_bench.c File Reference
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  BenchContext
 

Macros

#define OFFSET(x)   offsetof(BenchContext, x)
 
#define DEFINE_OPTIONS(filt_name, FLAGS)
 
#define START_TIME_KEY   "lavfi.bench.start_time"
 
#define T2F(v)   ((v) / 1000000.)
 

Enumerations

enum  BenchAction { ACTION_START, ACTION_STOP, NB_ACTION }
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 39 of file f_bench.c.

◆ DEFINE_OPTIONS

#define DEFINE_OPTIONS (   filt_name,
  FLAGS 
)
Value:
static const AVOption filt_name##_options[] = { \
{ "action", "set action", OFFSET(action), AV_OPT_TYPE_INT, {.i64=ACTION_START}, 0, NB_ACTION-1, FLAGS, "action" }, \
{ "start", "start timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_START}, INT_MIN, INT_MAX, FLAGS, "action" }, \
{ "stop", "stop timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_STOP}, INT_MIN, INT_MAX, FLAGS, "action" }, \
{ NULL } \
}
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: cmdutils.c:544
AVOption.
Definition: opt.h:246
#define OFFSET(x)
Definition: f_bench.c:39

Definition at line 40 of file f_bench.c.

Referenced by filter_frame().

◆ START_TIME_KEY

#define START_TIME_KEY   "lavfi.bench.start_time"

Definition at line 48 of file f_bench.c.

Referenced by filter_frame().

◆ T2F

#define T2F (   v)    ((v) / 1000000.)

Definition at line 49 of file f_bench.c.

Referenced by filter_frame().

Enumeration Type Documentation

◆ BenchAction

Enumerator
ACTION_START 
ACTION_STOP 
NB_ACTION 

Definition at line 25 of file f_bench.c.

Function Documentation

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 51 of file f_bench.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 59 of file f_bench.c.