FFmpeg
Data Structures | Macros | Enumerations | Functions
f_bench.c File Reference
#include "config_components.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"
#include "video.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 42 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, .unit = "action" }, \
{ "start", "start timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_START}, INT_MIN, INT_MAX, FLAGS, .unit = "action" }, \
{ "stop", "stop timer", 0, AV_OPT_TYPE_CONST, {.i64=ACTION_STOP}, INT_MIN, INT_MAX, FLAGS, .unit = "action" }, \
{ NULL } \
}

Definition at line 43 of file f_bench.c.

◆ START_TIME_KEY

#define START_TIME_KEY   "lavfi.bench.start_time"

Definition at line 51 of file f_bench.c.

◆ T2F

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

Definition at line 52 of file f_bench.c.

Enumeration Type Documentation

◆ BenchAction

Enumerator
ACTION_START 
ACTION_STOP 
NB_ACTION 

Definition at line 28 of file f_bench.c.

Function Documentation

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 54 of file f_bench.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 62 of file f_bench.c.

AVOption
AVOption.
Definition: opt.h:346
FLAGS
#define FLAGS
Definition: cmdutils.c:581
NB_ACTION
@ NB_ACTION
Definition: f_bench.c:31
NULL
#define NULL
Definition: coverity.c:32
ACTION_START
@ ACTION_START
Definition: f_bench.c:29
OFFSET
#define OFFSET(x)
Definition: f_bench.c:42
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
ACTION_STOP
@ ACTION_STOP
Definition: f_bench.c:30
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:244