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 426B14B420 for ; Wed, 5 Jun 2024 12:46:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3BA7C68D6C8; Wed, 5 Jun 2024 15:46:29 +0300 (EEST) Received: from b-painless.mh.aa.net.uk (b-painless.mh.aa.net.uk [81.187.30.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CC7DA68D512 for ; Wed, 5 Jun 2024 15:46:22 +0300 (EEST) Received: from 5.5.7.4.0.7.d.2.a.7.f.9.b.e.1.b.0.5.8.0.9.1.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:819:850:b1eb:9f7a:2d70:4755] helo=andrews-2024-laptop.sayers) by painless-b.tch.aa.net.uk with smtp (Exim 4.96) (envelope-from ) id 1sEq22-003JfY-0H for ffmpeg-devel@ffmpeg.org; Wed, 05 Jun 2024 13:46:22 +0100 Date: Wed, 5 Jun 2024 13:46:15 +0100 From: Andrew Sayers To: FFmpeg development discussions and patches Message-ID: References: <20240418150614.3952107-1-ffmpeg-devel@pileofstuff.org> <20240604144919.213799-1-ffmpeg-devel@pileofstuff.org> <20240604144919.213799-3-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH v6 2/4] lavu: Clarify relationship between AVClass, AVOption and context 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: On Wed, Jun 05, 2024 at 12:34:48PM +0200, Stefano Sabatini wrote: > On date Tuesday 2024-06-04 15:47:22 +0100, Andrew Sayers wrote: > > + * Structs that only use logging facilities are often referred to as > > + * "AVClass context structures", while those that provide configuration > > + * options are called "AVOptions-enabled structs". > > A struct with an AVClass as its first member can be used for both > logging and options management, there is no difference between the > two. My take: > |Structs that use AVClass might be referred to as AVClass > |contexts/structures, those that in addition define options might be > |called AVOptions contexts/structures. I think you were away when this came up, and anyway this thread is getting quite unwieldy. See [1] and [2] for the full version, but in short, defining AVClass by layout leads to conclusions that are at best unintuitive. > > + * Note that AVOptions is not reentrant, and that many FFmpeg functions access > > ... AVOptions access is not reeentrant ... > > > + * options from separate threads. Unless otherwise indicated, it is best to > > + * avoid modifying options once a struct has been initialized. > > But this note is not relevant to the change, and should probably be > discussed separately Short version: I'll make a separate patch now, let's come back to this after Long version... If you assume options can be set at any time, they broadly resemble a reflection mechanism. If you assume they can only be set during the configuration stage, they broadly resemble an OOP constructor. The document needs to address the one they resemble (even if just to say "this is why they're different"), and needs to steer clear of any possible comparison with the one they don't resemble. So it would be too risky to bump this to the upcoming omnibus patchset, but it's fine to apply this *before* the context document. [1] https://ffmpeg.org/pipermail/ffmpeg-devel/2024-May/328058.html [2] https://ffmpeg.org/pipermail/ffmpeg-devel/2024-May/328087.html _______________________________________________ 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".