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 ESMTP id 4C14F4C9A3 for ; Sun, 11 Aug 2024 14:43:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A5D7268DAF6; Sun, 11 Aug 2024 17:42:34 +0300 (EEST) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 32E4F68DA0D for ; Sun, 11 Aug 2024 17:42:25 +0300 (EEST) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=aQvIkgOk; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id B69D04DFC for ; Sun, 11 Aug 2024 16:42:21 +0200 (CEST) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id OMP7R4qzEKFW for ; Sun, 11 Aug 2024 16:42:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1723387338; bh=R5O8iriAGCwpWt2nRszrDjjOWbORDCAOpc87t/ir9VA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=aQvIkgOk4sbOttHyq0vMKacXXKfl+XOcQboKPz8YVMOvaUrz/bH2z1ms35awFcZLT TTlZ/X/eEyw2A9gOTfmkTmvouig0DLG2IgXDEQVl+ZLnoqhlrrvxRX0oBLYw0Egzrs OXbrampQtaKYDO8copOBVIremqzjYSTDTZxjHiJRjmvTeyfTj8KXoZubsaE05h8VCl jX2G1BwqrGowRde+U3JfnqHG7RX6rNIcwVZJ7sAtq3hZm4G3fEmhPVguC56CfGMtK0 9MQZC4zATRqgbtiVaTUwrjlKj5WnZjTcMz9zhU93OItot3bSGk5eGsY9sfApgEvuOg 1RJlRsGYJRjYw== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 784DF4E04 for ; Sun, 11 Aug 2024 16:42:18 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 61E2A3A293C for ; Sun, 11 Aug 2024 16:42:18 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Sun, 11 Aug 2024 16:42:11 +0200 Message-ID: <20240811144211.5712-10-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240811144211.5712-1-anton@khirnov.net> References: <20240811144211.5712-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 10/10] lavfi: move AVFilterLink.graph to FilterLink 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 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: --- libavfilter/avfilter.c | 6 +++--- libavfilter/avfilter.h | 5 ----- libavfilter/avfiltergraph.c | 2 +- libavfilter/f_sendcmd.c | 2 +- libavfilter/filters.h | 5 +++++ 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 055db01e02..43d7c9f4ab 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -185,7 +185,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, link->srcpad = &src->output_pads[srcpad]; link->dstpad = &dst->input_pads[dstpad]; link->type = src->output_pads[srcpad].type; - link->graph = src->graph; + li->l.graph = src->graph; av_assert0(AV_PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1); link->format = -1; link->colorspace = AVCOL_SPC_UNSPECIFIED; @@ -231,8 +231,8 @@ static void update_link_current_pts(FilterLinkInternal *li, int64_t pts) li->l.current_pts = pts; li->l.current_pts_us = av_rescale_q(pts, link->time_base, AV_TIME_BASE_Q); /* TODO use duration */ - if (link->graph && li->age_index >= 0) - ff_avfilter_graph_update_heap(link->graph, li); + if (li->l.graph && li->age_index >= 0) + ff_avfilter_graph_update_heap(li->l.graph, li); } void ff_filter_set_ready(AVFilterContext *filter, unsigned priority) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index a91b543f5e..549fe6ce3a 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -594,11 +594,6 @@ struct AVFilterLink { * Lists of supported formats / etc. supported by the output filter. */ AVFilterFormatsConfig outcfg; - - /** - * Graph the filter belongs to. - */ - struct AVFilterGraph *graph; }; /** diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 2d46dd7637..6bfcc42430 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -106,7 +106,7 @@ void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter filter->graph = NULL; for (j = 0; jnb_outputs; j++) if (filter->outputs[j]) - filter->outputs[j]->graph = NULL; + ff_filter_link(filter->outputs[j])->graph = NULL; return; } diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index 86f9d522e9..8ba0878e81 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -567,7 +567,7 @@ FF_ENABLE_DEPRECATION_WARNINGS av_log(ctx, AV_LOG_VERBOSE, "Processing command #%d target:%s command:%s arg:%s\n", cmd->index, cmd->target, cmd->command, cmd_arg); - ret = avfilter_graph_send_command(inlink->graph, + ret = avfilter_graph_send_command(inl->graph, cmd->target, cmd->command, cmd_arg, buf, sizeof(buf), AVFILTER_CMD_FLAG_ONE); diff --git a/libavfilter/filters.h b/libavfilter/filters.h index 36164c171e..ab16047e12 100644 --- a/libavfilter/filters.h +++ b/libavfilter/filters.h @@ -42,6 +42,11 @@ typedef struct FilterLink { AVFilterLink pub; + /** + * Graph the filter belongs to. + */ + struct AVFilterGraph *graph; + /** * Current timestamp of the link, as defined by the most recent * frame(s), in link time_base units. -- 2.43.0 _______________________________________________ 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".