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 3DD4B4DAF0 for <ffmpegdev@gitmailbox.com>; Tue, 22 Apr 2025 21:58:17 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CEA8568A76F; Wed, 23 Apr 2025 00:57:18 +0300 (EEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1EE9E68807C for <ffmpeg-devel@ffmpeg.org>; Wed, 23 Apr 2025 00:56:46 +0300 (EEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-736b350a22cso4671244b3a.1 for <ffmpeg-devel@ffmpeg.org>; Tue, 22 Apr 2025 14:56:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745359005; x=1745963805; 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=LA0hi5xOAATQdcAGHgrL9wfErZxgj50jqO/4Ncg61AvdxE5cmgXnlaL2R0+TnsGSuX 05JpzRZTfifVdzwB0j6iKyHtrDgz+Nswba/IVyaoJcih9r0n4hXF31JnScvGeP4fx8LY o4XLiwX7MIMK3I86Q0Txg3BK+GuD/nfbjsP4UjUFSA4Fmb6pumeIIu2QEO3R2rbYZeg9 Gfh+2OoG4PdMU1Uv63MkKqS5YQBezdrXLdinMhfU8UhBdc4qzz2uXM640uQ2Zb0ajZbI BvHVrje/crmPxUViNCoWT03LB9t2Ur/Bd3YfMxebn1wdQOs76RbtuUfR8543yjqOGtba XQYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745359005; x=1745963805; 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=FUvI1DWVY71NoI3iff/oNofoQPlNVR1gXol+ECQAQbnD94Js3OXThldQdj/C8T6B17 NzIZLxq5c0eVTHO6zmqkJhZ1Vo0WVJoIAsL8djvTpBidP5PagdEwSDXdmBe9w6ujI6Ss gjwJEwR9Zdc/yQLYyA9+TU11APbQ7NmSGAtCv5X7GTPZDgoWuWAaHZqbAu20LEGSq1D0 vZn5YpGzVGg6mphvXhe437EMWP1JXlx64jd/wDUoIiwpKDQ72iqGjyuEUwMhmUzoB5xw ztKMHc0SYJQMyDKvCUuciZHV3s4sWak+lpxhagcMDHbbCGFg9F06waqLw41JqGuGX9i+ Z5bg== X-Gm-Message-State: AOJu0YzYgyBqVxRp8QrTj51MkNQNqdly0DjROL1ZpZLrdIQVJcZaVnIb 2fWEt9wMwsWfTaOWVtPBBQDWMU/+lrv0YQHRB0/f1iG8d6a+zP8hj6QeUyiJ X-Gm-Gg: ASbGncty6d5bulwYVnrNTn2FJ1Sj/R3mM272myKO4xIkYy+C2EXArHfZ5bxOSzXDiIX lWBEW0JPFfu1KXS5pLrBPwYcUj8nImp59ZEPF6uGceCkdAgQ9XNxIpBiY9B6t5PJWmBkJyyZtAC QnsB8F86jD/ti9vfth9r3VtHyXH4aWujUoCx0/Y3f8upPEG+dpd2pEgFJJVYpwpk3xm8eOb3hVb tOBD8QV6JREAPHbrpgYmh2EJk9Pnr+Qf8y7Vv7adcjDyGz8ndver124th+j4+/L/b/NwvySkZys 8qU+pTCcAzrQvBtI5L8XBjt4JwkUIVLe/kM4jy5YsnRaWUoIZM8gnLx/S/s= X-Google-Smtp-Source: AGHT+IGtvYV1VCfFYjzrnug184ns9aYU0CQW9cWUOyB7vdcHAZZ5ljcq5VqrcVHKpJIB92CC6fCTNQ== X-Received: by 2002:a05:6a00:1145:b0:736:53bc:f1ab with SMTP id d2e1a72fcca58-73dc14d3225mr23126477b3a.12.1745359005136; Tue, 22 Apr 2025 14:56:45 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b0db145e30esm7809409a12.54.2025.04.22.14.56.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Apr 2025 14:56:44 -0700 (PDT) From: softworkz <ffmpegagent@gmail.com> X-Google-Original-From: softworkz <softworkz@hotmail.com> Message-Id: <6e31aa603ad8a2874ae5e7fb0a1ca2e49b878e3a.1745358943.git.ffmpegagent@gmail.com> In-Reply-To: <pull.66.v5.ffstaging.FFmpeg.1745358943.ffmpegagent@gmail.com> References: <pull.66.v4.ffstaging.FFmpeg.1745189954.ffmpegagent@gmail.com> <pull.66.v5.ffstaging.FFmpeg.1745358943.ffmpegagent@gmail.com> Date: Tue, 22 Apr 2025 21:55:39 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v5 10/14] 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/6e31aa603ad8a2874ae5e7fb0a1ca2e49b878e3a.1745358943.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".