From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 437244C321 for ; Sat, 8 Mar 2025 17:56:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 04BC168E747; Sat, 8 Mar 2025 19:56:13 +0200 (EET) Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2224968D6EA for ; Sat, 8 Mar 2025 19:56:11 +0200 (EET) Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-22401f4d35aso53823035ad.2 for ; Sat, 08 Mar 2025 09:56:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1741456569; x=1742061369; darn=ffmpeg.org; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:from:to:cc:subject:date :message-id:reply-to; bh=RLDPCbIqj1ywV+JBFmfE+FrrTqVCcD3ubi8HpoFa8z4=; b=ehjOS03QHwp4M92bb8balWZadGx8bJV/uXdPM4vdhgmyDGzFQb/ey+iRn8H20i1ZtC OIv6E07wmHbamNOz2cgNSLkZFL4HmwkUoCCcS6SJQrPM2ErFfKaOyYirP+MnZreHWXZd afkCMBBTTPIoPJTs0/RA/PMoX50y53QJx8z+IiNG4f2F2ChjW4XnUeWzGnklaIhu6jGJ hLjF08vr28djrUlUTkhuu0r6nI04M1O0R47251/I7yJnsl8g+s+kZj7BkqsL++/hYbGW av3asF6R/vBHwfid0bpCD04n2/P0gmKKsqL2/NZD9lmRtHeQy4cVOq9RPP34nkNoJYDZ Vj4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741456569; x=1742061369; h=cc:to:mime-version:content-transfer-encoding:fcc:subject:date :references:in-reply-to:message-id:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=RLDPCbIqj1ywV+JBFmfE+FrrTqVCcD3ubi8HpoFa8z4=; b=IoyVOn2iKQ8zgwahPV815Mqxe0T7FyjInllCLLfBJORDXn0ILt4M+ckql9gLfaEaIc wa8LKAbi+eIHXPoA2qm5zaWQdoY9hg21eonoI3j1j9t1WvCB3HcBtRN6X+V96BF0gnKn NtmXd4yRXVsyDx5cZzZwl4qGKTfa9kJ5AFE/ft0S6BvV7WfZO0HQpwpaBLwssaDRfIBV kfuvo56OKo+wmxpvsTY44arR/Fqt4lYaCOBw+2J9p4M3KolLawRxWVYxbHuLRvww4+6R OZJPTBkb/qclb6OCokd3O6a5iJ7LN6iuoZ95DgN6rFZa6Q2DemSXTJkop/ivKbaaRzQ3 VpcA== X-Gm-Message-State: AOJu0YzwmpnC3NKGHDjgnI+X1Gb7s0hLvAoiKYiiXlU3qKoz/KJlUDoA A1uf/28gbpGkmUAR7DZYWy6j8TFmwrKZfssRGQ1BvI7UlVWK9tm2eFvv+skc X-Gm-Gg: ASbGnctCsWTcXZd3e1zYz/5k6ce3gvUeIbcQtajUCa+BgdnN8P6JeNZS4qZaFWIBwvH GTU5o7wGW0QdJi1yvc3IK9AeOifE94/wzkbWZSmBT0Vfp4+2gJ45wW1FN9JOKfLkDLJOtPLM0n8 NT4xIJF9keNqzCa9RWr8ycoEiv45Vkj6SJQuuil9vjp6eRFZ/t9SrWm9HWPsYZ/o83Xsb5XCpI+ zcsqZxH4imAqTgQd9z+we3HaEMbu+pwE/keOnF3WLP9GOw4TMxT73FFPkaLhUDjw6PDwZRrJqZN Q+Sd4e4Vk6Dn6OaHbnlOW25s8Y2/DjNCdF4+c4YnnuKjU7C3pH7x5gbrdKwDqrU= X-Google-Smtp-Source: AGHT+IHAC+sRafvdaC8ddJXAI9Q/xPwKtMKuVtDrFL9F9jEBKFD9wJrM+Pucq6nMoipTAmbkmOWRGw== X-Received: by 2002:a17:903:1b63:b0:223:50f0:b97 with SMTP id d9443c01a7336-22428bd456dmr118918015ad.52.1741456569306; Sat, 08 Mar 2025 09:56:09 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-224109dd51bsm49292865ad.49.2025.03.08.09.56.09 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Mar 2025 09:56:09 -0800 (PST) From: softworkz X-Google-Original-From: softworkz Message-Id: <811c5ab35c384894e6504b9a55738c0f9c483048.1741456535.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Sat, 08 Mar 2025 17:55:32 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v5 5/8] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx() 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: softworkz Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: softworkz --- doc/APIchanges | 3 +++ libavfilter/avfilter.c | 9 +++++++++ libavfilter/avfilter.h | 12 ++++++++++++ libavfilter/version.h | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 5a64836e25..354716399d 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2025-02-xx - xxxxxxxxxx - lavfi 10.10.100 - avfilter.h + Add avfilter_link_get_hw_frames_ctx(). + 2025-03-01 - xxxxxxxxxx - lavu 59.58.100 - pixfmt.h Add AV_PIX_FMT_GRAY32BE and AV_PIX_FMT_GRAY32LE. diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index e732556ffa..13abd7e8ad 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -1006,6 +1006,15 @@ enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx) return pads[pad_idx].type; } +AVBufferRef *avfilter_link_get_hw_frames_ctx(AVFilterLink *link) +{ + FilterLink* plink = ff_filter_link(link); + if (plink->hw_frames_ctx) + return av_buffer_ref(plink->hw_frames_ctx); + + return NULL; +} + static int default_filter_frame(AVFilterLink *link, AVFrame *frame) { return ff_filter_frame(link->dst->outputs[0], frame); diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 4520d5f978..27c50520b3 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -96,6 +96,18 @@ const char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx); */ enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx); +/** + * Get the hardware frames context of a filter link. + * + * @param link an AVFilterLink + * + * @return a ref-counted copy of the link's hw_frames_ctx if there's a hardware + * frames context associated with the link or NULL otherwise. + * The returned AVBufferRef needs to be released with av_buffer_unref() + * when it's no longer used. + */ +AVBufferRef* avfilter_link_get_hw_frames_ctx(AVFilterLink *link); + /** * Lists of formats / etc. supported by an end of a link. * diff --git a/libavfilter/version.h b/libavfilter/version.h index 77f38cb9b4..4a69d6be98 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #include "version_major.h" -#define LIBAVFILTER_VERSION_MINOR 9 +#define LIBAVFILTER_VERSION_MINOR 10 #define LIBAVFILTER_VERSION_MICRO 100 -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".