From patchwork Thu Apr 18 15:06:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48158 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp39977pzb; Thu, 18 Apr 2024 08:07:12 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVM4ZszylYO2o7AlxAKYx9npu3vJip4UVe46Zng3/iOGoEDTQ6AWzC9FrRKfpks7qnocPwGlJPgxQYV716UytmKDwnBhfXr3kKPJA== X-Google-Smtp-Source: AGHT+IGLJLlPR3FIFfejpchjgi85WAqttS3xUHe5BKDHuv17QHKU/Mu4SZCerGtewH1WuS5a1yH5 X-Received: by 2002:a05:6512:2399:b0:519:6c2d:9bcb with SMTP id c25-20020a056512239900b005196c2d9bcbmr2753688lfv.31.1713452831729; Thu, 18 Apr 2024 08:07:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713452831; cv=none; d=google.com; s=arc-20160816; b=zIX4KRq83B6QsIOpfLGRfu7EvWnPyA5iGxzPdUUjTc6xipacwCppswPmUaqHZGrwN/ SSulGvKRZXmTmXJSWY9j+utcAdgn5PWiyZiIj4f65Cg2am8wFmDU9Up9+T63KuCu/FM2 1AYBo8dhqOAvXuPmfqm37ZGItk/J6uUaHxzgwzX+7cuNtjl32Jua1OBzGwJXvT+Jo1ZO LJ0yo1oAdLpsKszQnHNnU/Vbmp7B+GNi0JQegRkpDvRB4LaEfMlosMp5F9GcsOjv88uU 9wnDgXDHj0O61AmA4tdf6ZlQBGwu1zi/qh2KyAnBCj9CvXPeuV6Rwj8D5XIuo1weBkh7 FW8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:delivered-to; bh=mVBqIVbgAEy6v8llddqWMLXE2LLeNC+eGeXqwrq0PZ0=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=R0seV1y8heMaQcGgC9jaxKhVDP5+o3qRImXrNf0xYIrQhpo697pOO+YCqtjzUuUwp+ iIl2jvoOk3t89QVtkZ61/1WRdyXuE0bwDOlvThfbscPBR61ACjLwZqoIAAZVomReh0we w5dgRRByb7UECHGW5n9TlODHZYUnHpXJ3IVgEkToYzyWxy/8RbLdfVkIDasLM4eVGMw/ 6xWD6GYN7aio1I/eNWAhuVrOchMPdZ1kSPnuPeMw4OJMAdg9dwu1y1ajaUwMSbwjs1Q5 963neki3VfiuMM+VMI8YJ2kX6tCGEU1EXTkXAFw0O8aQZvVzoqV8Vge3/Q3hQNkjWUc6 ryfw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id t12-20020a1709063e4c00b00a524e64fb99si882876eji.579.2024.04.18.08.06.57; Thu, 18 Apr 2024 08:07:11 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CA09A68CF40; Thu, 18 Apr 2024 18:06:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org 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 66F4C68CD13 for ; Thu, 18 Apr 2024 18:06:31 +0300 (EEST) Received: from 0.b.4.b.7.4.0.8.c.4.a.5.d.8.b.2.0.5.8.0.9.1.8.0.0.b.8.0.1.0.0.2.ip6.arpa ([2001:8b0:819:850:2b8d:5a4c:8047:b4b0] helo=andrews-2024-laptop.lan) by painless-b.tch.aa.net.uk with esmtp (Exim 4.96) (envelope-from ) id 1rxTLK-000wcu-0p; Thu, 18 Apr 2024 16:06:30 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Thu, 18 Apr 2024 16:06:13 +0100 Message-ID: <20240418150614.3952107-2-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240418150614.3952107-1-ffmpeg-devel@pileofstuff.org> References: <20240418150614.3952107-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: K7F1SXzKB18Q --- 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..b5c739dab1 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 + * + * A @ref context "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 e6013662f6..b817d15554 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"). 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