22#include "config_components.h"
34 const char *in,
int x1,
int y1,
int x2,
int y2)
36 if (x1 >= 0 && y1 >= 0) {
40 if (x2 >= 0 && y2 >= 0 && (x2 != x1 || y2 != y1) && x2 >= x1 && y2 >= y1) {
42 const int cx = x1 + (x2 - x1)/2;
43 const int cy = y1 + (y2 - y1)/2;
59 int *got_sub_ptr,
const AVPacket *avpkt)
62 int x1 = -1, y1 = -1, x2 = -1, y2 = -1;
68 if (p &&
size == 16) {
105#if CONFIG_SUBRIP_DECODER
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
const FFCodec ff_subrip_decoder
const FFCodec ff_srt_decoder
av_cold void ff_ass_decoder_flush(AVCodecContext *avctx)
Helper to flush a text subtitles decoder making use of the FFASSDecoderContext.
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
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.
#define ASS_DEFAULT_PLAYRESY
#define ASS_DEFAULT_PLAYRESX
Libavcodec external API header.
void av_bprintf(AVBPrint *buf, const char *fmt,...)
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
#define AV_BPRINT_SIZE_UNLIMITED
#define CODEC_LONG_NAME(str)
#define FF_CODEC_DECODE_SUB_CB(func)
common internal and external API header
@ AV_PKT_DATA_SUBTITLE_POSITION
Subtitle event position.
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
int ff_htmlmarkup_to_ass(void *log_ctx, AVBPrint *dst, const char *in)
static int srt_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
static int srt_to_ass(AVCodecContext *avctx, AVBPrint *dst, const char *in, int x1, int y1, int x2, int y2)
main external API structure.
This structure stores compressed data.