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 D05324E873
	for <ffmpegdev@gitmailbox.com>; Thu,  8 May 2025 01:39:37 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C25C68C1CA;
	Thu,  8 May 2025 04:38:51 +0300 (EEST)
Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com
 [209.85.216.42])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 356AB68C044
 for <ffmpeg-devel@ffmpeg.org>; Thu,  8 May 2025 04:38:06 +0300 (EEST)
Received: by mail-pj1-f42.google.com with SMTP id
 98e67ed59e1d1-306b6ae4fb2so495681a91.3
 for <ffmpeg-devel@ffmpeg.org>; Wed, 07 May 2025 18:38:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1746668284; x=1747273084; 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=HD/xh55FLbR1PvwSwJJueywCsoTtcOkVJUogajXRvH7tbttyLi0eXrbJZLm/Ym5XE3
 W6fLv44wiwRq0vpSwWFRpgDwPRqzd0DWBjY31zDnodqFqWPmuoaOWW7rUVfxqHQx2Tfo
 Zo6MqqkLoE+gXqSCIlZdYzJoLo0B5qxWMi1FdxyxKfs4sJvGqdwCVYIRqtPPbP42Wk5x
 4w+sKZr/olgTnZCScCx+x2IrwemUpRlv+6axenrloaoLQ8kYGwfqbdgYTttdHOgg5JKI
 DFmWvXWegtNNUDB4t4IyntAI217nNcUGfaDqO6nUTfqGa9c/k+MWaR0e9dnR6egPhBQT
 y3Ig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1746668284; x=1747273084;
 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=kuGeq4fXYKB+yTsM6lzljFXvUXzf1FHTEzi1nHo+slYT+RLt9yp5ff4QivzK1HAMCL
 MT3uWZ25ZlvpCgFhFw3l3WH/b0ooBsKhwhzbURvDsUoFh/mvcjs0NwZuXk3yVUbK7dYj
 GOp0FT5UN8Kisb0xPg9SJ2TI/YKNv8zaTgSDDopt6MatlS73FC9Jd5DjY9cWnIsUGP23
 wNgtPRo7MsOn+dtNn/tZKhuoLijd+LIclnNIudDAZppLEVxS46tqeQ63p7hBKKBZ/AOj
 0kx+gtzppJFLYWLVatQzu2KGjwVRMCldUUZwPBUMXwKLpz1atkeinhH7/GiJhMhYn56s
 MYhw==
X-Gm-Message-State: AOJu0YzUar3f3l9dnYP2x/FOKqQTRT632rT+UIsWF1FCKYhqDxbTbkQl
 BdIYWOcgbKiSo3ILTe+90YIqt1bxWM6Ju2PX3OPSoa0wcv2KbeOiP7n13w==
X-Gm-Gg: ASbGncs6N+kYH0BN89QF62BnY5xsQP5OSVAhNrKeMlCRJCcmz2brnxFAKBEfp02uhoY
 v+w/VU4aRn1Gd154lAVewP2woBP4SICtjlrnWH0PkDbFN0VlFgpfT6lbzNWRsqDu8FStI5urxuk
 TU1CrsoU2yMwgf8oI0hd3nLsnmArsQHEiv1wnm0vsNo8Qwgm/97l0kB4aXXcW9qcF0A0l5ILfCN
 JfUIf6DthyCRMbf4/iFK9qlMZQBF1oTe9kzDdqJNg+lczr5Ud+s6SGTgzbl2ne8jjHbrb0W5J8c
 9i+ESqVFYHmxoa6wNcoAdYrG5kVUqRZGLuTZXQWXOjtJxPgraWuFCCpQY4w=
X-Google-Smtp-Source: AGHT+IEcLz1kRzu1sucTPhAXg+op87OorKvK0wde7F8qx61ou3aoVVGMQlwRERZ6Z4m9p65qifVb5w==
X-Received: by 2002:a17:90b:3903:b0:2ff:5ec1:6c6a with SMTP id
 98e67ed59e1d1-30b3a6745ebmr2097364a91.18.1746668283471; 
 Wed, 07 May 2025 18:38:03 -0700 (PDT)
Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50])
 by smtp.gmail.com with ESMTPSA id
 98e67ed59e1d1-30a892f4d93sm3488575a91.1.2025.05.07.18.38.03
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 07 May 2025 18:38:03 -0700 (PDT)
From: softworkz <ffmpegagent@gmail.com>
X-Google-Original-From: softworkz <softworkz@hotmail.com>
Message-Id: <997d93b0b4a4a5edb605dcccb0d72770fb2f76e4.1746668216.git.ffmpegagent@gmail.com>
In-Reply-To: <pull.66.v12.ffstaging.FFmpeg.1746668216.ffmpegagent@gmail.com>
References: <pull.66.v11.ffstaging.FFmpeg.1746398104.ffmpegagent@gmail.com>
 <pull.66.v12.ffstaging.FFmpeg.1746668216.ffmpegagent@gmail.com>
Date: Thu, 08 May 2025 01:36:52 +0000
Fcc: Sent
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v12 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/997d93b0b4a4a5edb605dcccb0d72770fb2f76e4.1746668216.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".