int showed_multi_packet_warning;
int is_past_recording_time;
#if CONFIG_AVFILTER
- AVFilterContext *out_video_filter;
+ AVFilterContext *output_video_filter;
AVFilterContext *input_video_filter;
AVFrame *filter_frame;
int has_filter_frame;
if ((ret = avfilter_open(&ist->input_video_filter, avfilter_get_by_name("buffer"), "src")) < 0)
return ret;
- if ((ret = avfilter_open(&ist->out_video_filter, &output_filter, "out")) < 0)
+ if ((ret = avfilter_open(&ist->output_video_filter, &output_filter, "out")) < 0)
return ret;
snprintf(args, 255, "%d:%d:%d", ist->st->codec->width,
ist->st->codec->height, ist->st->codec->pix_fmt);
if ((ret = avfilter_init_filter(ist->input_video_filter, args, NULL)) < 0)
return ret;
- if ((ret = avfilter_init_filter(ist->out_video_filter, NULL, &codec->pix_fmt)) < 0)
+ if ((ret = avfilter_init_filter(ist->output_video_filter, NULL, &codec->pix_fmt)) < 0)
return ret;
/* add input and output filters to the overall graph */
avfilter_graph_add_filter(graph, ist->input_video_filter);
- avfilter_graph_add_filter(graph, ist->out_video_filter);
+ avfilter_graph_add_filter(graph, ist->output_video_filter);
last_filter = ist->input_video_filter;
outputs->next = NULL;
inputs->name = av_strdup("out");
- inputs->filter = ist->out_video_filter;
+ inputs->filter = ist->output_video_filter;
inputs->pad_idx = 0;
inputs->next = NULL;
return ret;
av_freep(&vfilters);
} else {
- if ((ret = avfilter_link(last_filter, 0, ist->out_video_filter, 0)) < 0)
+ if ((ret = avfilter_link(last_filter, 0, ist->output_video_filter, 0)) < 0)
return ret;
}
if ((ret = avfilter_graph_config_links(graph, NULL)) < 0)
return ret;
- codec->width = ist->out_video_filter->inputs[0]->w;
- codec->height = ist->out_video_filter->inputs[0]->h;
+ codec->width = ist->output_video_filter->inputs[0]->w;
+ codec->height = ist->output_video_filter->inputs[0]->h;
return 0;
}
}
#if CONFIG_AVFILTER
frame_available = ist->st->codec->codec_type != AVMEDIA_TYPE_VIDEO ||
- !ist->out_video_filter || avfilter_poll_frame(ist->out_video_filter->inputs[0]);
+ !ist->output_video_filter || avfilter_poll_frame(ist->output_video_filter->inputs[0]);
#endif
/* if output time reached then transcode raw format,
encode packets and output them */
if (start_time == 0 || ist->pts >= start_time)
#if CONFIG_AVFILTER
while (frame_available) {
- if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ist->out_video_filter)
- get_filtered_video_pic(ist->out_video_filter, &ist->picref, &picture, &ist->pts);
+ if (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ist->output_video_filter)
+ get_filtered_video_pic(ist->output_video_filter, &ist->picref, &picture, &ist->pts);
#endif
for(i=0;i<nb_ostreams;i++) {
int frame_size;
#if CONFIG_AVFILTER
frame_available = (ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO) &&
- ist->out_video_filter && avfilter_poll_frame(ist->out_video_filter->inputs[0]);
+ ist->output_video_filter && avfilter_poll_frame(ist->output_video_filter->inputs[0]);
if(ist->picref)
avfilter_unref_buffer(ist->picref);
}