FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_ass.c File Reference

Libass subtitles burning filter. More...

#include <ass/ass.h>
#include "config.h"
#include "libavutil/avstring.h"
#include "libavutil/imgutils.h"
#include "libavutil/opt.h"
#include "libavutil/parseutils.h"
#include "drawutils.h"
#include "avfilter.h"
#include "internal.h"
#include "formats.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  AssContext
 

Macros

#define OFFSET(x)   offsetof(AssContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define AR(c)   ( (c)>>24)
 
#define AG(c)   (((c)>>16)&0xFF)
 
#define AB(c)   (((c)>>8) &0xFF)
 
#define AA(c)   ((0xFF-c) &0xFF)
 

Functions

static void ass_log (int ass_level, const char *fmt, va_list args, void *ctx)
 
static av_cold int init (AVFilterContext *ctx, const char *args, const AVClass *class)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static void overlay_ass_image (AssContext *ass, AVFilterBufferRef *picref, const ASS_Image *image)
 
static int filter_frame (AVFilterLink *inlink, AVFilterBufferRef *picref)
 

Variables

static const AVOption options []
 
static const int ass_libavfilter_log_level_map []
 
static const AVFilterPad ass_inputs []
 
static const AVFilterPad ass_outputs []
 

Detailed Description

Libass subtitles burning filter.

See Also
{http://www.matroska.org/technical/specs/subtitles/ssa.html}

Definition in file vf_ass.c.

Macro Definition Documentation

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

Definition at line 59 of file vf_ass.c.

Definition at line 60 of file vf_ass.c.

#define AR (   c)    ( (c)>>24)

Definition at line 157 of file vf_ass.c.

Referenced by overlay_ass_image().

#define AG (   c)    (((c)>>16)&0xFF)

Definition at line 158 of file vf_ass.c.

Referenced by overlay_ass_image().

#define AB (   c)    (((c)>>8) &0xFF)

Definition at line 159 of file vf_ass.c.

Referenced by overlay_ass_image().

#define AA (   c)    ((0xFF-c) &0xFF)

Definition at line 160 of file vf_ass.c.

Referenced by overlay_ass_image().

Function Documentation

static void ass_log ( int  ass_level,
const char *  fmt,
va_list  args,
void ctx 
)
static

Definition at line 81 of file vf_ass.c.

Referenced by init().

static av_cold int init ( AVFilterContext ctx,
const char *  args,
const AVClass class 
)
static

Definition at line 89 of file vf_ass.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 123 of file vf_ass.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 136 of file vf_ass.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 142 of file vf_ass.c.

static void overlay_ass_image ( AssContext ass,
AVFilterBufferRef picref,
const ASS_Image *  image 
)
static

Definition at line 162 of file vf_ass.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFilterBufferRef picref 
)
static

Definition at line 177 of file vf_ass.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{"filename", "set the filename of file to read", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{"f", "set the filename of file to read", OFFSET(filename), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{"original_size", "set the size of the original video (used to scale fonts)", OFFSET(original_w), AV_OPT_TYPE_IMAGE_SIZE, {.str = NULL}, CHAR_MIN, CHAR_MAX, FLAGS },
{NULL},
}

Definition at line 62 of file vf_ass.c.

const int ass_libavfilter_log_level_map[]
static
Initial value:

Definition at line 70 of file vf_ass.c.

Referenced by ass_log().

const AVFilterPad ass_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
.min_perms = AV_PERM_READ | AV_PERM_WRITE,
},
{ NULL }
}

Definition at line 195 of file vf_ass.c.

const AVFilterPad ass_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 206 of file vf_ass.c.