Lines Matching defs:avctx
62 static int libaribb24_generate_ass_header(AVCodecContext *avctx)
68 switch (avctx->profile) {
72 font_size = get_profile_font_size(avctx->profile);
77 font_size = get_profile_font_size(avctx->profile);
80 av_log(avctx, AV_LOG_ERROR, "Unknown or unsupported profile set!\n");
84 avctx->subtitle_header = av_asprintf(
118 !(avctx->flags & AV_CODEC_FLAG_BITEXACT) ? AV_STRINGIFY(LIBAVCODEC_VERSION) : "",
125 if (!avctx->subtitle_header)
128 avctx->subtitle_header_size = strlen(avctx->subtitle_header);
133 static int libaribb24_init(AVCodecContext *avctx)
135 Libaribb24Context *b24 = avctx->priv_data;
139 if (!(b24->lib_instance = arib_instance_new(avctx))) {
140 av_log(avctx, AV_LOG_ERROR, "Failed to initialize libaribb24!\n");
145 av_log(avctx, AV_LOG_INFO, "Setting the libaribb24 base path to '%s'\n",
153 av_log(avctx, AV_LOG_ERROR, "Failed to initialize libaribb24 PES parser!\n");
157 av_log(avctx, AV_LOG_ERROR, "Failed to initialize libaribb24 decoder!\n");
161 switch (avctx->profile) {
169 av_log(avctx, AV_LOG_ERROR, "Unknown or unsupported profile set!\n");
176 if (libaribb24_generate_ass_header(avctx) < 0) {
193 static int libaribb24_close(AVCodecContext *avctx)
195 Libaribb24Context *b24 = avctx->priv_data;
208 static int libaribb24_handle_regions(AVCodecContext *avctx, AVSubtitle *sub)
210 Libaribb24Context *b24 = avctx->priv_data;
212 unsigned int profile_font_size = get_profile_font_size(avctx->profile);
228 av_log(avctx, AV_LOG_ERROR, "Invalid negative region length!\n");
274 av_log(avctx, AV_LOG_DEBUG, "Styled ASS line: %s\n",
286 static int libaribb24_decode(AVCodecContext *avctx, AVSubtitle *sub,
289 Libaribb24Context *b24 = avctx->priv_data;
305 av_log(avctx, AV_LOG_DEBUG, "No decode'able data was received from "
313 av_log(avctx, AV_LOG_ERROR,
326 if (avctx->pkt_timebase.num && pkt->pts != AV_NOPTS_VALUE)
328 avctx->pkt_timebase, AV_TIME_BASE_Q);
336 av_log(avctx, AV_LOG_DEBUG,
343 avctx->pkt_timebase.num, avctx->pkt_timebase.den,
344 avctx->time_base.num, avctx->time_base.den);
347 ret = libaribb24_handle_regions(avctx, sub);
360 static void libaribb24_flush(AVCodecContext *avctx)
362 Libaribb24Context *b24 = avctx->priv_data;
363 if (!(avctx->flags2 & AV_CODEC_FLAG2_RO_FLUSH_NOOP))