30 #include "libavutil/bprint.h"
40 while (*p && strchr(
"/\\_", *p)) {
42 else if (*p ==
'\\')
av_bprintf(buf,
"{\\b1}");
48 while (*p && *p !=
'|') {
49 if (*p !=
'\r' && *p !=
'\n')
71 const char *ptr = avpkt->
data;
73 const int ts_duration = avpkt->duration != -1 ?
84 *got_sub_ptr = sub->num_rects > 0;
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
const char * name
Name of the codec implementation.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const
Rescale a 64-bit integer by 2 rational numbers.
#define AV_BPRINT_SIZE_UNLIMITED
Convenience macros for special values for av_bprint_init() size_max parameter.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
Libavcodec external API header.
int ff_ass_add_rect(AVSubtitle *sub, const char *dialog, int ts_start, int duration, int raw)
Add an ASS dialog line to an AVSubtitle as a new AVSubtitleRect.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
Init a print buffer.
Buffer to print data progressively.
static int av_bprint_is_complete(AVBPrint *buf)
Test if the print buffer is complete (not truncated).
static int mpl2_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt)
main external API structure.
rational number numerator/denominator
void av_bprintf(AVBPrint *buf, const char *fmt,...) av_printf_format(2
Append a formatted string to a print buffer.
static int mpl2_event_to_ass(AVBPrint *buf, const char *p)
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...