Lines Matching defs:avctx
40 AVCodecContext *avctx;
55 av_log(s->avctx, AV_LOG_ERROR,
80 static int ttml_encode_frame(AVCodecContext *avctx, uint8_t *buf,
83 TTMLContext *s = avctx->priv_data;
94 av_log(avctx, AV_LOG_ERROR, "Only SUBTITLE_ASS type supported.\n");
113 avctx->err_recognition & AV_EF_EXPLODE) ?
115 av_log(avctx, log_level,
140 av_log(avctx, AV_LOG_ERROR, "Buffer too small for TTML event.\n");
147 static av_cold int ttml_encode_close(AVCodecContext *avctx)
149 TTMLContext *s = avctx->priv_data;
218 static int ttml_write_region(AVCodecContext *avctx, AVBPrint *buf,
229 av_log(avctx, AV_LOG_ERROR, "Subtitle style name not set!\n");
234 av_log(avctx, AV_LOG_ERROR, "Invalid font size for TTML: %d!\n",
240 av_log(avctx, AV_LOG_ERROR,
250 av_log(avctx, AV_LOG_ERROR,
301 static int ttml_write_header_content(AVCodecContext *avctx)
303 TTMLContext *s = avctx->priv_data;
311 av_log(avctx, AV_LOG_ERROR,
332 int ret = ttml_write_region(avctx, &s->buffer, script_info,
348 if (!(avctx->extradata =
353 avctx->extradata_size =
355 memcpy(avctx->extradata, TTMLENC_EXTRADATA_SIGNATURE,
359 memcpy(avctx->extradata + TTMLENC_EXTRADATA_SIGNATURE_SIZE,
367 static av_cold int ttml_encode_init(AVCodecContext *avctx)
369 TTMLContext *s = avctx->priv_data;
371 s->avctx = avctx;
375 if (!(s->ass_ctx = ff_ass_split(avctx->subtitle_header))) {
379 if ((ret = ttml_write_header_content(avctx)) < 0) {