From patchwork Thu Sep 7 01:05:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 43609 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b17:b0:149:dfde:5c0a with SMTP id l23csp297707pzh; Wed, 6 Sep 2023 18:06:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRdlqUCKB0Cnbm7paBWqaSKRUdpLwZ0s958KCfoKeiAmZWhCUHrIYwCfoxuI/fP1mYAUII X-Received: by 2002:a05:6402:8cc:b0:51e:4439:f474 with SMTP id d12-20020a05640208cc00b0051e4439f474mr3346026edz.35.1694048808606; Wed, 06 Sep 2023 18:06:48 -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 d26-20020a50fb1a000000b005233d7f4910si10139932edq.162.2023.09.06.18.06.48; Wed, 06 Sep 2023 18:06:48 -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=MIneaQJc; 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 C84F868C843; Thu, 7 Sep 2023 04:05:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03olkn2054.outbound.protection.outlook.com [40.92.59.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 51E8D68C831 for ; Thu, 7 Sep 2023 04:05:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UwHlxANc531pfAO9bF2vfm4VXZQrlt59AcTG/+Cg2VK1GH/szM/3QHswaiB56121I0xKXF9zktdSLcVXXIfIbd8Xhcy6vwWHiPX5qp2bdHoWeLoSXCv5KX78R2zXeh+QKP9AzwUfNAUMBDf3OyJWYyzVShOVV4CNQ2AkNHTevUy0CfYR3u+QD7YNhxNYvjlbCElM4wJwTDM+InoBLkL5J62REuNIUX3DA5bUic1W+EUrdO9BEpFUwEga2fzh/Ccu1X4jNwN+aJBzmEZ0tuBp+eBbt5xr75qtWew0QxWfN6W61WJ2vFf7eQoinNqIkym+PImiLTrCBiMta/MnFgFqoA== 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=mqhUqpkBpo9C01oiPNYANFzrOqvba+mDW7Z6zuQpbsU=; b=YZ6PL2KRCnsbEkBNrKUhBHxuNV0wPquHPzrtCDD1is8VsuLkfl7qzZqANVLax0kDnVCXrVSJKqkO2m0/vwW0J4s70+D72DSw32XG2ZRK5V+7YqKA2QE33e4Xphp5wLPpBAmts1jUomtK45Pe8pAt4IkZtRrND+KVXarvhtmtWT/eheTe+9XU2z/9zIc0QUfOij9loGKq6N092LOMwEGi7tVcTQobbecbUCZPl8yJSdXprWiSHIbXwgRqtzNloD7VbjX8jgb+7CSgVo57SwoL4XdsmfhX19UvCm2/j9L7OKNCBGKDUgva/k74XFkOJPku4xCGizFov5OMKDWjZGEaEQ== 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=mqhUqpkBpo9C01oiPNYANFzrOqvba+mDW7Z6zuQpbsU=; b=MIneaQJc+NAUmCPUREXLKCthHIU2heBk/gGNmCQzXI9iF9rmE+rv8tgF7THLvrc8zosWA2pz1AcAOmf/u/XtKb49mdUPc01bSIClwfIj7L/ZVuY8reYxBmT54hd2mgaBxnprZj/GKKDpEoY7K8gHfJc6peD6V1aEOKhftP+T3FRJLQrWmoyRymHn5VptsKGbMBdxzgALLKVZiMmFHgPPfs7ViJb0zfmyNPdHLJe4Qbbri5ZsAubeh9siFbxGykOeE8u8Cu7yTwO7V8JhG7SOIv20x4u+wvXfbRtwmj4Sgcv5QiY1nxIV7eX+dKxlR+6DYjkInLr21F21E4tHu5u5pA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:2b6::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Thu, 7 Sep 2023 01:05:55 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::5e01:aea5:d3a8:cafa%3]) with mapi id 15.20.6745.034; Thu, 7 Sep 2023 01:05:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Sep 2023 03:05:30 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [pQuhztN/iNgB56HYGlgyZ/7sjNlh+SBK] X-ClientProxiedBy: ZR0P278CA0096.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::11) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20230907010538.488975-13-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0025:EE_ X-MS-Office365-Filtering-Correlation-Id: 1a4a48ea-d30b-43f3-d456-08dbaf3e96a6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +Itd55yD373NkUzal3A4CNWWlIcjKYeSkFEO78BRKx7LZlqmdAb5l3BSPkdHYo+9VYIBEu9WRBkcRHy1c90kDoWlCwVbOamKk2YYrw3ghVVezLaCj/wXkdvpF8Aq1sDvApV/czxm16QLq9Hp3sueUS5/4TvW6s6wisjFlwKOo0wx+JMVvgH1QmYLbQy7D3JTaY1uhMQbpamETw/HZ7B+v987Uo3Hr5ANrn43cK2wlPfvEUCQB9w2l09ZFIOqucdPeSKtptojfCcGzf2Z++D3n1gTbqJrRnWsgSyTxKKaK5Qgyo23506Lr+6sHj0OofFXV3xobqDgt+MkL7um10DHJJq3idZkr2/apJHcJ+FaZSawW03H/B8ziXq4Yqjc7JsmJxmg8zX+6CSNOk66VGjrs3l4sq4ITMlZWWYlGDpPGOeUFcF+8ueXRqt+2I1VMocwCPlJS7OYAfjH/WEnSZ8tVKodMTnyviEzTU45okwoZJqBUpDwofhV1OdGAyIEOmYpTHEEm15YzLVgGwoAEkng7uT6niV6EtjbxCox9UUrORPsq6+vEchbS5xbaLeSq6ooPuuB/g31aw+c3Mvu7XhcSA3Tx8oN4tgjBhjeIfceT58pOyLRV6k2rOSD3OWsv9eh X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 6BFeeAnxNyL1XPrfUtYdCANcuwcAKoZEX3xiTbeLVoWQLQcvGX/ZYDgFcYYMSqhwQzOCnCdobnkFja7c+soXbLTddIuwHOAteaL3Q7+RIGgh8U6olj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+O4fLeb2JjT05vdptWQgN8eV1xBa2r6n0VEKtrmNp9lJM2wgegtKLbpsyQFr/44ueEBlqSRxhsb0WYaq X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1a4a48ea-d30b-43f3-d456-08dbaf3e96a6 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2023 01:05:55.5607 (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: DU2P250MB0025 Subject: [FFmpeg-devel] [PATCH v2 14/22] avformat/avio_internal: Don't include url.h 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: TTwtKpqGo0er It is only included because two very rarely used functions use pointers to URLContexts; use struct URLContext instead. Also move ffio_geturlcontext() so that one can avoid a forward declaration of struct URLContext (which would be necessary as soon as FF_API_AVIODIRCONTEXT is no more). Signed-off-by: Andreas Rheinhardt --- libavformat/avio_internal.h | 19 +++++++++---------- libavformat/dashdec.c | 1 + libavformat/format.c | 1 + libavformat/hls.c | 1 + libavformat/hlsenc.c | 1 + libavformat/rtpenc_chain.c | 1 + 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/libavformat/avio_internal.h b/libavformat/avio_internal.h index 57796ade03..aef6ab660e 100644 --- a/libavformat/avio_internal.h +++ b/libavformat/avio_internal.h @@ -20,7 +20,6 @@ #define AVFORMAT_AVIO_INTERNAL_H #include "avio.h" -#include "url.h" #include "libavutil/log.h" @@ -194,6 +193,14 @@ unsigned long ff_crcA001_update(unsigned long checksum, const uint8_t *buf, */ int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); +/** + * Return the URLContext associated with the AVIOContext + * + * @param s IO context + * @return pointer to URLContext or NULL. + */ +struct URLContext *ffio_geturlcontext(AVIOContext *s); + /** * Create and initialize a AVIOContext for accessing the * resource referenced by the URLContext h. @@ -205,15 +212,7 @@ int ffio_open_dyn_packet_buf(AVIOContext **s, int max_packet_size); * @return >= 0 in case of success, a negative value corresponding to an * AVERROR code in case of failure */ -int ffio_fdopen(AVIOContext **s, URLContext *h); - -/** - * Return the URLContext associated with the AVIOContext - * - * @param s IO context - * @return pointer to URLContext or NULL. - */ -URLContext *ffio_geturlcontext(AVIOContext *s); +int ffio_fdopen(AVIOContext **s, struct URLContext *h); /** diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index f4af625814..cbe34f4f50 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -29,6 +29,7 @@ #include "avio_internal.h" #include "dash.h" #include "demux.h" +#include "url.h" #define INITIAL_BUFFER_SIZE 32768 diff --git a/libavformat/format.c b/libavformat/format.c index c91f71057a..477ad6b43b 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -30,6 +30,7 @@ #include "avformat.h" #include "id3v2.h" #include "internal.h" +#include "url.h" /** diff --git a/libavformat/hls.c b/libavformat/hls.c index 276e4ee333..b2a93d578b 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -43,6 +43,7 @@ #include "internal.h" #include "avio_internal.h" #include "id3v2.h" +#include "url.h" #include "hls_sample_encryption.h" diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 12e20580ee..08f3746ce7 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -51,6 +51,7 @@ #include "internal.h" #include "mux.h" #include "os_support.h" +#include "url.h" typedef enum { HLS_START_SEQUENCE_AS_START_NUMBER = 0, diff --git a/libavformat/rtpenc_chain.c b/libavformat/rtpenc_chain.c index cd751f48b6..45d0e313fd 100644 --- a/libavformat/rtpenc_chain.c +++ b/libavformat/rtpenc_chain.c @@ -23,6 +23,7 @@ #include "avio_internal.h" #include "rtpenc_chain.h" #include "rtp.h" +#include "url.h" #include "libavutil/opt.h" int ff_rtp_chain_mux_open(AVFormatContext **out, AVFormatContext *s,