From patchwork Sat Apr 20 12:19:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 48187 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:c906:b0:1a9:af23:56c1 with SMTP id gx6csp1215970pzb; Sat, 20 Apr 2024 05:20:08 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVFzxSt9rZ3aVJT2JDLVBObDs5+6XxgsdltEj98A0Olo6Fg+jxm6/iTXyS4HLi1bsbKuto/4NzXAOS0nTZCMZGpYaGeoavKrzQO1w== X-Google-Smtp-Source: AGHT+IG734UMidYNZQYuZLIeDYakZ+WMG5RdJKETAGNTYze0+Oyg/K0Olv14bMPuXMuzrpyZWp/W X-Received: by 2002:a2e:2a82:0:b0:2d8:a82f:50a0 with SMTP id q124-20020a2e2a82000000b002d8a82f50a0mr3108670ljq.35.1713615608660; Sat, 20 Apr 2024 05:20:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713615608; cv=none; d=google.com; s=arc-20160816; b=izN3ATcUQVECTY1hIoBSNxVdIZl9NtfavHEArdN2aOssALhuojvqLCjnjwDYs+0Dw/ +WRW0ChjTlSUF7m6nz1VXHIB24jPkSI1fyOc1YKPFKd341evHhn9v/hxvNlUGoEl0q4O TRX3gxWWALeVN78eC59wdJZiyIB9/9La7ewxANaxWDUABsmM9Ku5c46Mula7UF7qs1c2 OHEtWoeh9BElispg8TzOFQoSVrHDvN5qWfeoaBNcnOb4gQhyTz5Fx/GBBu/NQTpJqvmN 8wrMuO1b788/6D+d7MhMnbldl9eeDCtiZ9Sc9BhV3ucMmELz18PiSh0zkjH5+pLLa+6f CqgA== 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=mrxhovr+Mwoa0775IcDKdWZrCtNmRmbl4tcUsoVErFF3YKw3mSSAXdU8f2MHY6kQ16 9fiMRe73B7fMTsmO9CxJS2KJ1OgZQwFzSaDCoIVK0eBiUVWkr/f2/OWKZrCeF6ei9YJY nLE/iifRRzVGHoXtiMp+JNGDLWIF2wWFiL28tbx4OBX4U2L8EPzsPu9MbdCSkLMIul4N 1RUrrt46ZeBuyR97nybvwm6G+Uy9WZZuAKY7dNzMh6ERr5BbciZtmZu1DIi4cQYShe4+ bUurqQiUIUaXpDXFBFZgSIxkqTMgkLj3NM7/cY4TiCyR47+USq5qNEPnY7U6gr4c3d1G 65lQ==; 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 16-20020a05651c009000b002d4376f5b5fsi1701848ljq.188.2024.04.20.05.20.08; Sat, 20 Apr 2024 05:20:08 -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 7352068D229; Sat, 20 Apr 2024 15:19:56 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from b-painless.mh.aa.net.uk (unknown [81.187.30.52]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9E17568ABD7 for ; Sat, 20 Apr 2024 15:19:48 +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 1ry9h6-004Qdg-0D; Sat, 20 Apr 2024 13:19:48 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Sat, 20 Apr 2024 13:19:42 +0100 Message-ID: <20240420121943.201032-2-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240420121943.201032-1-ffmpeg-devel@pileofstuff.org> References: <20240420121943.201032-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: E872tW4qiKTS --- 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