Commited in SoC by Vitor Sessak on 2008-02-06 19:55:36 Originally committed as revision 12718 to svn://svn.ffmpeg.org/ffmpeg/trunk
Showing the changes to libavfilter/avfiltergraph.c (1 of 1 file). Show all
Unified · Split
| @@ -69,6 +69,15 @@ static int link_in_request_frame(AVFilterLink *link) · 68 unmodified lines | ||
| 69 | 69 | return avfilter_request_frame(link2); |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + | |
| 73 | +static int link_in_poll_frame(AVFilterLink *link) | |
| 74 | +{ | |
| 75 | + AVFilterLink *link2 = get_extern_input_link(link); | |
| 76 | + if(!link2) | |
| 77 | + return -1; | |
| 78 | + return avfilter_poll_frame(link2); | |
| 79 | +} | |
| 80 | + | |
| 72 | 81 | static int link_in_config_props(AVFilterLink *link) |
| 73 | 82 | { |
| 74 | 83 | AVFilterLink *link2 = get_extern_input_link(link); |
| @@ -236,6 +245,16 @@ static int graph_out_request_frame(AVFilterLink *link) · 161 unmodified lines | ||
| 236 | 245 | return -1; |
| 237 | 246 | } |
| 238 | 247 | |
| 248 | +static int graph_out_poll_frame(AVFilterLink *link) | |
| 249 | +{ | |
| 250 | + AVFilterLink *link2 = get_intern_output_link(link); | |
| 251 | + | |
| 252 | + if(!link2) | |
| 253 | + return -1; | |
| 254 | + | |
| 255 | + return avfilter_poll_frame(link2); | |
| 256 | +} | |
| 257 | + | |
| 239 | 258 | static int graph_out_config_props(AVFilterLink *link) |
| 240 | 259 | { |
| 241 | 260 | GraphContext *graph = link->src->priv; |
| @@ -276,6 +295,7 @@ static int add_graph_input(AVFilterContext *gctx, AVFilterContext *filt, unsigne · 34 unmodified lines | ||
| 276 | 295 | .name = NULL, /* FIXME? */ |
| 277 | 296 | .type = AV_PAD_VIDEO, |
| 278 | 297 | .request_frame = link_in_request_frame, |
| 298 | + .poll_frame = link_in_poll_frame, | |
| 279 | 299 | .config_props = link_in_config_props, |
| 280 | 300 | }; |
| 281 | 301 | |
| @@ -296,6 +316,7 @@ static int add_graph_output(AVFilterContext *gctx, AVFilterContext *filt, unsign · 14 unmodified lines | ||
| 296 | 316 | .name = name, |
| 297 | 317 | .type = AV_PAD_VIDEO, |
| 298 | 318 | .request_frame = graph_out_request_frame, |
| 319 | + .poll_frame = graph_out_poll_frame, | |
| 299 | 320 | .config_props = graph_out_config_props, |
| 300 | 321 | }; |
| 301 | 322 | AVFilterPad dummy_inpad = |
| @@ -488,12 +509,14 @@ static int graph_load_from_desc(AVFilterContext *ctx, AVFilterGraphDesc *desc) · 186 unmodified lines | ||
| 488 | 509 | for(curfilt = desc->filters; curfilt; curfilt = curfilt->next) { |
| 489 | 510 | if(!(filterdef = avfilter_get_by_name(curfilt->filter)) || |
| 490 | 511 | !(filt = avfilter_open(filterdef, curfilt->name))) { |
| 491 | − av_log(ctx, AV_LOG_ERROR, "error creating filter\n"); | |
| 512 | + av_log(ctx, AV_LOG_ERROR, | |
| 513 | + "error creating filter '%s'\n", curfilt->name); | |
| 492 | 514 | goto fail; |
| 493 | 515 | } |
| 494 | 516 | avfilter_graph_add_filter(ctx, filt); |
| 495 | 517 | if(avfilter_init_filter(filt, curfilt->args, NULL)) { |
| 496 | − av_log(ctx, AV_LOG_ERROR, "error initializing filter\n"); | |
| 518 | + av_log(ctx, AV_LOG_ERROR, | |
| 519 | + "error initializing filter '%s'\n", curfilt->name); | |
| 497 | 520 | goto fail; |
| 498 | 521 | } |
| 499 | 522 | } |