libavfilter/vf_ass.c File Reference

Libass subtitles burning filter. More...

#include <ass/ass.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

Defines

#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

 AVFILTER_DEFINE_CLASS (ass)
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)
static av_cold void uninit (AVFilterContext *ctx)
static int query_formats (AVFilterContext *ctx)
static int config_input (AVFilterLink *inlink)
static int null_draw_slice (AVFilterLink *link, int y, int h, int slice_dir)
static void overlay_ass_image (AssContext *ass, AVFilterBufferRef *picref, const ASS_Image *image)
static int end_frame (AVFilterLink *inlink)

Variables

static const AVOption ass_options []
static const int ass_libavfilter_log_level_map []
AVFilter avfilter_vf_ass


Detailed Description

Libass subtitles burning filter.

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

Definition in file vf_ass.c.


Define Documentation

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

Definition at line 165 of file vf_ass.c.

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

Definition at line 164 of file vf_ass.c.

Referenced by overlay_ass_image().

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

Definition at line 163 of file vf_ass.c.

Referenced by overlay_ass_image().

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

Definition at line 162 of file vf_ass.c.

Referenced by overlay_ass_image().

#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM

Definition at line 54 of file vf_ass.c.

#define OFFSET (  )     offsetof(AssContext, x)

Definition at line 53 of file vf_ass.c.


Function Documentation

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

Definition at line 75 of file vf_ass.c.

Referenced by init().

AVFILTER_DEFINE_CLASS ( ass   ) 

static int config_input ( AVFilterLink inlink  )  [static]

Definition at line 145 of file vf_ass.c.

static int end_frame ( AVFilterLink inlink  )  [static]

Definition at line 182 of file vf_ass.c.

static av_cold int init ( AVFilterContext ctx,
const char *  args 
) [static]

Definition at line 83 of file vf_ass.c.

static int null_draw_slice ( AVFilterLink link,
int  y,
int  h,
int  slice_dir 
) [static]

Definition at line 159 of file vf_ass.c.

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

Definition at line 167 of file vf_ass.c.

Referenced by end_frame().

static int query_formats ( AVFilterContext ctx  )  [static]

Definition at line 139 of file vf_ass.c.

static av_cold void uninit ( AVFilterContext ctx  )  [static]

Definition at line 126 of file vf_ass.c.


Variable Documentation

Initial value:

Definition at line 64 of file vf_ass.c.

Referenced by ass_log().

const AVOption ass_options[] [static]

Initial value:

 {
    {"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 56 of file vf_ass.c.

Initial value:

 {
    .name          = "ass",
    .description   = NULL_IF_CONFIG_SMALL("Render subtitles onto input video using the libass library."),
    .priv_size     = sizeof(AssContext),
    .init          = init,
    .uninit        = uninit,
    .query_formats = query_formats,

    .inputs = (const AVFilterPad[]) {
        { .name             = "default",
          .type             = AVMEDIA_TYPE_VIDEO,
          .get_video_buffer = ff_null_get_video_buffer,
          .start_frame      = ff_null_start_frame,
          .draw_slice       = null_draw_slice,
          .end_frame        = end_frame,
          .config_props     = config_input,
          .min_perms        = AV_PERM_WRITE | AV_PERM_READ },
        { .name = NULL}
    },
    .outputs = (const AVFilterPad[]) {
        { .name             = "default",
          .type             = AVMEDIA_TYPE_VIDEO, },
        { .name = NULL}
    },
    .priv_class = &ass_class,
}

Definition at line 202 of file vf_ass.c.


Generated on Fri Oct 26 02:50:10 2012 for FFmpeg by  doxygen 1.5.8