From patchwork Fri Mar 11 12:18:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Storsj=C3=B6?= X-Patchwork-Id: 34686 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:3486:0:0:0:0 with SMTP id ek6csp1638014nkb; Fri, 11 Mar 2022 04:18:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQeGEwNiTbyHZ1z4f1mUBPqNqyJugi1pmtsClgNJ/L1QQBBROHfcw84wEUhbjYauE0X9+v X-Received: by 2002:aa7:d648:0:b0:416:4b85:da68 with SMTP id v8-20020aa7d648000000b004164b85da68mr8327061edr.253.1647001133798; Fri, 11 Mar 2022 04:18:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647001133; cv=none; d=google.com; s=arc-20160816; b=gv0mq15jDx4o2OF+pTukQ+6C9Q0b5JaMG5sIf8KIt/rSHknNw/5yNEVDFUQbV9YuG5 onv23SZPNxEvwD2o8t2QNAigJFx0vjm3U8A55F9fyX7OLRUiB+RwBXWSNg6d47FVm5Ew kRQZm6c82LjwTXK7DTmUtMiEiU7ZRtCEm3uXI8uKYLY+Mo5Q0UeD8C7OeKXkJlEmso4K cFkjjVRLKqGpdR524ecFr4WHD6vwARZRBJyXSPzM4pgFlrW9SuEb6YwpuCdOG25lDZgn 7kCnU8zNjm4OJLU9mK/vQfdYsW66Uythj/eA7wExexXzQpL+m1iOCJX/e3+dz4eJDWcA pWuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=7miRrokODWqXjUCdB9Q6yuUbdoW6iF0qP2Zh0FIGLEI=; b=01YpmOOk/I/+VTf7qZ4e3mZw+Gh7sPMf07jiGMjpyHHWYA1AvTPUvp+EXu58uUz8ub ct/ROoNX71iAR1JGxFZJ3epb5PKRCjjPwjn5xfnPQaewC/6bDaRDRgyhZVCeijTicx6G JygI0djLAXy2MM7Zu377i9B2o092xefBoqyEisBlkG95rDdZwS3SXaI+Kd3xcIWEM4qX IiMt1YcX1SZPjAFDmNWMUUsYo/jF2mJHcCnC1nnFgAidPMPidgEnknlApa0akS59bAN+ +wAha1NNjYAF5MlAFxqKirPo169/5egypo7shxTfzTwYvMtA0I2PS3qhjGuc9DmLnTZz 6n1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@martin-st.20210112.gappssmtp.com header.s=20210112 header.b=lUYr1lm3; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d25-20020a50fb19000000b004109b560d56si4877700edq.368.2022.03.11.04.18.53; Fri, 11 Mar 2022 04:18:53 -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=@martin-st.20210112.gappssmtp.com header.s=20210112 header.b=lUYr1lm3; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C842668B1AE; Fri, 11 Mar 2022 14:18:39 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 835C868B165 for ; Fri, 11 Mar 2022 14:18:33 +0200 (EET) Received: by mail-lf1-f41.google.com with SMTP id b28so3051751lfc.4 for ; Fri, 11 Mar 2022 04:18:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20210112.gappssmtp.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=vWNFDeyRRJhiSHF+0yAzSvB3fJXMeIuDgzVMnVoK2RU=; b=lUYr1lm3BcLZ5WF2HUmh+8wxvvZA+sKKDX7aEXu0qgKkxofFR6leWrkikwhBtlbhxb oQ+UYmad75zkmOLQg8Z/HrimgoHZ8iJUaEX97usM1GC+A4kK3y1iZ88DgzbVNW6CCLaU ihxrMRTCcuhqvGlE5k52kUAqZtzUBNyZM9ZkVaLmQlM3yxbvuOzO0PdimYcPo+ETdugI /+u3b0dLFkzL7ZoXbUvraBgrggEwEr61dNJ23Z0+pA6xfndPjsrBen4KgJ7b+Amu+YCh Vv81VTKtry/q0lyUenH8wclmMsDmPFZodTwJPzlxRYaC8BCJvthjt59L05U1M6CzfT/B ceoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vWNFDeyRRJhiSHF+0yAzSvB3fJXMeIuDgzVMnVoK2RU=; b=o2ZGVqR/yB+OtzzN9D5CsJ75bTkEDJ0xrqwJIRZa1mNVGVigoijBK5tQsMt4VPqi4k pIUIGsVEtzhQbNJxB9WrGkgFKIS4E0zO8V8VxoyuhiAgPjrnpxXVBJLAM/Vn4dN86HbA /o2EYY+yya41Ue1jIpkWH5bXe9oxEuA03Wg48xA6VA8gPmwdQvSCRuR15r/65P8Z82UH HbmBI4SiJxq01Cy0eQrIoVXJ7DKzbAUHdkzh8wNAfGTIg0A59dwoq0iOZ7xLUOVGLWBo 1eEaTT9jPOA/vIYeaS4A72euebJc4DxZiwVzzIWTZrbAHFaRG/HU72ImLlpdJrNM9JmZ rW4w== X-Gm-Message-State: AOAM532yXQ7sKfcRkRxV09FQ3UXbb3aCR4aCeXN5Ug57ZOwundAcX0m9 c7eQyuEiy5QuBcOPjZ1WeFF4KwumytNbeeIH X-Received: by 2002:a05:6512:10c8:b0:448:3fdc:6407 with SMTP id k8-20020a05651210c800b004483fdc6407mr5701422lfg.360.1647001112462; Fri, 11 Mar 2022 04:18:32 -0800 (PST) Received: from localhost (dsl-tkubng21-58c01c-243.dhcp.inet.fi. [88.192.28.243]) by smtp.gmail.com with ESMTPSA id q15-20020a19f20f000000b0044376b4e80bsm1579293lfh.279.2022.03.11.04.18.31 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 11 Mar 2022 04:18:32 -0800 (PST) From: =?utf-8?q?Martin_Storsj=C3=B6?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 11 Mar 2022 14:18:23 +0200 Message-Id: <20220311121830.5653-2-martin@martin.st> X-Mailer: git-send-email 2.32.0 (Apple Git-132) In-Reply-To: <20220311121830.5653-1-martin@martin.st> References: <20220311121830.5653-1-martin@martin.st> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/9] libavformat: Split version.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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: At/R7sibpa76 --- fftools/cmdutils.c | 1 + fftools/ffprobe.c | 1 + libavdevice/pulse_audio_dec.c | 1 + libavdevice/pulse_audio_enc.c | 1 + libavformat/Makefile | 1 + libavformat/avformat.h | 2 +- libavformat/avio.h | 2 +- libavformat/flacenc.c | 1 + libavformat/framehash.c | 1 + libavformat/matroskaenc.c | 1 + libavformat/mmf.c | 1 + libavformat/movenc.c | 1 + libavformat/mux.c | 1 + libavformat/mxfenc.c | 1 + libavformat/nutenc.c | 1 + libavformat/oggenc.c | 1 + libavformat/rtmpproto.c | 1 + libavformat/rtsp.c | 1 + libavformat/rtspdec.c | 1 + libavformat/utils.c | 1 + libavformat/version.h | 23 ++------------- libavformat/version_major.h | 53 +++++++++++++++++++++++++++++++++++ 22 files changed, 75 insertions(+), 23 deletions(-) create mode 100644 libavformat/version_major.h diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 869b5ec012..87f410e975 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -32,6 +32,7 @@ #include "config.h" #include "compat/va_copy.h" #include "libavformat/avformat.h" +#include "libavformat/version.h" #include "libavfilter/avfilter.h" #include "libavdevice/avdevice.h" #include "libswscale/swscale.h" diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 6f4ce52eb5..7e70b549f3 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -29,6 +29,7 @@ #include #include "libavformat/avformat.h" +#include "libavformat/version.h" #include "libavcodec/avcodec.h" #include "libavcodec/version.h" #include "libavutil/avassert.h" diff --git a/libavdevice/pulse_audio_dec.c b/libavdevice/pulse_audio_dec.c index b23d08e4d3..5a42f71ede 100644 --- a/libavdevice/pulse_audio_dec.c +++ b/libavdevice/pulse_audio_dec.c @@ -30,6 +30,7 @@ #include "libavformat/avformat.h" #include "libavformat/internal.h" +#include "libavformat/version.h" #include "pulse_audio_common.h" #include "timefilter.h" diff --git a/libavdevice/pulse_audio_enc.c b/libavdevice/pulse_audio_enc.c index 4ff425d33f..7b50517fc7 100644 --- a/libavdevice/pulse_audio_enc.c +++ b/libavdevice/pulse_audio_enc.c @@ -23,6 +23,7 @@ #include #include "libavformat/avformat.h" #include "libavformat/internal.h" +#include "libavformat/version.h" #include "libavutil/channel_layout.h" #include "libavutil/internal.h" #include "libavutil/opt.h" diff --git a/libavformat/Makefile b/libavformat/Makefile index 322c8e7896..27d553c20e 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -4,6 +4,7 @@ DESC = FFmpeg container format library HEADERS = avformat.h \ avio.h \ version.h \ + version_major.h \ OBJS = allformats.o \ avio.o \ diff --git a/libavformat/avformat.h b/libavformat/avformat.h index b4b8075ae6..d37a582838 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -319,7 +319,7 @@ #include "libavutil/log.h" #include "avio.h" -#include "libavformat/version.h" +#include "libavformat/version_major.h" struct AVFormatContext; struct AVStream; diff --git a/libavformat/avio.h b/libavformat/avio.h index ca970b1ce3..3ed9175a9b 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -33,7 +33,7 @@ #include "libavutil/dict.h" #include "libavutil/log.h" -#include "libavformat/version.h" +#include "libavformat/version_major.h" /** * Seeking works like for a local file. diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c index b267197ccc..88dbe87af4 100644 --- a/libavformat/flacenc.c +++ b/libavformat/flacenc.c @@ -30,6 +30,7 @@ #include "flacenc.h" #include "id3v2.h" #include "internal.h" +#include "version.h" #include "vorbiscomment.h" diff --git a/libavformat/framehash.c b/libavformat/framehash.c index 04c40825b9..43b8ab3be2 100644 --- a/libavformat/framehash.c +++ b/libavformat/framehash.c @@ -20,6 +20,7 @@ #include "libavutil/channel_layout.h" #include "internal.h" +#include "version.h" int ff_framehash_write_header(AVFormatContext *s) { diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 38d9485288..e8df5db3bd 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -35,6 +35,7 @@ #include "isom.h" #include "matroska.h" #include "riff.h" +#include "version.h" #include "vorbiscomment.h" #include "wv.h" diff --git a/libavformat/mmf.c b/libavformat/mmf.c index 0c067a1025..e836390bff 100644 --- a/libavformat/mmf.c +++ b/libavformat/mmf.c @@ -26,6 +26,7 @@ #include "pcm.h" #include "rawenc.h" #include "riff.h" +#include "version.h" typedef struct MMFContext { int64_t atrpos, atsqpos, awapos; diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 8e3f803b38..14482abe8d 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -61,6 +61,7 @@ #include "mov_chan.h" #include "movenc_ttml.h" #include "ttmlenc.h" +#include "version.h" #include "vpcc.h" static const AVOption options[] = { diff --git a/libavformat/mux.c b/libavformat/mux.c index 53eb56f0af..bd85661663 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -21,6 +21,7 @@ #include "avformat.h" #include "internal.h" +#include "version.h" #include "libavcodec/bsf.h" #include "libavcodec/internal.h" #include "libavcodec/packet_internal.h" diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 1e87dc6111..8ca67f52c6 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -58,6 +58,7 @@ #include "avc.h" #include "mxf.h" #include "config.h" +#include "version.h" extern const AVOutputFormat ff_mxf_d10_muxer; extern const AVOutputFormat ff_mxf_opatom_muxer; diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index 585ce953ca..c33c16fd44 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -34,6 +34,7 @@ #include "internal.h" #include "avio_internal.h" #include "riff.h" +#include "version.h" static int find_expected_header(AVCodecParameters *p, int size, int key_frame, uint8_t out[64]) diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index a88dab8ccc..31f47dadf6 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -31,6 +31,7 @@ #include "avformat.h" #include "avio_internal.h" #include "internal.h" +#include "version.h" #include "vorbiscomment.h" #define MAX_PAGE_SIZE 65025 diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index 34020bc383..88557140f7 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -42,6 +42,7 @@ #include "rtmpcrypt.h" #include "rtmppkt.h" #include "url.h" +#include "version.h" #if CONFIG_ZLIB #include diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 70c18941ca..f1992f193e 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -50,6 +50,7 @@ #include "url.h" #include "rtpenc.h" #include "mpegts.h" +#include "version.h" /* Default timeout values for read packet in seconds */ #define READ_PACKET_TIMEOUT_S 10 diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c index 2ada29a2d3..eee6329025 100644 --- a/libavformat/rtspdec.c +++ b/libavformat/rtspdec.c @@ -34,6 +34,7 @@ #include "rdt.h" #include "tls.h" #include "url.h" +#include "version.h" static const struct RTSPStatusMessage { enum RTSPStatusCode code; diff --git a/libavformat/utils.c b/libavformat/utils.c index ca61a97759..1ec413f198 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -46,6 +46,7 @@ #if CONFIG_NETWORK #include "network.h" #endif +#include "version.h" #include "libavutil/ffversion.h" const char av_format_ffversion[] = "FFmpeg version " FFMPEG_VERSION; diff --git a/libavformat/version.h b/libavformat/version.h index 44ea7c7c5d..be8ce01160 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -29,9 +29,8 @@ #include "libavutil/version.h" -// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) -// Also please add any ticket numbers that you believe might be affected here -#define LIBAVFORMAT_VERSION_MAJOR 59 +#include "version_major.h" + #define LIBAVFORMAT_VERSION_MINOR 18 #define LIBAVFORMAT_VERSION_MICRO 101 @@ -45,22 +44,4 @@ #define LIBAVFORMAT_IDENT "Lavf" AV_STRINGIFY(LIBAVFORMAT_VERSION) -/** - * FF_API_* defines may be placed below to indicate public API that will be - * dropped at a future version bump. The defines themselves are not part of - * the public API and may change, break or disappear at any time. - * - * @note, when bumping the major version it is recommended to manually - * disable each FF_API_* in its own commit instead of disabling them all - * at once through the bump. This improves the git bisect-ability of the change. - * - */ -#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60) -#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59) - - -#define FF_API_R_FRAME_RATE 1 #endif /* AVFORMAT_VERSION_H */ diff --git a/libavformat/version_major.h b/libavformat/version_major.h new file mode 100644 index 0000000000..5f71298bcc --- /dev/null +++ b/libavformat/version_major.h @@ -0,0 +1,53 @@ +/* + * Version macros. + * + * 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_VERSION_MAJOR_H +#define AVFORMAT_VERSION_MAJOR_H + +/** + * @file + * @ingroup libavf + * Libavformat version macros + */ + +// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) +// Also please add any ticket numbers that you believe might be affected here +#define LIBAVFORMAT_VERSION_MAJOR 59 + +/** + * FF_API_* defines may be placed below to indicate public API that will be + * dropped at a future version bump. The defines themselves are not part of + * the public API and may change, break or disappear at any time. + * + * @note, when bumping the major version it is recommended to manually + * disable each FF_API_* in its own commit instead of disabling them all + * at once through the bump. This improves the git bisect-ability of the change. + * + */ +#define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) +#define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) +#define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) +#define FF_HLS_TS_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 60) +#define FF_API_AVSTREAM_CLASS (LIBAVFORMAT_VERSION_MAJOR > 59) + + +#define FF_API_R_FRAME_RATE 1 + +#endif /* AVFORMAT_VERSION_MAJOR_H */