Lines Matching defs:avctx
83 av_cold static int lavfi_read_close(AVFormatContext *avctx)
85 LavfiContext *lavfi = avctx->priv_data;
98 static int create_subcc_streams(AVFormatContext *avctx)
100 LavfiContext *lavfi = avctx->priv_data;
108 lavfi->sink_stream_subcc_map[sink_idx] = avctx->nb_streams;
109 if (!(st = avformat_new_stream(avctx, NULL)))
113 time_base = &avctx->streams[stream_idx]->time_base;
123 av_cold static int lavfi_read_header(AVFormatContext *avctx)
125 LavfiContext *lavfi = avctx->priv_data;
141 av_log(avctx, AV_LOG_ERROR,
150 if (avctx->protocol_whitelist && (ret = av_dict_set(&options, "protocol_whitelist", avctx->protocol_whitelist, 0)) < 0)
152 ret = avio_open2(&avio, lavfi->graph_filename, AVIO_FLAG_READ, &avctx->interrupt_callback, &options);
168 lavfi->graph_str = av_strdup(avctx->url);
175 &input_links, &output_links, avctx)) < 0)
179 av_log(avctx, AV_LOG_ERROR,
206 av_log(avctx, AV_LOG_ERROR,
214 av_log(avctx, AV_LOG_ERROR,
221 av_log(avctx, AV_LOG_ERROR,
229 av_log(avctx, AV_LOG_ERROR,
242 if (!(st = avformat_new_stream(avctx, NULL)))
259 av_log(avctx, AV_LOG_ERROR, "Missing required buffersink filter, aborting.\n");
290 av_log(avctx, AV_LOG_ERROR,
301 if ((ret = avfilter_graph_config(lavfi->graph, avctx)) < 0)
319 AVStream *st = avctx->streams[i];
331 avctx->probesize = FFMAX(avctx->probesize, probesize);
342 av_log(avctx, AV_LOG_ERROR,
348 if ((ret = create_subcc_streams(avctx)) < 0)
361 static int create_subcc_packet(AVFormatContext *avctx, AVFrame *frame,
364 LavfiContext *lavfi = avctx->priv_data;
381 static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
383 LavfiContext *lavfi = avctx->priv_data;
410 ff_dlog(avctx, "EOF sink_idx:%d\n", i);
416 ff_dlog(avctx, "sink_idx:%d time:%f\n", i, d);
427 ff_dlog(avctx, "min_pts_sink_idx:%i\n", min_pts_sink_idx);
431 st = avctx->streams[stream_idx];
464 if ((ret = create_subcc_packet(avctx, frame, min_pts_sink_idx)) < 0) {