30 #define WHITESPACES " \n\t"
44 "Cannot create the link %s:%d -> %s:%d\n",
60 const char *start = *buf;
68 "Bad (empty?) label found in the following: \"%s\".\n", start);
72 if (*(*buf)++ !=
']') {
74 "Mismatched '[' found in the following: \"%s\".\n", start);
95 const char *filt_name,
const char *args,
void *log_ctx)
102 snprintf(inst_name,
sizeof(inst_name),
"Parsed filter %d %s", index, filt_name);
108 "No such filter: '%s'\n", filt_name);
115 "Error creating filter '%s'\n", filt_name);
119 if (!strcmp(filt_name,
"scale") && args && !strstr(args,
"flags") &&
121 snprintf(tmp_args,
sizeof(tmp_args),
"%s:%s",
129 "Error initializing filter '%s'", filt_name);
157 int index,
void *log_ctx)
168 ret =
create_filter(filt_ctx, graph, index, name, opts, log_ctx);
193 while (*links && (!(*links)->name || strcmp((*links)->name, label)))
194 links = &((*links)->next);
208 element->
next = *inouts;
214 while (*inouts && (*inouts)->
next)
215 inouts = &((*inouts)->next);
220 (*inouts)->
next = *element;
230 for (pad = 0; pad < filt_ctx->
nb_inputs; pad++) {
234 *curr_inputs = (*curr_inputs)->
next;
254 "Too many inputs specified for the \"%s\" filter.\n",
278 while (**buf ==
'[') {
307 *curr_inputs = parsed_inputs;
318 while (**buf ==
'[') {
329 "No output pad can be associated to link label '%s'.\n", name);
333 *curr_inputs = (*curr_inputs)->
next;
362 char *p = strchr(*buf,
';');
364 if (strncmp(*buf,
"sws_flags=", 10))
401 if ((ret =
parse_inputs(&filters, &curr_inputs, &open_outputs, graph)) < 0)
404 if ((ret =
parse_filter(&filter, &filters, graph, index, graph)) < 0)
411 if ((ret =
parse_outputs(&filters, &curr_inputs, &open_inputs, &open_outputs,
418 if (chr ==
';' && curr_inputs)
421 }
while (chr ==
',' || chr ==
';');
425 "Unable to parse graph description substring: \"%s\"\n",
433 *inputs = open_inputs;
434 *outputs = open_outputs;
462 if (inputs && !inputs->
name)
464 for (cur = inputs; cur; cur = cur->
next) {
467 "Not enough inputs specified for the \"%s\" filter.\n",
482 if (outputs && !outputs->name)
484 for (cur = outputs; cur; cur = cur->
next) {
487 "Invalid filterchain containing an unlabelled output pad: \"%s\"\n",