50 #define LICENSE_PREFIX "libavfilter license: "
60 idx =
FFMIN(idx, *count);
64 memmove(*pads + idx + 1, *pads + idx,
sizeof(
AVFilterPad) * (*count - idx));
65 memmove(*links + idx + 1, *links + idx,
sizeof(
AVFilterLink*) * (*count - idx));
70 for (i = idx + 1; i < *count; i++)
72 (*(
unsigned *)((
uint8_t *) *links[i] + padidx_off))++;
86 "Media type mismatch between the '%s' filter output pad %d and the '%s' filter input pad %d\n",
87 src->
name, srcpad, dst->
name, dstpad);
109 unsigned filt_srcpad_idx,
unsigned filt_dstpad_idx)
115 "between the filter '%s' and the filter '%s'\n",
119 if ((ret =
avfilter_link(filt, filt_dstpad_idx, link->
dst, dstpad_idx)) < 0) {
128 filt->
inputs[filt_srcpad_idx] = link;
151 for (i = 0; i < filter->
nb_inputs; i ++) {
159 case AVLINK_STARTINIT:
171 "with more than one input "
172 "must set config_props() "
173 "callbacks on all outputs\n");
176 }
else if ((ret = config_link(link)) < 0) {
178 "Failed to configure output pad on %s\n",
197 }
else if (!link->
w || !link->
h) {
199 "Video source filters must set their output link's "
200 "width and height\n");
206 if ((ret = config_link(link)) < 0) {
208 "Failed to configure input pad on %s\n",
224 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",
225 link, link->
w, link->
h,
235 "link[%p r:%d cl:%s fmt:%-16s %-16s->%-16s]%s",
257 int i,
min = INT_MAX;
267 min =
FFMIN(min, val);
275 #if !FF_API_NOCONST_GET_NAME
286 if (!strcmp(f->
name, name))
307 #if FF_API_OLD_FILTER_REGISTER
313 void avfilter_uninit(
void)
325 for (count = 0; pads->
name; count++)
359 #define OFFSET(x) offsetof(AVFilterContext, x)
360 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM
378 int *ret,
int nb_jobs)
382 for (i = 0; i < nb_jobs; i++) {
383 int r = func(ctx, arg, i, nb_jobs);
464 #if FF_API_AVFILTER_OPEN
468 return *filter_ctx ? 0 :
AVERROR(ENOMEM);
501 for (i = 0; i < filter->
nb_inputs; i++) {
527 const char *p = args;
534 "this filter supports.\n");
554 #if FF_API_AVFILTER_INIT_FILTER
605 "options, but options were provided: %s.\n", args);
609 #if FF_API_OLD_FILTER_OPTS
611 strchr(args,
':') && strchr(args,
':') < strchr(args,
'=')) {
617 "syntax is deprecated. Use either <w>:<h>:<flags> or "
618 "w=<w>:h=<h>:flags=<flags>.\n");
625 p = strrchr(copy,
':');
639 if (strchr(args,
'=')) {
644 #if FF_API_OLD_FILTER_OPTS
645 }
else if (!strcmp(filter->
filter->
name,
"format") ||
648 !strcmp(filter->
filter->
name,
"frei0r_src") ||
661 if (!strcmp(filter->
filter->
name,
"frei0r") ||
664 else if (!strcmp(filter->
filter->
name,
"frei0r_src"))
667 while (nb_leading--) {
670 p = copy + strlen(copy);
676 if (strchr(p,
':')) {
678 "'|' to separate the list items.\n");
681 while ((p = strchr(p,
':')))
715 return pads[pad_idx].
name;
720 return pads[pad_idx].
type;
745 switch (link->
type) {
765 switch (link->
type) {