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 B22BB490FD for ; Mon, 4 Mar 2024 21:01:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BEEB468D428; Mon, 4 Mar 2024 23:01:01 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 39E3F68D226 for ; Mon, 4 Mar 2024 23:00:55 +0200 (EET) Authentication-Results: mail0.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=C+XtKWss; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 96EC424048D for ; Mon, 4 Mar 2024 22:00:54 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id ye-nQt6SHgR1 for ; Mon, 4 Mar 2024 22:00:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1709586053; bh=8qxFJqvkdB3mntDlS9JuHlY9z2IDGsFc39XVfmL9zCw=; h=Subject:From:To:In-Reply-To:References:Date:From; b=C+XtKWssj7gugAzX39ChKLrvNX63kRg9ADjw0xaJ71sL5Gjydtn2ce8jO6CvOBEjz aCLGijKD4+emVprv/2oCuO5CWliKLFlOJ8pZCdbisKVBQc24y7ehXrLgJSmUNYp2KX NFMBeTlr7azSd0dUai8kYJEHTI+jbxIUERv617AjQvjsnjansZHO2lOOwaTy15jrK7 mqF41/JI0ddp6GlUxm71v9N/elH1PdHaYp8Ebnq5X5aECA8vzc3ijPVuIljc4MUhiw nh40q0tp2ABhKC6p0c56eNibqqsC1uxGVaX0T08Br5hgi/afQ72gInq75TxDlukMX+ gHS5TZC3KetkQ== 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 B1698240177 for ; Mon, 4 Mar 2024 22:00:53 +0100 (CET) Received: by lain.khirnov.net (Postfix, from userid 1000) id 8DC761601B9; Mon, 4 Mar 2024 22:00:53 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: References: <20240304130657.30631-1-anton@khirnov.net> <20240304130657.30631-6-anton@khirnov.net> Mail-Followup-To: FFmpeg development discussions and patches Date: Mon, 04 Mar 2024 22:00:53 +0100 Message-ID: <170958605355.29002.10860559385113559662@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 06/29] lavu/opt: add array options 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 Andreas Rheinhardt (2024-03-04 14:29:59) > Anton Khirnov: > > --- > > doc/APIchanges | 3 + > > libavutil/opt.c | 362 +++++++++++++++++++++++++++++++++++++----- > > libavutil/opt.h | 62 +++++++- > > libavutil/tests/opt.c | 51 ++++++ > > tests/ref/fate/opt | 35 +++- > > 5 files changed, 468 insertions(+), 45 deletions(-) > > > > diff --git a/doc/APIchanges b/doc/APIchanges > > index 7d46ebb006..3209614ed6 100644 > > --- a/doc/APIchanges > > +++ b/doc/APIchanges > > @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 > > > > API changes, most recent first: > > > > +2024-02-xx - xxxxxxxxxx - lavu 58.xx.100 - opt.h > > + Add AV_OPT_TYPE_FLAG_ARRAY and AVOptionArrayDef. > > + > > 2024-02-28 - xxxxxxxxxx - swr 4.14.100 - swresample.h > > swr_convert() now accepts arrays of const pointers (to input and output). > > > > diff --git a/libavutil/opt.h b/libavutil/opt.h > > index e402f6a0a0..77797b3fbe 100644 > > --- a/libavutil/opt.h > > +++ b/libavutil/opt.h > > @@ -253,6 +253,17 @@ enum AVOptionType{ > > #endif > > AV_OPT_TYPE_BOOL, > > AV_OPT_TYPE_CHLAYOUT, > > + > > + /** > > + * May be combined with another regular option type to declare an array > > + * option. > > + * > > + * For array options, @ref AVOption.offset should refer to a pointer > > + * corresponding to the option type. The pointer should be immediately > > + * followed by an unsigned int that will store the number of elements in the > > + * array. > > How about we make this actually type-safe and use an actual struct for > this instead of relying on the compiler not adding padding between a > pointer and an unsigned int? A struct containing what exactly? -- 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".