All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_ocr.c File Reference
#include <tesseract/capi.h>
#include "libavutil/opt.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  OCRContext


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


static av_cold int init (AVFilterContext *ctx)
static int query_formats (AVFilterContext *ctx)
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
static av_cold void uninit (AVFilterContext *ctx)


static const AVOption ocr_options []
static const AVFilterPad ocr_inputs []
static const AVFilterPad ocr_outputs []
AVFilter ff_vf_ocr

Macro Definition Documentation

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

Definition at line 40 of file vf_ocr.c.

Definition at line 41 of file vf_ocr.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx)

Definition at line 51 of file vf_ocr.c.

static int query_formats ( AVFilterContext ctx)

Definition at line 76 of file vf_ocr.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 

Definition at line 98 of file vf_ocr.c.

static av_cold void uninit ( AVFilterContext ctx)

Definition at line 114 of file vf_ocr.c.


Variable Documentation

const AVOption ocr_options[]
Initial value:
= {
{ "datapath", "set datapath", OFFSET(datapath), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS },
{ "language", "set language", OFFSET(language), AV_OPT_TYPE_STRING, {.str="eng"}, 0, 0, FLAGS },
{ "whitelist", "set character whitelist", OFFSET(whitelist), AV_OPT_TYPE_STRING, {.str="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.:;,-+_!?\"'[]{}()<>|/\\=*&%$#@!~"}, 0, 0, FLAGS },
{ "blacklist", "set character blacklist", OFFSET(blacklist), AV_OPT_TYPE_STRING, {.str=""}, 0, 0, FLAGS },
{ NULL }
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: vf_ocr.c:41
#define OFFSET(x)
Definition: vf_ocr.c:40

Definition at line 43 of file vf_ocr.c.

const AVFilterPad ocr_inputs[]
Initial value:
= {
.name = "default",
.filter_frame = filter_frame,
{ NULL }
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_ocr.c:98

Definition at line 124 of file vf_ocr.c.

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

Definition at line 133 of file vf_ocr.c.

AVFilter ff_vf_ocr
Initial value:
= {
.name = "ocr",
.description = NULL_IF_CONFIG_SMALL("Optical Character Recognition."),
.priv_size = sizeof(OCRContext),
.priv_class = &ocr_class,
.init = init,
static const AVFilterPad ocr_outputs[]
Definition: vf_ocr.c:133
static av_cold int init(AVFilterContext *ctx)
Definition: vf_ocr.c:51
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_ocr.c:114
static int query_formats(AVFilterContext *ctx)
Definition: vf_ocr.c:76
static const AVFilterPad ocr_inputs[]
Definition: vf_ocr.c:124
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376

Definition at line 141 of file vf_ocr.c.