FFmpeg
Loading...
Searching...
No Matches
f_bench.c File Reference
#include "config_components.h"
#include "libavutil/opt.h"
#include "libavutil/time.h"
#include "audio.h"
#include "avfilter.h"
#include "filters.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  BenchContext
 

Macros

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

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)
Value:
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 } \
}
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
@ NB_ACTION
Definition f_bench.c:31
@ ACTION_STOP
Definition f_bench.c:30
@ ACTION_START
Definition f_bench.c:29
#define OFFSET(x)
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
AVOption.
Definition opt.h:428

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.

Referenced by filter_frame().

◆ T2F

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

Definition at line 52 of file f_bench.c.

Referenced by filter_frame().

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.