From patchwork Thu Jun 17 02:31:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 28461 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp208853iol; Wed, 16 Jun 2021 19:48:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLTTWXdEoLnF8Q2wuXoA8oN9KpxAkuHv+ieEdwdJTmlDg/Mf/kePFDAA7+WWOtbUkoJ4R+ X-Received: by 2002:a05:6402:358d:: with SMTP id y13mr3482824edc.264.1623898139811; Wed, 16 Jun 2021 19:48:59 -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 nc38si1181881ejc.708.2021.06.16.19.48.59; Wed, 16 Jun 2021 19:48:59 -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="dDRD/icY"; 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 A876E689A12; Thu, 17 Jun 2021 05:48:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074057.outbound.protection.outlook.com [40.92.74.57]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 07CD968836F for ; Thu, 17 Jun 2021 05:48:50 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y9fFgdRGiuoRpPQZPIe2kOcT3ASQ38pQILEVmd9+z+G58I7HLwbNKxGTPPeJJrLx7+Gj+mqNXiWPyth2VtLed6aWhX4EEKNAAf228ASYBWg7h/J64b6CuUweeMb9VnzMF5vA4Frn1jPmwLcZevSWZIaSqKd9yfCoFU72F8p4v/fdIcksh0r1VKikTUaAyIXp2Low/nsVs6iqRs/GDWALYgdTO2Vc/BSxJbpHTV4ofwjxvR74EAFgXd+H0/D4S4TZwN8XSxZkfRUD1ujuJY4IQ5FOPHY2jVEowoEj1jYSlZ5CZHkREXflYKstiHBWZ/+nhAIIvi5cAITmquJ7jOWYuA== 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=HYZ2cOa+Gj0R6aOjZqQpjLXOfi0FAIvGABcRgsNm+rQ=; b=XT7Jd3l4SgfY88ICB0MrvNC0U5Y1stwPDsFmEMuhl/oySeuNGNSgCGYcXsLBIzvVHygI1FOrKFXddWw6ntiGdSazz3fQxFEYrot55PBiOH4+9P34qZY/HGcU/s+pwKt/W6aoOxGxeyHT41IEzqYFygUUkmXr9hlWJsOEoBSBgrGXrECWcXzy+IqDP2V+vvGtTYACWayOmGy89WD+gSlQin5iSOuVrxPFLIW5T1PCAWxQFOtbn/M1nUx7JBENv8L+Pm/PaOzRZ4NkfeuGrspGFVYfYOwfs1xLEmwGHCmjntWJYNyx6r8b7dXMqCGRfbI4a/7zNKV4ckGXWbdIqkNAhg== 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=HYZ2cOa+Gj0R6aOjZqQpjLXOfi0FAIvGABcRgsNm+rQ=; b=dDRD/icYx9UTystvVg7VXwLLdN559R283ha98iZH9yj3PiYPnsReukdnxCRKVbk4NeavFPUYRSitxX9D6Ze2YdW+u5P0qXS7KHDG2NGX/ovIvzcB8VQXwWRjWibNy2n6i4QOx1VIdgQg7IpoG9v9Dy15PXl+vue+pq8siv3lRnEpF4inCzjGufOwW1p8njMtz47x+Sq6h8aRJW+G4AB9RRseqQnjzbCU1FT0c0tBzscN+lT6byuOk6LUFyFrk5LlDFUPV3Ffz6fNPfnv9gUmOlIZivTuynOm5s/7h8gPInfT1K6XqgzIB4QLEDxyKt5yfyjtif8a7QFuCIgK4XbsxA== Received: from HE1EUR04FT016.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::46) by HE1EUR04HT128.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::223) 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:12 +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:12 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2B26C683E8E692BBBD814FA3D26CEBE127C8F17ED1CDC89DEEF37D9331B2390E; UpperCasedChecksum:64F067C5BA909A8F3D6551C42F3DF3008E5753787E983B17226233865DB3FF11; 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:12 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 17 Jun 2021 04:31:30 +0200 Message-ID: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: X-TMN: [IJ2CSr8iZRtUJTnzLVHxkCIEnr+f3a7i] 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-8-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:11 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: f0b2a99e-ff0a-4cbb-371b-08d93138407c X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSz7Gd0YLSftKT0G4ETHQtWsxNP3P3lYuU5K2qNoN8i6OyAtl9aFqvoK9xoH/vEKagYlpC9QDbPtUMkGdnpRyQMZQ4pq6Lknj6zZnrkUKrP5zIhjBer4L3HH3ZnDP+LDfm4qvlLBLyFr3EZVQSwVnJtqds/8OCeZyT4RDDri1pCJ9W2nbViC98TvixNo9LviRGrdCFTmBqndEpw4ZdwKlv+P3Jb0/xgEAsHqx5NbvBb8ciMrBahGd3mZZ+F3UBJiiYE2Rr4XDYPPb4v1M2PsyGgT16SX7Zp3nqgvWT+FNOIv6y0nYP4czu7ZJDEbTYUGJOlIjkLWp829VWDAKF845SaGrgDVEbsu1lBvYN9l5z1t9nh1fyJYwO+GJQJVUTCiRM754QEGDBxnkdX7+FocBnlpgXVL6PU1h9WGKvkWb1oneo+l0fhqgkxq4GDHBKgixm13lswWPjOl3P1K6PPAKXgxfAteJzp+gYKsDe/M6EC6EDN/31i8KeM4QD4DjRVl8oBl6ADDx5vKur7Cqe0tPC6Crv51I1xTqXka7i8OSooY/ESCOSW7CBUUIx/xrox0sF2q6N5wZK0PeDAxzoxP3opsXZ4JdrKRuFTkK/uiKVG/sGVCLhHAyxlccsxcx63DvmXceRNFg/2DgKpDCra1qzq60C7nnBEX81ULdugbJhF70zmzV4k/RT9zj5l5OpSXoFarM5YzuvLyfG5UW+WwEtSPn28aTtQOOhhYPXw/t2KU+7q2QQGEMGDBwoEjKRsoew= X-MS-TrafficTypeDiagnostic: HE1EUR04HT128: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q7Qj6cvEmUCyDsZ277d0tgHKkxl91JTZOy4UuRthMUMAn/hcE/VinoIOTpA+qzyZfTJE2q3GcWGJTwlhQqDBp4ZtHiNBJ1l8GXJTRBP37XCXiFb52P55JeJ/wpiBunnFkeUy+1DgR+yzvi9NGaja5B+YZDzmmFbdzHNLM7g1Nq9HDVys4aPzsooqXoK4ucUb1VCqTqOm1p4vEOk2DYdSLJcECmEkWGjDmFEMxUxbLKM/Ei4G4mTkpc5CF1gqZA4asSJDRQttnjgPcxpQl88yJTIm2FfDU4cmZvxnmS7ygAcNF9xZNLu7siJNZ5hmTl+0avOOW2/76JsSWZdPbeg7bv0sAPiVc6LuWSThwQzJAFoVEeSUXEAQEzpB5phx457chihyzcZTUv40clU86gucPA== X-MS-Exchange-AntiSpam-MessageData: KvTb7obJjLky2bUapfUWZMzT4B2GY635krBnkGGAGqElECZKLSRVCi1GrsYgl2dDpV+NIJoPwDt/Fddn68KHgondm9mOrXVx1BZirjIhS2WKTL+1gC2rUTfzv88t5UW/71bdVkI3/0BHeuf7v9LTAg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0b2a99e-ff0a-4cbb-371b-08d93138407c X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 02:33:12.1626 (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: HE1EUR04HT128 Subject: [FFmpeg-devel] [PATCH 09/41] avformat/hashenc: 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: 9J11Smn7Exd3 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/hashenc.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/libavformat/hashenc.c b/libavformat/hashenc.c index a1e98eda89..4d5cf2ee7d 100644 --- a/libavformat/hashenc.c +++ b/libavformat/hashenc.c @@ -47,6 +47,13 @@ static const AVOption hash_streamhash_options[] = { HASH_OPT("sha256"), { NULL }, }; + +static const AVClass hash_streamhashenc_class = { + .class_name = "(stream) hash muxer", + .item_name = av_default_item_name, + .option = hash_streamhash_options, + .version = LIBAVUTIL_VERSION_INT, +}; #endif #if CONFIG_FRAMEHASH_MUXER @@ -164,13 +171,6 @@ static void hash_free(struct AVFormatContext *s) } #if CONFIG_HASH_MUXER -static const AVClass hashenc_class = { - .class_name = "hash muxer", - .item_name = av_default_item_name, - .option = hash_streamhash_options, - .version = LIBAVUTIL_VERSION_INT, -}; - const AVOutputFormat ff_hash_muxer = { .name = "hash", .long_name = NULL_IF_CONFIG_SMALL("Hash testing"), @@ -183,7 +183,7 @@ const AVOutputFormat ff_hash_muxer = { .deinit = hash_free, .flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT | AVFMT_TS_NEGATIVE, - .priv_class = &hashenc_class, + .priv_class = &hash_streamhashenc_class, }; #endif @@ -212,13 +212,6 @@ const AVOutputFormat ff_md5_muxer = { #endif #if CONFIG_STREAMHASH_MUXER -static const AVClass streamhashenc_class = { - .class_name = "stream hash muxer", - .item_name = av_default_item_name, - .option = hash_streamhash_options, - .version = LIBAVUTIL_VERSION_INT, -}; - const AVOutputFormat ff_streamhash_muxer = { .name = "streamhash", .long_name = NULL_IF_CONFIG_SMALL("Per-stream hash testing"), @@ -231,7 +224,7 @@ const AVOutputFormat ff_streamhash_muxer = { .deinit = hash_free, .flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT | AVFMT_TS_NEGATIVE, - .priv_class = &streamhashenc_class, + .priv_class = &hash_streamhashenc_class, }; #endif