[FFmpeg-cvslog] lavc: deprecate rate_emu

Anton Khirnov git at videolan.org
Sun Apr 3 02:35:24 CEST 2011


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Apr  2 12:51:28 2011 +0200| [ed5fcd60b2d1d4993e2094c9836dedb8ef9b2ed3] | committer: Anton Khirnov

lavc: deprecate rate_emu

It's not used anywhere and apparrently hasn't been for a very long time.

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

 libavcodec/avcodec.h |    4 +++-
 libavcodec/options.c |    2 ++
 libavcodec/version.h |    3 +++
 3 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 2122545..83e0e56 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1208,13 +1208,15 @@ typedef struct AVCodecContext {
      */
     enum PixelFormat pix_fmt;
 
+#if FF_API_RATE_EMU
     /**
      * Frame rate emulation. If not zero, the lower layer (i.e. format handler)
      * has to read frames at native frame rate.
      * - encoding: Set by user.
      * - decoding: unused
      */
-    int rate_emu;
+    attribute_deprecated int rate_emu;
+#endif
 
     /**
      * If non NULL, 'draw_horiz_band' is called by the libavcodec
diff --git a/libavcodec/options.c b/libavcodec/options.c
index f7fa454..fb7d371 100644
--- a/libavcodec/options.c
+++ b/libavcodec/options.c
@@ -105,7 +105,9 @@ static const AVOption options[]={
 {"extradata_size", NULL, OFFSET(extradata_size), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
 {"time_base", NULL, OFFSET(time_base), FF_OPT_TYPE_RATIONAL, DEFAULT, INT_MIN, INT_MAX},
 {"g", "set the group of picture size", OFFSET(gop_size), FF_OPT_TYPE_INT, 12, INT_MIN, INT_MAX, V|E},
+#if FF_API_RATE_EMU
 {"rate_emu", "frame rate emulation", OFFSET(rate_emu), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
+#endif
 {"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
 {"ac", "set number of audio channels", OFFSET(channels), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX},
 {"cutoff", "set cutoff bandwidth", OFFSET(cutoff), FF_OPT_TYPE_INT, DEFAULT, INT_MIN, INT_MAX, A|E},
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 3d13f79..9d211b9 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -74,5 +74,8 @@
 #ifndef FF_API_HURRY_UP
 #define FF_API_HURRY_UP         (LIBAVCODEC_VERSION_MAJOR < 53)
 #endif
+#ifndef FF_API_RATE_EMU
+#define FF_API_RATE_EMU         (LIBAVCODEC_VERSION_MAJOR < 53)
+#endif
 
 #endif /* AVCODEC_VERSION_H */



More information about the ffmpeg-cvslog mailing list