Go to the documentation of this file.
32 const char *in,
int x1,
int y1,
int x2,
int y2)
34 if (x1 >= 0 && y1 >= 0) {
38 if (x2 >= 0 && y2 >= 0 && (x2 != x1 || y2 != y1) && x2 >= x1 && y2 >= y1) {
40 const int cx = x1 + (x2 - x1)/2;
41 const int cy = y1 + (y2 - y1)/2;
44 av_bprintf(dst,
"{\\an5}{\\pos(%d,%d)}", scaled_x, scaled_y);
49 av_bprintf(dst,
"{\\an1}{\\pos(%d,%d)}", scaled_x, scaled_y);
61 int x1 = -1, y1 = -1, x2 = -1, y2 = -1;
67 if (p &&
size == 16) {
86 *got_sub_ptr =
sub->num_rects > 0;
90 #if CONFIG_SRT_DECODER
105 #if CONFIG_SUBRIP_DECODER
#define AV_BPRINT_SIZE_UNLIMITED
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
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)
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 srt_to_ass(AVCodecContext *avctx, AVBPrint *dst, const char *in, int x1, int y1, int x2, int y2)
#define ASS_DEFAULT_PLAYRESY
@ AV_PKT_DATA_SUBTITLE_POSITION
Subtitle event position.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
const AVCodec ff_subrip_decoder
#define ASS_DEFAULT_PLAYRESX
void ff_ass_decoder_flush(AVCodecContext *avctx)
Helper to flush a text subtitles decoder making use of the FFASSDecoderContext.
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
const char * name
Name of the codec implementation.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
static int srt_decode_frame(AVCodecContext *avctx, void *data, int *got_sub_ptr, AVPacket *avpkt)
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
const AVCodec ff_srt_decoder
This structure stores compressed data.