From patchwork Wed Aug 17 21:49:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 37332 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp331162pzh; Wed, 17 Aug 2022 14:50:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR7owqSvb+7s9KoG1lP2A7Cs6WFnDV8pKjji8MZRD/3bGOS9lLANMuTpn6mS7Y7S13M7ROkh X-Received: by 2002:a17:907:7d91:b0:731:7ecb:1e5b with SMTP id oz17-20020a1709077d9100b007317ecb1e5bmr27808ejc.78.1660773002019; Wed, 17 Aug 2022 14:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660773002; cv=none; d=google.com; s=arc-20160816; b=eNSrLpQpqAc8oJj4SDrBTVxMAGdaI7b4p1TtBwQLtbINB2Zq2sgCRcgMFDR7YBVF5n J0NFBS7O2OZrqq0+98bgpiWRXz/uRjUEVnfniQ/a773EvQjEAREYI0EDtJ6iP1++b4Cg FH8MxbsQShNziT/+wEEhQ7WP/zbWryKhlN6aLWRbbqC3TN12Qe5r5EWJ3nIvcu/ZJEPk zX6piOoS+EUHRHVPKSxxx2yHiHpHkn0TfVowzYBQXlIZ41V72XdVoGFe9g0XWcm3x0PX 9YMxeqiQBzXe36rWs1qIJqGS7ga+KdeFu2lUQpZ4ECQmGu8GPIsH1a9aIPkf0x7W8b2/ +FLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=KxEvzYsGD7ZZezQtRwQBgv500pXrtXjhRYBrGaPnDuI=; b=UDEXvlAtjMiw8bxtvhpprOJR+/jKvPpCQXBy3ubUu5n7jc3QfQoClUhBT8YlyJkpmu /egFDl8LQbxGo0lDsnS+MxRqGbaY55CPgOg8HmUEj5FIazRd5UfLwEFFsomTGSTWMcT0 mcvoh5SUW7ufyEqALmaemAV7K3soCzYIDwz6oTBdaxze9ULr66FkJXup5cjaRDVI9Qdu 36i075cw4qGR3UAob1VbfRsysbu8IcAnrHITpFhFhDSFmVWGOvJly7IR1HbpMuWLqZt1 ZwSEaGze3j5r3VVzF4OCdK6E8FEMn0AgZRjfmmbGykJMAKnjNBQTQnwp5M0z8O3IG5YU c/qQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v8-20020a50d088000000b00442350167dbsi11854122edd.421.2022.08.17.14.49.53; Wed, 17 Aug 2022 14:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4629568B92B; Thu, 18 Aug 2022 00:49:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 67DE868B45F for ; Thu, 18 Aug 2022 00:49:42 +0300 (EEST) 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 27HLnfmk004327 for ; Wed, 17 Aug 2022 23:49:41 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id 7A2BDE0101; Wed, 17 Aug 2022 23:49:41 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Wed, 17 Aug 2022 23:49:31 +0200 Message-Id: <20220817214932.42351-1-george@nsup.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Wed, 17 Aug 2022 23:49:41 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 1/2] doc/plans: add a file to list approved projects 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: PkwHQgeV92NL This file makes it easier to engage in ambitious and/or long-term projects for enhancing FFmpeg by removing earlier the uncertainty of acceptance on principle. Signed-off-by: Nicolas George --- doc/plans.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/plans.md Reference to discussion: https://ffmpeg.org/pipermail/ffmpeg-devel/2022-August/300193.html diff --git a/doc/plans.md b/doc/plans.md new file mode 100644 index 0000000000..0d7336e8b4 --- /dev/null +++ b/doc/plans.md @@ -0,0 +1,6 @@ +# Plans for future developments + +Projects listed below have been approved by the FFmpeg developers community, +and their author(s) can invest time and effort implementing them. The +resulting patches will be subject to technical review like any other +patches, but they can no longer be rejected on principle. From patchwork Wed Aug 17 21:49:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas George X-Patchwork-Id: 37333 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp331171pzh; Wed, 17 Aug 2022 14:50:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR4DRX2dMDOU+1986vLJ7XcsGEZo/CCkL9eMWJ3SpVsqsbmTu7NOUgyHmnTXpKDoDZDcrK5k X-Received: by 2002:a17:907:7d90:b0:738:2f9b:9869 with SMTP id oz16-20020a1709077d9000b007382f9b9869mr24646ejc.186.1660773006284; Wed, 17 Aug 2022 14:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660773006; cv=none; d=google.com; s=arc-20160816; b=NA4UsiwmUqgAHW2VJplPJF0MWZaT+ZoEzN4+PV6JyjnE0/EeYyGnbbSFic+/akhBVV jAFPTpvK0Qzz+cbNCqX52qIPioubEjdqoWiOAbROlIBJi9sWTh2z7atRNz4sk1VmD40G o50Li28iQowPWDMp4f7DTYjmbwEeuPEG8EgQhMcJtw8EoRGFWCe46W9mV8IGmBTkRB8+ g75y4Msa1x+lWLFjzMWQwEN8hOpPE2deKeaBnUvdzE42AWYoR76nCC0MBjJ0Bx75zwqb iFletrrCrgy8HD50Wf+2BnZurNgjdicLzGKcN1qi0e0CGfX7ASLYWpFZaa2111P5D9+j YeHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=TvjiBCeioIWmUYnfbLlzQWFuoHbxeDEbTp0zoGtI2us=; b=zXGJBdWq58XvCs3/mfuzIqrNnkLBT5YdVyaVC/2AnyNy82uOPtwTL2ACVnZlNbvxBe zxvP6AQPxqfLKEasPUbxFROlrBAOf3RVndYshazSzb2loyMyWjZ4qJeghfrTUW+zTmwa tLYzPxSpVvnmpa/jyKN3eAp5r3S0E2MQ4vyhDKBN4PoFDME+EZaD409FYIwGJcMqpHBO as3JcAui6LAcdSnVOBlCqlfNFtfkVhjUe1lSJC3JA3nsVupihpIllimqZLWq17CKTRTy 81jq7a8GIm7g/EZjnOz5KetOHw18uMHhY1Ct6TUpH50bF5HM+1sjyxnrenJ+5wxgnonE wGqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fs14-20020a170907600e00b00726b8d2fbc6si10855813ejc.504.2022.08.17.14.50.04; Wed, 17 Aug 2022 14:50:06 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 625DF68B93E; Thu, 18 Aug 2022 00:49:51 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from nef.ens.fr (nef2.ens.fr [129.199.96.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 27D3168B45F for ; Thu, 18 Aug 2022 00:49:43 +0300 (EEST) 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 27HLng2Z004330 for ; Wed, 17 Aug 2022 23:49:42 +0200 Received: by phare.normalesup.org (Postfix, from userid 1001) id 69E2DE0101; Wed, 17 Aug 2022 23:49:42 +0200 (CEST) From: Nicolas George To: ffmpeg-devel@ffmpeg.org Date: Wed, 17 Aug 2022 23:49:32 +0200 Message-Id: <20220817214932.42351-2-george@nsup.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220817214932.42351-1-george@nsup.org> References: <20220817214932.42351-1-george@nsup.org> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef.ens.fr [129.199.96.32]); Wed, 17 Aug 2022 23:49:42 +0200 (CEST) Subject: [FFmpeg-devel] [PATCH 2/2] doc/plans: add AVWriter 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: U57OgQFdJxza Signed-off-by: Nicolas George --- doc/plans.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/doc/plans.md b/doc/plans.md index 0d7336e8b4..d96328aabc 100644 --- a/doc/plans.md +++ b/doc/plans.md @@ -4,3 +4,41 @@ Projects listed below have been approved by the FFmpeg developers community, and their author(s) can invest time and effort implementing them. The resulting patches will be subject to technical review like any other patches, but they can no longer be rejected on principle. + +## AVWriter: a unified API for building and returning strings + +**Author:** Nicolas George + +An API that can be used everywhere a function needs to return a string, or +really an arbitrary buffer of bytes, and everywhere code needs to build a +string from parts. It needs to be fast and lightweight enough to be used in +tight loops, like once per frame, without limiting the size of the returned +string when needed. It should make checking for overflows and possible +memory allocation errors simple. It should easily be compatible with other +uses of strings, especially standard C buffers. + +AVWriter is an enhancement on the AVBPrint API; AVBPrint already achieves +some of these objectives but not all. + +Like other FFmpeg components, AVWriter is designed as a limited +object-oriented virtual class / interface with multiple implementations. To +let applications define their own writers and allocate structures on the +stack or as part of their data, structures contain their own size and the +code only accesses fields that exist. + +Some functions are specific to a particular implementation of AVWriter; for +example getting a mallocated buffer from a dynamic AVWriter. It is the +responsibility of the caller to use the right type, which will usually be +enforced by an assert. + +**Future plans where AVWriter will help:** + +A universal API to return the string associated with an elementary type +(pixel format, channel layout, etc.) and to serialize complex types, +especially side data. + +A system to store error messages in contexts instead of logging them, to +make it easier for applications, especially GUI, to display them cleanly. + +An extension to `avwriter_printf()` to use any serializable object directly +from the format string.