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 DDE844E524
	for <ffmpegdev@gitmailbox.com>; Sun,  4 May 2025 02:59:54 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9342E68BC3F;
	Sun,  4 May 2025 05:58:36 +0300 (EEST)
Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com
 [209.85.210.175])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A4DED68BC29
 for <ffmpeg-devel@ffmpeg.org>; Sun,  4 May 2025 05:58:34 +0300 (EEST)
Received: by mail-pf1-f175.google.com with SMTP id
 d2e1a72fcca58-736c277331eso4122839b3a.1
 for <ffmpeg-devel@ffmpeg.org>; Sat, 03 May 2025 19:58:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1746327513; x=1746932313; 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=EB08gyY5C2ALXs5XY58UGhKRIo554RCwcxgblyiGWU69e/C02Y01Ez/9kdzLxuJNRR
 bIOhLBqpz+UlkWCKhoiV2d8CB6GBLBtl68L98wi7rkX8kbr9WqLqU2GFvo8FDp2ZzZeV
 ESAtsABIYkNPvGoXf+CRRwFQxqeeD7TDpcHhghQkCwoD3pM1aoKntNW2sZguWS/vJYPl
 s4Lsa1GeA2MvMSpV2vs8EynDVjHPlGpysUqh6Ly9OMMAgmez47ocPvpFEDqmmv8KRmyE
 HLPbPUOVQVpIeYhIEGD0LTKC3xBnscuxsHTrJ0w7WuUYlQW/C3MGFGjdbKXh2zc1a/yF
 zcuQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1746327513; x=1746932313;
 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=Rc+8juUjlRDEert7gI5tsFC8+5D2E0Pok9r3n9RPBrXVT7KKM+eWnUBgyKM6xYBFRG
 UbtPaAOhO8qma0u8OcJyPTqQTPyLH/rTgg8vk+rytUHlhANphr6JqOU4fZIySb31QIfO
 iY2uSa4eS0r8GKAOJHV56CArKocHOj21hrtN7BDsO6rqEzivSwJXC7hQBL+F1OddMU3/
 tWuDfvEbgEGqYaXjQywtx8K2cE9pv0x60tefvBRddMgXV95F4310ITT0Z8UhCQDfquXy
 xudTA4Lxz/tuGqrGxQSQcQq2oyHSw6H6uWh7iUUkmxhyVbhHGXZlgzGO7YdJGP+kCYV+
 UeDw==
X-Gm-Message-State: AOJu0YzPswSTXSjzmZIzZIbb5lcap4NgzS5aordz67kpieL77VjP8oN5
 llrI77Q93SwX8JoyeWJIu1DNeOGlgK+xbCJpqBVPIgEU6SF+MANN5Xvr1w==
X-Gm-Gg: ASbGncsXSzWqW0YsEhNMFFmwtpZk567rY3bhqn3UxOh+JilVS4nfMcvyBEjf53Volao
 vgBrMWOa0KOj8IC/CQgf9yfGNJVkWieIWWCgWk/ugy3v9GKXAhrh1Lgh38qaeGJtXroWmYlFyw1
 oA66NitzsaM6UW4VCoAW4La0hGxhpEPgVZbvyrCBeHqg2b+gB2mCNZ1DwwD0laZ5wBsGaHGDCpt
 T1k9USXSQs+Zv8B4G2ecCvbyjGdyksGuTGw2tqnHFHTgKpzt6zSx4mVpXZ8iqFxZWw22FnSLVb0
 Ku91GdFTXEf5QJYX0pu7KxPmOO2yKK4rxWuyDVX2SxamZNity/8mvb5FJa4=
X-Google-Smtp-Source: AGHT+IHCk3J7thjPzzlCcZLWG/45Dze2H9TA8NWNV/L1tfy/Z4OuybGCi50CvqraD9vVwr3vDKjyRw==
X-Received: by 2002:a05:6a20:9f4e:b0:1ee:ba29:d8fa with SMTP id
 adf61e73a8af0-20bd724e901mr18630003637.6.1746327512965; 
 Sat, 03 May 2025 19:58:32 -0700 (PDT)
Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-74058d7adb1sm4092364b3a.36.2025.05.03.19.58.32
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 03 May 2025 19:58:32 -0700 (PDT)
From: softworkz <ffmpegagent@gmail.com>
X-Google-Original-From: softworkz <softworkz@hotmail.com>
Message-Id: <53db9857280f37b650513dd4ce689fd421867f39.1746327446.git.ffmpegagent@gmail.com>
In-Reply-To: <pull.66.v10.ffstaging.FFmpeg.1746327446.ffmpegagent@gmail.com>
References: <pull.66.v9.ffstaging.FFmpeg.1746260565.ffmpegagent@gmail.com>
 <pull.66.v10.ffstaging.FFmpeg.1746327446.ffmpegagent@gmail.com>
Date: Sun, 04 May 2025 02:57:22 +0000
Fcc: Sent
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v10 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.1746327446.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".