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 C16A04C32E for <ffmpegdev@gitmailbox.com>; Sat, 3 May 2025 08:25:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 858AD68BA2D; Sat, 3 May 2025 11:23:56 +0300 (EEST) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CDD7A68BA00 for <ffmpeg-devel@ffmpeg.org>; Sat, 3 May 2025 11:23:54 +0300 (EEST) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-b074d908e56so2134619a12.2 for <ffmpeg-devel@ffmpeg.org>; Sat, 03 May 2025 01:23:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746260633; x=1746865433; 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=6QkCzdNcu9Ltu8afG4QeySxQc5HsESa2paiuYmJ1Y14=; b=I7sfUrcYRb85CLg+nSWg7UsDV96do9diEQ5OUbSJRRkvqW501eH+FNuaQs1HdrJmcR wkWxDvY7tPw1ciF3+6Ea5/Pw4+Mz1yQM0uPWo6XXfxmzcmfGikaFX338kAInS6VMyQLC PrCl6k62n2vIkWhXmEx1ouQtgO4/MA/D63lNA5Qo8xcV63b/sm8XPK9yXL2UqtKiP0Cs XRlZwpmMpVKypdTPJoBFvnpX7rnN9iRIGtfRoZK9fKrqZtlwHEykldw3rcSCmCYy4MrV 09P0/EgKrqjQBjtYf8/1UMlzYQ3Fp80Jj9Z/nknfr4LVd68Pyfhq76p1sqD8YvhOuoxi Kbvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746260633; x=1746865433; 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=6QkCzdNcu9Ltu8afG4QeySxQc5HsESa2paiuYmJ1Y14=; b=eQGdyWJ8f26ydPQRtxlD+eWqkpzgvPLgeM3wYcSybnAzQqDXvwvJbXgmUd77lmhq6F jb0vVM69zvwE0thzXNQgEDitRF2b4hWA9joMVrIzwT2mfi2F6hsJVrKc7LEon5Qf7f1Q aUpTKUkq18njEHWU5d6B/ix2r3eKRtrdCN7CBsE3Pk7K2NIppdNq6ixKoIn4tJ8j/O4p dKTwdwQHhlQJLqCt2zbd+IlChM5Tyqh1ovEBMm9WtHfbDwViAVbCyKHmGuHZEH4aIzPO W/vFF2LiXdNVC4gcQSShzepaRSj7oIm08dbIm3+JrJ1hYGb1rMMlY5eCWjvqh2vtgTMc 0SUQ== X-Gm-Message-State: AOJu0YzAdnukrf+0EmOrxpz5e534Jafusm0UFnznEKl7cm7cZ7bzPOzF lAfET1w7coQ1UNh9f8Ev2Qj6yrgUVTdVi2715HlqK20Rd8RGftTH47ZSYQ== X-Gm-Gg: ASbGnctYqTiN1Dh/+jlxZgX4zw2uwmG6uNrOrNHIH0VhMe2sbKoncGwChAIiD7XvOuz Gm6fbafHF3cBvAUt+cXOwYSyS93vt2YKJ9qs6axldTT+EeHSOa4NNrzDdhmq2+zVZ8rM1q7ob/F SnKQaHzminhoevJqXaYfq4ievOdxMuxSZ5ItDeCOgIifHLIbfxIF8UIhEVl+Rd+GMeh0avn1LOg NxEhMESkhINKzyZ3Qy+DN6pi2SYmoHToYFUrtghBItj2tRyZjQIhrXOmQKXtOERtI6rqdH4yeme F2CUgyBi2vfVsQipbmykMPjRIUISWeg6KWhSK2eCL214l1Em/2chHkWSrsU= X-Google-Smtp-Source: AGHT+IF5UlmVFk+eAv3dilGmxlxGsXhAPvyTHpNb0e4w1yiX26Xtl13I0UOHVjWkr8Far/l1DzYCFQ== X-Received: by 2002:a17:902:e750:b0:224:1221:1ab4 with SMTP id d9443c01a7336-22e1e8e686bmr3877865ad.22.1746260632700; Sat, 03 May 2025 01:23:52 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22e150eb007sm19753545ad.25.2025.05.03.01.23.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 May 2025 01:23:52 -0700 (PDT) From: softworkz <ffmpegagent@gmail.com> X-Google-Original-From: softworkz <softworkz@hotmail.com> Message-Id: <53db9857280f37b650513dd4ce689fd421867f39.1746260566.git.ffmpegagent@gmail.com> In-Reply-To: <pull.66.v9.ffstaging.FFmpeg.1746260565.ffmpegagent@gmail.com> References: <pull.66.v8.ffstaging.FFmpeg.1745888404.ffmpegagent@gmail.com> <pull.66.v9.ffstaging.FFmpeg.1746260565.ffmpegagent@gmail.com> Date: Sat, 03 May 2025 08:22:41 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v9 11/15] 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/53db9857280f37b650513dd4ce689fd421867f39.1746260566.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 75d66f87f3..d0869561f3 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-21 - xxxxxxxxxx - lavu 60.2.100 - log.h Add AV_CLASS_CATEGORY_HWDEVICE. 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".