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 8C3EB4DC92
	for <ffmpegdev@gitmailbox.com>; Thu, 24 Apr 2025 01:15:31 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2D47368BA50;
	Thu, 24 Apr 2025 04:14:18 +0300 (EEST)
Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com
 [209.85.214.171])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E0ABC68B7B5
 for <ffmpeg-devel@ffmpeg.org>; Thu, 24 Apr 2025 04:14:15 +0300 (EEST)
Received: by mail-pl1-f171.google.com with SMTP id
 d9443c01a7336-224100e9a5cso5855665ad.2
 for <ffmpeg-devel@ffmpeg.org>; Wed, 23 Apr 2025 18:14:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1745457254; x=1746062054; 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=ZR9aUEaNKE9J42+p+LKQJlf12bipqCjNIhKMkcsJj+p8Kni/dEAsDQ6d3rTMVD6wu3
 zDtedvDPKPfQpd/Bw+Ps/2WJhPCKH31WyOYamGenJxT2JJDz+5hQH+RTbO9pzH0xLlo8
 SMKRUvjYfVt8fj8mxOX4tFGKV/8u/KVOIAZyq6wcEUMeZOnA8Te+ERVLNPXsUT8uwab2
 LnrLL1qDBzaTQG1UkAP1iOxcJJTDZAXT5OAsWR6BODLg5yhhW6eFN1oefZG/VFFn058R
 PS3gBdejbdFCU5sDGXzRIu0AxmrXa9m9kYWvvEl/C5fqlK3cFC4ZQUADA+lUuCX7r7/o
 6gRw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1745457254; x=1746062054;
 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=BrZ8vjXs71LzdHfcBF15olix+fBT89AnII5v51Zi/eXi7G7t5moEslwN2WA3v5hf60
 dOIKKj1Taxmw+C9GpYL325jtJnfCwyxCFbY2BPwfWAk6srrYitdH2F9FMRCaOb19uA0X
 1oloby6ImetjK3Nyjzcj6OHtRStGTq0oxTC2Lgf2wHG1Vre0fwGWphmIALSgh86l0spN
 QjU54UjbPlWoWP7cGSikm5JLPNF+Ifht5uVF2MDRN/ptX0Xsg4RqzsEelcIdSV8NNezI
 3tVdaJgfT1YUbITxkAJ7KlS0e2LYunH/o9H2/SYsupIDAXMq3SXk/AyQu3UAlIvpDifg
 /t1w==
X-Gm-Message-State: AOJu0Yzevfp74nzVh2V+qVXFLPr+cSvMi4DJ7Q8Jiw7eX2f49WpvfglM
 HaHtI4o/MyHmuz/0L5446u4H+JSY3Q3qMyKbwGYy+SESvh0vvQbAJjgQ1Q==
X-Gm-Gg: ASbGncvSLkuCsU5YA/ZBq1G4AjJOWfyeGk59QOUp0g81t27No01ZZj3ZxJFCQ0f/4Kl
 pYdX4M3Zy3nbrITdbgGzDlruH5cfM2DX7wEf3RUTHInFxBioet6oVA1aXI498Ia8fadj7MjtUny
 7lBm6Jba6mA8jFpGeVMbJK+qNoE+6YBI33Kbs94ICtXLS+PK/gX6YPXdgOF9gkHqOI081rLTErh
 j9ijnUVNBkGV8yEa/Nv5yoQW5mQyVwMn10CvkJxAtumA4+mBsKfR7SgDuibbsRPfQcRFmwZwS8C
 RtcsGJMyUL1NbqT0YtodZngJCIz0QUJaVanNdJ0gWSZ662Zp4ffUPZPlp88=
X-Google-Smtp-Source: AGHT+IHgkqV+pAhyu1ZJvL6RkhVs+D5cNBu9PTjPlqGmdwTb9bjOXIjlB3eblqkCp0zV8FlullFORw==
X-Received: by 2002:a17:902:ec90:b0:224:3c9:19ae with SMTP id
 d9443c01a7336-22db3d7ae50mr8698695ad.34.1745457254043; 
 Wed, 23 Apr 2025 18:14:14 -0700 (PDT)
Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50])
 by smtp.gmail.com with ESMTPSA id
 d9443c01a7336-22db50e7b91sm1112045ad.115.2025.04.23.18.14.13
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 23 Apr 2025 18:14:13 -0700 (PDT)
From: softworkz <ffmpegagent@gmail.com>
X-Google-Original-From: softworkz <softworkz@hotmail.com>
Message-Id: <b6320cab8c53bf65e002eb3b9049e58e3bdf0854.1745457192.git.ffmpegagent@gmail.com>
In-Reply-To: <pull.66.v6.ffstaging.FFmpeg.1745457192.ffmpegagent@gmail.com>
References: <pull.66.v5.ffstaging.FFmpeg.1745358943.ffmpegagent@gmail.com>
 <pull.66.v6.ffstaging.FFmpeg.1745457192.ffmpegagent@gmail.com>
Date: Thu, 24 Apr 2025 01:13:07 +0000
Fcc: Sent
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v6 09/13] 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/b6320cab8c53bf65e002eb3b9049e58e3bdf0854.1745457192.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".