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 F289B4D416 for <ffmpegdev@gitmailbox.com>; Fri, 18 Apr 2025 02:58:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2369568AE09; Fri, 18 Apr 2025 05:57:53 +0300 (EEST) Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C01CD68A351 for <ffmpeg-devel@ffmpeg.org>; Fri, 18 Apr 2025 05:57:51 +0300 (EEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-739525d4e12so1338396b3a.3 for <ffmpeg-devel@ffmpeg.org>; Thu, 17 Apr 2025 19:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744945070; x=1745549870; 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=w+yrxtcmtgj9bzezZQNbT3YRNCkAUTz4+I19HPLAQUI=; b=JtqiYi+gZCOs71EPg1RzlFnSAknT+3xaKayThvdY6k4ZM3tcnenqWEkDyR0ro0CRh/ Qpf1vi1MGCZ7rYjql3ttq5Prr3sHxCIl5Tj4GvkK9RlNV3uBFIzjSSJURPMzVS0yJojY b96IsPkyT/sHEK4+9ivcLnqPSdhn8eTuV0P3OeJ5ClptCkQmDlUo25MNIpFW8Xk/AmA3 nh4tANNXd4cqVCoRpP6DhOiVfWyLQlhgTGbo0S3rJTo3z8RaU0vPUYPHt/k4eZgk9v/E aLB+CBfCMEsOarIipFmNjDbc4M/dzZq7vgZc1/aZ82xfw+honNSEpPH3ChcYTpv38U52 Yd5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744945070; x=1745549870; 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=w+yrxtcmtgj9bzezZQNbT3YRNCkAUTz4+I19HPLAQUI=; b=OlC4+5lqSZjhNydR+hY2iDjqLJoek5DFdZxTJJ/zer5xnS0EWisFumHL389VyHTHhx QBZaSC6+I9R7c0X8flsQ83gEXvbGq5e6P8pJAn9kQ12QHUmJ7Of9nTMCLSU75eStlMpC Dqqkn0Dx0y7HxMnxnR7qblr+uS88dPqJ4CXfpfP1CqE6FtmAVQLnV3dYaoX+/QhG+LRF 0QDqeSxg4CdLJQITmdzhDMQKcjG+fFN8FyGAgoKHwwcyR5W+5X1cjNDKz9ujEiJoCxn5 OuslCU4QiqpBOwUxFRNhdpP/X1HnDdqsfXbNe3/wIgEN9WgBME9dmO+fA1oWG4zubaLg eNoQ== X-Gm-Message-State: AOJu0Yyx+wHloNncmgog9P1GPyA2Xab5AcZdBPDyNBM4vxZ5e6n4I8Fk k328y6Qb2wh58MYkbplMRp9bgtFFapRfOajqwWbvhwfE57fn5ymQmxn0UA== X-Gm-Gg: ASbGncuUkZlYYtgLi78A3VAYKFJ6Gih/Mk83Nvk3elo5dQkqdBZL21QU18LTojIGucr gq8lsPOJ4ElBBINReKU8coBATIl3Ayrgy73bQDYKBgg0fBPONQD2DwqE+sRO6NcPNTNsySj7E4O GvN8E8guXGQ4s3VFeDi60Jp3HiPszRQq4MUM2LScvuZNINTpKJBOnShAUaiIAp3heYD29fzNrwx d4YCdWZDuze8DeRYn+XtebEsJfYB7hTQQv/0Ag0yeo+xA3DX4qyKOu7LMhigeEiG6kfTQLSlAEz L5/ibQXwZKn6xLd0gSP6gPnDp5IyT33KRkR+/vv7eIfG7AZId+/V1cJBR/A= X-Google-Smtp-Source: AGHT+IH4jqkVk2UFU+WuCtjCNAe8pKYu0hoMi68JAceFvOI2azMRvSoKW6BfqWPVWYeMK/I38IK23Q== X-Received: by 2002:a05:6a20:158c:b0:1ee:c8e7:203c with SMTP id adf61e73a8af0-203cbc74cdbmr2094071637.24.1744945069914; Thu, 17 Apr 2025 19:57:49 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b0db13cb6bfsm573972a12.39.2025.04.17.19.57.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Apr 2025 19:57:49 -0700 (PDT) From: softworkz <ffmpegagent@gmail.com> X-Google-Original-From: softworkz <softworkz@hotmail.com> Message-Id: <5e3225c9dfa49d75d551d26ccfdc6dd97e021853.1744945025.git.ffmpegagent@gmail.com> In-Reply-To: <pull.66.v3.ffstaging.FFmpeg.1744945024.ffmpegagent@gmail.com> References: <pull.66.v2.ffstaging.FFmpeg.1744798340.ffmpegagent@gmail.com> <pull.66.v3.ffstaging.FFmpeg.1744945024.ffmpegagent@gmail.com> Date: Fri, 18 Apr 2025 02:57:00 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v3 07/11] 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/5e3225c9dfa49d75d551d26ccfdc6dd97e021853.1744945025.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 22aa6fa5c7..4f60bbbe3d 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-16 - c818c67991 - libpostproc 59.1.100 - postprocess.h Deprecate PP_CPU_CAPS_3DNOW. 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".