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 80F5949BBE for ; Mon, 4 Mar 2024 15:43:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6186C68D463; Mon, 4 Mar 2024 17:43:42 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2498068D3E6 for ; Mon, 4 Mar 2024 17:43:36 +0200 (EET) 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=PhtQyBrW; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 878504D49 for ; Mon, 4 Mar 2024 16:43:35 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id La3I6MnEeKzs for ; Mon, 4 Mar 2024 16:43:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1709567014; bh=63fGm5J9fPvDwUhnGFaYJzvqxWTXxx3VXDCGWYw18y0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PhtQyBrW1DGLklTYji6rlXk1Qoze3fmz8l602r7Lxn/j/VUFHWpzLJ132b74xX0qi EK4K2/xvtHyYba953HfN50HtB7RIFFzaSYzeV8pMAOrVASAUbE5qIYddfSLLSI2aV0 L3lNxnY1m1Bg6kJoQSHZMhk4DAc/sKEeji8XOhxIXgnqT9x0st+6VE6FsbCNWjBA2y xNC7UZ+pNCl5ODxUuES7pQjp7mxHoICnl+SPYcAye6lOv7iVQJFOf/liyx6dklvg8x C1dzGaYbZVID3mYuzhHEIsq/B3mp5sksSJ21exOJTebBuaf30yDOGrsAc3HxhWdT8B R/2TZJht6AEfQ== 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 B5C8C4D3D for ; Mon, 4 Mar 2024 16:43:34 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 966ED3A0582 for ; Mon, 4 Mar 2024 16:43:34 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 4 Mar 2024 16:42:05 +0100 Message-ID: <20240304154205.27758-2-anton@khirnov.net> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304154205.27758-1-anton@khirnov.net> References: <20240304154205.27758-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] lavfi: deprecate avfilter_config_links() 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: It never makes sense for this function to be called by users. --- libavfilter/avfilter.c | 8 ++++++-- libavfilter/avfilter.h | 8 +++----- libavfilter/avfiltergraph.c | 2 +- libavfilter/f_streamselect.c | 2 +- libavfilter/internal.h | 8 ++++++++ 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index cb2128252b..859a6f9d16 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -212,6 +212,10 @@ void avfilter_link_free(AVFilterLink **link) { link_free(link); } +int avfilter_config_links(AVFilterContext *filter) +{ + return ff_filter_config_links(EINVAL); +} #endif static void update_link_current_pts(FilterLinkInternal *li, int64_t pts) @@ -322,7 +326,7 @@ int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, return 0; } -int avfilter_config_links(AVFilterContext *filter) +int ff_filter_config_links(AVFilterContext *filter) { int (*config_link)(AVFilterLink *); unsigned i; @@ -353,7 +357,7 @@ int avfilter_config_links(AVFilterContext *filter) case AVLINK_UNINIT: li->init_state = AVLINK_STARTINIT; - if ((ret = avfilter_config_links(link->src)) < 0) + if ((ret = ff_filter_config_links(link->src)) < 0) return ret; if (!(config_link = link->srcpad->config_props)) { diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 0949870de4..08f185c4d2 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -698,15 +698,13 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, */ attribute_deprecated void avfilter_link_free(AVFilterLink **link); -#endif /** - * Negotiate the media format, dimensions, etc of all inputs to a filter. - * - * @param filter the filter to negotiate the properties for its inputs - * @return zero on successful negotiation + * @deprecated this function should never be called by users */ +attribute_deprecated int avfilter_config_links(AVFilterContext *filter); +#endif #define AVFILTER_CMD_FLAG_ONE 1 ///< Stop once a filter understood the command (for target=all for example), fast filters are favored automatically #define AVFILTER_CMD_FLAG_FAST 2 ///< Only execute command when its fast (like a video out that supports contrast adjustment in hw) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 674711ec35..ac491ee89b 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -251,7 +251,7 @@ static int graph_config_links(AVFilterGraph *graph, void *log_ctx) filt = graph->filters[i]; if (!filt->nb_outputs) { - if ((ret = avfilter_config_links(filt))) + if ((ret = ff_filter_config_links(filt))) return ret; } } diff --git a/libavfilter/f_streamselect.c b/libavfilter/f_streamselect.c index 1328a842f9..fb96a46862 100644 --- a/libavfilter/f_streamselect.c +++ b/libavfilter/f_streamselect.c @@ -250,7 +250,7 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar if (ret < 0) return ret; - return avfilter_config_links(ctx); + return ff_filter_config_links(ctx); } return AVERROR(ENOSYS); } diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 0e3f68d1f4..000f94cb16 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -246,6 +246,14 @@ int ff_parse_channel_layout(AVChannelLayout *ret, int *nret, const char *arg, */ void ff_avfilter_link_set_in_status(AVFilterLink *link, int status, int64_t pts); +/** + * Negotiate the media format, dimensions, etc of all inputs to a filter. + * + * @param filter the filter to negotiate the properties for its inputs + * @return zero on successful negotiation + */ +int ff_filter_config_links(AVFilterContext *filter); + #define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) #define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) #define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) -- 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".