From patchwork Mon Apr 22 15:56:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48224 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp2384569pzb; Mon, 22 Apr 2024 08:59:13 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU4NK2u2NKjIW+PIoVFlS2rU5fkUfkWKxA+DEEuAO6SqxTNy14zoVfGl9eGVu1UbLC2I/UEFqiRJCBQuGlugm/8Lm979dOgvWdSXw== X-Google-Smtp-Source: AGHT+IGcEeWCCzsDLUEAS7xqzR697ImCWz5EisjUNy61OyiWgDiMKSU0VyPUYvlxbl2Md9JX/jv3 X-Received: by 2002:a50:d6c3:0:b0:56f:dabb:ec79 with SMTP id l3-20020a50d6c3000000b0056fdabbec79mr6700188edj.3.1713801553419; Mon, 22 Apr 2024 08:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713801553; cv=none; d=google.com; s=arc-20160816; b=EhdOaKTNj76RTqPGtcIbVnRrbZDWeaDYcC+wHOR7+NPtsgc8Z1Uk5tEfBnrPF19kMl uuR26iZV1fIPUvv7IGvb6ELY4B2OVqKkevOECoVyioihTpuAprjeT2AOLMidTnOXHtpl Ky68tIoRmGjdthn/f+pkeS0GN0X761Y5Rg6iSTcFHNlkGUGY2SoHjhjEGmyuZuiFL5mN 6LaGvwOSS/XzgAQRhWxtVvjPhjXUaNRqIdUjKm9sGXejQkf4Ier2x7cFPafnuwSWn+ju 9LqeDZyf/QDisgNefyv9WjHtMVh78XkWF3pycElpWUXAD1GZiqn6aN400CAmCWltaXEm v5mg== 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=0dcmLuRuc9U8hS0SrmTOQjt5Exi6MKPs5NeJd4hB1yk=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=UJ0rmywwY+4IhrqvYC39sl3HoAqUFeUaOTw9+Qs1amyC4DJOErC6oT1XczF/Z89tde 5FLSXUI0s/C6mfen7KVryJtHdDhgeIYpLHTArQ2V3LqbMH9JxUpW2zNuYfEr2k9s1iui hsIQMpbOx944DG+4i27K5CaUK6QCfSXP4hLY0wVO6vB48KSeJ5RMWpkAOn/AV/N/4k41 NPzXYsbQjUsDPYuE5QozbSNPHmwnAix/+5MKysKvDf7GLgg7v5e1n9mJUwq/S0X6o6gP 096GdjaAJB9lvGOAOjQqZ2kuJzx588mifYBzlFF7m9F6qG1qa9NiphGLTNqdOHeTPtNW MsMQ==; 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 26-20020a508e1a000000b0056e1193a35dsi5773047edw.257.2024.04.22.08.59.13; Mon, 22 Apr 2024 08:59:13 -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 3253C68D35C; Mon, 22 Apr 2024 18:58:52 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from alt2.a-painless.mh.aa.net.uk (alt2.a-painless.mh.aa.net.uk [81.187.30.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5216A68D18B for ; Mon, 22 Apr 2024 18:58:43 +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-a.thn.aa.net.uk with esmtp (Exim 4.96) (envelope-from ) id 1ryw43-00B6rX-0j; Mon, 22 Apr 2024 16:58:42 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Mon, 22 Apr 2024 16:56:49 +0100 Message-ID: <20240422155836.385333-3-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240422155836.385333-1-ffmpeg-devel@pileofstuff.org> References: <20240422155836.385333-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 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: 2vzuvrb6jXSJ --- 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 + * + * 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 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