From: Nicolas George via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: cenzhanquan1 <code@ffmpeg.org>, Nicolas George <george@nsup.org>
Subject: [FFmpeg-devel] Re: [PATCH] avfilter: add avfilter_forward_command API for recursive command processing. (PR #20621)
Date: Sun, 28 Sep 2025 13:18:31 +0200
Message-ID: <aNkZh0qgjXRQpFrx@phare.normalesup.org> (raw)
In-Reply-To: <175904174886.25.9550971653392209023@bf249f23a2c8>
cenzhanquan1 via ffmpeg-devel (HE12025-09-28):
> PR #20621 opened by cenzhanquan1
> URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20621
> Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20621.patch
>
> This commit introduces a new API that allows commands to be recursively
> forwarded through filter graphs, enabling dynamic control of filters
> at runtime.
>
> Key changes:
>
> 1. Added avfilter_forward_command() function in avfilter.c:
> - Supports both forward and reverse command propagation via
> AVFILTER_CMD_FLAG_REVERSE flag
> - Recursively traverses filter links to find target filters
> - Falls back to filter-specific forward_command callback when available
> - Properly handles "all" target for broadcasting commands
>
> 2. Extended AVFilter struct in filters.h:
> - Added forward_command callback for filter-specific implementations
> - Maintains backward compatibility with existing filters
>
> 3. New API documentation in avfilter.h:
> - Detailed parameter descriptions including pad_idx and flags
> - Clear explanation of AVFILTER_CMD_FLAG_REVERSE behavior
> - Usage examples for common scenarios
>
> 4. Added AVFILTER_CMD_FLAG_REVERSE flag:
> - Enables reverse traversal from sink to source filters
> - Useful for targeting specific filters in complex graphs
Thanks for the patch.
We normally avoid introducing APIs that nothing uses. If this API is
useful, then it probably can be made use of by one of the fftools, most
likely ffmpeg itself. Please submit a patch series that also adds this
use.
Also, please explain what this makes possible that was not already
possible with existing functions, in particular simply
avfilter_process_command() and avfilter_graph_send_command().
Regards,
--
Nicolas George
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
prev parent reply other threads:[~2025-09-28 11:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-28 6:42 [FFmpeg-devel] " cenzhanquan1 via ffmpeg-devel
2025-09-28 11:18 ` Nicolas George via ffmpeg-devel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aNkZh0qgjXRQpFrx@phare.normalesup.org \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@ffmpeg.org \
--cc=george@nsup.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ http://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git