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 DCB474D1FB for <ffmpegdev@gitmailbox.com>; Wed, 16 Apr 2025 10:14:12 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 943DB687DC0; Wed, 16 Apr 2025 13:13:09 +0300 (EEST) Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A6625687DC0 for <ffmpeg-devel@ffmpeg.org>; Wed, 16 Apr 2025 13:13:07 +0300 (EEST) Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-223fd89d036so79590555ad.1 for <ffmpeg-devel@ffmpeg.org>; Wed, 16 Apr 2025 03:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1744798386; x=1745403186; 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=VO4FFM7XTx0GJXXZ9F+deUwi+TEYcRJaUz1lYWegvXYM+zZ3b9MfbyYLNKOAjSwNNy CV5dhcmnsWvgDeGriFmzpA06vw2kBpzIG5f/ntqYcFvwGLpImLiKt4QrevSBppDslguH sIRPT5c93EbaiPay3vMBKGaU25l6ATz5qaNug+fJwvfSzVIKSY6DuEDVmFhkCWrPtYcz ga2+SWYj6LegpFgMp0/LXqWwZJyj9L3soZiRoGPsVEw4PWpNKzUl13HwkTOVQt0dd8Mh PAAG3hf+jZl4T8TXbuHh+RWXBlYpoShuV7BrhjQB8uVH+MqQbKXN2TGUqigfGd9L+VAN Sm9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744798386; x=1745403186; 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=qz7vqADdi4DZB5WBpCZaMtNXmQOWq9lVKLySfTvtRFX28WIAEv1XGSeDAC5Gx/Zyp+ AysLj80ZA365eX7JVzO4KxCqgimIlS591L5J+5My7OJCPpPpij6x2uVyTIjRyLjF+7pd QLhFRQjqYZVuUh/By9NLKk4Nakk3XoFuSP6at9cMWmSU8HYr57XYE5UKHEgzZ6ppU4jQ nFxs7CePznGXYTwaNP83IuNXSvWbCn5XrhBv6g83aai9HMFc4Pfb4VxeFAmn/d4a0GFD EALwckllwc7l3Qt7Xw/X02TbHLYEFwVzQKsfKDiK49LBgTs63XUV1JkRq9eglPWFNJ/M LqRQ== X-Gm-Message-State: AOJu0YzS7juHQHnUTKJoC6zNdpY/oDx8mQ9vXFStjA21fWE6AVuQZzcn SVoJCbRAGjMhsiIQ8I+0+5i5j+PGLuYfs2LyCKxfzwEfqFCgPCoQcHnW3g== X-Gm-Gg: ASbGncskdOC9rGhAr+tVFZb+V74zkKh586zlpZD3DO2vGszXswbZPGNBEz8Y/sysP+M DQMyYRcImoGy/3tMzlGZhKvYh9qU1ixCgg8DzoASdrnwhaaP4xgMXGFCP/TAF1dJsWIDm1xv78y SPnZ0UwBB0OffpvXlWN6KPbgDiZ024Lfij/NcZ+YXH8KLHSonO41aFxHW5wYmj7x7n+iBCfhQJY qGbc7m5QpnSJmy0e6U4tmBzBG14wcWAP9nprE62+CYa9UOQB5cV380O9tMJpE3/c/hrgxW41suH SwR7wZV7ooTO0XxffZ+V7llIwWa9eT1ITB7F9meLhVktVO/OpDE9q+HForo= X-Google-Smtp-Source: AGHT+IESZwCKg2Vto1fHlZgkgMIkpUVIrDZsjAiXIarybpMixx9NWDE1XyUvVpOZf1YsyBawpTZL9g== X-Received: by 2002:a17:902:ef44:b0:215:8d49:e2a7 with SMTP id d9443c01a7336-22c35990b95mr21666615ad.50.1744798385770; Wed, 16 Apr 2025 03:13:05 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22c33fa5f59sm10195735ad.129.2025.04.16.03.13.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Apr 2025 03:13:05 -0700 (PDT) From: softworkz <ffmpegagent@gmail.com> X-Google-Original-From: softworkz <softworkz@hotmail.com> Message-Id: <eb54476d0027cad185c813591178a7b8d588f6cb.1744798340.git.ffmpegagent@gmail.com> In-Reply-To: <pull.66.v2.ffstaging.FFmpeg.1744798340.ffmpegagent@gmail.com> References: <pull.66.ffstaging.FFmpeg.1744634826.ffmpegagent@gmail.com> <pull.66.v2.ffstaging.FFmpeg.1744798340.ffmpegagent@gmail.com> Date: Wed, 16 Apr 2025 10:12:17 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v2 07/10] 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/eb54476d0027cad185c813591178a7b8d588f6cb.1744798340.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".