40 #include "libavutil/ffversion.h"
49 "ref[%p buf:%p data:%p linesize[%d, %d, %d, %d] pts:%"PRId64
" pos:%"PRId64,
55 ff_tlog(ctx,
" a:%d/%d s:%dx%d i:%c iskey:%d type:%c",
64 ff_tlog(ctx,
" cl:%"PRId64
"d n:%d r:%d",
70 ff_tlog(ctx,
"]%s", end ?
"\n" :
"");
81 return FFMPEG_CONFIGURATION;
86 #define LICENSE_PREFIX "libavfilter license: "
107 idx =
FFMIN(idx, *count);
115 if (!newpads || !newlinks)
118 memmove(*pads + idx + 1, *pads + idx,
sizeof(
AVFilterPad) * (*count - idx));
119 memmove(*links + idx + 1, *links + idx,
sizeof(
AVFilterLink*) * (*count - idx));
121 (*links)[idx] =
NULL;
124 for (i = idx + 1; i < *
count; i++)
126 (*(
unsigned *)((
uint8_t *) (*links)[i] + padidx_off))++;
142 "Media type mismatch between the '%s' filter output pad %d (%s) and the '%s' filter input pad %d (%s)\n",
186 unsigned filt_srcpad_idx,
unsigned filt_dstpad_idx)
192 "between the filter '%s' and the filter '%s'\n",
196 if ((ret =
avfilter_link(filt, filt_dstpad_idx, link->
dst, dstpad_idx)) < 0) {
205 filt->
inputs[filt_srcpad_idx] = link;
228 for (i = 0; i < filter->
nb_inputs; i ++) {
233 if (!link->
src || !link->
dst) {
235 "Not all input and output are properly linked (%d).\n", i);
245 case AVLINK_STARTINIT:
257 "with more than one input "
258 "must set config_props() "
259 "callbacks on all outputs\n");
262 }
else if ((ret = config_link(link)) < 0) {
264 "Failed to configure output pad on %s\n",
269 switch (link->
type) {
286 }
else if (!link->
w || !link->
h) {
288 "Video source filters must set their output link's "
289 "width and height\n");
305 if ((ret = config_link(link)) < 0) {
307 "Failed to configure input pad on %s\n",
323 "link[%p s:%dx%d fmt:%s %s->%s]%s",
324 link, link->
w, link->
h,
334 "link[%p r:%d cl:%s fmt:%s %s->%s]%s",
376 int i,
min = INT_MAX;
386 min =
FFMIN(min, val);
438 "Error when evaluating the expression '%s' for enable\n",
462 if(!strcmp(cmd,
"ping")){
463 char local_res[256] = {0};
467 res_len =
sizeof(local_res);
470 if (res == local_res)
473 }
else if(!strcmp(cmd,
"enable")) {
484 #if !FF_API_NOCONST_GET_NAME
495 if (!strcmp(f->
name, name))
512 || (!input->start_frame && !input->end_frame));
519 last_filter = &filter->
next;
529 #if FF_API_OLD_FILTER_REGISTER
535 void avfilter_uninit(
void)
547 for (count = 0; pads->
name; count++)
587 #define OFFSET(x) offsetof(AVFilterContext, x)
588 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM
608 int *
ret,
int nb_jobs)
612 for (i = 0; i < nb_jobs; i++) {
613 int r =
func(ctx, arg, i, nb_jobs);
694 #if FF_API_AVFILTER_OPEN
698 return *filter_ctx ? 0 :
AVERROR(ENOMEM);
734 for (i = 0; i < filter->
nb_inputs; i++) {
774 const char *shorthand =
NULL;
786 &parsed_key, &
value);
839 #if FF_API_AVFILTER_INIT_FILTER
892 "options, but options were provided: %s.\n", args);
896 #if FF_API_OLD_FILTER_OPTS
897 if ( !strcmp(filter->
filter->
name,
"format") ||
900 !strcmp(filter->
filter->
name,
"frei0r_src") ||
917 if (!strcmp(filter->
filter->
name,
"frei0r") ||
920 else if (!strcmp(filter->
filter->
name,
"frei0r_src"))
923 while (nb_leading--) {
926 p = copy + strlen(copy);
932 deprecated = strchr(p,
':') !=
NULL;
934 if (!strcmp(filter->
filter->
name,
"aevalsrc")) {
936 while ((p = strchr(p,
':')) && p[1] !=
':') {
937 const char *epos = strchr(p + 1,
'=');
938 const char *spos = strchr(p + 1,
':');
939 const int next_token_is_opt = epos && (!spos || epos < spos);
940 if (next_token_is_opt) {
948 if (p && *p ==
':') {
950 memmove(p, p + 1, strlen(p));
953 while ((p = strchr(p,
':')))
958 "'|' to separate the list items.\n");
992 return pads[pad_idx].
name;
997 return pads[pad_idx].
type;
1028 switch (link->
type) {
1048 switch (link->
type) {
1070 "Processing command time:%f command:%s arg:%s\n",
1105 int insamples = frame->
nb_samples, inpos = 0, nb_samples;
1118 "Samples dropped due to memory allocation failure.\n");
1127 nb_samples =
FFMIN(insamples,
1131 nb_samples, nb_channels, link->
format);
1132 inpos += nb_samples;
1133 insamples -= nb_samples;