64 #define CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format)\
65 if (c->w != width || c->h != height || c->pix_fmt != format) {\
66 av_log(s, AV_LOG_INFO, "Changing frame properties on the fly is not supported by all filters.\n");\
69 #define CHECK_AUDIO_PARAM_CHANGE(s, c, srate, ch_layout, format)\
70 if (c->sample_fmt != format || c->sample_rate != srate ||\
71 c->channel_layout != ch_layout) {\
72 av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\
73 return AVERROR(EINVAL);\
143 "%d buffers queued in %s, something may be wrong.\n",
156 #ifdef FF_API_BUFFERSRC_BUFFER
168 #define OFFSET(x) offsetof(BufferSourceContext, x)
169 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
186 char pix_fmt_str[128], sws_param[256] =
"", *colon, *equal;
189 c->
class = &buffer_class;
195 colon = strchr(args,
':');
196 equal = strchr(args,
'=');
197 if (equal && (!colon || equal < colon)) {
203 if ((n = sscanf(args,
"%d:%d:%127[^:]:%d:%d:%d:%d:%255c", &c->
w, &c->
h, pix_fmt_str,
206 av_log(ctx,
AV_LOG_ERROR,
"Expected at least 7 arguments, but only %d found in '%s'\n", n, args);
238 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_AUDIO_PARAM
254 s->
class = &abuffer_class;
285 "tb:%d/%d samplefmt:%s samplerate:%d chlayout:%s\n",
341 switch (link->
type) {
399 .description =
NULL_IF_CONFIG_SMALL(
"Buffer video frames, and make them accessible to the filterchain."),
407 .
outputs = avfilter_vsrc_buffer_outputs,
408 .priv_class = &buffer_class,
424 .description =
NULL_IF_CONFIG_SMALL(
"Buffer audio frames, and make them accessible to the filterchain."),
432 .
outputs = avfilter_asrc_abuffer_outputs,
433 .priv_class = &abuffer_class,