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 83E0B4884D for ; Mon, 18 Dec 2023 17:33:55 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 767FC68D0E0; Mon, 18 Dec 2023 19:33:52 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7448368CF3E for ; Mon, 18 Dec 2023 19:33:46 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id BC27B2405ED for ; Mon, 18 Dec 2023 18:33:45 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id FAXPnSDugC3S for ; Mon, 18 Dec 2023 18:33:45 +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 1C09C2400AC for ; Mon, 18 Dec 2023 18:33:45 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 0881F1601B9; Mon, 18 Dec 2023 18:33:45 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: References: <170245852534.8914.12550775596488175101@lain.khirnov.net> <170254011817.8914.11563902500718557350@lain.khirnov.net> Mail-Followup-To: FFmpeg development discussions and patches Date: Mon, 18 Dec 2023 18:33:45 +0100 Message-ID: <170292082501.8914.10077474434835822133@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [RFC] fftools/ffmpeg and libavdevice/sdl issue 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: Quoting Stefano Sabatini (2023-12-16 16:18:07) > On date Thursday 2023-12-14 10:35:56 +0100, Nicolas George wrote: > > Anton Khirnov (12023-12-14): > [...] > > > I have to strongly disagree. This is neither practically workable, > > > nor a good goal to aim at. > > > > And I strongly agree with Stefano. Having the tools just thin wrappers > > around the libraries is the only way to ensure the libraries are > > maximally useful for other applications. Otherwise, useful code will > > only reside in the tools and be only available through a clumsy > > command-line interface. > > > > > This mindset IMO inevitably leads to (among > > > other problems): > > > > * endless scope creep > > Scope creep is a general tendency in software, as it tends to grow > with more functionality and use cases in mind (FFmpeg itself started > as an MPEG decoder). OTOH there is good and bad scope creep, it is bad > if the functionality goes beyond the original design and core use > case, or if the extension is not carefully designed and suffers from > assumptions which limit how the software can be used. For example, > making constraints about where the main thread can be executed. > > (Unrelated note: I greatly appreciate Anton's threaded architecture > endeavor, and I'm fine with the idea that something can result broken > as a consequence of a major redesign, but I also think we should fix > what can be fixed rather than just dismiss that as "not useful". The entire question here is whether SDL muxing is useful enough to warrant massive hacks in ffmpeg CLI. > > > * bloated, inefficient, and buggy libraries, trying (and failing) to > > > support every use case under the sun > > > > * myopic API design aimed at fulfilling the needs of precisely one > > > caller; this is a problem e.g avfilter badly suffers from, and to a > > > lesser extent avformat > > Note that these two statements conflicting. If you try to support most > of the use cases, it will be flexible by definition. For example, if > we design the API to be only usable from ffmpeg.c, it will be limited > in scope and usefullness. There is a subtle but important difference between * an interface that goes out of its way to explicitly support a large number of specific usecases * an interface that is generic and flexible enough to be applicable to a wide range of cases The crucial distinction is that the first case is about your code doing MORE, while the second is about doing LESS. -- 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".