From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 8CC2E4DC0C for ; Sat, 1 Mar 2025 22:56:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1276968E1E6; Sun, 2 Mar 2025 00:55:28 +0200 (EET) Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2449868E222 for ; Sun, 2 Mar 2025 00:55:27 +0200 (EET) Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-223480ea43aso82825475ad.1; Sat, 01 Mar 2025 14:55:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740869725; x=1741474525; 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=RLDPCbIqj1ywV+JBFmfE+FrrTqVCcD3ubi8HpoFa8z4=; b=g9Oh1zIgG8GfwDpV7FMbU9Hw6DJWE56MpoluVp1PiqCP/QvLV95w+Lx7EHPy0+Zx1x TAf15cVhC/vu0cWPDrjDYfRDC0OsPGVU19YURul5hhtkweSkZdYBJInzhT72bLIA3t8M LBwXxsZ/w68IAXKpC/Hxy29JcmeJrDA9F40yScZ9Ft6P0pfYb+L83q/iidhQDGRLoL1W n29Zp49soGfdusqvxlabGbyZMvPrmMhs5KBNCNcra6JitJCJOBa5tNInnRHw8iq/BojN nBvvodzKhduP0v5Z+k+kcN6tLEKm7/ZqHePrCkmJ8EzhjVS8EZQFwbKeTly6vQeqt9iJ C3Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740869725; x=1741474525; 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=RLDPCbIqj1ywV+JBFmfE+FrrTqVCcD3ubi8HpoFa8z4=; b=dFvZgaxBmMGPHgojrljUBbSp8V1PURwC7Em+isM/Hxvqc8AphDhGl76OqujedrUiy+ RVykLgXrqZGQ4pidktRjZxbJdiU03S0YtwyfVCrueETkON/on39Yc47TC67F7F356uQv pQhfLY+JK+Lj3jvrarXsegGkePdx3nHmxabQFbVeUu+uSuDZ193eguu5yBCrPaawLUrz a7Ry7UN5lE6RdevLpC1ZZJFJCTUEqCuhpe/2XzPfxe9qu1G9g4mhG4OkhlNeLgxmODgw GESM++TfI2nkSEvgnOkpE4cfZ0lnlsHyofAXpuXZWBskzGXCk06cCcPewo6G1fkKY0A/ zQnA== X-Forwarded-Encrypted: i=1; AJvYcCXChZrj9ktj72LiT7mHwswzh6LZyQHrJ8AhCKAEPJyTtxCsqoo6a0+r0bFNf/OgJqmtKQ7GFo3dR7NDUHrWrMhrswSUtdHySp4=@ffmpeg.org X-Gm-Message-State: AOJu0Yze0bvBT0MwfByGfOy9qg3Ekmm3W6zsmD1fpVzUs08cwVwk9r06 xETTOXM8RzMGZ1Vw6vorfVG+5FtUs6VG3I09HLOK8qIYNpBCRosne1s59g== X-Gm-Gg: ASbGncv8s/Ei9KFuEDIPewq+W4u5ctmoy2CDqsDhnDkkAHHQQVpzcolUHW1VV3fX5JC hXJy4yKC4lJbLlE5SJcuiQkmQipQydWP4jmYWPeYA3VqyiWq7ArZrlXrDoOyakYYgEFfj2hmZA5 YIZB53sdYOJmxzJuykiRRnw3/26QeFh4y4yA3GlHyA8sMZsK3UPJafmjznO0Q6UoGpLyOXMUut3 5YbxgMh6B9HogqI69V72PiCk9gg6oi0A0EcRElTqD/AYKQ29XIDVBX7Km0mkP/5VgLZ5DLEIhqC tHI3zBmIRa4Cz/hSZfi3gSZeV/w4hq/xSq2gAmion+YJmKXHuLjGmc/UAY9HA88= X-Google-Smtp-Source: AGHT+IFE3tcf7PmM9zoA4KMlkymXa6eFgt/KrMlrvp4q0nOMhA/OeRSh+Ik7V/yGEHSM4k1AghjoRQ== X-Received: by 2002:a05:6a21:7109:b0:1ee:d8c8:4b7f with SMTP id adf61e73a8af0-1f2f4d22894mr13591785637.25.1740869725372; Sat, 01 Mar 2025 14:55:25 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7349fe2b836sm6029208b3a.26.2025.03.01.14.55.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Mar 2025 14:55:25 -0800 (PST) From: softworkz X-Google-Original-From: softworkz Message-Id: <4b8d7ee51b2bd0a7c066c84af68ce31ac81e4d91.1740869691.git.ffmpegagent@gmail.com> In-Reply-To: References: Date: Sat, 01 Mar 2025 22:54:49 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v4 5/7] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Soft Works , softworkz , Andreas Rheinhardt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: softworkz --- doc/APIchanges | 3 +++ libavfilter/avfilter.c | 9 +++++++++ libavfilter/avfilter.h | 12 ++++++++++++ libavfilter/version.h | 2 +- 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 5a64836e25..354716399d 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07 API changes, most recent first: +2025-02-xx - xxxxxxxxxx - lavfi 10.10.100 - avfilter.h + Add avfilter_link_get_hw_frames_ctx(). + 2025-03-01 - xxxxxxxxxx - lavu 59.58.100 - pixfmt.h Add AV_PIX_FMT_GRAY32BE and AV_PIX_FMT_GRAY32LE. diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index e732556ffa..13abd7e8ad 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -1006,6 +1006,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 4520d5f978..27c50520b3 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 if there's a hardware + * frames context associated with the link or NULL otherwise. + * The returned AVBufferRef needs to be released with av_buffer_unref() + * when it's no longer used. + */ +AVBufferRef* avfilter_link_get_hw_frames_ctx(AVFilterLink *link); + /** * Lists of formats / etc. supported by an end of a link. * diff --git a/libavfilter/version.h b/libavfilter/version.h index 77f38cb9b4..4a69d6be98 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -31,7 +31,7 @@ #include "version_major.h" -#define LIBAVFILTER_VERSION_MINOR 9 +#define LIBAVFILTER_VERSION_MINOR 10 #define LIBAVFILTER_VERSION_MICRO 100 -- 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".