1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avcodec/options: deprecate avcodec_get_frame_class()

AVFrame hasn't been a struct defined in libavcodec for a decade now, when
it was moved to libavutil.

Found-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2021-02-25 17:30:28 -03:00
parent 0c902a6147
commit dd9227e48f
4 changed files with 14 additions and 6 deletions

View File

@@ -15,6 +15,9 @@ libavutil: 2017-10-21
API changes, most recent first: API changes, most recent first:
2021-02-27 - xxxxxxxxxx - lavc 58.126.100 - avcodec.h
Deprecated avcodec_get_frame_class().
2021-02-21 - xxxxxxxxxx - lavu 56.66.100 - tx.h 2021-02-21 - xxxxxxxxxx - lavu 56.66.100 - tx.h
Add enum AVTXFlags and AVTXFlags.AV_TX_INPLACE Add enum AVTXFlags and AVTXFlags.AV_TX_INPLACE

View File

@@ -2770,13 +2770,13 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec);
*/ */
const AVClass *avcodec_get_class(void); const AVClass *avcodec_get_class(void);
#if FF_API_GET_FRAME_CLASS
/** /**
* Get the AVClass for AVFrame. It can be used in combination with * @deprecated This function should not be used.
* AV_OPT_SEARCH_FAKE_OBJ for examining options.
*
* @see av_opt_find().
*/ */
attribute_deprecated
const AVClass *avcodec_get_frame_class(void); const AVClass *avcodec_get_frame_class(void);
#endif
/** /**
* Get the AVClass for AVSubtitleRect. It can be used in combination with * Get the AVClass for AVSubtitleRect. It can be used in combination with

View File

@@ -312,6 +312,7 @@ const AVClass *avcodec_get_class(void)
return &av_codec_context_class; return &av_codec_context_class;
} }
#if FF_API_GET_FRAME_CLASS
#define FOFFSET(x) offsetof(AVFrame,x) #define FOFFSET(x) offsetof(AVFrame,x)
static const AVOption frame_options[]={ static const AVOption frame_options[]={
@@ -338,6 +339,7 @@ const AVClass *avcodec_get_frame_class(void)
{ {
return &av_frame_class; return &av_frame_class;
} }
#endif
#define SROFFSET(x) offsetof(AVSubtitleRect,x) #define SROFFSET(x) offsetof(AVSubtitleRect,x)

View File

@@ -28,8 +28,8 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MAJOR 58
#define LIBAVCODEC_VERSION_MINOR 125 #define LIBAVCODEC_VERSION_MINOR 126
#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \ LIBAVCODEC_VERSION_MINOR, \
@@ -153,5 +153,8 @@
#ifndef FF_API_DEBUG_MV #ifndef FF_API_DEBUG_MV
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60) #define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60)
#endif #endif
#ifndef FF_API_GET_FRAME_CLASS
#define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60)
#endif
#endif /* AVCODEC_VERSION_H */ #endif /* AVCODEC_VERSION_H */