From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 805B84BE3E
	for <ffmpegdev@gitmailbox.com>; Wed, 30 Apr 2025 02:57:04 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 41E3868AFBF;
	Wed, 30 Apr 2025 05:57:00 +0300 (EEST)
Received: from NAM10-BN7-obe.outbound.protection.outlook.com
 (mail-bn7nam10olkn2022.outbound.protection.outlook.com [40.92.40.22])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EE78F687DE7
 for <ffmpeg-devel@ffmpeg.org>; Wed, 30 Apr 2025 05:56:53 +0300 (EEST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
 b=WUBTBtuTw456WaDXSK4Zcp2M5Rg6f8wose9ecZHx4MApWpSydj3yzTGKD7zvIJzv8WF85SorY8J7fIe/zL8rD2DVilfJVUag+i9hvJC5CzsJ8z0BIJIzPUbLMKNH6S5DPU4ZWFMWO4PiR1zkshD4YMU8TB5kHb8uRSUNSqWCMpXHHp/S78AtXnU44GOXQrnCJyWx76kJlynd9VFuGuG8L9gshzv5CcIWs7ss5XuymJ7kFlBxvz/LZQ2MoQ0kFliAnIXxIfsH92cOKe0megoL3PSK2RCvYK4JDZkR/NARmioMnQykiIhibLmbXf9kUdqsy0u81B9cUJyUoqwYugtwbg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector10001;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=Nh9gv2c6cZ74MJj2us8uhZ4YI4fw/+ZczGi3pCWIx5k=;
 b=UvENAa69AMs1vtdOp/cRPEiXRPqCiSNbyFJlUR5FBREkVWvLWIBTmLqE+RJW98AiDMVDwKLm7OVidx3DWoickHC3zk8DdJIO8pNLVC+7DrccJppnjaiS1RjLmNsZnriZQbAjlBG5GcsbJicmO/bWkB9vg0AjXGR0WUe9SWnD0pW/473Miuh6T6dkP8sR6scIZT3+pq5O+pT7jdS8RT+vzNHWCYcpddkWfuXDP+HLY2r3pesWaXXLnzrjaC2a3rcVq17QzzaMQMgLURTrKDckinKuGuZobhFDEcIfeEY2Vh/gxMZMBLQOOjOL9BPl6fCkl+uCgSMbaM4DzcBOJxV1rw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
 dkim=none; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com;
 s=selector1;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=Nh9gv2c6cZ74MJj2us8uhZ4YI4fw/+ZczGi3pCWIx5k=;
 b=FO8AzaRsD5tVjSpghDfJZuZ2BMjdRGxYSVGVw02C/tbK5qTzMTPBKTMJxUxU1XUzBEp3eBDMdLWJDcyJCyL+lu1NzWdTtBa49CPUaB9iUF9kjJa/pCkgo8r7S+k6bprv+aTeOYbMivI3dTcLHMEFgoN6OoS7uXKkhHH6/UYZEvI2YVK41ciIx7nHVHQORvlq2wq/zcVvqllYe689P2jksXyWD40OmTSZF3xgSvC/XE2WI1FeYChWDrVOVhJwbgimNdemX5RWe1H+Hb+94/lzuTUfwGT1UMEXCTuq6FUO0Y2jeOJet1Y9R52peAqb8kOpOTrsxcRh7GUG5asBf2iXnQ==
Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM (2603:10b6:8:b::20) by
 DS4PPFA8B6A3C64.NAMP223.PROD.OUTLOOK.COM (2603:10b6:f:fc00::b6) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8678.27; Wed, 30 Apr
 2025 02:56:51 +0000
Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM
 ([fe80::bf09:8e9:b07f:98a7]) by DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM
 ([fe80::bf09:8e9:b07f:98a7%4]) with mapi id 15.20.8699.019; Wed, 30 Apr 2025
 02:56:51 +0000
From: "softworkz ." <softworkz-at-hotmail.com@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Thread-Topic: [FFmpeg-devel] [RFC] Shaping the AVTextFormat API Surface
Thread-Index: AduzMDhGXdsgXHAcTguhmPiAzJ4vgQCC8qyAAIgInIAAYTg4gAAST4cAABKsK0A=
Date: Wed, 30 Apr 2025 02:56:50 +0000
Message-ID: <DM8P223MB03659894B8CCA23652D7524FBA832@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM>
References: <DM8P223MB036504CFC0521633C2ADCCE3BABB2@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM>
 <aApw6eiupyMBT5mm@phare.normalesup.org> <aA4B0eruJJhLzfpq@mariano>
 <aBCOPyA3Bt1aFnbj@phare.normalesup.org>
 <DM8P223MB0365CEB594A34DCD8FBDCD52BA802@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM>
In-Reply-To: <DM8P223MB0365CEB594A34DCD8FBDCD52BA802@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DM8P223MB0365:EE_|DS4PPFA8B6A3C64:EE_
x-ms-office365-filtering-correlation-id: 4952ddda-b2aa-4670-0108-08dd8792a7ee
x-microsoft-antispam: BCL:0;
 ARA:14566002|15080799006|7092599003|461199028|8062599003|8022599003|19110799003|8060799006|3412199025|440099028|102099032;
x-microsoft-antispam-message-info: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athVZjoKgVXoG5j9ocqqGU+n9bVoqccBwUlMXFrZfDOTNd0LHG6ikSaag5?=
 =?us-ascii?Q?vhn4Or1Ea8W75SSFKvXphGE5l9ls9G9h4iOHH77blf7huV0+MQOE07xmN4Lq?=
 =?us-ascii?Q?062yu7Bk1tlYx38w13RC4Kx7QB38otlZH2cRzOgwvivg3d82oR4xl4EPuOdZ?=
 =?us-ascii?Q?SXU2lC0pRjscJSHuzDF/hxAugjptPQ4F4dQyKvU2dr5yusGJF2lsO4Ud0j08?=
 =?us-ascii?Q?2C68j+cdQhTL3sHdyfjLU2S9OBamQ7uCQBxBH8tPXIJ+CtAzSUmRaG82K8AC?=
 =?us-ascii?Q?kfD4XJetwrgFgrTaIf1hjTUiPfnQvy18gw=3D=3D?=
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?azuo7sjxYe77JKi3rmSMiKH6OsbLkVn9h+1QZTFv6l1wsW5jq2sIc/fCCyLo?=
 =?us-ascii?Q?JAxhVHzJK1Z4h4+Qn9VJuQJ2rEptfzYIBzEAJmhBe0bsy3hJdCtqBKhVk+qc?=
 =?us-ascii?Q?3ZkltnNgIfzlIM7Cyz2sMfAamHTnQANPp54yqxq2skTralq5UfCZ3SjdlF0V?=
 =?us-ascii?Q?jhad3iM9zBlEp5tALlQPTX5HLiL+AKTVD0JqRfeqrzakWwj1ekAVlI8Ou+VZ?=
 =?us-ascii?Q?RS8aeMpEC800xv/FXEGPhMCJZk+LoCW6cCmwTUpXlQHMl04jRf+cRThAbuz4?=
 =?us-ascii?Q?CvxdKt8q1+mdJBM2OOGZCTI8iTrUFDBg2H5bl1CXeec6MnYCrgkVaA5EaVrZ?=
 =?us-ascii?Q?sk80IH1x8vwkF2OtQCydeD56AGO9qj9EpXGI0cB/veorDpiLWlj48bHyxQBw?=
 =?us-ascii?Q?K3f/tBXKK1KHQ6GgmIHWwlS+bditloyVQ8mpJhSQyVMqD9IZt3n89vDoliV8?=
 =?us-ascii?Q?HvuLI1LFipNCfYYjFqr9cNye6EIT0K7olA9vwY/oA0xHYh9gl+MNzQnMnTne?=
 =?us-ascii?Q?2r8NQMaOfHGEtOVJUuZYVy48qhuYo48fwvaVoOFxo905QnSv3/XczcEL9gM0?=
 =?us-ascii?Q?sjhmEZm26dk/TApjAjD66M/pE8/5Pwt86iJWbvDny6gyFmf7ZgusH7dbYs+K?=
 =?us-ascii?Q?Xnos/LSuKu8eH/Fn10EkCPbE1nyzhYcjBSK1E2dPJlXhWbCTZl0dAVQiy418?=
 =?us-ascii?Q?EiWBOLd2OgD8EKLEjbhu+FFAtlzJhmQMwmPIxPlkFiiy55x3znlHoP7ajWwb?=
 =?us-ascii?Q?9CLoLIT8HKRDLkTVKeCvz2jcxzfCe/6cDS1xHqKvN5+ttsVsb7HGvO0S1Sip?=
 =?us-ascii?Q?bF3sihB59x4EBeMgd/6Usa/hpGVhQW+2MQ2o4WXRSCC0tim/oizfjChVYRRN?=
 =?us-ascii?Q?o7Mi8QPdaUCxvORsCCVXQjj9Ot2qRTEiV/oU/g9Fdp8K1oidFBeLwqGjTvgm?=
 =?us-ascii?Q?R+yxjdTWR2HAtUo5YfEWNgogaWIwQPAeW42Vzgv7BHQHoTD5KKaN5uYNwXSx?=
 =?us-ascii?Q?uznNWjcasfcF/BgftoYZ6tgZPyRmzkiLjwyUX7VGK+IMjUN3b/mWcCRXQMxi?=
 =?us-ascii?Q?i5hPvduAWA4fPeFdJv2wFAqnyMtO3/x2hhwubNbcY7R2scubWE6/wYM0EyEO?=
 =?us-ascii?Q?pbQLSzToq9c1yAvH80XGWBr4ADT4ChLGf1jeoGWk90Eac1emljuUTqAxXZd0?=
 =?us-ascii?Q?2ThKkxjbxG0wEkyr4AE8JamkOEQXHcPZFBn+tDlPcUJADdG2y+sTIQFbQrw?=
 =?us-ascii?Q?=3D?=
MIME-Version: 1.0
X-OriginatorOrg: sct-15-20-7719-20-msonline-outlook-92255.templateTenant
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-CrossTenant-Network-Message-Id: 4952ddda-b2aa-4670-0108-08dd8792a7ee
X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2025 02:56:50.8717 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS4PPFA8B6A3C64
Subject: Re: [FFmpeg-devel] [RFC] Shaping the AVTextFormat API Surface
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/DM8P223MB03659894B8CCA23652D7524FBA832@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of softworkz .
> Sent: Dienstag, 29. April 2025 20:07
> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [RFC] Shaping the AVTextFormat API Surface
> 
> 
> 
> > -----Original Message-----
> > From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of Nicolas
> > George
> > Sent: Dienstag, 29. April 2025 10:31
> > To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
> > Subject: Re: [FFmpeg-devel] [RFC] Shaping the AVTextFormat API Surface
> >
> > Stefano Sabatini (HE12025-04-27):
> > > Elaborating on this. ffprobe/textformat is based on a notion of
> > > hierarchical tree-like data
> >
> > No, this is not true. FFprobe and all its supporting code is based on
> > one level of hierarchy. Just one level, not a real hierarchical
> > structure.
> >
> > > Considering this, there is probably no need to extend the API to cover
> > > each possible format full semantics - this at least it is my view.
> >
> > If we add XML-writing code in libavutil, it must be usable for all the
> > places we are already producing XML. Otherwise it does not make sense.
> >
> > > As I wrote, this was not the purpose of the ffprobe formats in the
> > > first place. MOV/DASH requires a specific use of an XML encoder. In
> > > theory it might be done using the textformat API in the current form,
> > > but it would be probably pretty awkward. We might want to factorize a
> > > few generic utilities (e.g. escaping) to avoid code duplication
> > > though.
> >
> > You are going at it backwards.
> >
> > The goal is not to cram this text writers API forcefully into libavutil
> > and then see if it might serve other purposes, which is what softworkz
> > is doing.
> 
> No, this is not my intention. I thought I had laid it out a number of
> times already, but in case it didn't come through clearly, let me
> reiterate the agenda that I'm following and proposing:
> 
> 
> 1. Extract the text formatting from ffprobe.c and transform it into
>    a generic API
> 
> 2. Give that API a temporary home inside fftools as a staging area
> 
> 3. Refine and polish the API inside fftools while adding additional
>    use cases (like graph printing)
> 
> 4. Brainstorm and discuss which further changes and refinements are
>    needed to serve all the use cases that we are envisioning for the
>    future and apply those changes
> 
> 5. Move it to avutil once we believe that it's ready for this
> 
> 
> => 1 and 2 are done, 3 is in progress
> 
> I'm not proposing to do 5 before 4.
> 
> 
> > The API must be able to handle all our use cases from the start. Until
> > then, it goes back to the design board.
> 
> I never had any different intentions, albeit it can happen that there's
> some very specific case that it would not be able to serve.
> 
> But it should be able to serve the vast majority of cases, that goes
> without saying.
> 
> 
> A fundamental point from my point of view though, is that the API
> must remain to be built around the sections concept at its core. It's
> a strong concept that enables the exchangeability of the text formatters
> independent from the individual use case. It has a number of
> shortcomings (as has been mentioned already) in terms of how certain
> data maps to the schema of individual formats, but there's sufficient
> room to extend the sections concept in a way that makes it possible
> to get better control of the way how it is represented in certain
> output formats (like XML).
> 
> Being able to add new formats in a way that these become immediately
> available for all use cases is a high value that must not be
> sacrificed. Not every format makes sense for all use cases, but
> the ability to use all formats without any (or just little) extra
> work is (and must remain to be) a key capability of the API.



Additional thoughts:

[Stefano]
> > Considering this, there is probably no need to extend the API to cover
> > each possible format full semantics - this at least it is my view.
[Nicolas]
> If we add XML-writing code in libavutil, it must be usable for all the
> places we are already producing XML. Otherwise it does not make sense.


This illustrates the kind of misunderstanding that appears to
exist, and in this regard, I think, it's important to clear up about 
which kind of API we are talking about and which purposes it is meant
to serve and which not:


The AVTextFormat feature allows to create output data in a wide range
of formats from a generic API that is agnostic to the format.
It is not a format-specific API providing full-featured formatting for
any format.
That's the nature of this API and it won't change as it cannot change.


> it must be usable for all the
> places we are already producing XML. Otherwise it does not make sense

How do you come to that idea? It's a generic, format-agnostic 
text formatting API. It is not an XML API.

I didn't even get it in the first place that that's what you mean,
it's somewhat far off... Hence I also need to clarify this:
Where I said above that it should be able to cover all use cases, I 
meant "all use cases that need multi-format text output".
But not: all cases that need full-featured XML output PLUS all cases
that need full-featured JSON output PLUS all cases that need full-
featured CSV output PLUS all cases that need full-featured YAML 
output, etc.


If you want to create a full-featured XML writer that's fine, it's 
just something different from the AVTextFormat API.


Best regards,
sw




_______________________________________________
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".