[FFmpeg-cvslog] avformat/options: Deprecate av_fmt_ctx_get_duration_estimation_method()

Andreas Rheinhardt git at videolan.org
Wed Mar 6 14:31:27 EET 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sun Mar  3 23:35:01 2024 +0100| [49707b05900547978c9a057e1daea508fff205a0] | committer: Andreas Rheinhardt

avformat/options: Deprecate av_fmt_ctx_get_duration_estimation_method()

Forgotten in b7785d10b00c88029d8af7dbddac09ab0d6f2b7f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=49707b05900547978c9a057e1daea508fff205a0
---

 doc/APIchanges              | 4 ++++
 libavformat/avformat.h      | 4 ++++
 libavformat/options.c       | 2 ++
 libavformat/version.h       | 2 +-
 libavformat/version_major.h | 1 +
 5 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 523945e511..815439e835 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,10 @@ The last version increases of all libraries were on 2023-02-09
 
 API changes, most recent first:
 
+2024-03-06 - xxxxxxxxxx - lavf 60.25.100 - avformat.h
+  Deprecate av_fmt_ctx_get_duration_estimation_method().
+  The relevant field is public and needs no getter to access.
+
 2024-03-05 - xxxxxxxxxx - lavf 60.24.100 - avformat.h
   Add avformat_stream_group_name().
 
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 3a584993dd..974943d8e6 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -2008,12 +2008,16 @@ typedef struct AVFormatContext {
  */
 void av_format_inject_global_side_data(AVFormatContext *s);
 
+#if FF_API_GET_DUR_ESTIMATE_METHOD
 /**
  * Returns the method used to set ctx->duration.
  *
  * @return AVFMT_DURATION_FROM_PTS, AVFMT_DURATION_FROM_STREAM, or AVFMT_DURATION_FROM_BITRATE.
+ * @deprecated duration_estimation_method is public and can be read directly.
  */
+attribute_deprecated
 enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx);
+#endif
 
 /**
  * @defgroup lavf_core Core functions
diff --git a/libavformat/options.c b/libavformat/options.c
index cd7e4cea9c..0b3e9775d9 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -198,10 +198,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
     return s;
 }
 
+#if FF_API_GET_DUR_ESTIMATE_METHOD
 enum AVDurationEstimationMethod av_fmt_ctx_get_duration_estimation_method(const AVFormatContext* ctx)
 {
     return ctx->duration_estimation_method;
 }
+#endif
 
 const AVClass *avformat_get_class(void)
 {
diff --git a/libavformat/version.h b/libavformat/version.h
index 6c2776460b..966ebb7ed3 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -31,7 +31,7 @@
 
 #include "version_major.h"
 
-#define LIBAVFORMAT_VERSION_MINOR  24
+#define LIBAVFORMAT_VERSION_MINOR  25
 #define LIBAVFORMAT_VERSION_MICRO 100
 
 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
diff --git a/libavformat/version_major.h b/libavformat/version_major.h
index 224fdacf23..c488188344 100644
--- a/libavformat/version_major.h
+++ b/libavformat/version_major.h
@@ -50,6 +50,7 @@
 #define FF_API_ALLOW_FLUSH              (LIBAVFORMAT_VERSION_MAJOR < 61)
 #define FF_API_AVSTREAM_SIDE_DATA       (LIBAVFORMAT_VERSION_MAJOR < 61)
 
+#define FF_API_GET_DUR_ESTIMATE_METHOD  (LIBAVFORMAT_VERSION_MAJOR < 62)
 
 #define FF_API_R_FRAME_RATE            1
 



More information about the ffmpeg-cvslog mailing list