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 415024B0F7 for ; Sat, 1 Mar 2025 10:03:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E291068DF6E; Sat, 1 Mar 2025 12:02:41 +0200 (EET) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 643E268DFF2 for ; Sat, 1 Mar 2025 12:02:41 +0200 (EET) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-221206dbd7eso63404005ad.2; Sat, 01 Mar 2025 02:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740823360; x=1741428160; 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=OA/f/tz8YgnUa8ZsclvxV+rLRR8w1v5p0rBD696aTWU=; b=Ust1Pa0BsVw7DzetjyBQ/fpuSVOpe3kIyJV379Od+C2WyYLC+5IIVY4hYVqXmjiGVV vBHdtduDVookpGf/cmlDPIJ44uL+IdA4plkqXyyKYYbDrJyHWdHimI/jbRWdGHRI2jVJ hqSK9+yoovQJhYz7plRP3UGRW6G+Z77Sm/sABVIC2AhBBjiRhYyfrgD2xPXJ6kvDZcpq i/C17x7ANihbPnCFOA9OFSjb2ImLkKk2LRkKfRdZhMOifcZj8C+cdBTlqWnmyS4M5ZXf yDvHn8HwdAwwUo5qMcw7M0sZakNLA+psWL70/Ijjgpo+MWS88lHhiq7ANk9zweT5YlRo Va2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740823360; x=1741428160; 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=OA/f/tz8YgnUa8ZsclvxV+rLRR8w1v5p0rBD696aTWU=; b=TxReX8ZPatApeqcoGdpVNLA55xOqduHHWRrztJXGT8JTspqK92QulOCY394AsjRujx y6NgdEKjdGEJmu4nYeAVXKHi4mSS1GepB49B3vFeGM0PIu8Fhqx4GSVLbE1Qy0sSHe0+ V2/2m+t7m7aF+EFPaQBbwoxFoz35l1aLJ9pHF9tBHEWJCid4FAJhh++n3RyvuJsUcK3G yNZDi1p4M3F5oC0Pi36X5wLA8VeOUL/Jud8FCEA6V1siWxtCYYDlwXVSZgqCTX3R8V0J OvfLUe2jCd98U1sBpRPBmLLUr4XDN0tQy1FLrgUl/K+cSgGLA1kSo7bMYnYAbEBourjw 12xw== X-Forwarded-Encrypted: i=1; AJvYcCV2k2ByRUL+9C9ygYfbJk48devPQeevJRqesxNN6Lf9C5bYWmqwNcGIppti0iFX7xgciJrUGD2aikOmJu+fxf4eVjU6D7vrSY4=@ffmpeg.org X-Gm-Message-State: AOJu0YyQ/je2UfyPLySQqh44O8j9G16OueuxVawHKFUB7cvsRYUqiQ/k 1YDytyWe5gRTqERjQryDkSmRZYssXV6PYjE62AoPk7wX4WWpGAa3lUgIOA== X-Gm-Gg: ASbGncu3/4Pq1mKydHHl0K6zzt4XVL7zu1FtBpZGz8FKkeQjzIv+TsUPTPSNs9V7PYi Oq6ntXTn+haoDyyoPwJ4af1nc8MmmgADbQ2gvgzKdMkad8J5NxZHfOWwG25pxqcdP//ZUOcQ2Dc nyHCfKOLtYRcTAHNBOoTlxbJFAwcukFPmFnRcTJkjz8VxZA2fxAOWH6gkI7KJvt7NQ7mkK/1+4p LsjftKKtQipA+7O2YPAJY57bbkH2Q/H70DkJPIj+nFPM3GFwuPBdFEmHUH6PGtcTMx0ZocgHLEP kQsugEj8tKxnLjvrb3pm7IYkf4VfwvML+zN4CpGQOh5DZ93mUev07+3VQ9qBwlM= X-Google-Smtp-Source: AGHT+IHRZ7KHfo6MRl7a3nI/TwBKCs8Rl4tuVLNnUoiub0++K1DUSxlvTrNuEfCneBhpCkWr4nwd6A== X-Received: by 2002:a05:6a21:339c:b0:1ee:88f1:e840 with SMTP id adf61e73a8af0-1f2f4d1c17fmr12176969637.19.1740823359707; Sat, 01 Mar 2025 02:02:39 -0800 (PST) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-aee7dec4142sm4760181a12.56.2025.03.01.02.02.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Mar 2025 02:02:39 -0800 (PST) From: softworkz X-Google-Original-From: softworkz Message-Id: In-Reply-To: References: Date: Sat, 01 Mar 2025 10:02:02 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v3 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 ac506f4b56..acdd473a67 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-02-xx - xxxxxxxxxx - lavu 59.57.100 - log.h Add flags AV_LOG_PRINT_TIME and AV_LOG_PRINT_DATETIME. 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".