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: "
104 idx =
FFMIN(idx, *count);
112 if (!newpads || !newlinks)
115 memmove(*pads + idx + 1, *pads + idx,
sizeof(
AVFilterPad) * (*count - idx));
116 memmove(*links + idx + 1, *links + idx,
sizeof(
AVFilterLink*) * (*count - idx));
118 (*links)[idx] = NULL;
121 for (i = idx + 1; i < *
count; i++)
123 (*(
unsigned *)((
uint8_t *) (*links)[i] + padidx_off))++;
139 "Media type mismatch between the '%s' filter output pad %d (%s) and the '%s' filter input pad %d (%s)\n",
183 unsigned filt_srcpad_idx,
unsigned filt_dstpad_idx)
189 "between the filter '%s' and the filter '%s'\n",
193 if ((ret =
avfilter_link(filt, filt_dstpad_idx, link->
dst, dstpad_idx)) < 0) {
202 filt->
inputs[filt_srcpad_idx] = link;
225 for (i = 0; i < filter->
nb_inputs; i ++) {
237 case AVLINK_STARTINIT:
249 "with more than one input "
250 "must set config_props() "
251 "callbacks on all outputs\n");
254 }
else if ((ret = config_link(link)) < 0) {
256 "Failed to configure output pad on %s\n",
261 switch (link->
type) {
278 }
else if (!link->
w || !link->
h) {
280 "Video source filters must set their output link's "
281 "width and height\n");
297 if ((ret = config_link(link)) < 0) {
299 "Failed to configure input pad on %s\n",
315 "link[%p s:%dx%d fmt:%s %s->%s]%s",
316 link, link->
w, link->
h,
326 "link[%p r:%d cl:%s fmt:%s %s->%s]%s",
368 int i,
min = INT_MAX;
378 min =
FFMIN(min, val);
384 static const char *
const var_names[] = {
"t",
"n",
"pos", NULL };
412 NULL, NULL, NULL, NULL, 0, ctx->
priv);
415 "Error when evaluating the expression '%s' for enable\n",
439 if(!strcmp(cmd,
"ping")){
440 char local_res[256] = {0};
444 res_len =
sizeof(local_res);
447 if (res == local_res)
450 }
else if(!strcmp(cmd,
"enable")) {
461 #if !FF_API_NOCONST_GET_NAME
472 if (!strcmp(f->
name, name))
489 || (!input->start_frame && !input->end_frame));
496 last_filter = &filter->
next;
506 #if FF_API_OLD_FILTER_REGISTER
512 void avfilter_uninit(
void)
524 for (count = 0; pads->
name; count++)
564 #define OFFSET(x) offsetof(AVFilterContext, x)
565 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM
585 int *
ret,
int nb_jobs)
589 for (i = 0; i < nb_jobs; i++) {
590 int r =
func(ctx, arg, i, nb_jobs);
671 #if FF_API_AVFILTER_OPEN
675 return *filter_ctx ? 0 :
AVERROR(ENOMEM);
711 for (i = 0; i < filter->
nb_inputs; i++) {
751 const char *shorthand = NULL;
763 &parsed_key, &
value);
816 #if FF_API_AVFILTER_INIT_FILTER
869 "options, but options were provided: %s.\n", args);
873 #if FF_API_OLD_FILTER_OPTS
874 if ( !strcmp(filter->
filter->
name,
"format") ||
877 !strcmp(filter->
filter->
name,
"frei0r_src") ||
894 if (!strcmp(filter->
filter->
name,
"frei0r") ||
897 else if (!strcmp(filter->
filter->
name,
"frei0r_src"))
900 while (nb_leading--) {
903 p = copy + strlen(copy);
909 deprecated = strchr(p,
':') != NULL;
911 if (!strcmp(filter->
filter->
name,
"aevalsrc")) {
913 while ((p = strchr(p,
':')) && p[1] !=
':') {
914 const char *epos = strchr(p + 1,
'=');
915 const char *spos = strchr(p + 1,
':');
916 const int next_token_is_opt = epos && (!spos || epos < spos);
917 if (next_token_is_opt) {
925 if (p && *p ==
':') {
927 memmove(p, p + 1, strlen(p));
930 while ((p = strchr(p,
':')))
935 "'|' to separate the list items.\n");
949 if (!strncmp(args,
"filter=", 7))
984 return pads[pad_idx].
name;
989 return pads[pad_idx].
type;
1020 switch (link->
type) {
1040 switch (link->
type) {
1062 "Processing command time:%f command:%s arg:%s\n",
1095 int insamples = frame->
nb_samples, inpos = 0, nb_samples;
1108 "Samples dropped due to memory allocation failure.\n");
1117 nb_samples =
FFMIN(insamples,
1121 nb_samples, nb_channels, link->
format);
1122 inpos += nb_samples;
1123 insamples -= nb_samples;