46 "ref[%p buf:%p data:%p linesize[%d, %d, %d, %d] pts:%"PRId64
" pos:%"PRId64,
52 ff_tlog(ctx,
" a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
61 ff_tlog(ctx,
" cl:%"PRId64
"d n:%d r:%d",
67 ff_tlog(ctx,
"]%s", end ?
"\n" :
"");
78 return FFMPEG_CONFIGURATION;
83 #define LICENSE_PREFIX "libavfilter license: "
102 idx =
FFMIN(idx, *count);
106 memmove(*pads + idx + 1, *pads + idx,
sizeof(
AVFilterPad) * (*count - idx));
107 memmove(*links + idx + 1, *links + idx,
sizeof(
AVFilterLink*) * (*count - idx));
109 (*links)[idx] = NULL;
112 for (i = idx + 1; i < *
count; i++)
114 (*(
unsigned *)((
uint8_t *) *links[i] + padidx_off))++;
128 "Media type mismatch between the '%s' filter output pad %d (%s) and the '%s' filter input pad %d (%s)\n",
172 unsigned filt_srcpad_idx,
unsigned filt_dstpad_idx)
178 "between the filter '%s' and the filter '%s'\n",
182 if ((ret =
avfilter_link(filt, filt_dstpad_idx, link->
dst, dstpad_idx)) < 0) {
191 filt->
inputs[filt_srcpad_idx] = link;
214 for (i = 0; i < filter->
nb_inputs; i ++) {
226 case AVLINK_STARTINIT:
238 "with more than one input "
239 "must set config_props() "
240 "callbacks on all outputs\n");
243 }
else if ((ret = config_link(link)) < 0) {
245 "Failed to configure output pad on %s\n",
250 switch (link->
type) {
267 }
else if (!link->
w || !link->
h) {
269 "Video source filters must set their output link's "
270 "width and height\n");
286 if ((ret = config_link(link)) < 0) {
288 "Failed to configure input pad on %s\n",
304 "link[%p s:%dx%d fmt:%s %s->%s]%s",
305 link, link->
w, link->
h,
315 "link[%p r:%d cl:%s fmt:%s %s->%s]%s",
357 int i,
min = INT_MAX;
367 min =
FFMIN(min, val);
373 static const char *
const var_names[] = {
"t",
"n",
"pos", NULL };
401 NULL, NULL, NULL, NULL, 0, ctx->
priv);
404 "Error when evaluating the expression '%s' for enable\n",
428 if(!strcmp(cmd,
"ping")){
431 }
else if(!strcmp(cmd,
"enable")) {
449 if (!strcmp(f->
name, name))
466 || (!input->start_frame && !input->end_frame));
482 #if FF_API_OLD_FILTER_REGISTER
488 void avfilter_uninit(
void)
500 for (count = 0; pads->
name; count++)
540 #define OFFSET(x) offsetof(AVFilterContext, x)
541 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM
561 int *
ret,
int nb_jobs)
565 for (i = 0; i < nb_jobs; i++) {
566 int r =
func(ctx, arg, i, nb_jobs);
645 #if FF_API_AVFILTER_OPEN
649 return *filter_ctx ? 0 :
AVERROR(ENOMEM);
685 for (i = 0; i < filter->
nb_inputs; i++) {
725 const char *shorthand = NULL;
737 &parsed_key, &
value);
790 #if FF_API_AVFILTER_INIT_FILTER
843 "options, but options were provided: %s.\n", args);
847 #if FF_API_OLD_FILTER_OPTS
848 if ( !strcmp(filter->
filter->
name,
"format") ||
851 !strcmp(filter->
filter->
name,
"frei0r_src") ||
868 if (!strcmp(filter->
filter->
name,
"frei0r") ||
871 else if (!strcmp(filter->
filter->
name,
"frei0r_src"))
874 while (nb_leading--) {
877 p = copy + strlen(copy);
883 deprecated = strchr(p,
':') != NULL;
885 if (!strcmp(filter->
filter->
name,
"aevalsrc")) {
887 while ((p = strchr(p,
':')) && p[1] !=
':') {
888 const char *epos = strchr(p + 1,
'=');
889 const char *spos = strchr(p + 1,
':');
890 const int next_token_is_opt = epos && (!spos || epos < spos);
891 if (next_token_is_opt) {
899 if (p && *p ==
':') {
901 memmove(p, p + 1, strlen(p));
904 while ((p = strchr(p,
':')))
909 "'|' to separate the list items.\n");
923 if (!strncmp(args,
"filter=", 7))
958 return pads[pad_idx].
name;
963 return pads[pad_idx].
type;
994 switch (link->
type) {
1001 default:
return AVERROR(EINVAL);
1009 switch (link->
type) {
1020 default:
return AVERROR(EINVAL);
1029 "Processing command time:%f command:%s arg:%s\n",
1057 int insamples = frame->
nb_samples, inpos = 0, nb_samples;
1070 "Samples dropped due to memory allocation failure.\n");
1078 nb_samples =
FFMIN(insamples,
1082 nb_samples, nb_channels, link->
format);
1083 inpos += nb_samples;
1084 insamples -= nb_samples;