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 7420D48CF9 for ; Wed, 24 Jan 2024 15:12:39 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6350E68D0E4; Wed, 24 Jan 2024 17:12:35 +0200 (EET) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02olkn2093.outbound.protection.outlook.com [40.92.48.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 708CE68D084 for ; Wed, 24 Jan 2024 17:12:28 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dK5SG1LtEM2/SV+yGMHOIYTFo6j4JLcHN/REF50+dDW8iE9KuyAmenrpP1NehIMybOVPIZ0MTtSAIUQLoMxdzC2KTeEKvInyXQpofsIB7pnth7jVadJm8EO3WljGXAqwz8aMg7ON1v5MT+Un638gzSDBQp6jyiJkq0pZ978GZpW0QE842H15ChHHGOcNbA/4/3VMNGLq5De8zuQcOgYh/z11PBApRXq/5cS7c4pZK9m4g/v8VW3gKu8LyXlFWDVLamoVSiZy5KUO9XFe+jQsXrvTcT5FNjaFdLx5ajrOH8ZDrrbre3jvkiChyof+H456CKcI3XLUwK9CdgHGX3wrSQ== 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=Mcga4QtulUoLAYWYQzT/n+3AvzzoPkvbDrzAfL0XvKo=; b=n3GG4ARVQDZrdCq95qT/1PC+bVkKGLIOGYVI/GHfBywlH1tnccwEWqDhCjNftFcjNp4a2hbh8yuA/faC0A30bSY09b9PdVZs7nvUJoyq43KXqoNmMl8vyQ41HSFWF7PO6F7smGhtlv66X0wY2vkX+piXIQm3dd9JkSXDaIuQWFNvixkUxnzeq/m4pWxxJQN4UE6vBvC7ylTQhgryMq0TxKXcKj1K419H6wMPbedIiNO86n0wbGOzNLlKY8iQvMbHbinfDyuZLtcYGLLHaE58Anfo7ZTc0X4lC1VoLsaULU0X285R/Rp8YCUHoaNi1mpscL5b4Vfu/96id6VXILBRZQ== 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=Mcga4QtulUoLAYWYQzT/n+3AvzzoPkvbDrzAfL0XvKo=; b=oXUAbO4Nj5ksh0dr8m9L0pqtcYOS2ltLrq8EefKv2VtKM20QvRQq4yMCSmUzNsRtQwy06+ToZHL1+EWF+IBA/9+wptkGQaaXeni2ZfytNAeAW19pxohQGEtTOlEhOGntHH3NNf0o4m7wemyoGMSapG1D2XBYWwKCbHcf8PkuYXwjgaN+KIHw3EpAKM8HENXL9O0elOffR/z0LDA7CUBJfLL1lLFIitU3wZ942oFKzyn1WtvCzQwjWoZ18oOQEutvU8qCrqH2yT+S13grLSk4+9KKlbh9lg/WvTQsVGv5VuR+2mXRpcrXuGqNFXNZwQRGPs7d48R5kjtiI29ejzqreA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0033.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:14c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Wed, 24 Jan 2024 15:12:25 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::65aa:deb0:a18e:d48d]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::65aa:deb0:a18e:d48d%5]) with mapi id 15.20.7202.031; Wed, 24 Jan 2024 15:12:25 +0000 Message-ID: Date: Wed, 24 Jan 2024 16:14:04 +0100 User-Agent: Mozilla Thunderbird Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20240116005031.30423-1-jamrial@gmail.com> From: Andreas Rheinhardt In-Reply-To: <20240116005031.30423-1-jamrial@gmail.com> X-TMN: [+y2mcbIsIxmfoNgEC6w032OJBaVIvyEzxhPlY/pOId0=] X-ClientProxiedBy: FR0P281CA0170.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:b4::8) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <3431ae11-eaf1-4718-8a77-6eeb1f3e5ff1@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0033:EE_ X-MS-Office365-Filtering-Correlation-Id: 78bdcec8-5415-45ec-48c6-08dc1ceedf11 X-MS-Exchange-SLBlob-MailProps: 9IecXKUgicCX4KYLJ+RgTh+pTcblwntPo2DsHDzYVBwByARD3vurUNJp/jzs2TUqbXfe5LDsvwcLBCWYVIY9BIaqb/WVi4ykwFK1aPV8zMsuDDTJipdznDMlVQYJxZ3ibuqdeHsLoDjfLrkvpwEYiBnJibk9w1EAq5xno3Ge8QZ1GvPPBsZDxioDVhSaDWR+kRqbdIi+gq0Ld81dbAz5JX21t0twMDhtU0i7DtBaiPkUKGnnR6bhc3jX/BcyG1ika9EWaUsxUwO/1q3x8/hiTsFViwKq1bA3NZ816GvWAvt3gI3nMkWNJOGjuHH9GfD5ADB8GeJlORJx1dJEmhnEEG5PsEdcWw5t2HPWclHZXjylfJA2D9lwYdLogC2YrMyVSB/HvOC6/Y3Stua2MlqM6xAEmL1dDp47fRmHmfUp1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VNGSXJBVFBRbjFs?= =?utf-8?B?UXZUOEF0WWNnemFLYTAwMUpnWDN3ejBzYWczUTBpWHludzNOY2Nka2E0ZzVu?= =?utf-8?B?TWptaldnMGNOcnF2cUkxMHZDWS8vbU1vWHZkUlRuOXMwR0FWTUs0bnVZVmVK?= =?utf-8?B?Y3lvUitoZHRaVVVzQ3B2YzU5VlZ5YUxmYk4xMmtQTThVVHkrU0FiZy9vRStJ?= =?utf-8?B?bXJPMWUwUU5KbVJvL1dSei91ZmpCUHIwSWRPdkc3ME5tamh0S3hPSHFHL2hO?= =?utf-8?B?WEhvam1LVGplcXMyWFNNMm5tZHhOOHl6K2RLK05GN0tFWEdzVlVOdWpadjZR?= =?utf-8?B?RkE5ZHFSdTE3RVUxTnRYQUp5bmt1QjZldlJtMjF6Q002WFR5US9zUUc3YXNX?= =?utf-8?B?T2NyQ2pkTFpmNkNJR0gxTkJYdWlXZ3ZTZXNNc2lyZ0NlQlY2ZTl0WG01SG1q?= =?utf-8?B?UFpxZXFkL3NPZ1J5S1Z2V29aMEo2SW9xcGEvZmwwVGcyUmVJcTRXblkxUUZt?= =?utf-8?B?a2E4QUhGYzN6bXJGNzR1YWlBMmIzUUFJeUdHUExOSHcxVDJVOFd2Smc1M3F0?= =?utf-8?B?Uk9od2VsOURyTkNIUEFsMWlacVlyOFhuM2ZERGZPZ1pTMFZ5ZFcwY29pOWUy?= =?utf-8?B?alVJUmo0MC9za1dYZWRKVUFhWEFGZStHYmlCOWd5R1czanFUcFF3b052MVY2?= =?utf-8?B?clI3b1lGY29qbkZCUnZCdXZyUW1ra2JORkt0N0E3R1ZZWGJvV0RhVmU2QXAv?= =?utf-8?Q?TrMHyYwq+c7m//7LSKjT?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 78bdcec8-5415-45ec-48c6-08dc1ceedf11 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2024 15:12:25.1863 (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: PR3P250MB0033 Subject: Re: [FFmpeg-devel] [PATCH] avformat: move internal stream related functions and structs to a separate header 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: James Almer: > Signed-off-by: James Almer > --- > libavformat/Makefile | 1 + > libavformat/avformat.c | 171 ---------------- > libavformat/demux.h | 29 --- > libavformat/internal.h | 319 +--------------------------- > libavformat/stream.c | 196 ++++++++++++++++++ > libavformat/stream_internal.h | 376 ++++++++++++++++++++++++++++++++++ > 6 files changed, 574 insertions(+), 518 deletions(-) > create mode 100644 libavformat/stream.c > create mode 100644 libavformat/stream_internal.h > > diff --git a/libavformat/internal.h b/libavformat/internal.h > index f93832b3c4..f97ebc818f 100644 > --- a/libavformat/internal.h > +++ b/libavformat/internal.h > @@ -26,6 +26,7 @@ > #include "libavcodec/packet_internal.h" > > #include "avformat.h" > +#include "stream_internal.h" You seem to have included the new header in order to avoid checking which of the internal.h inclusions should be replaced by stream_internal.h. This basically defeats the point of adding a new header (honestly, I don't really get the point of splitting this off anyway: avformat.c is not that big). > > #define MAX_URL_SIZE 4096 > ... > diff --git a/libavformat/stream_internal.h b/libavformat/stream_internal.h > new file mode 100644 > index 0000000000..9759f30e3f > --- /dev/null > +++ b/libavformat/stream_internal.h > @@ -0,0 +1,376 @@ > +/* > + * Stream related functions and structs > + * > + * 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 AVFORMAT_STREAM_INTERNAL_H > +#define AVFORMAT_STREAM_INTERNAL_H > + > +#include > + > +#include "libavcodec/bsf.h" > +#include "libavcodec/packet_internal.h" > +#include "libavcodec/parser.h" Including bsf.h and parser.h is unnecessary (the structs here don't need the complete types and almost no file including this needs them either). > +#include "avformat.h" > + > +/** > + * Fractional numbers for exact pts handling > + * > + * The exact value of the fractional number is: 'val + num / den'. > + * num is assumed to be 0 <= num < den. > + */ > +typedef struct FFFrac { > + int64_t val, num, den; > +} FFFrac; > + > +#define MAX_STD_TIMEBASES (30*12+30+3+6) > +typedef struct FFStreamInfo { > + int64_t last_dts; > + int64_t duration_gcd; > + int duration_count; > + int64_t rfps_duration_sum; > + double (*duration_error)[2][MAX_STD_TIMEBASES]; > + int64_t codec_info_duration; > + int64_t codec_info_duration_fields; > + int frame_delay_evidence; > + > + /** > + * 0 -> decoder has not been searched for yet. > + * >0 -> decoder found > + * <0 -> decoder with codec_id == -found_decoder has not been found > + */ > + int found_decoder; > + > + int64_t last_duration; > + > + /** > + * Those are used for average framerate estimation. > + */ > + int64_t fps_first_dts; > + int fps_first_dts_idx; > + int64_t fps_last_dts; > + int fps_last_dts_idx; > +} FFStreamInfo; Moving FFStreamInfo to this header makes it accessible to muxers, although this is supposed to be a demuxer-only struct. (Didn't you send this patch once before?) - Andreas _______________________________________________ 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".