Go to the documentation of this file.
48 AVBPrint cur_line = { 0 };
56 "Failed to move the current subtitle dialog to AVBPrint!\n");
89 for (
i=0;
i<
sub->num_rects;
i++) {
90 const char *ass =
sub->rects[
i]->ass;
98 if (!strncmp(ass,
"Dialogue: ", 10)) {
102 for (; dialog && num--; dialog++) {
111 "Splitting received ASS dialog failed: %s\n",
133 "Splitting received ASS dialog text %s failed: %s\n",
145 #if FF_API_ASS_TIMING
157 if (
av_strlcpy(buf,
s->buffer.str, bufsize) > bufsize - 1) {
162 return s->buffer.len;
#define AV_LOG_WARNING
Something somehow does not look correct.
#define AV_BPRINT_SIZE_UNLIMITED
static av_cold int init(AVCodecContext *avctx)
Set of callback functions corresponding to each override codes that can be encountered in a "Dialogue...
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
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 an already initializ...
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)
int err_recognition
Error recognition; may misdetect some more or less valid parts as errors.
uint8_t * subtitle_header
Header containing style information for text subtitles.
void av_bprint_append_data(AVBPrint *buf, const char *data, unsigned size)
Append data to a print buffer.
@ SUBTITLE_ASS
Formatted text, the ass field must be set by the decoder and is authoritative.
#define TTMLENC_EXTRADATA_SIGNATURE_SIZE
static void ttml_text_cb(void *priv, const char *text, int len)
#define AVERROR_BUFFER_TOO_SMALL
Buffer too small.
void ff_ass_free_dialog(ASSDialog **dialogp)
Free a dialogue obtained from ff_ass_split_dialog2().
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
ASSDialog * ff_ass_split_dialog2(ASSSplitContext *ctx, const char *buf)
Split one ASS Dialogue line from a string buffer.
static const ASSCodesCallbacks ttml_callbacks
static void ttml_new_line_cb(void *priv, int forced)
static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf, int bufsize, const AVSubtitle *sub)
#define TTMLENC_EXTRADATA_SIGNATURE
ASSSplitContext * ass_ctx
This struct can be casted to ASS to access to the split data.
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...
#define AV_EF_EXPLODE
abort decoding on minor error detection
static int av_bprint_is_complete(const AVBPrint *buf)
Test if the print buffer is complete (not truncated).
void ff_ass_split_free(ASSSplitContext *ctx)
Free all the memory allocated for an ASSSplitContext.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
char * text
actual text which will be displayed as a subtitle, can include style override control codes (see ff_a...
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
@ AV_ESCAPE_MODE_XML
Use XML non-markup character data escaping.
static av_cold int ttml_encode_init(AVCodecContext *avctx)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
const char * name
Name of the codec implementation.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
void av_bprint_escape(AVBPrint *dstbuf, const char *src, const char *special_chars, enum AVEscapeMode mode, int flags)
Escape the content in src and append it to dstbuf.
#define AV_INPUT_BUFFER_PADDING_SIZE
main external API structure.
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
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
fields extracted from the [Events] section
static av_cold int ttml_encode_close(AVCodecContext *avctx)
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 AVERROR_INVALIDDATA
Invalid data found when processing input.
int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv, const char *buf)
Split override codes out of a ASS "Dialogue" Text field.
void(* text)(void *priv, const char *text, int len)