FFmpeg
Data Structures | Macros | Functions | Variables
vf_freezedetect.c File Reference

video freeze detection filter More...

#include "libavutil/avassert.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libavutil/timestamp.h"
#include "avfilter.h"
#include "filters.h"
#include "scene_sad.h"

Go to the source code of this file.

Data Structures

struct  FreezeDetectContext
 

Macros

#define OFFSET(x)   offsetof(FreezeDetectContext, x)
 
#define V   AV_OPT_FLAG_VIDEO_PARAM
 
#define F   AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (freezedetect)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int is_frozen (FreezeDetectContext *s, AVFrame *reference, AVFrame *frame)
 
static int set_meta (FreezeDetectContext *s, AVFrame *frame, const char *key, const char *value)
 
static int activate (AVFilterContext *ctx)
 

Variables

static const AVOption freezedetect_options []
 
static const AVFilterPad freezedetect_inputs []
 
static const AVFilterPad freezedetect_outputs []
 
AVFilter ff_vf_freezedetect
 

Detailed Description

video freeze detection filter

Definition in file vf_freezedetect.c.

Macro Definition Documentation

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

Definition at line 50 of file vf_freezedetect.c.

#define V   AV_OPT_FLAG_VIDEO_PARAM

Definition at line 51 of file vf_freezedetect.c.

Definition at line 52 of file vf_freezedetect.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( freezedetect  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 65 of file vf_freezedetect.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 100 of file vf_freezedetect.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 121 of file vf_freezedetect.c.

static int is_frozen ( FreezeDetectContext s,
AVFrame reference,
AVFrame frame 
)
static

Definition at line 127 of file vf_freezedetect.c.

Referenced by activate().

static int set_meta ( FreezeDetectContext s,
AVFrame frame,
const char *  key,
const char *  value 
)
static

Definition at line 147 of file vf_freezedetect.c.

Referenced by activate().

static int activate ( AVFilterContext ctx)
static

Definition at line 153 of file vf_freezedetect.c.

Variable Documentation

const AVOption freezedetect_options[]
static
Initial value:
= {
{ "n", "set noise tolerance", OFFSET(noise), AV_OPT_TYPE_DOUBLE, {.dbl=0.001}, 0, 1.0, V|F },
{ "noise", "set noise tolerance", OFFSET(noise), AV_OPT_TYPE_DOUBLE, {.dbl=0.001}, 0, 1.0, V|F },
{ "d", "set minimum duration in seconds", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64=2000000}, 0, INT64_MAX, V|F },
{ "duration", "set minimum duration in seconds", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64=2000000}, 0, INT64_MAX, V|F },
{NULL}
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
#define F
int64_t duration
Definition: movenc.c:63
#define V
static int noise(AVBSFContext *ctx, AVPacket *pkt)
Definition: noise_bsf.c:38

Definition at line 54 of file vf_freezedetect.c.

const AVFilterPad freezedetect_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)

Definition at line 208 of file vf_freezedetect.c.

const AVFilterPad freezedetect_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 217 of file vf_freezedetect.c.

AVFilter ff_vf_freezedetect
Initial value:
= {
.name = "freezedetect",
.description = NULL_IF_CONFIG_SMALL("Detects frozen video input."),
.priv_size = sizeof(FreezeDetectContext),
.priv_class = &freezedetect_class,
}
static const AVFilterPad freezedetect_outputs[]
static int query_formats(AVFilterContext *ctx)
static int activate(AVFilterContext *ctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad freezedetect_inputs[]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs

Definition at line 225 of file vf_freezedetect.c.