[FFmpeg-cvslog] avcodec: remove FF_API_GET_FRAME_CLASS

James Almer git at videolan.org
Thu Feb 9 16:37:35 EET 2023


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Jan  9 11:08:14 2023 -0300| [63258b6f7cc5275a35fa7896321327959309c3da] | committer: Anton Khirnov

avcodec: remove FF_API_GET_FRAME_CLASS

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/avcodec.h       |  8 --------
 libavcodec/options.c       | 33 ---------------------------------
 libavcodec/version_major.h |  1 -
 3 files changed, 42 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index f1475fa32e..cc7a8faa6a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2384,14 +2384,6 @@ void avcodec_free_context(AVCodecContext **avctx);
  */
 const AVClass *avcodec_get_class(void);
 
-#if FF_API_GET_FRAME_CLASS
-/**
- * @deprecated This function should not be used.
- */
-attribute_deprecated
-const AVClass *avcodec_get_frame_class(void);
-#endif
-
 /**
  * Get the AVClass for AVSubtitleRect. It can be used in combination with
  * AV_OPT_SEARCH_FAKE_OBJ for examining options.
diff --git a/libavcodec/options.c b/libavcodec/options.c
index 9090c94e9c..a9b35ee1c3 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -189,39 +189,6 @@ const AVClass *avcodec_get_class(void)
     return &av_codec_context_class;
 }
 
-#if FF_API_GET_FRAME_CLASS
-FF_DISABLE_DEPRECATION_WARNINGS
-#define FOFFSET(x) offsetof(AVFrame,x)
-
-static const AVOption frame_options[]={
-{"best_effort_timestamp", "", FOFFSET(best_effort_timestamp), AV_OPT_TYPE_INT64, {.i64 = AV_NOPTS_VALUE }, INT64_MIN, INT64_MAX, 0},
-{"pkt_pos", "", FOFFSET(pkt_pos), AV_OPT_TYPE_INT64, {.i64 = -1 }, INT64_MIN, INT64_MAX, 0},
-{"pkt_size", "", FOFFSET(pkt_size), AV_OPT_TYPE_INT64, {.i64 = -1 }, INT64_MIN, INT64_MAX, 0},
-{"sample_aspect_ratio", "", FOFFSET(sample_aspect_ratio), AV_OPT_TYPE_RATIONAL, {.dbl = 0 }, 0, INT_MAX, 0},
-{"width", "", FOFFSET(width), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
-{"height", "", FOFFSET(height), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
-{"format", "", FOFFSET(format), AV_OPT_TYPE_INT, {.i64 = -1 }, 0, INT_MAX, 0},
-#if FF_API_OLD_CHANNEL_LAYOUT
-{"channel_layout", "", FOFFSET(channel_layout), AV_OPT_TYPE_INT64, {.i64 = 0 }, 0, INT64_MAX, 0},
-#endif
-{"sample_rate", "", FOFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, INT_MAX, 0},
-{NULL},
-};
-
-static const AVClass av_frame_class = {
-    .class_name              = "AVFrame",
-    .item_name               = NULL,
-    .option                  = frame_options,
-    .version                 = LIBAVUTIL_VERSION_INT,
-};
-
-const AVClass *avcodec_get_frame_class(void)
-{
-    return &av_frame_class;
-}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 #define SROFFSET(x) offsetof(AVSubtitleRect,x)
 
 static const AVOption subtitle_rect_options[]={
diff --git a/libavcodec/version_major.h b/libavcodec/version_major.h
index f0e347c482..d65fe867df 100644
--- a/libavcodec/version_major.h
+++ b/libavcodec/version_major.h
@@ -37,7 +37,6 @@
  * at once through the bump. This improves the git bisect-ability of the change.
  */
 
-#define FF_API_GET_FRAME_CLASS     (LIBAVCODEC_VERSION_MAJOR < 60)
 #define FF_API_AUTO_THREADS        (LIBAVCODEC_VERSION_MAJOR < 60)
 #define FF_API_INIT_PACKET         (LIBAVCODEC_VERSION_MAJOR < 60)
 #define FF_API_AVCTX_TIMEBASE    (LIBAVCODEC_VERSION_MAJOR < 60)



More information about the ffmpeg-cvslog mailing list