From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id D066E4BDE7
	for <ffmpegdev@gitmailbox.com>; Sun,  4 May 2025 22:37:35 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6D07168BDC8;
	Mon,  5 May 2025 01:36:15 +0300 (EEST)
Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com
 [209.85.215.179])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 37A5568B57A
 for <ffmpeg-devel@ffmpeg.org>; Mon,  5 May 2025 01:36:12 +0300 (EEST)
Received: by mail-pg1-f179.google.com with SMTP id
 41be03b00d2f7-af589091049so2700873a12.1
 for <ffmpeg-devel@ffmpeg.org>; Sun, 04 May 2025 15:36:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1746398171; x=1747002971; 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=6QkCzdNcu9Ltu8afG4QeySxQc5HsESa2paiuYmJ1Y14=;
 b=E4I+/sXjkan39Mt8+SaumFhEgyqE0sTXIB7slqRSJIj3mkCbnjdO2dralC2Bx8us9M
 7UCQ6u9eR2YCO69NOn5TAnihybDC/qmmP0rZ+Zzqv3pQi6+PgFhtMEVCL/C1Q0efuwp+
 5I0giDQOytwbtMcwnOTRlWFfJi7Aql1BC2TMV8mP1FKXCHbOzJ/3O1Q397/FNCSjYhhw
 xzaBWu/Tm9hQu4ItrFT02OvU8RCJY3hzee3kSFO3aXDitAlSvU5q0+UAGVftwSTy+RjK
 +/hhGMSPiecsrnQfwYf0VqZ9ZVW4IDlHu6WzO4Yhkb1jVphYfZp2MFdPsWFZzAKjCWC1
 oFrw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1746398171; x=1747002971;
 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=6QkCzdNcu9Ltu8afG4QeySxQc5HsESa2paiuYmJ1Y14=;
 b=szL9q9ylBEPM/h4B/kKaCKoWelKLtsQouJeEA5XDZaiPQDhY3ahAEVGhqNnRbafkVV
 85FYhEvvqQP7ymVD8CKKJq6lSd5/MXUR2HJFupeKRXAcUozn5UsFg/JGsF+q0Tub/VKm
 XljDGRSFgTqdZwAIPSY/xiPrZFhSMPeX/JMxPJUYVwTKMcrDI2IvDlWW/k2x8uoLwIeU
 65Ol8n2Wz2o0IsMHWY5C1PJ1a97iidtzxRmGfxR7LyQ9VgpAqYP2SWyx0iVYBbdKFL20
 0J+t+86R3IOWe5d7kK5nkiTsl51W7U3KhFsclksTBmDA+uH6R/XaDV9gw2QlVLY9VzeG
 A23g==
X-Gm-Message-State: AOJu0YzysKorVbrT1d9RW4KkA0vBa+7fo/Q3eWFaRZ04DxSlNEieS+We
 ZgGwy+yhkbymfV/p49hC9D5Im7cUMJOC0+6am8mY4bnefynrXTydvUR9CdsW
X-Gm-Gg: ASbGncuht63XnT/LBASALtgTkeh/oyU5ml/8uzgcM4J5FGTddmue13pY8DrJX5Z9QkO
 VJjHg8eu66lEzrCd2bLY4GvjO4UFgEGg4Su+zzz1Fq+4FbiRlS6w9cYfEIkyW93oGbfbW/shapH
 L88126MhfxF7zpad+yVmSNV/DarCtriWmXLlMcQTBVihEzzqGQXV+oVGUKnF1uS2oWT+ykBLHIp
 Is1QZf5OCywcvY5U09R97DNKMpvKSlBh0LHRddAUkuBwZQtVhBhbGdcBnF2BiRyLSTqOdUt/+xZ
 UKq+zVd/gjMXsqOk9rnId2Ksvwiry5Ql38y41eD00KifktZGGJLeaAIFfvk=
X-Google-Smtp-Source: AGHT+IHRvkVXZBIyCT18yPMhE1t23q/yPbr0mOu/5QrLkmJstxOdy+flFXy8FzTphf0afnFfMJhZDQ==
X-Received: by 2002:a17:90b:548d:b0:305:2d27:7ba5 with SMTP id
 98e67ed59e1d1-30a4e568050mr14952065a91.6.1746398171188; 
 Sun, 04 May 2025 15:36:11 -0700 (PDT)
Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50])
 by smtp.gmail.com with ESMTPSA id
 41be03b00d2f7-b1fb3c697a6sm4255972a12.63.2025.05.04.15.36.10
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 04 May 2025 15:36:10 -0700 (PDT)
From: softworkz <ffmpegagent@gmail.com>
X-Google-Original-From: softworkz <softworkz@hotmail.com>
Message-Id: <53db9857280f37b650513dd4ce689fd421867f39.1746398104.git.ffmpegagent@gmail.com>
In-Reply-To: <pull.66.v11.ffstaging.FFmpeg.1746398104.ffmpegagent@gmail.com>
References: <pull.66.v10.ffstaging.FFmpeg.1746327446.ffmpegagent@gmail.com>
 <pull.66.v11.ffstaging.FFmpeg.1746398104.ffmpegagent@gmail.com>
Date: Sun, 04 May 2025 22:35:00 +0000
Fcc: Sent
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v11 11/15] 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 <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: softworkz <softworkz@hotmail.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/53db9857280f37b650513dd4ce689fd421867f39.1746398104.git.ffmpegagent@gmail.com/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>

From: softworkz <softworkz@hotmail.com>

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 doc/APIchanges         |  3 +++
 libavfilter/avfilter.c |  9 +++++++++
 libavfilter/avfilter.h | 12 ++++++++++++
 3 files changed, 24 insertions(+)

diff --git a/doc/APIchanges b/doc/APIchanges
index 75d66f87f3..d0869561f3 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
 
 API changes, most recent first:
 
+2025-02-xx - xxxxxxxxxx - lavfi 10.10.100 - avfilter.h
+  Add avfilter_link_get_hw_frames_ctx().
+
 2025-04-21 - xxxxxxxxxx - lavu 60.2.100 - log.h
   Add AV_CLASS_CATEGORY_HWDEVICE.
 
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 64c1075c40..c76d43a215 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -989,6 +989,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 a89d3cf658..f85929dc5c 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 field if there is
+ *         a hardware frames context associated with the link or NULL otherwise.
+ *         The returned AVBufferRef needs to be released with av_buffer_unref()
+ *         when it is no longer used.
+ */
+AVBufferRef* avfilter_link_get_hw_frames_ctx(AVFilterLink *link);
+
 /**
  * Lists of formats / etc. supported by an end of a link.
  *
-- 
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".