Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avformat/options: Deprecate av_fmt_ctx_get_duration_estimation_method()
@ 2024-03-03 22:36 Andreas Rheinhardt
  2024-03-05 11:01 ` Andreas Rheinhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2024-03-03 22:36 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Forgotten in b7785d10b00c88029d8af7dbddac09ab0d6f2b7f.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 doc/APIchanges              | 4 ++++
 libavformat/avformat.h      | 4 ++++
 libavformat/options.c       | 2 ++
 libavformat/version_major.h | 1 +
 4 files changed, 11 insertions(+)

diff --git a/doc/APIchanges b/doc/APIchanges
index 7d46ebb006..a72ec3553e 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-03 - xxxxxxxxxx - lavf 60.xx.100 - avformat.h
+  Deprecate av_fmt_ctx_get_duration_estimation_method().
+  The relevant field is public and needs no getter to access.
+
 2024-02-28 - xxxxxxxxxx - swr   4.14.100 - swresample.h
   swr_convert() now accepts arrays of const pointers (to input and output).
 
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index f4506f4cf1..af064b4dbb 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_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
 
-- 
2.40.1

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [FFmpeg-devel] [PATCH] avformat/options: Deprecate av_fmt_ctx_get_duration_estimation_method()
  2024-03-03 22:36 [FFmpeg-devel] [PATCH] avformat/options: Deprecate av_fmt_ctx_get_duration_estimation_method() Andreas Rheinhardt
@ 2024-03-05 11:01 ` Andreas Rheinhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Rheinhardt @ 2024-03-05 11:01 UTC (permalink / raw)
  To: ffmpeg-devel

Andreas Rheinhardt:
> Forgotten in b7785d10b00c88029d8af7dbddac09ab0d6f2b7f.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
>  doc/APIchanges              | 4 ++++
>  libavformat/avformat.h      | 4 ++++
>  libavformat/options.c       | 2 ++
>  libavformat/version_major.h | 1 +
>  4 files changed, 11 insertions(+)
> 
> diff --git a/doc/APIchanges b/doc/APIchanges
> index 7d46ebb006..a72ec3553e 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-03 - xxxxxxxxxx - lavf 60.xx.100 - avformat.h
> +  Deprecate av_fmt_ctx_get_duration_estimation_method().
> +  The relevant field is public and needs no getter to access.
> +
>  2024-02-28 - xxxxxxxxxx - swr   4.14.100 - swresample.h
>    swr_convert() now accepts arrays of const pointers (to input and output).
>  
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index f4506f4cf1..af064b4dbb 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_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
>  

Will apply this patch tomorrow unless there are objections.

- 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".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-05 11:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-03 22:36 [FFmpeg-devel] [PATCH] avformat/options: Deprecate av_fmt_ctx_get_duration_estimation_method() Andreas Rheinhardt
2024-03-05 11:01 ` Andreas Rheinhardt

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git