Nicolas George: > Andreas Rheinhardt (12021-10-09): >> Currently an API user has no easy way that always works to know >> whether an AVFilter supports commands. One can check for whether >> the filter has any AVOption with AV_OPT_FLAG_RUNTIME_PARAM set, >> but this is a bit of extra work and more importantly it doesn't >> work for all filters: anequalizer, ladspa, drawtext, overlay, pp, >> concat and (a)movie accept commands, but have no AVOptions of this >> type. Tellingly ffprobe/cmdutils.c has to abuse the API and check >> for AVFilter.process_command to know whether a filter accepts commands. >> >> This commit fixes this by adding a new AVFilter flag. > > I do not like it: it requires redundant changes in all the filters. > > It would be more elegant to add avfilter_can_process_commands() that can > check for the process_command callback. > > Regards, >
Quite a lot of these process_command callbacks are actually quite boilerplate; lots of them are just ff_filter_process_command(). I actually intended to factor out this common part in a subsequent patch: https://github.com/mkver/FFmpeg/commits/process_command This would make the flag non-redundant, because then quite a lot of filters supporting commands would no longer have a process_command callback at all. And adding a getter for something that is essentially a flag is IMO very inelegant. - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".