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 7EE544CE09 for <ffmpegdev@gitmailbox.com>; Mon, 14 Apr 2025 12:48:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3ABB1687D12; Mon, 14 Apr 2025 15:47:51 +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 332E3687CDD for <ffmpeg-devel@ffmpeg.org>; Mon, 14 Apr 2025 15:47:50 +0300 (EEST) Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-7390d21bb1cso3985529b3a.2 for <ffmpeg-devel@ffmpeg.org>; Mon, 14 Apr 2025 05:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744634868; x=1745239668; 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=lLkQgI1SalRwUhggVcciDqTA5oZkWc9W01Uu4pRyQgM=; b=OmeJfd3UxfJvn4fE7FBqeEiP8v2ayDKtO5G9+fxzp1A9+olGe/Y3fvNDVm4d9c+2MZ jRZBpU5bgEJUX9qvlwyNjgIaFtAx9flydiuWcQnPDHArfZ5OIrrprKyu50vxOlsQK5RE LNu18bVLHIOZpEFZsAzeI+X4FBKfFdnqAb2WG4S+NeB6ppxuzBWC2IwOPdkZ3FOV/RSJ zpkT9Gib4iTb312px362E3fYAodEpxwM3iP6MJcbrBX5/0p77DooQ8Jg+i3k4zGELmtF BOvU8aTj5KPmxLgXJrCl5KceVYTLJHWxnT2fcl4MqazzmFcnXcyaH8aZWloTH/cZg9Ac qL7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744634868; x=1745239668; 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=lLkQgI1SalRwUhggVcciDqTA5oZkWc9W01Uu4pRyQgM=; b=XAq84N4LumfDSgCnWv/ja9MJXsCWISPiZwM8t+Sn5EC5MAWPm/9EyCnTI3ARm5rWAg 20JnABJdHH2PzvnyfzQb6Aji5k9UvZ1hyK95aW7MFPMXRzzZVOW3iHljp4/oFv1OZZBd vSXs+URfde9oqFb6RSWUzDCnyi13IjVIwJQvwCoec3TnEn+gTu1/nzIlllvawGpxYgId wxW+s+DBYwnDDyfR10Yay+h69/TWGOuXDZE9CfC/jiOpGdv8qD5NF0QHnSqc67ucQVZ0 ReFFRoz9Bnpr4lFm2M6Gg3x0XU11w6jhHPFWiGr9PKAue1LAHvoPL2+Nwo1R1gvUM67c Hctw== X-Gm-Message-State: AOJu0YyrWrIYLreEVVuSsfBrcB5Hq9XFkLW+2Nc60QnfTLQsPFK7YuBz 7A7fgFaV1ndsbF6Ge9DQ0VMtX9OVl9LUT2/ZXYSVOGLzMKaX1j8KVzSIKA== X-Gm-Gg: ASbGncvqSighD3atrURox5bKGnQFC8rCRC/MrC9zMtygpx8xszdk3HnYGsRuJ5O85nn oiODsubkmHWlQoQ1E4u3Rm5knmJnp8miG5eYy4RuY1Pb49P946wpoprAJdxLc21d98MI0L/3zxn W819uonhE65ZOZpKSPd23Nh7/bNdNkz6L6SzXiD40cpi0n77hq6X9MawKC+6g5kMXa1Jbj/GBug HoasZP0jzJltSFodjaO5HKLtyzOeGWT37AuGFQJOO/5Kmbk2ZsgJ8Z8Oin9XCpQmQhkbrz9zrbF 5rLPBUJEGFr8tXs5AONOJAqr3ln3SjfLsM4sf9ScAXuHfwUBLqtxuGiNlSo= X-Google-Smtp-Source: AGHT+IHi2/GTnYoQyKknf8OcAxf320td3llEDyiX7kK5s0DfXMuR0e4y/Lq+mP1NvzSo4ALvFqdILw== X-Received: by 2002:a05:6a20:c906:b0:1f3:4427:74ae with SMTP id adf61e73a8af0-201797b94f7mr18065961637.25.1744634868374; Mon, 14 Apr 2025 05:47:48 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73bd22f82aesm6428037b3a.110.2025.04.14.05.47.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Apr 2025 05:47:48 -0700 (PDT) From: softworkz <ffmpegagent@gmail.com> X-Google-Original-From: softworkz <softworkz@hotmail.com> Message-Id: <4f3db399c6bcd7b6e460312a3ef733ba901b9231.1744634827.git.ffmpegagent@gmail.com> In-Reply-To: <pull.66.ffstaging.FFmpeg.1744634826.ffmpegagent@gmail.com> References: <pull.66.ffstaging.FFmpeg.1744634826.ffmpegagent@gmail.com> Date: Mon, 14 Apr 2025 12:47:03 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH 6/9] 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/4f3db399c6bcd7b6e460312a3ef733ba901b9231.1744634827.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 65bf5a9419..32374f5453 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-07 - 19e9a203b7 - lavu 60.01.100 - dict.h Add AV_DICT_DEDUP. 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".