FFmpeg
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 } \
}

Definition at line 40 of file f_bench.c.

◆ START_TIME_KEY

#define START_TIME_KEY   "lavfi.bench.start_time"

Definition at line 48 of file f_bench.c.

◆ T2F

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

Definition at line 49 of file f_bench.c.

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.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 59 of file f_bench.c.

AVOption
AVOption.
Definition: opt.h:246
FLAGS
#define FLAGS
Definition: cmdutils.c:544
NB_ACTION
@ NB_ACTION
Definition: f_bench.c:28
NULL
#define NULL
Definition: coverity.c:32
ACTION_START
@ ACTION_START
Definition: f_bench.c:26
OFFSET
#define OFFSET(x)
Definition: f_bench.c:39
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
ACTION_STOP
@ ACTION_STOP
Definition: f_bench.c:27
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:232