48 if (strftime(buf,
sizeof(buf),
arg, <ime))
66 int (*
func)(AVBPrint *
dst,
const char *in,
const char *
arg);
95 int i, valign = 0, halign = 0;
97 char directives[128] = {0};
100 if ((
c >=
'A' &&
c <=
'Z') ||
c ==
'[') {
101 char *p = directives;
102 char *pend = directives +
sizeof(directives) - 1;
111 if (strstr(directives,
"VB")) valign =
ALIGN_VB;
112 else if (strstr(directives,
"VM")) valign =
ALIGN_VM;
113 else if (strstr(directives,
"VT")) valign =
ALIGN_VT;
114 if (strstr(directives,
"JC")) halign =
ALIGN_JC;
115 else if (strstr(directives,
"JL")) halign =
ALIGN_JL;
116 else if (strstr(directives,
"JR")) halign =
ALIGN_JR;
117 if (valign || halign) {
120 switch (valign | halign) {
134 while (*
src && *
src !=
'\n') {
137 if (
src[0] ==
'\\' &&
src[1] ==
'\n') {
148 size_t codemap_len = strlen(
from);
150 if (!strncmp(
src,
from, codemap_len)) {
164 int *got_sub_ptr,
const AVPacket *avpkt)
167 const char *ptr = avpkt->
data;
170 if (avpkt->
size <= 0)
178 ptr = strchr(ptr,
' ');
if (!ptr)
goto end; ptr++;
179 ptr = strchr(ptr,
' ');
if (!ptr)
goto end; ptr++;
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
const FFCodec ff_jacosub_decoder
av_cold void ff_ass_decoder_flush(AVCodecContext *avctx)
Helper to flush a text subtitles decoder making use of the FFASSDecoderContext.
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
int ff_ass_add_rect(AVSubtitle *sub, const char *dialog, int readorder, int layer, const char *style, const char *speaker)
Add an ASS dialog to a subtitle.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define i(width, name, range_min, range_max)
#define CODEC_LONG_NAME(str)
#define FF_CODEC_DECODE_SUB_CB(func)
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
static av_const int av_toupper(int c)
Locale-independent conversion of ASCII characters to uppercase.
static av_always_inline int jss_whitespace(char c)
static av_always_inline const char * jss_skip_whitespace(const char *p)
int(* func)(AVBPrint *dst, const char *in, const char *arg)
static void jacosub_to_ass(AVCodecContext *avctx, AVBPrint *dst, const char *src)
static const struct @326042212152112064327374272111271355366050247340 ass_codes_map[]
static int insert_color(AVBPrint *dst, const char *in, const char *arg)
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_font(AVBPrint *dst, const char *in, const char *arg)
static int jacosub_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
#define FF_ARRAY_ELEMS(a)
main external API structure.
This structure stores compressed data.