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 CC1ED4DED4 for <ffmpegdev@gitmailbox.com>; Fri, 25 Apr 2025 23:33:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EF67268B412; Sat, 26 Apr 2025 02:32:06 +0300 (EEST) Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 874AA68B3F9 for <ffmpeg-devel@ffmpeg.org>; Sat, 26 Apr 2025 02:32:06 +0300 (EEST) Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-7394945d37eso2507796b3a.3 for <ffmpeg-devel@ffmpeg.org>; Fri, 25 Apr 2025 16:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1745623925; x=1746228725; 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=TAJnnmjlVZwwJhVAfVFyYCRciFWjkwUFtwwVJzZFurGNrQ8XjuFs77T9ldiYkv+hrk i7fiuksPMdW8JaS6Kw9l0AXQ/b5LzdSZQJGDKvscasAVtiF35DZsCNUbpc2LhsXLmn7+ VzusX8ly1/Z8CCw99VBLb8go/s6SY8HGE4skDBJRk0xg0ASJPfGo52RhwuvhNRc1gsi4 Tkn8LhFEWD2ML+w8iOwjbYLVeq8wROlTJL7wsofqFuzVmgfLy/4NVq92Xsq7ebDz0W/k mJ+3jePvdWW2PEEO3/PDrOdjzxCRT7Gj7iZP8tJyhnGkae7cza4P/nSf30v4tY1WU+Vh kc5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745623925; x=1746228725; 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=nahwQNL6XyRCiw2uCzioe60aTjspRU2T616nRdUkhOGOkyK1ScnMWA1CPB1iBZkn7M GnMlYkC6aLnoOJvKRb8VIp6FM9l6RJk4pEfESQ/gE6jAi/LZY3CESDunqBOLk4i3YRaw XAgLWkUt0eQ5kgBffss7kZkvF4LCdrbhAMcrt9dw2zTbqL5UTLMCkv2N70w8t6WM700I 8Vd5kkCpU8yEA21OQfLlpBTq86/FToBPvw+EK8+qBKVtapW5AebNcSIyfFVaQ/PJ8t2F xwHI29+5dtYNFAgFbVrziC1wkHXZr+utmnl17eWEXWpCOmZmQqscDBwzcbizRRDp0ZUS rAxw== X-Gm-Message-State: AOJu0YwEzUJh9qI6QKnB3HLsWcFwOrWlENxMFUOMhUjJ4787D/wiG4+B L2eT/4Y1SUh8tQccO9jSMXmUFBppI2TzxfVU7gdQ4RcBJ96FnQjUnJK0zg== X-Gm-Gg: ASbGncuNMurGF/+6ko9n6ivplQ7QFgohbnb+XoU+iGYeCLyjl7U3ozmOMlA7De04b5S alZBIE6tiPEulaQ8vPJTR3gsfNVp7ZLXvogBw5gm8k9KGB9ArLwtnU+DNol/oU4goWr5N4zz5Gy Xl1/L7sdADBem8E1EqAE1UENvtz99YVrio7HcqWmV/zCQMY3MyXT51qFjHOUhYeFiUbMtEI3HMN bueZ70SgpJ2WqHtLwPpEJQ1retpPYmkgHMLRl6/DHTxrrdSJG5MowVjl8ZohxejOkyM34c431AP Z8EMo2HMlFu2NLgRoi6ohvZuov/RBp144KrEaOUaE9TNWBXYV8ooScZq97MKW9izP7el2w== X-Google-Smtp-Source: AGHT+IFXtrdbMR17+RIT5aiQaYwC8DuGLikinEHXdiuQgC4ZeJ8YT5w8hjxcMN411v2Z0sbWUaR5pg== X-Received: by 2002:a05:6a21:9211:b0:1f5:55b7:1bb2 with SMTP id adf61e73a8af0-2046a3abdccmr1512972637.6.1745623924826; Fri, 25 Apr 2025 16:32:04 -0700 (PDT) Received: from [127.0.0.1] (master.gitmailbox.com. [34.83.118.50]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15f8597e0bsm3469323a12.44.2025.04.25.16.32.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Apr 2025 16:32:04 -0700 (PDT) From: softworkz <ffmpegagent@gmail.com> X-Google-Original-From: softworkz <softworkz@hotmail.com> Message-Id: <b6320cab8c53bf65e002eb3b9049e58e3bdf0854.1745623868.git.ffmpegagent@gmail.com> In-Reply-To: <pull.66.v7.ffstaging.FFmpeg.1745623868.ffmpegagent@gmail.com> References: <pull.66.v6.ffstaging.FFmpeg.1745457192.ffmpegagent@gmail.com> <pull.66.v7.ffstaging.FFmpeg.1745623868.ffmpegagent@gmail.com> Date: Fri, 25 Apr 2025 23:31:04 +0000 Fcc: Sent MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH v7 09/13] 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/b6320cab8c53bf65e002eb3b9049e58e3bdf0854.1745623868.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".