From patchwork Tue Jul 2 09:08:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Sayers X-Patchwork-Id: 50280 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:cc64:0:b0:482:c625:d099 with SMTP id k4csp2296870vqv; Tue, 2 Jul 2024 02:19:04 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWldESjjLIeNM+DHq0TGjgEUYtq0w3HXYLIvBairx3RgkGXKlm4twuHScVIffqCNl8TOM6hGO6+/oW2Gcjjj5NitvjFxDs08BSoag== X-Google-Smtp-Source: AGHT+IHOFDumaPIhxWIRzx7fvUM+0bEH0DfExr1oux9aCP3xUiiZilyi0d9DFvkRQhT6lorcP1E2 X-Received: by 2002:a17:907:7676:b0:a70:7a10:de0b with SMTP id a640c23a62f3a-a75144301c5mr514476866b.21.1719911944052; Tue, 02 Jul 2024 02:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1719911944; cv=none; d=google.com; s=arc-20160816; b=FwFrehQQRytZVP74Iu58ApWfxj/D2l4nAYmPPOZm5OYDslKmufdUEP24DQMlfVB1g0 Ur+6ufW5XgCuURj7+ApXaySiU94RatffT0+8iKsIGmGZJVlG++Tk53n9RsuG6poh8Iyk oS6eR2HWixvhJoLK0aX2qs3MXDHw/Vt0o6yXQZ5GmH1nziWMcn03mIPTdmUqptEnhQLA zAU3RRxeCMWNok75/SUK2uahZw3cuzErf6Llwh6eVNhVyv9c4fbQGUwzfWFHouz8RcZr 1k6lFeer4ItnSECzB/PYY4HTFp/eEwoj3Jl6AyOm1q9Q9BlEPE2NWlYGzhWzS6yfqsUb Y4sA== 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=vKEYZIlY002DWiTKnQSIXbChGXeYcIujyB8AVBVXnqc=; fh=73ExZnkQ8FYbu/qeQNmI0dtHCfShNh8/NmZJs1umltM=; b=SQwSo9+ZHkBI74ZlEaEDIHqkF99LNwLGc78TQTr5Srdiq4l3nUbVRoSA0UuWPQdjq+ esH7kBJe5RxVWtDcumrghTolXgNhVJVotuwSIDHrkX8C+gYUl0YKTBIYkH33meBCoH90 k0filq7fzuwCGwPxdnf0kw9cjkXWo0tSUuyWEZUL/MmYIrs0MOP315JLTG3ICYkkTZ4f i5XcTQtkSXJ2YNkNYpSin49zhXUhNlGq0gRfUHGVWVxjf1WKYuMs6SM12ixSPOK4T8mK zTTtomVvqYFUVPViB+o3nlsW99TiJnzlJ8x18n3ef1wp28GtSZRBC/AtLBc5ucckzbd+ 0wDA==; 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 a640c23a62f3a-a72aaef68c3si443016566b.148.2024.07.02.02.19.03; Tue, 02 Jul 2024 02:19:04 -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 E34DE68D8C7; Tue, 2 Jul 2024 12:09:35 +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 E609568D89C for ; Tue, 2 Jul 2024 12:09:26 +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 1sOZVt-004H8u-3D; Tue, 02 Jul 2024 10:09:26 +0100 From: Andrew Sayers To: ffmpeg-devel@ffmpeg.org Date: Tue, 2 Jul 2024 10:08:38 +0100 Message-ID: <20240702090917.319956-2-ffmpeg-devel@pileofstuff.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240702090917.319956-1-ffmpeg-devel@pileofstuff.org> References: <20240702090917.319956-1-ffmpeg-devel@pileofstuff.org> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 1/3] lavu/opt: Rename AV_OPT_FLAG_RUNTIME_PARAM to ...POST_INIT_SETTABLE_PARAM 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: 5zS4W1j6qf75 The old name could be misread as the opposite of "AV_OPT_FLAG_READONLY" - some things can be set at runtime, others are read-only. Clarify that this refers to options that can be set after the struct is initialized. --- doc/APIchanges | 4 ++++ libavutil/opt.h | 15 ++++++++++++++- libavutil/version.h | 3 ++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index f1828436e5..8217c391cb 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,10 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2024-07-02 - xxxxxxxxxx - lavu 59.28.100 - opt.h + Deprecate AV_OPT_FLAG_RUNTIME_PARAM and replace it with + AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM. + 2024-06-28 - xxxxxxxxxx - lavu 59.27.100 - stereo3d.h Add AV_STEREO3D_UNSPEC and AV_STEREO3D_VIEW_UNSPEC. diff --git a/libavutil/opt.h b/libavutil/opt.h index 07e27a9208..b78c3406fa 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -53,6 +53,9 @@ * question is allowed to access the field. This allows us to extend the * semantics of those fields without breaking API compatibility. * + * Note: only options with the AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM flag can be + * modified after the struct is initialized. + * * @section avoptions_scope Scope of AVOptions * * AVOptions is designed to support any set of multimedia configuration options @@ -300,9 +303,19 @@ enum AVOptionType{ #define AV_OPT_FLAG_BSF_PARAM (1 << 8) /** - * A generic parameter which can be set by the user at runtime. + * A generic parameter which can be set by the user after the struct is initialized. + */ +#define AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM (1 << 15) +#if FF_API_OPT_FLAG_RUNTIME_PARAM +/** + * A generic parameter which can be set by the user after the struct is initialized. + * + * @deprecated Renamed for clarity - to continue using this feature, + * please do s/AV_OPT_FLAG_RUNTIME_PARAM/AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM/g + * throughout your codebase */ #define AV_OPT_FLAG_RUNTIME_PARAM (1 << 15) +#endif /** * A generic parameter which can be set by the user for filtering. */ diff --git a/libavutil/version.h b/libavutil/version.h index a8962734e7..c03681f802 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -79,7 +79,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 59 -#define LIBAVUTIL_VERSION_MINOR 27 +#define LIBAVUTIL_VERSION_MINOR 28 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -113,6 +113,7 @@ #define FF_API_VULKAN_CONTIGUOUS_MEMORY (LIBAVUTIL_VERSION_MAJOR < 60) #define FF_API_H274_FILM_GRAIN_VCS (LIBAVUTIL_VERSION_MAJOR < 60) #define FF_API_MOD_UINTP2 (LIBAVUTIL_VERSION_MAJOR < 60) +#define FF_API_OPT_FLAG_RUNTIME_PARAM (LIBAVUTIL_VERSION_MAJOR < 60) /** * @}