Hi Nicolas,
Since the Forgejo web discussion isn't accessible without a
browser, here is a summary of the PR review history and key
discussion points.
PR OVERVIEW
This PR adds directional command propagation to FFmpeg's filter
graph system, split into two commits:
Commit 1 -- avfilter: enhance command processing with subgraph
propagation and direction control
- Adds AVFILTER_CMD_FLAG_FORWARD (4) and
AVFILTER_CMD_FLAG_BACKWARD (8) flags to avfilter.h
- Refactors avfilter_process_command() to support recursive
chain traversal along/against data flow
- Blocks FORWARD/BACKWARD in avfilter_graph_send_command()
and avfilter_graph_queue_command() (subgraph traversal only
makes sense at filter level)
- Adds mutual exclusion check: FORWARD and BACKWARD cannot
be set simultaneously
- Bumps LIBAVFILTER_VERSION_MINOR to 13
Commit 2 -- avfilter/f_sendcmd: add mode option for command
propagation direction
- Adds mode option to sendcmd/asendcmd: graph (default,
original behavior), forward, backward
- In forward/backward modes, locates target filter by
instance name (e.g. volume@v1) and calls
avfilter_process_command() with the appropriate flag
- Adds 5 FATE tests: graph mode, forward, backward,
multi-target propagation, and subgraph isolation
REVIEW HISTORY
1) michaelni raised a concern about infinite loops in cyclic
filter graphs.
Resolution: FFmpeg's scheduler performs cycle detection via
DFS during initialization (ffmpeg_sched.c:1435-1508). Cyclic
graphs are rejected outright at runtime, so infinite recursion
cannot occur. As documented in ffmpeg.texi, feedback patterns
must use multiple independent filter graphs, not cycles within
a single graph.
2) Nicolas George (you) requested a patch series with real
examples demonstrating the use case.
Resolution: Commit 2 was added, extending sendcmd/asendcmd
with the mode option and accompanying FATE tests.
3) Zhao Zhili reviewed the code and provided the following
feedback:
a) Merge FATE tests from the separate PR #21156 into this
PR -- done.
b) Several coding style issues -- all fixed.
c) Second commit description should focus on the f_sendcmd
feature rather than FATE tests -- adjusted.
d) Asked why FATE tests use filter_complex_script instead
of inline filtergraphs.
Resolution: The FATE test framework has a known shell
quoting limitation -- in fate-run.sh, the ffmpeg()
function uses "for arg in $@" (without quotes around
$@), which causes word-splitting on spaces. Since
asendcmd parameters contain single quotes and spaces
(e.g. commands='0.0 volume volume 0.5'), inline
filtergraphs get broken into separate arguments. The
tests now use -/filter_complex with static filtergraph
files stored in tests/filtergraphs/ (git-tracked, copied
to tests/data/filtergraphs/ by the Makefile), avoiding
the deprecated filter_complex_script while sidestepping
the quoting issue.
CURRENT STATUS
- Lint check: passed
- FATE tests (amd64/aarch64 32/64-bit, wine): passed
- All review comments from Zhao Zhili addressed
- Zhao Zhili's verdict: LGTM
- Awaiting 1 approval to merge
The latest patches are at:
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20731.patch
Happy to provide any additional details or clarifications.
Regards,
Zhanquan Cen
________________________________
发件人: Nicolas George via ffmpeg-devel <[email protected]>
发送时间: 2026年3月1日 19:44
收件人: FFmpeg development discussions and patches
抄送: Nicolas George
主题: [External Mail][FFmpeg-devel] Re: [PATCH] avfilter: enhance command
processing with chain propagation and direction control. (PR #20731)
[外部邮件] 此邮件来源于小米公司外部,请谨慎处理。若对邮件安全性存疑,请将邮件转发给[email protected]进行反馈
Marvin Scholz (HE12026-02-27):
> https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20731.patch
Thanks, but what I am seeing are only the code changes. Not the comments
already done and the replies to these comments, all of it necessary to
understand why the code is like that and review usefully.
> or checkout the process_cmd branch of
> https://code.ffmpeg.org/cenzhanquan1/FFmpeg.git
As expected (because I know how git works), no more information in
there. Only a >180 megaoctets download, good thing my internet access is
not metered.
Please do not override reply-to settings.
Regards,
--
Nicolas George
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]