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 ESMTP id 592E74866D for ; Wed, 13 Dec 2023 12:39:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0821768D0EA; Wed, 13 Dec 2023 14:39:47 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 04CDF68CFCB for ; Wed, 13 Dec 2023 14:39:41 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id A2FA62405ED; Wed, 13 Dec 2023 13:39:40 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id pA2FTqmYUHIE; Wed, 13 Dec 2023 13:39:40 +0100 (CET) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id EE73A2400AC; Wed, 13 Dec 2023 13:39:39 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id CE4F81601B9; Wed, 13 Dec 2023 13:39:39 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: References: <20231211150725.46473-1-thilo.borgmann@mail.de> <20231211150725.46473-3-thilo.borgmann@mail.de> <170246885429.8914.10051704276943894799@lain.khirnov.net> <170246928230.8914.12754643765966025844@lain.khirnov.net> Mail-Followup-To: FFmpeg development discussions and patches , Thilo Borgmann Date: Wed, 13 Dec 2023 13:39:39 +0100 Message-ID: <170247117981.8914.16828787197695281420@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 2/5] fftools/ffmpeg: move parsing of -stats_* specifiers to lavu/parseutils 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 Cc: Thilo Borgmann 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: Quoting Thilo Borgmann via ffmpeg-devel (2023-12-13 13:15:27) > Am 13.12.23 um 13:08 schrieb Anton Khirnov: > > Quoting Thilo Borgmann via ffmpeg-devel (2023-12-13 13:05:35) > >> Am 13.12.23 um 13:00 schrieb Anton Khirnov: > >>> Quoting Thilo Borgmann via ffmpeg-devel (2023-12-11 16:07:22) > >>>> --- > >>>> fftools/ffmpeg.h | 31 +------ > >>>> fftools/ffmpeg_enc.c | 3 +- > >>>> fftools/ffmpeg_mux_init.c | 152 +++----------------------------- > >>>> libavutil/parseutils.c | 176 ++++++++++++++++++++++++++++++++++++++ > >>>> libavutil/parseutils.h | 102 ++++++++++++++++++++++ > >>>> libavutil/version.h | 2 +- > >>>> 6 files changed, 296 insertions(+), 170 deletions(-) > >>> > >>> Absolutely not. > >>> > >>> This is application code and does not belong in the libraries. > >> > >> How else do we not have a redundant copy of all that and make sure that -stats_* options and the filter understand the same {..} directives? > > > > Why does that filter need to understand the same directives? No other > > filter does. > > Because it is meant to use the file(s) the -stats_* option writes out. The most convenient and most error resilient way is to use the very same format string for -stats_* option as well as for the filter. > > Otherwise it could be a 'usual' scanf-format, but then the user has to translate it from one format into the other - without making mistakes. > But that would also mean to update the filter (if someone realizes it) if the option ever changes. Why does it need a dynamic format at all? Just postulate a fixed format for its input like every other filter and none of this complexity is needed. -- Anton Khirnov _______________________________________________ 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".