[FFmpeg-cvslog] r12718 - trunk/libavfilter/avfiltergraph.c
vitor
subversion
Fri Apr 4 22:08:03 CEST 2008
Author: vitor
Date: Fri Apr 4 22:08:02 2008
New Revision: 12718
Log:
Implement poll_frame() method. Fix ffmpeg.c bug with
vf_fps filter.
Commited in SoC by Vitor Sessak on 2008-02-06 19:55:36
Modified:
trunk/libavfilter/avfiltergraph.c
Modified: trunk/libavfilter/avfiltergraph.c
==============================================================================
--- trunk/libavfilter/avfiltergraph.c (original)
+++ trunk/libavfilter/avfiltergraph.c Fri Apr 4 22:08:02 2008
@@ -69,6 +69,15 @@ static int link_in_request_frame(AVFilte
return avfilter_request_frame(link2);
}
+
+static int link_in_poll_frame(AVFilterLink *link)
+{
+ AVFilterLink *link2 = get_extern_input_link(link);
+ if(!link2)
+ return -1;
+ return avfilter_poll_frame(link2);
+}
+
static int link_in_config_props(AVFilterLink *link)
{
AVFilterLink *link2 = get_extern_input_link(link);
@@ -236,6 +245,16 @@ static int graph_out_request_frame(AVFil
return -1;
}
+static int graph_out_poll_frame(AVFilterLink *link)
+{
+ AVFilterLink *link2 = get_intern_output_link(link);
+
+ if(!link2)
+ return -1;
+
+ return avfilter_poll_frame(link2);
+}
+
static int graph_out_config_props(AVFilterLink *link)
{
GraphContext *graph = link->src->priv;
@@ -276,6 +295,7 @@ static int add_graph_input(AVFilterConte
.name = NULL, /* FIXME? */
.type = AV_PAD_VIDEO,
.request_frame = link_in_request_frame,
+ .poll_frame = link_in_poll_frame,
.config_props = link_in_config_props,
};
@@ -296,6 +316,7 @@ static int add_graph_output(AVFilterCont
.name = name,
.type = AV_PAD_VIDEO,
.request_frame = graph_out_request_frame,
+ .poll_frame = graph_out_poll_frame,
.config_props = graph_out_config_props,
};
AVFilterPad dummy_inpad =
@@ -488,12 +509,14 @@ static int graph_load_from_desc(AVFilter
for(curfilt = desc->filters; curfilt; curfilt = curfilt->next) {
if(!(filterdef = avfilter_get_by_name(curfilt->filter)) ||
!(filt = avfilter_open(filterdef, curfilt->name))) {
- av_log(ctx, AV_LOG_ERROR, "error creating filter\n");
+ av_log(ctx, AV_LOG_ERROR,
+ "error creating filter '%s'\n", curfilt->name);
goto fail;
}
avfilter_graph_add_filter(ctx, filt);
if(avfilter_init_filter(filt, curfilt->args, NULL)) {
- av_log(ctx, AV_LOG_ERROR, "error initializing filter\n");
+ av_log(ctx, AV_LOG_ERROR,
+ "error initializing filter '%s'\n", curfilt->name);
goto fail;
}
}
More information about the ffmpeg-cvslog
mailing list