From patchwork Sat Feb 10 23:04:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 46161 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:a586:b0:19e:8a94:b663 with SMTP id gd6csp1752612pzc; Sat, 10 Feb 2024 15:02:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHAR6y/yRSjROLzj1x1XmZVqqeU5vtj+R5CAnfImXTG+mVjbnL8+sMfXEGsuLS6QxRko7UZ X-Received: by 2002:a05:6402:31f6:b0:560:f90e:4da3 with SMTP id dy22-20020a05640231f600b00560f90e4da3mr2347803edb.0.1707606164951; Sat, 10 Feb 2024 15:02:44 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUVc+vlYSqMR84CQVsjWc6H03hsCc0QwSIqH9vt+2UKmpbvVHPCAnS7kblOmY/LYPfXLP8Dat6n+61NjbUEqSUsD7FhfFDCBWamHcS0DIPxTLFZ/oFg3cYEQZWgGRsFNn4hshqvRF6y7aV0GNPVb24Ehtlg6RugKkYgF3ALV7o4E4JoLASWgJ5HCTi/70q6dqlSahn0aiHCWKe5fWPdZbzDP+HaJMdbX9CLefu7r/F+38ZzcKPl+OJdz9hfsJnQDWwYMS07Dp0l75g+WO07F9B1MHpQhk+0wjdz+oimWQVyLqQCMX6AcNUzcvbkqsac6Byzh3dcjiTeRT3uproXOTPSWZMaRZqbHLSdp4HP9Qn1od3jTFVnJw6PYicplkZZwe/fANUu1oK5VK+1krlVTap4Dlem+gsQV8hpzfX9mJRPJD2wi/DmyKCvKWFPnYYEZX2p4KUkn/5/BsMvW779wFMX9MRuDzoiWokQ6i/6hTcLPuXeq0VBYrXQuBCmdC+ZvYeHwLTEh39VxQxoH4ys/5nqLA54KjjU40QADBMZwzMUwM2bGn2K1Zn5br2sTX+HLU4HoWWWKYb4NBkXpBeI3NjOF74kIQbZVdi3nkfWRaMgrs34v9D3GaIFjE8HhxwgKDznkWO4kKTDsvVcQQCPx2aBVY1DCSgmSVvKlnZSCPmhyDKSzOs0iSO9tXK7Fxu82ayB3MjP4Pp4fD1RmqdZIj4uaD+ETXtVY7OYDCN1Ciq8NIAYPs//0jFmPr1pDq0PVVL5A99kkyxk74c9zHNfPrUpaS1tLECm2JbKQ977zjze2ooc/Xy7vfZVq+h0Ji4UfPIyFHTYSrIFDpLIrFwcyjhxpFhfkFkJh6KpydIHPSuKM1k2OaLZsrTncWAfhIJSwyc261/+eNx0A4aAFInt51SI+8HYkLZNfCgLlqo+sBjz+EJaT7xYcDOy89X157wL5ba05D xp7VJFOrYe1+7LUNDVgYgf+cXSkljBVvQNalQ0vdGr35BKjKx1faFhqsy5CnOx3ecTabtA2SnkNJID3aqdp77TPew+zTXAVlBF7d76KDYY5YkkkLqM2UhMZ8tptt4rUM2H80SykR3cJdHqYDoHSSDsMNKilA2idHUmYBPvPkCiME2e5qkVNfGOOrfbRfs9y1IbPCTgbkRy/vpSZnoU6Z1G/GM+5NqdQQ8m0VPYkYv899J804lR1uNeISYAis5M83d4qLNdNxaNPgN9oduiZnJAQA/UvHDmPoju5G2wdF1xdVeAxRXE4pY430CACmUr+Ud0QHmqcV/qUgQSKR9wsVNonAixGkaK46THc/Lx/YV/5/kuzOtdWjgdmdACDkw0mIvbxUk7fRjDM69wQmGCbOzg7WfnjLcIkero9NOT7Ah2xRwMu7I3Xgj9OXKgTCNRwU5cZW76pHCE9uFuRaJAKQRUUV+4c4e8hig3DsYjzuhR2B4I07KYQmxqtm6aBv8lkHbrgW/q2AvhJjNr2vG76l7MxxUQCcX8Z3mpZvDUgFfuHezpcfX1sJqq1hEe3DPidDPMo+5vIaTggTPtkyH2z0V+ImSmtDGSQJz1rHQ= Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z96-20020a509e69000000b0055d33a14abasi1219400ede.367.2024.02.10.15.02.44; Sat, 10 Feb 2024 15:02:44 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=EdtsM3Hf; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7BE3368D11C; Sun, 11 Feb 2024 01:02:38 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04olkn2058.outbound.protection.outlook.com [40.92.73.58]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D550968D085 for ; Sun, 11 Feb 2024 01:02:31 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NGCcmo/QJJjJidFqVInFIVesmgWNNj3objjtM9UxU23d2AB+oJ+mn/wtBkKQ1YrEwC4BFBLiozUbVcRDV/tNB3ha3HB+cmrlmpyENPZk2rCJ93qq0wfoNFC1lhetEA+ZRvtS69/0zqfsqojfNPcSp9it+XIsgyBvWpgB49b6U6q0owkAozDMotu+oYygxUUWGAzRC/fg5qS/VovDkFt6Q5r7BrHS+NSvMxEH9WUuDuMJ+fEDFHe2ID5jxIQ/AlQty1v+VsQFSk5WZsH9hwU2jvd1J3vMjobNPVFVvX30K1VZyvnZgN3s228+bc2swtUnfu6S29/jvqIPar2xpqBt9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ltuuPRbRrjfdG1wCs5EajXtutbd1NvVO7yAIfWMR8Mc=; b=TLFfqZiw/BiFyJazugSN/Z7BN08oUBHSm+7p87ZZKW+xC4SnKy0vNkJ1sHlQ5g+bxXHVe3mrK03YMjK9lvXxOHZCvg6OGEmdWno3pks1uEcCddF5kL9vpa0Xe3SABIDfpLgP1S58YR66zfKJ4A/Qv6zrlWVR1LzGb9gUG0aZNdMDsfj/jti67Dm9NImz/ywnHEIy9TY7c/u0kyPlBF4OxFsxi7mjoza1Ad5xBFZie4AktbKJtqWBl1xApC9CEjhLk4oUQarE90lVgf2676GVeg9FxbcQ+S5+GEeVKBolotxi8ejr9NcShA/3bWZgyWRvDBTloQPzMWzEfSA58V+xtA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ltuuPRbRrjfdG1wCs5EajXtutbd1NvVO7yAIfWMR8Mc=; b=EdtsM3HfFpHllhkcPGLFjw01AixyGd/952gZarJ+lI5G3fV3Kw9Lgln/Erm9yAaAs6UlfFB1tU5Wdjo8agh1AoGjrPD4MfDyqKh5Grpw51Kps9R4iCSwlwJiwQW7Bj8CS3j+8l/9bv9OqKbNB3z3ZBVqTJEUiWfIueTUZjpnhfGrE4uQ7Ad3kgSeKdsF6X9ylnlxIzrl3LXEYkPkIKoet/ghwbuo8y/NMWNU5PlsiqdA3qZTCPPLSCqrdD9K2lc/dEgNzrwYgGM+AtHT5VF28hlNp+l4EuKTvORjo7ZL38zZVil+wqA+xaztAbTPsqMLYxOKxUpMtN1iM7IWOLREJA== Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) by AS8P250MB0037.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.33; Sat, 10 Feb 2024 23:02:28 +0000 Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::db07:87f6:7c75:38cc]) by DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::db07:87f6:7c75:38cc%3]) with mapi id 15.20.7270.033; Sat, 10 Feb 2024 23:02:28 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 11 Feb 2024 00:04:05 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240125134425.374-1-jamrial@gmail.com> References: <20240125134425.374-1-jamrial@gmail.com> X-TMN: [3R9z19tfZ7qKBaQDzAQKD0H4mMVD0WVSZsX14IgI+fU=] X-ClientProxiedBy: ZR2P278CA0003.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:50::6) To DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) X-Microsoft-Original-Message-ID: <20240210230411.2616270-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0P250MB0747:EE_|AS8P250MB0037:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e6a1a73-6c80-4d3d-bc75-08dc2a8c5ab8 X-MS-Exchange-SLBlob-MailProps: Cq7lScuPrnpfz+h1ENKTbWTxnFGbPVjdzJr97b8hI9Gl0My2vSz+cfr7Sf6cNVOiEZKfT0+kBfW6q7hYhqnUUWVBJGJRdRO/Yz0GzzspkP4EosoHko2p9FjkpgrF4QjSuv+4pRpwUeaeUb3oMdOMfO5qh60m7uMP91jXz5wKBtiQDa3w6cDgRYv9/3pr8gWxz1JEmqScXquxEeKC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nWURO5D9giAWKyEqskNzuZAZQzrM9vGXQJbLmis8hZI6ggTbjyxAuWiHU/ZzklHDUD/XrWK9qn3bflY5xKHBrcw/vBUnZMf9jJiCJVOyfusaXDHTjEOBa6lfrxkqEfIIGD/FmZnVs87S6ji8ES1osnCAHObfMTenSBrhX0muEs6IkVW71+2EtLjWJrqZn34OLuv2XVOo1B9LW+FbRlnt6HT/ZUAbVybw1WBFlH4icX1So/TCsUw7lvZQSR4bBEc8TUv4LztD4OSho2M5lTOAP/oNQxnJHG0eHUa1UumD6F4onWRGrmrmMs78TlKMksRROAOmtlYibHNnaGG/sw6DdZ1rbLkn23gtireRUWSGt+JjTzT/0StFaNi1nXjZEDKipmiW9yFNPke7Nacu57sjyQoEldDkytLQtiWDx5Wi9HsvYIhwCqutTzyRHeCMWboF/bW2FPMP7ug== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e6a1a73-6c80-4d3d-bc75-08dc2a8c5ab8 X-MS-Exchange-CrossTenant-AuthSource: DU0P250MB0747.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Feb 2024 23:02:28.7251 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P250MB0037 Subject: [FFmpeg-devel] [PATCH 29/35] avfilter: Add a header for internal generic-layer APIs 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: bppJBkIoeHw6 This commit moves the generic-layer stuff (that is not used by filters) to a new header of its own, similarly to 5e7b5b0090bdf68e0897fe55ee657fdccc0cbca2 for libavcodec. Signed-off-by: Andreas Rheinhardt --- If buffersrc/sink were to be treated as part of the generic layer, the declarations of ff_avfilter_link_set_in_status and ff_filter_graph_run_once would also be moved. libavfilter/avfilter.c | 1 + libavfilter/avfilter_internal.h | 84 +++++++++++++++++++++++++++++++++ libavfilter/avfiltergraph.c | 2 +- libavfilter/graphparser.c | 1 + libavfilter/internal.h | 50 -------------------- libavfilter/pthread.c | 3 +- libavfilter/thread.h | 28 ----------- 7 files changed, 88 insertions(+), 81 deletions(-) create mode 100644 libavfilter/avfilter_internal.h delete mode 100644 libavfilter/thread.h diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index dbe6409274..85e2936e6e 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -39,6 +39,7 @@ #include "audio.h" #include "avfilter.h" +#include "avfilter_internal.h" #include "filters.h" #include "formats.h" #include "framepool.h" diff --git a/libavfilter/avfilter_internal.h b/libavfilter/avfilter_internal.h new file mode 100644 index 0000000000..3dd51fb993 --- /dev/null +++ b/libavfilter/avfilter_internal.h @@ -0,0 +1,84 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/* + * APIs internal to the generic filter(graph) layer. + * + * MUST NOT be included by individual filters. + */ + +#ifndef AVFILTER_AVFILTER_INTERNAL_H +#define AVFILTER_AVFILTER_INTERNAL_H + +#include "avfilter.h" +#include "framequeue.h" + +typedef struct AVFilterCommand { + double time; ///< time expressed in seconds + char *command; ///< command + char *arg; ///< optional argument for the command + int flags; + struct AVFilterCommand *next; +} AVFilterCommand; + +struct AVFilterGraphInternal { + void *thread; + avfilter_execute_func *thread_execute; + FFFrameQueueGlobal frame_queues; +}; + +/** + * Update the position of a link in the age heap. + */ +void ff_avfilter_graph_update_heap(AVFilterGraph *graph, AVFilterLink *link); + +/** + * Allocate a new filter context and return it. + * + * @param filter what filter to create an instance of + * @param inst_name name to give to the new filter context + * + * @return newly created filter context or NULL on failure + */ +AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name); + +/** + * Remove a filter from a graph; + */ +void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter); + +int ff_filter_activate(AVFilterContext *filter); + +/** + * Parse filter options into a dictionary. + * + * @param logctx context for logging + * @param priv_class a filter's private class for shorthand options or NULL + * @param options dictionary to store parsed options in + * @param args options string to parse + * + * @return a non-negative number on success, a negative error code on failure + */ +int ff_filter_opt_parse(void *logctx, const AVClass *priv_class, + AVDictionary **options, const char *args); + +int ff_graph_thread_init(AVFilterGraph *graph); + +void ff_graph_thread_free(AVFilterGraph *graph); + +#endif /* AVFILTER_AVFILTER_INTERNAL_H */ diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index a43c23065c..c6f94bf0a8 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -36,10 +36,10 @@ #include "framequeue.h" #include "avfilter.h" +#include "avfilter_internal.h" #include "buffersink.h" #include "formats.h" #include "internal.h" -#include "thread.h" #define OFFSET(x) offsetof(AVFilterGraph, x) #define F AV_OPT_FLAG_FILTERING_PARAM diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index 229e647c0a..5d6dcdb9d3 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -29,6 +29,7 @@ #include "libavutil/opt.h" #include "avfilter.h" +#include "avfilter_internal.h" #include "internal.h" #define WHITESPACES " \n\t\r" diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 3d46923cad..0e3f68d1f4 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -26,20 +26,6 @@ #include "libavutil/internal.h" #include "avfilter.h" -#include "framequeue.h" - -typedef struct AVFilterCommand { - double time; ///< time expressed in seconds - char *command; ///< command - char *arg; ///< optional argument for the command - int flags; - struct AVFilterCommand *next; -} AVFilterCommand; - -/** - * Update the position of a link in the age heap. - */ -void ff_avfilter_graph_update_heap(AVFilterGraph *graph, AVFilterLink *link); /** * A filter pad used for either input or output. @@ -127,12 +113,6 @@ struct AVFilterPad { int (*config_props)(AVFilterLink *link); }; -struct AVFilterGraphInternal { - void *thread; - avfilter_execute_func *thread_execute; - FFFrameQueueGlobal frame_queues; -}; - typedef struct FFFilterContext { /** * The public AVFilterContext. See avfilter.h for it. @@ -356,23 +336,6 @@ int ff_request_frame(AVFilterLink *link); */ int ff_filter_frame(AVFilterLink *link, AVFrame *frame); -/** - * Allocate a new filter context and return it. - * - * @param filter what filter to create an instance of - * @param inst_name name to give to the new filter context - * - * @return newly created filter context or NULL on failure - */ -AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name); - -int ff_filter_activate(AVFilterContext *filter); - -/** - * Remove a filter from a graph; - */ -void ff_filter_graph_remove_filter(AVFilterGraph *graph, AVFilterContext *filter); - /** * The filter is aware of hardware frames, and any hardware frame context * should not be automatically propagated through it. @@ -415,17 +378,4 @@ int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, int ff_filter_init_hw_frames(AVFilterContext *avctx, AVFilterLink *link, int default_pool_size); -/** - * Parse filter options into a dictionary. - * - * @param logctx context for logging - * @param priv_class a filter's private class for shorthand options or NULL - * @param options dictionary to store parsed options in - * @param args options string to parse - * - * @return a non-negative number on success, a negative error code on failure - */ -int ff_filter_opt_parse(void *logctx, const AVClass *priv_class, - AVDictionary **options, const char *args); - #endif /* AVFILTER_INTERNAL_H */ diff --git a/libavfilter/pthread.c b/libavfilter/pthread.c index 1a063d3cc0..a0336a8e04 100644 --- a/libavfilter/pthread.c +++ b/libavfilter/pthread.c @@ -29,8 +29,7 @@ #include "libavutil/slicethread.h" #include "avfilter.h" -#include "internal.h" -#include "thread.h" +#include "avfilter_internal.h" typedef struct ThreadContext { AVFilterGraph *graph; diff --git a/libavfilter/thread.h b/libavfilter/thread.h deleted file mode 100644 index c709f17a33..0000000000 --- a/libavfilter/thread.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVFILTER_THREAD_H -#define AVFILTER_THREAD_H - -#include "avfilter.h" - -int ff_graph_thread_init(AVFilterGraph *graph); - -void ff_graph_thread_free(AVFilterGraph *graph); - -#endif /* AVFILTER_THREAD_H */