You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec: deprecate getters and setters for AVCodecContext and AVCodec fields
The fields can be accessed directly, so these are not needed anymore. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -3235,22 +3235,41 @@ typedef struct AVCodecContext {
|
|||||||
int apply_cropping;
|
int apply_cropping;
|
||||||
} AVCodecContext;
|
} AVCodecContext;
|
||||||
|
|
||||||
|
#if FF_API_CODEC_GET_SET
|
||||||
|
/**
|
||||||
|
* Accessors for some AVCodecContext fields. These used to be provided for ABI
|
||||||
|
* compatibility, and do not need to be used anymore.
|
||||||
|
*/
|
||||||
|
attribute_deprecated
|
||||||
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
|
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
|
||||||
|
attribute_deprecated
|
||||||
void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val);
|
void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val);
|
||||||
|
|
||||||
|
attribute_deprecated
|
||||||
const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
|
const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
|
||||||
|
attribute_deprecated
|
||||||
void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);
|
void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);
|
||||||
|
|
||||||
|
attribute_deprecated
|
||||||
unsigned av_codec_get_codec_properties(const AVCodecContext *avctx);
|
unsigned av_codec_get_codec_properties(const AVCodecContext *avctx);
|
||||||
|
|
||||||
|
#if FF_API_LOWRES
|
||||||
|
attribute_deprecated
|
||||||
int av_codec_get_lowres(const AVCodecContext *avctx);
|
int av_codec_get_lowres(const AVCodecContext *avctx);
|
||||||
|
attribute_deprecated
|
||||||
void av_codec_set_lowres(AVCodecContext *avctx, int val);
|
void av_codec_set_lowres(AVCodecContext *avctx, int val);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
attribute_deprecated
|
||||||
int av_codec_get_seek_preroll(const AVCodecContext *avctx);
|
int av_codec_get_seek_preroll(const AVCodecContext *avctx);
|
||||||
|
attribute_deprecated
|
||||||
void av_codec_set_seek_preroll(AVCodecContext *avctx, int val);
|
void av_codec_set_seek_preroll(AVCodecContext *avctx, int val);
|
||||||
|
|
||||||
|
attribute_deprecated
|
||||||
uint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx);
|
uint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx);
|
||||||
|
attribute_deprecated
|
||||||
void av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val);
|
void av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AVProfile.
|
* AVProfile.
|
||||||
@@ -3387,7 +3406,10 @@ typedef struct AVCodec {
|
|||||||
const char *bsfs;
|
const char *bsfs;
|
||||||
} AVCodec;
|
} AVCodec;
|
||||||
|
|
||||||
|
#if FF_API_CODEC_GET_SET
|
||||||
|
attribute_deprecated
|
||||||
int av_codec_get_max_lowres(const AVCodec *codec);
|
int av_codec_get_max_lowres(const AVCodec *codec);
|
||||||
|
#endif
|
||||||
|
|
||||||
struct MpegEncContext;
|
struct MpegEncContext;
|
||||||
|
|
||||||
|
@@ -552,6 +552,7 @@ enum AVPixelFormat avpriv_find_pix_fmt(const PixelFormatTag *tags,
|
|||||||
return AV_PIX_FMT_NONE;
|
return AV_PIX_FMT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if FF_API_CODEC_GET_SET
|
||||||
MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
|
MAKE_ACCESSORS(AVCodecContext, codec, AVRational, pkt_timebase)
|
||||||
MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
|
MAKE_ACCESSORS(AVCodecContext, codec, const AVCodecDescriptor *, codec_descriptor)
|
||||||
MAKE_ACCESSORS(AVCodecContext, codec, int, lowres)
|
MAKE_ACCESSORS(AVCodecContext, codec, int, lowres)
|
||||||
@@ -567,6 +568,7 @@ int av_codec_get_max_lowres(const AVCodec *codec)
|
|||||||
{
|
{
|
||||||
return codec->max_lowres;
|
return codec->max_lowres;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec){
|
int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec){
|
||||||
return !!(codec->caps_internal & FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM);
|
return !!(codec->caps_internal & FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM);
|
||||||
|
@@ -120,6 +120,9 @@
|
|||||||
#ifndef FF_API_GETCHROMA
|
#ifndef FF_API_GETCHROMA
|
||||||
#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59)
|
#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef FF_API_CODEC_GET_SET
|
||||||
|
#define FF_API_CODEC_GET_SET (LIBAVCODEC_VERSION_MAJOR < 59)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* AVCODEC_VERSION_H */
|
#endif /* AVCODEC_VERSION_H */
|
||||||
|
Reference in New Issue
Block a user