32 #define WHITESPACES " \n\t"
46 "Cannot create the link %s:%d -> %s:%d\n",
62 const char *start = *buf;
70 "Bad (empty?) label found in the following: \"%s\".\n", start);
74 if (*(*buf)++ !=
']') {
76 "Mismatched '[' found in the following: \"%s\".\n", start);
97 const char *filt_name,
const char *args,
void *log_ctx)
104 snprintf(inst_name,
sizeof(inst_name),
"Parsed filter %d %s", index, filt_name);
110 "No such filter: '%s'\n", filt_name);
117 "Error creating filter '%s'\n", filt_name);
126 if (!strcmp(filt_name,
"scale") && args && !strstr(args,
"flags") &&
128 snprintf(tmp_args,
sizeof(tmp_args),
"%s:%s",
135 "Error initializing filter '%s' with args '%s'\n", filt_name, args);
159 int index,
void *log_ctx)
170 ret =
create_filter(filt_ctx, graph, index, name, opts, log_ctx);
195 while (*links && (!(*links)->name || strcmp((*links)->name, label)))
196 links = &((*links)->next);
210 element->
next = *inouts;
216 while (*inouts && (*inouts)->
next)
217 inouts = &((*inouts)->next);
222 (*inouts)->
next = *element;
232 for (pad = 0; pad < filt_ctx->
nb_inputs; pad++) {
236 *curr_inputs = (*curr_inputs)->
next;
256 "Too many inputs specified for the \"%s\" filter.\n",
280 while (**buf ==
'[') {
309 *curr_inputs = parsed_inputs;
320 while (**buf ==
'[') {
331 "No output pad can be associated to link label '%s'.\n", name);
335 *curr_inputs = (*curr_inputs)->
next;
364 char *p = strchr(*buf,
';');
366 if (strncmp(*buf,
"sws_flags=", 10))
403 if ((ret =
parse_inputs(&filters, &curr_inputs, &open_outputs, graph)) < 0)
406 if ((ret =
parse_filter(&filter, &filters, graph, index, graph)) < 0)
413 if ((ret =
parse_outputs(&filters, &curr_inputs, &open_inputs, &open_outputs,
420 if (chr ==
';' && curr_inputs)
423 }
while (chr ==
',' || chr ==
';');
427 "Unable to parse graph description substring: \"%s\"\n",
435 *inputs = open_inputs;
436 *outputs = open_outputs;
464 if (inputs && !inputs->
name)
466 for (cur = inputs; cur; cur = cur->
next) {
469 "Not enough inputs specified for the \"%s\" filter.\n",
484 if (outputs && !outputs->name)
486 for (cur = outputs; cur; cur = cur->
next) {
489 "Invalid filterchain containing an unlabelled output pad: \"%s\"\n",