Go to the documentation of this file.
50 if (strftime(buf,
sizeof(buf),
arg, <ime))
68 int (*
func)(AVBPrint *dst,
const char *in,
const char *
arg);
97 int i, valign = 0, halign = 0;
99 char directives[128] = {0};
102 if ((
c >=
'A' &&
c <=
'Z') ||
c ==
'[') {
103 char *p = directives;
104 char *pend = directives +
sizeof(directives) - 1;
113 if (strstr(directives,
"VB")) valign =
ALIGN_VB;
114 else if (strstr(directives,
"VM")) valign =
ALIGN_VM;
115 else if (strstr(directives,
"VT")) valign =
ALIGN_VT;
116 if (strstr(directives,
"JC")) halign =
ALIGN_JC;
117 else if (strstr(directives,
"JL")) halign =
ALIGN_JL;
118 else if (strstr(directives,
"JR")) halign =
ALIGN_JR;
119 if (valign || halign) {
122 switch (valign | halign) {
136 while (*
src && *
src !=
'\n') {
139 if (
src[0] ==
'\\' &&
src[1] ==
'\n') {
150 size_t codemap_len = strlen(
from);
152 if (!strncmp(
src,
from, codemap_len)) {
166 int *got_sub_ptr,
const AVPacket *avpkt)
169 const char *ptr = avpkt->
data;
172 if (avpkt->
size <= 0)
180 ptr = strchr(ptr,
' ');
if (!ptr)
goto end; ptr++;
181 ptr = strchr(ptr,
' ');
if (!ptr)
goto end; ptr++;
192 *got_sub_ptr =
sub->num_rects > 0;
int(* func)(AVBPrint *dst, const char *in, const char *arg)
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
static float sub(float src0, float src1)
static const struct @79 ass_codes_map[]
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.
static int insert_datetime(AVBPrint *dst, const char *in, const char *arg)
static void jacosub_to_ass(AVCodecContext *avctx, AVBPrint *dst, const char *src)
AVCodec p
The public AVCodec.
#define FF_ARRAY_ELEMS(a)
static int insert_text(AVBPrint *dst, const char *in, const char *arg)
static int insert_font(AVBPrint *dst, const char *in, const char *arg)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static av_always_inline int jss_whitespace(char c)
static int jacosub_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
const FFCodec ff_jacosub_decoder
static const av_always_inline char * jss_skip_whitespace(const char *p)
void ff_ass_decoder_flush(AVCodecContext *avctx)
Helper to flush a text subtitles decoder making use of the FFASSDecoderContext.
#define i(width, name, range_min, range_max)
static av_const int av_toupper(int c)
Locale-independent conversion of ASCII characters to uppercase.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
const char * name
Name of the codec implementation.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
main external API structure.
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
#define FF_CODEC_DECODE_SUB_CB(func)
This structure stores compressed data.
static int insert_color(AVBPrint *dst, const char *in, const char *arg)