Go to the documentation of this file.
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) {
91 #if CONFIG_SRT_DECODER
105 #if CONFIG_SUBRIP_DECODER
#define AV_BPRINT_SIZE_UNLIMITED
int ff_ass_subtitle_header_default(AVCodecContext *avctx)
Generate a suitable AVCodecContext.subtitle_header for SUBTITLE_ASS with default style.
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
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.
AVCodec p
The public AVCodec.
@ AV_PKT_DATA_SUBTITLE_POSITION
Subtitle event position.
static int srt_to_ass(AVCodecContext *avctx, AVBPrint *dst, const char *in, int x1, int y1, int x2, int y2)
#define CODEC_LONG_NAME(str)
#define ASS_DEFAULT_PLAYRESY
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define ASS_DEFAULT_PLAYRESX
const FFCodec ff_srt_decoder
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.
const FFCodec ff_subrip_decoder
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
main external API structure.
static int srt_decode_frame(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
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
#define FF_CODEC_DECODE_SUB_CB(func)
This structure stores compressed data.