From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 4B61F401A8 for ; Fri, 21 Feb 2025 13:09:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 906E668C664; Fri, 21 Feb 2025 15:09:53 +0200 (EET) Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A647068C664 for ; Fri, 21 Feb 2025 15:09:46 +0200 (EET) X-ENS-nef-client: 129.199.129.80 ( name = phare.normalesup.org ) Received: from phare.normalesup.org (phare.normalesup.org [129.199.129.80]) by nef.ens.fr (8.14.4/1.01.28121999) with ESMTP id 51LD9jPV016932 for ; Fri, 21 Feb 2025 14:09:46 +0100 Received: by phare.normalesup.org (Postfix, from userid 1001) id D54762EFDF; Fri, 21 Feb 2025 14:09:45 +0100 (CET) Date: Fri, 21 Feb 2025 14:09:45 +0100 From: Nicolas George To: FFmpeg development discussions and patches Message-ID: References: <0750b971f9ae0fc38917e0a3b3ccb7ad2e8cd221.1739959172.git.ffmpegagent@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <0750b971f9ae0fc38917e0a3b3ccb7ad2e8cd221.1739959172.git.ffmpegagent@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Fri, 21 Feb 2025 14:09:46 +0100 (CET) Subject: Re: [FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_graphprint: Add options for filtergraph printing X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: softworkz (HE12025-02-19): > From: softworkz > > The key benefits are: > > - Different to other graph printing methods, this is outputting: > - all graphs with runtime state > (including auto-inserted filters) > - each graph with its inputs and outputs > - all filters with their in- and output pads > - all connections between all input- and output pads > - for each connection: > - the runtime-negotiated format and media type > - the hw context > - if video hw context, both: hw pixfmt + sw pixfmt > - Output can either be printed to stdout or written to specified file > - Output is machine-readable > - Use the same output implementation as ffprobe, supporting multiple > formats > > Note: This commit includes only the default and JSON writers. This patch contains a lot of code copy-pasted from ffprobe. Moreover, it is copy-pasted from 2018 ffprobe, with seven years of bugfixes omitted. Copy-pasting non-trivial amounts of code is a big no, experienced developers should know better. It is a big no among other reasons precisely because bug fixes on one copy will likely be skipped on the other copies. When the same code is needed in multiple parts of the project, it needs to be moved into a library with a proper API. For JSON, and more generally ffprobe's writers, since it was quite obvious we need structured output at other places than ffprobe, I had started working on it. IIRC, I had the JSON output done, with no dynamic allocations if the structure is not too deep. But of course, since it uses strings, it requires a good strings API, which is being blocked. Regards, -- Nicolas George _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".