From patchwork Thu Jun 17 02:31:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 28451 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp199899iol; Wed, 16 Jun 2021 19:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyK6POA31fbU6zT0eDEeeWU2yHkkoPt9CLblw+i5Js4dMNqLKU+iWbreOe/qDJF6qwImGtW X-Received: by 2002:aa7:c594:: with SMTP id g20mr3310401edq.193.1623897242238; Wed, 16 Jun 2021 19:34:02 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o11si1710227edq.384.2021.06.16.19.34.01; Wed, 16 Jun 2021 19:34:02 -0700 (PDT) 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=V3n3F3PB; 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 F1AE9689A1E; Thu, 17 Jun 2021 05:33:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073036.outbound.protection.outlook.com [40.92.73.36]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8CAEB688374 for ; Thu, 17 Jun 2021 05:33:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Gyt87wDD35FkGNbvuPDBpxhjsigU4pl7pU+1VvhsJM7b7puSeMf6KD7iTEkYhQs1FOyNwbmXNiMpqdt2j2MQ89Xa+0hclivHF9taUOnJ+Nr65Tge3iSKuSPw+3c0cCN9MuqtI9fZuB2PEhmJ5eVdL0UCTrgBOtRcmvEEKOlYu5Hgvnm0tOa85A7u1U3RXZVKsqLBVYvtFrOMa8CU0q63/8GLzXnYLi2HCPqQUzbjJYNDh6TLM0Q0tNZp7u8uhG+gaTOb7zb1KJvc3ca5kn5lxebheg00TOyDhkNz2sz/r9+3JNSFb8fV9dswx17TfliCKqVoRkap2XRMQ8f6RAVAkQ== 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-SenderADCheck; bh=8NXyY8YRrvjIK3xUZ3/pO7kC4UHutn5emhwO0HLUx1A=; b=gQuDWHMr6+v1MLtJR+YiGjjtqcPlp6zEi9jGCoGDfhyqI1FqK3roqoa/rlarx7nDWDS5LKqaZSwkhTFjf6G+QDL+JFyweO3HV9ZZEU0sqFiGvEeenM7biJOiGBN+CJmqWoJPjkKTx1EnJY/oaaGRTGgZCmdnIwsOg2q/1YnC8Wfi65P3IWFtHMHAsWkivoSDpcWL13jE9KU6S6Kcj1+Lk49bQKzFyf3I4j7erqx4qpnm6qE/0b2BOF49Q9fyzxUj+Mbn+PeptS7IBjcjo1PznRLKBQSIVLDzq9EYG/x7eIOJ2YGqbhXKVC+4dwZf6tAG6h+aTa1RpWpUInFOFFxpFw== 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=8NXyY8YRrvjIK3xUZ3/pO7kC4UHutn5emhwO0HLUx1A=; b=V3n3F3PBcuSNgX+T8v/QNmoY4BlVxki6oxS+fHnYIe5azCnGNnkpgiXqE7lIpjMhtr2FNHs5UzF3U+BPLj+inA+5w1olabSzomBtt5ogtRBjAscWXH9SybB1MldST/RquooeWLzT9emy4r4w8n24cZ1AlMl/YNSTNXnzUjsdB5S3tClJcGunmfUftk2+DtQTPrtne+dtALFOnXPICieE1nYFpK4s1Z7MI+rwugkW0XHFZI7ma37M/cFqbgsdmBL09s8MNN5n5YBh57q4COt4qOY/89yc8jcxQR1cyAaYC0Phs7Ew6dISpxH2zFYqglZdl4dRbJwo2MU6U5dUwJQwVg== Received: from HE1EUR04FT016.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::40) by HE1EUR04HT163.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16; Thu, 17 Jun 2021 02:33:16 +0000 Received: from VI1PR0301MB2159.eurprd03.prod.outlook.com (2a01:111:e400:7e0d::46) by HE1EUR04FT016.mail.protection.outlook.com (2a01:111:e400:7e0d::93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 02:33:16 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2F12E2BEECBAD01E93E9A0A120501DED1A62E2F817AF43E37D931D477570C80A; UpperCasedChecksum:461A670463AAD7A346D151502427D4598DDD83A7F4178097DDA44116FE7C64C9; SizeAsReceived:7580; Count:48 Received: from VI1PR0301MB2159.eurprd03.prod.outlook.com ([fe80::d9b:66ba:63ad:967b]) by VI1PR0301MB2159.eurprd03.prod.outlook.com ([fe80::d9b:66ba:63ad:967b%5]) with mapi id 15.20.4242.019; Thu, 17 Jun 2021 02:33:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 17 Jun 2021 04:31:36 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [DopeNlZAIRUUz0ufOG52dO1XhM1mKM1s] X-ClientProxiedBy: AM0PR04CA0115.eurprd04.prod.outlook.com (2603:10a6:208:55::20) To VI1PR0301MB2159.eurprd03.prod.outlook.com (2603:10a6:800:26::20) X-Microsoft-Original-Message-ID: <20210617023202.1318312-14-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.97.82) by AM0PR04CA0115.eurprd04.prod.outlook.com (2603:10a6:208:55::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 02:33:15 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 5416d2b5-8c0c-4555-5ea9-08d9313842b2 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/ULuBil78Tl/c0OuVoBVXnkCyEHH58u7PRsJIpR3KLXEgRKUFjtmiTiZ2qslcw6l5YLVyfnmLIbAa/YWPLw/NsTxIpK0McHUQYxf4jbERk+wT9t2cpa6mpmAEHvZDA40Y3gP0/LLT7oIEfTbxMTjLjSkzGrBECO8Ao2BrF3pJaoBUrXC0bk2+QK4OSxF0qd5rZuQagx4yZBkZ78tMnCxaVBsjeQEhMpERLkqr7tAAMqEPKPmfI4FLGUAqgWCG7IpGPOJdmTkikhdGC1d2JF8EJr1mNykYA0o54LHBf9Vrtp26132WRHx6+CzzlCN/vLbVggN3eD4hyBcugTciifsg6fX5Bg9BcYce4/vE8w6gTN05zYx8h0XS7AAfElgZdC4hEAA6AeIvPO5KDKZXfHQR+1sxkJg/upKPSY2TqMYkqaF56kQgm/RaI+FbJ+iFBOrgGGnfnI8Z3+Ia4djOEHTrpUjn0h3owYLqMlp4yBiUETHOXRbyO36hLfDg/qbXR51lCI3qrHLrXU1IYCxbUNWNCP9jmZuP6DEYCJ3Mu9qnUQEA0coS1/rYMoTFLHpWJZ0Jcx0yGSlth9TjGQWGdvEYxbr5Z5UJ/AZXiSqCEopgJdfe9nOhmdPha/jjrjCH9PvMdHSNSwxXAUhHzSU5haOKtECH2kTguoh5DxdSi+DUfrlVW1mQhsgzZshcBGMmGBdM3sz5qd013CLaw== X-MS-TrafficTypeDiagnostic: HE1EUR04HT163: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 99h3laL0ODmaTjaf+KpU9G0sTSU4t8ukPEgtL0d9DfsHv8XiL+XoK1KJCQQRFFZniQWLgV5807+CqLrKtp0YSIuit7G+A0QOcN8gUyMB2cQE/dup91zCo+809SGughj3bOFXy817IKH4YK5g0v6ksKUHsz74cIRQxtX8LmrG4qHYAdx54Wb4Vdis2EWzpYGmn0IvgZWN3DmTh5SpJss4z6CzGVzrnUTPodQegD8McVO82AEP9Yht2IIri7W7/d9qg4UI4kEd8Fk1YATI+NbLECF9T9JDNXg0Z8STqgXtcei1GSO80NIPO8CtlJ9l7yYXb69PrzpISxSsNzXuEwoiAFa+z/ONBbN6ROar1e+L1FaDBjq38zq4JZHECB+LbwmrDRcJeg+KTlxDiQ3xSM/Emw== X-MS-Exchange-AntiSpam-MessageData: 4Wudmnv2D2CQmqFGciRm73rOJ2xhpavzY4/4/ASQ+/HNNSc0StWO4+Ovbn52NLh+rEqbDP4BlJ8sHAvFrytR912+BQdTKvL0KaL7jVnmi7ZKd+wZm5K35GGQ8nyH0u4qaTefPfyQ4pyRNDtihK6qJQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5416d2b5-8c0c-4555-5ea9-08d9313842b2 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 02:33:15.8410 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: HE1EUR04FT016.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT163 Subject: [FFmpeg-devel] [PATCH 15/41] avformat/oggenc: Deduplicate AVClasses 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: XaUMf7U4EDFd The child_class_next API relied on different (de)muxers to use different AVClasses; yet this API has been replaced by child_class_iterate. Signed-off-by: Andreas Rheinhardt --- libavformat/oggenc.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index af27957c75..aff0ca6b96 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -91,12 +91,11 @@ static const AVOption options[] = { { NULL }, }; -#define OGG_CLASS(flavor, name)\ -static const AVClass flavor ## _muxer_class = {\ - .class_name = #name " muxer",\ - .item_name = av_default_item_name,\ - .option = options,\ - .version = LIBAVUTIL_VERSION_INT,\ +static const AVClass ogg_muxer_class = { + .class_name = "Ogg (audio/video/Speex/Opus) muxer", + .item_name = av_default_item_name, + .option = options, + .version = LIBAVUTIL_VERSION_INT, }; static void ogg_write_page(AVFormatContext *s, OGGPage *page, int extra_flags) @@ -744,7 +743,6 @@ static void ogg_free(AVFormatContext *s) } #if CONFIG_OGG_MUXER -OGG_CLASS(ogg, Ogg) const AVOutputFormat ff_ogg_muxer = { .name = "ogg", .long_name = NULL_IF_CONFIG_SMALL("Ogg"), @@ -775,7 +773,6 @@ const AVOutputFormat ff_ogg_muxer = { #endif #if CONFIG_OGA_MUXER -OGG_CLASS(oga, Ogg audio) const AVOutputFormat ff_oga_muxer = { .name = "oga", .long_name = NULL_IF_CONFIG_SMALL("Ogg Audio"), @@ -789,12 +786,11 @@ const AVOutputFormat ff_oga_muxer = { .write_trailer = ogg_write_trailer, .deinit = ogg_free, .flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH, - .priv_class = &oga_muxer_class, + .priv_class = &ogg_muxer_class, }; #endif #if CONFIG_OGV_MUXER -OGG_CLASS(ogv, Ogg video) const AVOutputFormat ff_ogv_muxer = { .name = "ogv", .long_name = NULL_IF_CONFIG_SMALL("Ogg Video"), @@ -811,12 +807,11 @@ const AVOutputFormat ff_ogv_muxer = { .write_trailer = ogg_write_trailer, .deinit = ogg_free, .flags = AVFMT_TS_NEGATIVE | AVFMT_TS_NONSTRICT | AVFMT_ALLOW_FLUSH, - .priv_class = &ogv_muxer_class, + .priv_class = &ogg_muxer_class, }; #endif #if CONFIG_SPX_MUXER -OGG_CLASS(spx, Ogg Speex) const AVOutputFormat ff_spx_muxer = { .name = "spx", .long_name = NULL_IF_CONFIG_SMALL("Ogg Speex"), @@ -830,12 +825,11 @@ const AVOutputFormat ff_spx_muxer = { .write_trailer = ogg_write_trailer, .deinit = ogg_free, .flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH, - .priv_class = &spx_muxer_class, + .priv_class = &ogg_muxer_class, }; #endif #if CONFIG_OPUS_MUXER -OGG_CLASS(opus, Ogg Opus) const AVOutputFormat ff_opus_muxer = { .name = "opus", .long_name = NULL_IF_CONFIG_SMALL("Ogg Opus"), @@ -849,6 +843,6 @@ const AVOutputFormat ff_opus_muxer = { .write_trailer = ogg_write_trailer, .deinit = ogg_free, .flags = AVFMT_TS_NEGATIVE | AVFMT_ALLOW_FLUSH, - .priv_class = &opus_muxer_class, + .priv_class = &ogg_muxer_class, }; #endif