51 #if CONFIG_SSA_DECODER
55 const char *ptr = avpkt->
data;
63 duration = dialog->
end - dialog->
start;
71 *got_sub_ptr = avpkt->
size > 0;
81 .decode = ssa_decode_frame,
86 #if CONFIG_ASS_DECODER
87 static int ass_decode_frame(
AVCodecContext *avctx,
void *data,
int *got_sub_ptr,
92 const char *ptr = avpkt->
data;
107 *got_sub_ptr = avpkt->
size > 0;
117 .decode = ass_decode_frame,
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
fields extracted from the [Events] section
ptrdiff_t const GLvoid * data
memory handling functions
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...
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
static av_cold int ass_decode_init(AVCodecContext *avctx)
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
int duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
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 a already initialize...
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const char * name
Name of the codec implementation.
int end
end time of the dialog in centiseconds
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.
common internal API header
main external API structure.
int start
start time of the dialog in centiseconds
rational number numerator/denominator
static int ass_decode_close(AVCodecContext *avctx)
ASS as defined in Matroska.
void ff_ass_split_free(ASSSplitContext *ctx)
Free all the memory allocated for an ASSSplitContext.
This structure stores compressed data.
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
uint8_t * subtitle_header
Header containing style information for text subtitles.