44 static const uint8_t text_sample_entry[] = {
45 0x00, 0x00, 0x00, 0x00,
48 0x00, 0x00, 0x00, 0x00,
61 0xFF, 0xFF, 0xFF, 0xFF,
64 0x00, 0x00, 0x00, 0x12,
70 'S',
'e',
'r',
'i',
'f',
128 for (; dialog && num--; dialog++) {
141 if (len > bufsize-3) {
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
fields extracted from the [Events] section
static av_cold int init(AVCodecContext *avctx)
ASSSplitContext * ff_ass_split(const char *buf)
Split a full ASS file or a ASS header from a string buffer and store the split structure in a newly a...
static av_cold int mov_text_encode_init(AVCodecContext *avctx)
char * text
actual text which will be displayed as a subtitle, can include style override control codes (see ff_a...
#define av_assert0(cond)
assert() equivalent, that is always enabled.
This struct can be casted to ASS to access to the split data.
ASSSplitContext * ass_ctx
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf)
Split override codes out of a ASS "Dialogue" Text field.
static void mov_text_text_cb(void *priv, const char *text, int len)
ASSDialog * ff_ass_split_dialog(ASSSplitContext *ctx, const char *buf, int cache, int *number)
Split one or several ASS "Dialogue" lines from a string buffer and store them in a already initialize...
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
simple assert() macros that are a bit more flexible than ISO C assert().
const char * name
Name of the codec implementation.
Libavcodec external API header.
size_t av_strlcpy(char *dst, const char *src, size_t size)
Copy the string src to dst, but no more than size - 1 bytes, and null-terminate dst.
#define FF_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
void(* text)(void *priv, const char *text, int len)
Set of callback functions corresponding to each override codes that can be encountered in a "Dialogue...
AVCodec ff_movtext_encoder
static int mov_text_encode_frame(AVCodecContext *avctx, unsigned char *buf, int bufsize, const AVSubtitle *sub)
static const ASSCodesCallbacks mov_text_callbacks
main external API structure.
static int mov_text_encode_close(AVCodecContext *avctx)
static void mov_text_new_line_cb(void *priv, int forced)
Formatted text, the ass field must be set by the decoder and is authoritative.
char * ass
0 terminated ASS/SSA compatible event line.
void ff_ass_split_free(ASSSplitContext *ctx)
Free all the memory allocated for an ASSSplitContext.
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
uint8_t * subtitle_header
Header containing style information for text subtitles.