libavcodec/srtenc.c File Reference

#include <stdarg.h>
#include "avcodec.h"
#include "libavutil/avstring.h"
#include "ass_split.h"
#include "ass.h"

Go to the source code of this file.

Data Structures

struct  SRTContext

Defines

#define SRT_STACK_SIZE   64

Functions

static void srt_print (SRTContext *s, const char *str,...)
static int srt_stack_push (SRTContext *s, const char c)
static char srt_stack_pop (SRTContext *s)
static int srt_stack_find (SRTContext *s, const char c)
static void srt_close_tag (SRTContext *s, char tag)
static void srt_stack_push_pop (SRTContext *s, const char c, int close)
static void srt_style_apply (SRTContext *s, const char *style)
static av_cold int srt_encode_init (AVCodecContext *avctx)
static void srt_text_cb (void *priv, const char *text, int len)
static void srt_new_line_cb (void *priv, int forced)
static void srt_style_cb (void *priv, char style, int close)
static void srt_color_cb (void *priv, unsigned int color, unsigned int color_id)
static void srt_font_name_cb (void *priv, const char *name)
static void srt_font_size_cb (void *priv, int size)
static void srt_alignment_cb (void *priv, int alignment)
static void srt_cancel_overrides_cb (void *priv, const char *style)
static void srt_move_cb (void *priv, int x1, int y1, int x2, int y2, int t1, int t2)
static void srt_end_cb (void *priv)
static int srt_encode_frame (AVCodecContext *avctx, unsigned char *buf, int bufsize, void *data)
static int srt_encode_close (AVCodecContext *avctx)

Variables

static const ASSCodesCallbacks srt_callbacks
AVCodec ff_srt_encoder


Define Documentation

#define SRT_STACK_SIZE   64

Definition at line 29 of file srtenc.c.

Referenced by srt_stack_push().


Function Documentation

static void srt_alignment_cb ( void *  priv,
int  alignment 
) [static]

Definition at line 187 of file srtenc.c.

static void srt_cancel_overrides_cb ( void *  priv,
const char *  style 
) [static]

Definition at line 196 of file srtenc.c.

static void srt_close_tag ( SRTContext s,
char  tag 
) [static]

Definition at line 80 of file srtenc.c.

Referenced by srt_stack_push_pop().

static void srt_color_cb ( void *  priv,
unsigned int  color,
unsigned int  color_id 
) [static]

Definition at line 163 of file srtenc.c.

static int srt_encode_close ( AVCodecContext avctx  )  [static]

Definition at line 285 of file srtenc.c.

static int srt_encode_frame ( AVCodecContext avctx,
unsigned char *  buf,
int  bufsize,
void *  data 
) [static]

Definition at line 235 of file srtenc.c.

static av_cold int srt_encode_init ( AVCodecContext avctx  )  [static]

Definition at line 136 of file srtenc.c.

static void srt_end_cb ( void *  priv  )  [static]

Definition at line 216 of file srtenc.c.

static void srt_font_name_cb ( void *  priv,
const char *  name 
) [static]

Definition at line 173 of file srtenc.c.

static void srt_font_size_cb ( void *  priv,
int  size 
) [static]

Definition at line 180 of file srtenc.c.

static void srt_move_cb ( void *  priv,
int  x1,
int  y1,
int  x2,
int  y2,
int  t1,
int  t2 
) [static]

Definition at line 202 of file srtenc.c.

static void srt_new_line_cb ( void *  priv,
int  forced 
) [static]

Definition at line 151 of file srtenc.c.

static void srt_print ( SRTContext s,
const char *  str,
  ... 
) [static]

static int srt_stack_find ( SRTContext s,
const char  c 
) [static]

Definition at line 71 of file srtenc.c.

Referenced by srt_stack_push_pop().

static char srt_stack_pop ( SRTContext s  )  [static]

Definition at line 64 of file srtenc.c.

Referenced by srt_stack_push_pop().

static int srt_stack_push ( SRTContext s,
const char  c 
) [static]

Definition at line 56 of file srtenc.c.

Referenced by srt_stack_push_pop(), and srt_style_apply().

static void srt_stack_push_pop ( SRTContext s,
const char  c,
int  close 
) [static]

static void srt_style_apply ( SRTContext s,
const char *  style 
) [static]

Definition at line 97 of file srtenc.c.

Referenced by srt_cancel_overrides_cb(), and srt_encode_frame().

static void srt_style_cb ( void *  priv,
char  style,
int  close 
) [static]

Definition at line 156 of file srtenc.c.

static void srt_text_cb ( void *  priv,
const char *  text,
int  len 
) [static]

Definition at line 144 of file srtenc.c.


Variable Documentation

Initial value:

 {
    .name           = "srt",
    .long_name      = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
    .type           = AVMEDIA_TYPE_SUBTITLE,
    .id             = CODEC_ID_SRT,
    .priv_data_size = sizeof(SRTContext),
    .init           = srt_encode_init,
    .encode         = srt_encode_frame,
    .close          = srt_encode_close,
}

Definition at line 292 of file srtenc.c.

Initial value:

 {
    .text             = srt_text_cb,
    .new_line         = srt_new_line_cb,
    .style            = srt_style_cb,
    .color            = srt_color_cb,
    .font_name        = srt_font_name_cb,
    .font_size        = srt_font_size_cb,
    .alignment        = srt_alignment_cb,
    .cancel_overrides = srt_cancel_overrides_cb,
    .move             = srt_move_cb,
    .end              = srt_end_cb,
}

Definition at line 222 of file srtenc.c.


Generated on Fri Oct 26 02:47:59 2012 for FFmpeg by  doxygen 1.5.8