Lines Matching defs:graph
2 * filter graph parser
145 * corresponding filter instance which is added to graph with
159 static int parse_filter(AVFilterContext **filt_ctx, const char **buf, AVFilterGraph *graph,
171 ret = create_filter(filt_ctx, graph, index, name, opts, log_ctx);
363 static int parse_sws_flags(const char **buf, AVFilterGraph *graph)
371 av_log(graph, AV_LOG_ERROR, "sws_flags not terminated with ';'.\n");
377 av_freep(&graph->scale_sws_opts);
378 if (!(graph->scale_sws_opts = av_mallocz(p - *buf + 1)))
380 av_strlcpy(graph->scale_sws_opts, *buf, p - *buf + 1);
386 int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters,
397 if ((ret = parse_sws_flags(&filters, graph)) < 0)
404 if ((ret = parse_inputs(&filters, &curr_inputs, &open_outputs, graph)) < 0)
406 if ((ret = parse_filter(&filter, &filters, graph, index, graph)) < 0)
410 if ((ret = link_filter_inouts(filter, &curr_inputs, &open_inputs, graph)) < 0)
414 graph)) < 0)
426 av_log(graph, AV_LOG_ERROR,
427 "Unable to parse graph description substring: \"%s\"\n",
441 while (graph->nb_filters)
442 avfilter_free(graph->filters[0]);
443 av_freep(&graph->filters);
455 int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
462 if ((ret = avfilter_graph_parse2(graph, filters, &inputs, &outputs)) < 0)
507 while (graph->nb_filters)
508 avfilter_free(graph->filters[0]);
509 av_freep(&graph->filters);
517 int avfilter_graph_parse(AVFilterGraph *graph, const char *filters,
521 return avfilter_graph_parse_ptr(graph, filters, inputs, outputs, log_ctx);
525 int avfilter_graph_parse_ptr(AVFilterGraph *graph, const char *filters,
536 if ((ret = parse_sws_flags(&filters, graph)) < 0)
547 if ((ret = parse_filter(&filter, &filters, graph, index, log_ctx)) < 0)
579 "Unable to parse graph description substring: \"%s\"\n",
602 while (graph->nb_filters)
603 avfilter_free(graph->filters[0]);
604 av_freep(&graph->filters);