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 6A54D4E226
	for <ffmpegdev@gitmailbox.com>; Sun,  4 May 2025 15:32:45 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3E9C468B2B0;
	Sun,  4 May 2025 18:32:39 +0300 (EEST)
Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com
 [209.85.128.53])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7A282687DD5
 for <ffmpeg-devel@ffmpeg.org>; Sun,  4 May 2025 18:32:33 +0300 (EEST)
Received: by mail-wm1-f53.google.com with SMTP id
 5b1f17b1804b1-43cf58eea0fso14676695e9.0
 for <ffmpeg-devel@ffmpeg.org>; Sun, 04 May 2025 08:32:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1746372752; x=1746977552; darn=ffmpeg.org;
 h=user-agent:in-reply-to:content-disposition:mime-version:references
 :mail-followup-to:message-id:subject:to:from:date:from:to:cc:subject
 :date:message-id:reply-to;
 bh=G7CE46KCqACLhd7DaTGoFOr4H4bWPLt0ZPcJ9htPCyM=;
 b=e7pDobxaAnaDmjEbE3aLhodLYH6D13CPNZb0NRr441HLT3VqqbDEe1UIHGaBiQ99uk
 +Ly2By8ugw1s8YxnLxwR/LQ5KyeECeRYtD41WuSHwBW5XJx7KqmKaLl0O4jWCqfiBmgH
 5UJFWg9N+EyNlrnT0txSClDH95EZ+CHDyiZi2c8SLYSn/TXrqnPUcMLtaMLjDfP519gL
 DlRDCnH6zU7m+6lb8fz1YkMM9IrP2DgJKf6THsDCqGRCKvk3f98tIv1Jg8PV3TDb/l4U
 S8kOuZqYsX9GaNSEK6yYpzvFOb97lw5UkLL/6eKBCasxhahGp4kwv/SHenqhJ8LZXCQJ
 VjIg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1746372752; x=1746977552;
 h=user-agent:in-reply-to:content-disposition:mime-version:references
 :mail-followup-to:message-id:subject:to:from:date:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=G7CE46KCqACLhd7DaTGoFOr4H4bWPLt0ZPcJ9htPCyM=;
 b=hJm03gm6p3s3foEQY1gjAqeDkOHhLeV/DNThFeBimq0GMAO0FfZuQYByafxEU9A5Mg
 AQydAHgdcNT6R4H+u05jpmU+isBdEmxDMa5AhFom8yGJ/e0fFfNzT7P7TsqFYcYcFQqy
 fHiC3EKBeGnkQwX1VGZdvHaFYpAPK3LHH6KNNk/41e3X3EpbMoreUesQ42DACxQ9JEYa
 xIqhNDojIsC+wIUngWl3byUoYCtmE/fMlSlDXjf0AV7+saWeUQe+LrjCpJEBERa+yOKW
 LV5zlNHJ+WANmP7WLZRv0DVlm5YUSzN+iVqcVvqzSxLfiA2ElRxMsD8HUS7LxG4BB7BS
 EWNg==
X-Gm-Message-State: AOJu0YwgAItE4nFaNGvVGzPSiLdxfH6j/BSgL+GDStKhyl3gNNSyxesO
 +2YonKJQ0LITy0t6t7FrQSCF1XVwFt1TpY9z2H3F0Pv2GAhUZJIF8iDbPg==
X-Gm-Gg: ASbGncv008fSDZADG+61qGvJnza9Hw5Ycv1ygivwgnDAXu6LTatuTOU4hPdpXn8saP2
 Ji7tMzQa56EYXUMFVcVpO/fAXZ8X4F2sZXiXDpDaUlEYkheThHn5sacGKw+f/MTLQ6dnAhxYOML
 sVrumi8VYgJNd4Y5FojIsaK1r71z0PgRCuU7HzKFE5mR1E6wfng+hZvNYX/2uenFrv5K46Bk3py
 ti/De0fWDciMwL/Dtykl7T7zqucH3Efq6HiMO9gN67F3A44Kz4qbvV/mJAXJOrH4cb5jtXGR+s+
 A4ttgzk2ooy4aCAwtSP5Eqof7F4aqJ9IlXMPNM79c556X+mY0wVuB8NK12/pGgIZHDr7yHDA6Yz
 ZJ4eg
X-Google-Smtp-Source: AGHT+IG1rdTfg5kNMfEPQwXPB+kDwT0h0OInX1GklxTI9Ihm5k6BI8PqbvklBQvwxvIW6jeASbIQ9A==
X-Received: by 2002:a05:600c:1c91:b0:43c:fe90:1282 with SMTP id
 5b1f17b1804b1-441bbea0cdamr66417415e9.7.1746372751901; 
 Sun, 04 May 2025 08:32:31 -0700 (PDT)
Received: from mariano (dynamic-adsl-84-220-189-10.clienti.tiscali.it.
 [84.220.189.10]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-441b89cc469sm106024955e9.6.2025.05.04.08.32.31
 for <ffmpeg-devel@ffmpeg.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 04 May 2025 08:32:31 -0700 (PDT)
Received: by mariano (Postfix, from userid 1000)
 id 1598EBFCE8; Sun,  4 May 2025 17:32:31 +0200 (CEST)
Date: Sun, 4 May 2025 17:32:31 +0200
From: Stefano Sabatini <stefasab@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Message-ID: <aBeIj/X76vNIrAKp@mariano>
Mail-Followup-To: FFmpeg development discussions and patches
 <ffmpeg-devel@ffmpeg.org>
References: <DM8P223MB036504CFC0521633C2ADCCE3BABB2@DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM>
 <aApw6eiupyMBT5mm@phare.normalesup.org> <aA4B0eruJJhLzfpq@mariano>
 <aBCOPyA3Bt1aFnbj@phare.normalesup.org>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <aBCOPyA3Bt1aFnbj@phare.normalesup.org>
User-Agent: Mutt/2.1.4 (2021-12-11)
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/aBeIj%2FX76vNIrAKp@mariano/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

On date Tuesday 2025-04-29 10:30:55 +0200, Nicolas George wrote:
> 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.

I don't understand this claim. There is a root, and each section can
have several subsections, so it is a tree in my view, although we set
a maximum depth. Where am I wrong?

> > 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.
> 
> The API must be able to handle all our use cases from the start. Until
> then, it goes back to the design board.
> 
> > It might be if we want to make this a generic tool for library users,
> > and for purposes outside of the scope for which it was designed. But I
> > don't think this should be a real blocker - and we might even keep the
> > API private to enable libav* cross-librariers but not
> > external-libraries usage.
> 
> I can concede making a generic API for external users is not blocking.
> Reluctantly.
> 
> But I will not budge on internal uses: this API must serve all our
> current use cases or it stay outside the libraries.

I agree with softworkz on this. The AVTextFormat functionality is not
about a specific format, it's supposed to be a generic way to
represent a data tree using different formats. Being able to provide
this generic representation is crucial, since we want a single entry
point to represent data in a way which can be parsed in various ways,
given a data schema.

If we want to add support for a specific format encoder (e.g. XML,
JSON), it might be *used* by the AVTextFormat API, not be
*implemented* by the AVTextFormat.

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