65 #define CHECK_VIDEO_PARAM_CHANGE(s, c, width, height, format)\
66 if (c->w != width || c->h != height || c->pix_fmt != format) {\
67 av_log(s, AV_LOG_INFO, "Changing frame properties on the fly is not supported by all filters.\n");\
70 #define CHECK_AUDIO_PARAM_CHANGE(s, c, srate, ch_layout, format)\
71 if (c->sample_fmt != format || c->sample_rate != srate ||\
72 c->channel_layout != ch_layout) {\
73 av_log(s, AV_LOG_ERROR, "Changing frame properties on the fly is not supported.\n");\
74 return AVERROR(EINVAL);\
146 "%d buffers queued in %s, something may be wrong.\n",
159 #ifdef FF_API_BUFFERSRC_BUFFER
171 #define OFFSET(x) offsetof(BufferSourceContext, x)
172 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
189 char pix_fmt_str[128], sws_param[256] =
"", *colon, *equal;
192 c->
class = &buffer_class;
198 colon = strchr(args,
':');
199 equal = strchr(args,
'=');
200 if (equal && (!colon || equal < colon)) {
206 if ((n = sscanf(args,
"%d:%d:%127[^:]:%d:%d:%d:%d:%255c", &c->
w, &c->
h, pix_fmt_str,
209 av_log(ctx,
AV_LOG_ERROR,
"Expected at least 7 arguments, but only %d found in '%s'\n", n, args);
241 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_AUDIO_PARAM
258 s->
class = &abuffer_class;
286 "Mismatching channel count %d and layout '%s' "
296 "channel layout specified\n");
310 "tb:%d/%d samplefmt:%s samplerate:%d chlayout:%s\n",
368 switch (link->
type) {
425 .description =
NULL_IF_CONFIG_SMALL(
"Buffer video frames, and make them accessible to the filterchain."),
433 .
outputs = avfilter_vsrc_buffer_outputs,
434 .priv_class = &buffer_class,
450 .description =
NULL_IF_CONFIG_SMALL(
"Buffer audio frames, and make them accessible to the filterchain."),
458 .
outputs = avfilter_asrc_abuffer_outputs,
459 .priv_class = &abuffer_class,