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);
124 if (!strcmp(filt_name,
"scale") && args && !strstr(args,
"flags") &&
126 snprintf(tmp_args,
sizeof(tmp_args),
"%s:%s",
133 "Error initializing filter '%s' with args '%s'\n", filt_name, args);
157 int index,
void *log_ctx)
168 ret =
create_filter(filt_ctx, graph, index, name, opts, log_ctx);
188 while (*links && strcmp((*links)->name, label))
189 links = &((*links)->next);
201 element->
next = *inouts;
215 "Not enough inputs specified for the \"%s\" filter.\n",
220 *curr_inputs = (*curr_inputs)->
next;
236 "Too many inputs specified for the \"%s\" filter.\n",
259 while (**buf ==
'[') {
294 while (**buf ==
'[') {
301 "No output pad can be associated to link label '%s'.\n",
305 *curr_inputs = (*curr_inputs)->
next;
344 const char *filterchain =
filters;
347 if ((ret =
parse_inputs(&filters, &curr_inputs, &open_outputs, log_ctx)) < 0)
350 if ((ret =
parse_filter(&filter, &filters, graph, index, log_ctx)) < 0)
353 if (filter->
input_count == 1 && !curr_inputs && !index) {
355 const char *tmp =
"[in]";
356 if ((ret =
parse_inputs(&tmp, &curr_inputs, &open_outputs, log_ctx)) < 0)
363 if ((ret =
parse_outputs(&filters, &curr_inputs, &open_inputs, &open_outputs,
370 if (chr ==
';' && curr_inputs) {
372 "Invalid filterchain containing an unlabelled output pad: \"%s\"\n",
378 }
while (chr ==
',' || chr ==
';');
382 "Unable to parse graph description substring: \"%s\"\n",
388 if (open_inputs && !strcmp(open_inputs->
name,
"out") && curr_inputs) {
390 const char *tmp =
"[out]";
391 if ((ret =
parse_outputs(&tmp, &curr_inputs, &open_inputs, &open_outputs,