libavcodec/jacosubdec.c File Reference

JACOsub subtitle decoder. More...

#include <time.h>
#include "ass.h"
#include "jacosub.h"
#include "libavutil/avstring.h"
#include "libavutil/bprint.h"
Include dependency graph for libavcodec/jacosubdec.c:

Go to the source code of this file.

Enumerations

enum  {
  ALIGN_VB = 1<<0, ALIGN_VM = 1<<1, ALIGN_VT = 1<<2, ALIGN_JC = 1<<3,
  ALIGN_JL = 1<<4, ALIGN_JR = 1<<5
}
 

Functions

static int insert_text (AVBPrint *dst, const char *in, const char *arg)
 
static int insert_datetime (AVBPrint *dst, const char *in, const char *arg)
 
static int insert_color (AVBPrint *dst, const char *in, const char *arg)
 
static int insert_font (AVBPrint *dst, const char *in, const char *arg)
 
static void jacosub_to_ass (AVCodecContext *avctx, AVBPrint *dst, const char *src)
 
static int jacosub_decode_frame (AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt)
 

Variables

struct {
   const char *   from
 
   const char *   arg
 
   int(*   func )(AVBPrint *dst, const char
      *in, const char *arg)
 
ass_codes_map []
 
AVCodec ff_jacosub_decoder
 

Detailed Description

JACOsub subtitle decoder.

See also
http://unicorn.us.com/jacosub/jscripts.html

Definition in file libavcodec/jacosubdec.c.

Enumeration Type Documentation

anonymous enum
Enumerator
ALIGN_VB 
ALIGN_VM 
ALIGN_VT 
ALIGN_JC 
ALIGN_JL 
ALIGN_JR 

Definition at line 88 of file libavcodec/jacosubdec.c.

Function Documentation

static int insert_color ( AVBPrint dst,
const char *  in,
const char *  arg 
)
static

Definition at line 57 of file libavcodec/jacosubdec.c.

static int insert_datetime ( AVBPrint dst,
const char *  in,
const char *  arg 
)
static

Definition at line 41 of file libavcodec/jacosubdec.c.

static int insert_font ( AVBPrint dst,
const char *  in,
const char *  arg 
)
static

Definition at line 62 of file libavcodec/jacosubdec.c.

static int insert_text ( AVBPrint dst,
const char *  in,
const char *  arg 
)
static

Definition at line 35 of file libavcodec/jacosubdec.c.

static int jacosub_decode_frame ( AVCodecContext avctx,
void data,
int *  got_sub_ptr,
AVPacket avpkt 
)
static

Definition at line 168 of file libavcodec/jacosubdec.c.

static void jacosub_to_ass ( AVCodecContext avctx,
AVBPrint dst,
const char *  src 
)
static

Definition at line 97 of file libavcodec/jacosubdec.c.

Referenced by jacosub_decode_frame().

Variable Documentation

const { ... } ass_codes_map[]
Initial value:
= {
{"\\~", "~", insert_text},
{"~", "{\\h}", insert_text},
{"\\n", "\\N", insert_text},
{"\\D", "%d %b %Y", insert_datetime},
{"\\T", "%H:%M", insert_datetime},
{"\\N", "{\\r}", insert_text},
{"\\I", "{\\i1}", insert_text},
{"\\i", "{\\i0}", insert_text},
{"\\B", "{\\b1}", insert_text},
{"\\b", "{\\b0}", insert_text},
{"\\U", "{\\u1}", insert_text},
{"\\u", "{\\u0}", insert_text},
{"\\C", "", insert_color},
{"\\F", "", insert_font},
}
static int insert_datetime(AVBPrint *dst, const char *in, const char *arg)
static int insert_text(AVBPrint *dst, const char *in, const char *arg)
static int insert_color(AVBPrint *dst, const char *in, const char *arg)
static int insert_font(AVBPrint *dst, const char *in, const char *arg)

Referenced by jacosub_to_ass().

AVCodec ff_jacosub_decoder
Initial value:
= {
.name = "jacosub",
.long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle"),
}
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
Definition: ass.c:54
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static int jacosub_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt)

Definition at line 198 of file libavcodec/jacosubdec.c.

const char* from

Definition at line 68 of file libavcodec/jacosubdec.c.

Referenced by ff_sctp_recvmsg(), jacosub_to_ass(), and rtp_read().