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 C1A5B4AE83 for ; Wed, 22 May 2024 10:04:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9B64368D3FA; Wed, 22 May 2024 13:04:21 +0300 (EEST) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 36C8868D355 for ; Wed, 22 May 2024 13:04:15 +0300 (EEST) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-51f45104ef0so6156825e87.3 for ; Wed, 22 May 2024 03:04:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716372253; x=1716977053; darn=ffmpeg.org; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=rQciMpQQm2ZMU9jpksOaNzH7c5Z+NMgrVzkWGYhK+Ck=; b=BxmIPLI0yNr2oqchXK4spzAVYyp1McHK4BN1CYhuf0jtmTat/BCkJUPoemZUaFChqt D0WyQha29voEpbks6sLp96nGyPnZSR9PD1mvZcQRlyhW+ba6LhlrVLEwQhTI/bgT8WIa gP1A4XL6FJ07amqBWSWBnYY5RH706MzjkfjOpXQnB1R8Fu5oIkl3d08VMCoFDTeVE0F3 QC9vfntqVp/JTiCelG2R5CA+m547PnMzopNdq881SuM8whcqzGWmXMVUxRgoDbZVzTfg mMoz4NafjEe5ck+9arAX9yG134o/rcUZKh+GAgVYdE3FhIJUWj2p/4fCQR7KxMyLeal9 wxsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716372253; x=1716977053; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rQciMpQQm2ZMU9jpksOaNzH7c5Z+NMgrVzkWGYhK+Ck=; b=DM1z8RBNSE8EFWGPEvPRWkcQkp3wJ5Ypnu5bY4B6wY7dyTHwHLRQweam+plXKJS48g qlqbTs3TjWWxwNCVZDP1sFfW2tG3GhhVmFUpSdcLeJZz5oJAFdF1xvfmZ+bQqp64Ldll z7yrMjJGZPtEFD49gIGUIXWjCoRLRG7NDdTKMZM95jw0aKZMPEvNkPHyE1dP9llrj1Wp q1/jjvoZZ1lYyHRdkDghf1ZNxZiz/uZ7H8K2ArcLTgAFmYolkDQ7hJrRMF1jLwpq+9w4 ZUAy+0J3RSRsB+BvHgwB/7cRhT8WesUdBw0kqcfuGQJR+Ctt/7S9uaIelWU1LQIt7Ggr d1vA== X-Gm-Message-State: AOJu0YzCUgUv1zYw/y9I64Afo1YMNxydrKXC7Cf2w38FfkgHZjNNA9rQ z+zBd717bK0PqkZv1r83YYD6QW1bUF3CbdibeB5duXDWLNS0zXaUyx2Eag== X-Google-Smtp-Source: AGHT+IGi1+80uZymcfjAHMZ1ZhSF9tLsyIKLZVMDiLYC3CtBL8Dh4s1Kmx8umqmoVGwm00hPzeglWA== X-Received: by 2002:ac2:47e8:0:b0:521:7846:69d1 with SMTP id 2adb3069b0e04-526be6ea784mr913429e87.6.1716372252906; Wed, 22 May 2024 03:04:12 -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 a640c23a62f3a-a5a1b602b39sm1740220666b.50.2024.05.22.03.04.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 03:04:11 -0700 (PDT) Received: by mariano (Postfix, from userid 1000) id 9AA87BFCE8; Wed, 22 May 2024 12:04:10 +0200 (CEST) Date: Wed, 22 May 2024 12:04:10 +0200 From: Stefano Sabatini To: FFmpeg development discussions and patches Message-ID: Mail-Followup-To: FFmpeg development discussions and patches , Andrew Sayers References: <20240418150614.3952107-1-ffmpeg-devel@pileofstuff.org> <20240515155446.3589239-1-ffmpeg-devel@pileofstuff.org> <20240515155446.3589239-3-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240515155446.3589239-3-ffmpeg-devel@pileofstuff.org> User-Agent: Mutt/2.1.4 (2021-12-11) Subject: Re: [FFmpeg-devel] [PATCH v4 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 Cc: Andrew Sayers 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 date Wednesday 2024-05-15 16:54:20 +0100, Andrew Sayers wrote: > --- > libavutil/log.h | 11 ++++++++--- > libavutil/opt.h | 7 ++++--- > 2 files changed, 12 insertions(+), 6 deletions(-) > > diff --git a/libavutil/log.h b/libavutil/log.h > index ab7ceabe22..cfbf416679 100644 > --- a/libavutil/log.h > +++ b/libavutil/log.h > @@ -59,9 +59,14 @@ typedef enum { > struct AVOptionRanges; > > /** > - * Describe the class of an AVClass context structure. That is an > - * arbitrary struct of which the first field is a pointer to an > - * AVClass struct (e.g. AVCodecContext, AVFormatContext etc.). > + * Metadata about an arbitrary data structure The previous definition was circular, while this one is lacking information (for example it is neglecting the logging facilities provided by AVClass). My take: Provide access to generic logging and introspection facilities, used to describe a class of structs. An AVClass should be defined as the first element of the struct using the AVClass facilities, so that functions operating on the AVClass will work by providing the pointer to the structure. Note: we might move the AVClass definition to its own file class.h. > + * > + * A @ref md_doc_2context "context struct" whose first member is a pointer > + * to an AVClass object is called an "AVClass context structure" > + * (e.g. AVCodecContext, AVFormatContext etc.). > + * > + * AVClass is often combined with @ref avoptions "AVOptions" to create > + * "AVOptions-enabled structs" that can be easily configured by users. > */ > typedef struct AVClass { > /** > diff --git a/libavutil/opt.h b/libavutil/opt.h > index 07e27a9208..e314e134c2 100644 > --- a/libavutil/opt.h > +++ b/libavutil/opt.h > @@ -39,9 +39,10 @@ > * @defgroup avoptions AVOptions > * @ingroup lavu_data > * @{ > - * AVOptions provide a generic system to declare options on arbitrary structs > - * ("objects"). This should be kept. In addition you can mention that it requires the first element of the struct to be an AVClass (which is already mentioned later in the text). > An option can have a help text, a type and a range of possible > - * values. Options may then be enumerated, read and written to. > + * Builds on AVClass, adding a generic system to declare options. > + * > + * An option can have a help text, a type and a range of possible values. > + * Options may then be enumerated, read and written to. > * > * There are two modes of access to members of AVOption and its child structs. > * One is called 'native access', and refers to access from the code that [...] _______________________________________________ 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".