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 ADD9B4A1EF for ; Tue, 23 Apr 2024 20:53:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4FC4868D39F; Tue, 23 Apr 2024 23:53:50 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 76D6368D2BB for ; Tue, 23 Apr 2024 23:53:44 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 4DD2420002 for ; Tue, 23 Apr 2024 20:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1713905623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ytq3U1ZC8ukwX6FhbBbL4h5Qg6IydBwJFx8nfW49WeI=; b=AUEhwYxyf/IQ+YnCBIo9g8rlePImHAc1VeynIgrVYpQCVvp8hUh9WBUr9oCbUBvSmPCKVg hnDEqh6jeiyabX+lKQcPdQSsi4CZpZYjQ75QAB0ZnEWIwsCyYW+G8qm7HmEODEmye9trZQ eLSJRi0nWJN1ymuG3XG7hEPUoffBSsyiLRo5YJVqVPbO/Mx4CznNkPergz8fbY5+O8MSKG Npex85LtnvU3EyJPKlfpvmfW3PW4NO7DUo+BEPyi1bOxHfwqKEiZ1uMvnYJPgiko03vjgR GtagVLxbD22ITIZGUV+tUb+aCeYln0PmfFojSo6bK5Jn7Dmlfe4doS8sRf0isA== Date: Tue, 23 Apr 2024 22:53:42 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240423205342.GL6420@pb2> References: <20240422120925.380253-1-ffmpeg-devel@pileofstuff.org> <171386408794.22242.4320691091356910947@lain.khirnov.net> <171386667402.5069.14623062002271611181@lain.khirnov.net> <20240423111552.GI6420@pb2> <927b5c94-c765-4852-a502-4369b4a624c6@gmail.com> MIME-Version: 1.0 In-Reply-To: <927b5c94-c765-4852-a502-4369b4a624c6@gmail.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH v2] lavu/opt: Clarify that AVOptions is not indended for general use 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: multipart/mixed; boundary="===============7215726594621361174==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7215726594621361174== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HI6q4h1D4msW5Ft/" Content-Disposition: inline --HI6q4h1D4msW5Ft/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024 at 05:24:03PM -0300, James Almer wrote: > On 4/23/2024 8:15 AM, Michael Niedermayer wrote: > > On Tue, Apr 23, 2024 at 11:10:43AM +0100, Andrew Sayers wrote: > > > On Tue, Apr 23, 2024 at 12:04:34PM +0200, Anton Khirnov wrote: > > > > Quoting Andrew Sayers (2024-04-23 11:51:00) > > > > > On Tue, Apr 23, 2024 at 11:21:27AM +0200, Anton Khirnov wrote: > > > > > > > lavu/opt: Clarify that AVOptions is not indended for general = use > > > > > >=20 > > > > > > They _are_ intended for general use though. > > > > >=20 > > > > > In that case I'm confused... > > > > >=20 > > > > > Let's say I make a desktop app to transcode videos. Obviously I = would use > > > > > AVOptions to display configuration options for different encoders= =2E And it's > > > > > possible to create AVOptions objects for my UI. But how strongly= is that use > > > > > case recommended? > > > > >=20 > > > > > To provide a particularly difficult example - let's say I want to= let the user > > > > > choose between interface themes, and I want to show both some tex= t and a > > > > > picture of the theme. AVOption doesn't include a "text + picture= " option, > > > > > so how would I extend it to meet my needs? > > > >=20 > > > > If they fit your use case, then use them, otherwise don't - that's = true > > > > for pretty much all APIs we provide. > > >=20 > > > Ah ok, so how about if I changed "intended" to "optimized" in the sub= ject? > >=20 > > If FFmpeg which is a multimedia tool in no place needs or wants to store > > pictures through its option API in a way not curently supported. > > I would say thats not going to qualify as "general use" outside special= ized > > software thats already dealing with a lot of pictures > >=20 > > still you certainly can handle binary data (like a bitmap picture) thro= ugh > > AVOption > >=20 > > thx >=20 > Take for example AVIAMFReconGain.recon_gain in libavutil/iamf.h, which is > currently the only field not covered by an AVOption (And thus not current= ly > configurable from the CLI). How could it be supported? Binary type doesn't > work because it expects a pointer + size field and allocates the former. i would guess some form of AV_OPT_TYPE_FLAG_ARRAY we have similar arrays like intra_matrix in mpeg codecs thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable --HI6q4h1D4msW5Ft/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZigf0gAKCRBhHseHBAsP q5nwAJ9MKwXyOFna5zp1sbsl/CEEwR63ygCfeTtKrty4ObmwrhV9CEtAKcZYjpo= =LBEZ -----END PGP SIGNATURE----- --HI6q4h1D4msW5Ft/-- --===============7215726594621361174== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============7215726594621361174==--