FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
f_perms.c File Reference
#include "config_components.h"
#include "libavutil/lfg.h"
#include "libavutil/opt.h"
#include "libavutil/random_seed.h"
#include "audio.h"
#include "filters.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  PermsContext
 

Macros

#define OFFSET(x)   offsetof(PermsContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM
 
#define TFLAGS   AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
 

Enumerations

enum  mode {
  FF_EBUR128_MODE_M = (1 << 0), FF_EBUR128_MODE_S = (1 << 1) | FF_EBUR128_MODE_M, FF_EBUR128_MODE_I = (1 << 2) | FF_EBUR128_MODE_M, FF_EBUR128_MODE_LRA = (1 << 3) | FF_EBUR128_MODE_S,
  FF_EBUR128_MODE_SAMPLE_PEAK = (1 << 4) | FF_EBUR128_MODE_M, MODE_NONE, MODE_RO, MODE_RW,
  MODE_TOGGLE, MODE_RANDOM, NB_MODES, MODE_COVER,
  MODE_BLUR, NB_MODES, MODE_HARD, MODE_SOFT,
  MODE_MEDIUM, MODE_HARD, MODE_SOFT, NB_MODES
}
 
enum  perm { RO, RW }
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 
 AVFILTER_DEFINE_CLASS_EXT (perms, "(a)perms", options)
 

Variables

static const AVOption options []
 
static const char *const perm_str [2] = { "RO", "RW" }
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 46 of file f_perms.c.

◆ FLAGS

Definition at line 47 of file f_perms.c.

◆ TFLAGS

Definition at line 48 of file f_perms.c.

Enumeration Type Documentation

◆ mode

enum mode
Enumerator
FF_EBUR128_MODE_M 

can resurrrect and call ff_ebur128_loudness_momentary

FF_EBUR128_MODE_S 

can call ff_ebur128_loudness_shortterm

FF_EBUR128_MODE_I 

can call ff_ebur128_loudness_global_* and ff_ebur128_relative_threshold

FF_EBUR128_MODE_LRA 

can call ff_ebur128_loudness_range

FF_EBUR128_MODE_SAMPLE_PEAK 

can call ff_ebur128_sample_peak

MODE_NONE 
MODE_RO 
MODE_RW 
MODE_TOGGLE 
MODE_RANDOM 
NB_MODES 
MODE_COVER 
MODE_BLUR 
NB_MODES 
MODE_HARD 
MODE_SOFT 
MODE_MEDIUM 
MODE_HARD 
MODE_SOFT 
NB_MODES 

Definition at line 30 of file f_perms.c.

◆ perm

enum perm
Enumerator
RO 
RW 

Definition at line 75 of file f_perms.c.

Function Documentation

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 61 of file f_perms.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 78 of file f_perms.c.

◆ AVFILTER_DEFINE_CLASS_EXT()

AVFILTER_DEFINE_CLASS_EXT ( perms  ,
"(a)perms"  ,
options   
)

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "mode", "select permissions mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64 = MODE_NONE}, MODE_NONE, NB_MODES-1, TFLAGS, .unit = "mode" },
{ "none", "do nothing", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_NONE}, 0, 0, TFLAGS, .unit = "mode" },
{ "ro", "set all output frames read-only", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_RO}, 0, 0, TFLAGS, .unit = "mode" },
{ "rw", "set all output frames writable", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_RW}, 0, 0, TFLAGS, .unit = "mode" },
{ "toggle", "switch permissions", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_TOGGLE}, 0, 0, TFLAGS, .unit = "mode" },
{ "random", "set permissions randomly", 0, AV_OPT_TYPE_CONST, {.i64 = MODE_RANDOM}, 0, 0, TFLAGS, .unit = "mode" },
{ "seed", "set the seed for the random mode", OFFSET(random_seed), AV_OPT_TYPE_INT64, {.i64 = -1}, -1, UINT32_MAX, FLAGS },
{ NULL }
}

Definition at line 50 of file f_perms.c.

◆ perm_str

const char* const perm_str[2] = { "RO", "RW" }
static

Definition at line 76 of file f_perms.c.

Referenced by filter_frame().

MODE_NONE
@ MODE_NONE
Definition: f_perms.c:31
OFFSET
#define OFFSET(x)
Definition: f_perms.c:46
AV_OPT_TYPE_INT64
@ AV_OPT_TYPE_INT64
Definition: opt.h:236
TFLAGS
#define TFLAGS
Definition: f_perms.c:48
NULL
#define NULL
Definition: coverity.c:32
MODE_TOGGLE
@ MODE_TOGGLE
Definition: f_perms.c:34
MODE_RW
@ MODE_RW
Definition: f_perms.c:33
MODE_RANDOM
@ MODE_RANDOM
Definition: f_perms.c:35
NB_MODES
@ NB_MODES
Definition: f_perms.c:36
FLAGS
#define FLAGS
Definition: f_perms.c:47
MODE_RO
@ MODE_RO
Definition: f_perms.c:32
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:244