From patchwork Fri Oct 4 08:42:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 52021 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:938f:0:b0:48e:c0f8:d0de with SMTP id z15csp257547vqg; Fri, 4 Oct 2024 01:43:43 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVFqygpOLGjr94E+FuSB7NxxaMdEvn3H9PkyLkJIqb2i1JaUimpIPxWS05ZzT1+GFu2QAkI2U2BBiPMhaN/NZIL@gmail.com X-Google-Smtp-Source: AGHT+IH2vHj7Lh81qgLtcaQLet2/VZ4LhQBxFR3uHc8Ejp/cFC+aMlv9oahHaOtBXjm4O/qnedFp X-Received: by 2002:a17:906:f589:b0:a8d:4829:3dca with SMTP id a640c23a62f3a-a991bd84bdamr79775866b.8.1728031422898; Fri, 04 Oct 2024 01:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728031422; cv=none; d=google.com; s=arc-20240605; b=TtK1EEm5grXwx/GXbY25XWCF58ZmoQ7gZpvgdyUUn+MxHK3z70rekm/tBLCxJ7rltw nuL75JUyjDIPdIw3kaEYiF1YHqtzG/zcaVFBwp4wce+1Jv/u5K64YBfjJPLP8tOJPZ1+ oPIEgT8M2hsH663nf4IPGpj+U2sY+q6RglCHo6D/BgtusgoMJ3uhBhmGm3q2mE8NdMIP 3wgBjaI9Uek5bth1bXKmrBIH330QPrhWpW54lSLtCezDeA3BD/DPVhWB+RqMzDpxvTy0 dr5O3Jlu53QSdbzUHLdMMNov/8baOUUzWcrZB14WBJ0OKN5GOm1iRKmi1bhPpOZFE9yH +h0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:content-transfer-encoding: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:dkim-signature:delivered-to; bh=3UAAGIInO99G6yD7Nrm7r2P7M+Hv/w3Y2dZS4Ptfn0c=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=jfsl0loZLQIrOWxiwKQzp4h5zwJz366tGkfuGd+xDuWSCcL+pM2bpyD4hqQDpkMWXG EVpcVZDIecoHksomKFEEuB762uUYcOQNWmb7VpBLv4sQ8roPieF7GUFZId8HnxbqZMuW tt+KKuAZ/kM6PiAed8Mm3VWFL79Ce7sJQXdvP75CI/BQZk8Gc7qyeElxjy3otdiPCBKg WMg9kbZ3VYwSDDF5XZPBnAzmSvmPceia5nhGT/z8BQSLneRIBjKqR3cJEEM4k11Tl73B lRxw0Md5AdmUviHusFNIa5TzwUK4bhL8SfpGWVC2AdT30O3KWaMekfb3AO8faeWzb19u S6aA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=pU60q5hv; 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-a99100ad327si206711166b.48.2024.10.04.01.43.42; Fri, 04 Oct 2024 01:43:42 -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; dkim=neutral (body hash did not verify) header.i=@khirnov.net header.s=mail header.b=pU60q5hv; 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 A077C68DB08; Fri, 4 Oct 2024 11:43:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D60B668DA00 for ; Fri, 4 Oct 2024 11:42:56 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=pU60q5hv; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 12A6F4E1A for ; Fri, 4 Oct 2024 10:42:52 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id zhoQWUSQp0qJ for ; Fri, 4 Oct 2024 10:42:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1728031370; bh=xSzkn0FvNovVdZ/34oX2K3mRt6OsSsfvEjLfjgGQE9M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pU60q5hvQyEMjw+4QpigpmFqxKcK/owzuTpatT+l+KzSqE5rr3EtrlKglot6R98yl /pdEpkeSs48nYP7jIfNtXsLC1NlNcDOctND3azDSzetXotZaiAwwB92uR0Fb+5CJtU HiI8f+CsuBoQ7T0t/2PKr3zU4tjk/YsZ+5LxtH0gWBhz5cVCaBOXA9fRiQ+Bjbagqo yMCy+pQsrYYsc4ij6hzDacNgrAoDEZEwgNkeYsYgPd0sfm0MHgYz4AmplyXogqkJ+E TmFLCjrtXid8ktZD+AAFEdSc7Qi+8ljPvcQ0WNPNEMzkn8qm3ULziOvMYkEUFVcDZr qf/84xlDZD2jA== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 028A94E1E for ; Fri, 4 Oct 2024 10:42:50 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id E3BB43A0139 for ; Fri, 04 Oct 2024 10:42:49 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Fri, 4 Oct 2024 10:42:20 +0200 Message-ID: <20241004084230.27419-10-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241004084230.27419-1-anton@khirnov.net> References: <20241004084230.27419-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/20] lavfi/vf_drawtext: switch to query_func2() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: faFmzyZYAiJr --- libavfilter/vf_drawtext.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 4c55a01155..2b0a21a4b4 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1077,9 +1077,12 @@ static av_cold int init(AVFilterContext *ctx) return 0; } -static int query_formats(AVFilterContext *ctx) +static int query_formats(const AVFilterContext *ctx, + AVFilterFormatsConfig **cfg_in, + AVFilterFormatsConfig **cfg_out) { - return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0)); + return ff_set_common_formats2(ctx, cfg_in, cfg_out, + ff_draw_supported_pixel_formats(0)); } static int glyph_enu_border_free(void *opaque, void *elem) @@ -1915,7 +1918,7 @@ const AVFilter ff_vf_drawtext = { .uninit = uninit, FILTER_INPUTS(avfilter_vf_drawtext_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - FILTER_QUERY_FUNC(query_formats), + FILTER_QUERY_FUNC2(query_formats), .process_command = command, .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, };