[FFmpeg-devel] [PATCH 34/87] avformat: Remove FFserver leftovers

James Almer jamrial at gmail.com
Mon Apr 19 17:09:31 EEST 2021


From: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavformat/avformat.h | 18 ------------------
 libavformat/utils.c    | 22 ----------------------
 libavformat/version.h  |  3 ---
 3 files changed, 43 deletions(-)

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 166f1aa41c..578ccbd87d 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1000,18 +1000,6 @@ typedef struct AVStream {
      */
     AVRational r_frame_rate;
 
-#if FF_API_LAVF_FFSERVER
-    /**
-     * String containing pairs of key and values describing recommended encoder configuration.
-     * Pairs are separated by ','.
-     * Keys are separated from values by '='.
-     *
-     * @deprecated unused
-     */
-    attribute_deprecated
-    char *recommended_encoder_configuration;
-#endif
-
     /**
      * Codec parameters associated with this stream. Allocated and freed by
      * libavformat in avformat_new_stream() and avformat_free_context()
@@ -1107,12 +1095,6 @@ attribute_deprecated
 AVRational av_stream_get_r_frame_rate(const AVStream *s);
 attribute_deprecated
 void       av_stream_set_r_frame_rate(AVStream *s, AVRational r);
-#if FF_API_LAVF_FFSERVER
-attribute_deprecated
-char* av_stream_get_recommended_encoder_configuration(const AVStream *s);
-attribute_deprecated
-void  av_stream_set_recommended_encoder_configuration(AVStream *s, char *configuration);
-#endif
 #endif
 
 struct AVCodecParserContext *av_stream_get_parser(const AVStream *s);
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ec48d1c08e..7d944268d3 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -115,11 +115,6 @@ static int64_t wrap_timestamp(const AVStream *st, int64_t timestamp)
 
 #if FF_API_FORMAT_GET_SET
 MAKE_ACCESSORS(AVStream, stream, AVRational, r_frame_rate)
-#if FF_API_LAVF_FFSERVER
-FF_DISABLE_DEPRECATION_WARNINGS
-MAKE_ACCESSORS(AVStream, stream, char *, recommended_encoder_configuration)
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, video_codec)
 MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, audio_codec)
 MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, subtitle_codec)
@@ -4392,18 +4387,6 @@ int ff_stream_encode_params_copy(AVStream *dst, const AVStream *src)
         }
     }
 
-#if FF_API_LAVF_FFSERVER
-FF_DISABLE_DEPRECATION_WARNINGS
-    av_freep(&dst->recommended_encoder_configuration);
-    if (src->recommended_encoder_configuration) {
-        const char *conf_str = src->recommended_encoder_configuration;
-        dst->recommended_encoder_configuration = av_strdup(conf_str);
-        if (!dst->recommended_encoder_configuration)
-            return AVERROR(ENOMEM);
-    }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     return 0;
 }
 
@@ -4448,11 +4431,6 @@ FF_DISABLE_DEPRECATION_WARNINGS
 FF_ENABLE_DEPRECATION_WARNINGS
 #endif
     av_freep(&st->priv_data);
-#if FF_API_LAVF_FFSERVER
-FF_DISABLE_DEPRECATION_WARNINGS
-    av_freep(&st->recommended_encoder_configuration);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 
     av_freep(pst);
 }
diff --git a/libavformat/version.h b/libavformat/version.h
index 81326aa199..de18399298 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -82,9 +82,6 @@
 #ifndef FF_API_OLD_AVIO_EOF_0
 #define FF_API_OLD_AVIO_EOF_0           (LIBAVFORMAT_VERSION_MAJOR < 59)
 #endif
-#ifndef FF_API_LAVF_FFSERVER
-#define FF_API_LAVF_FFSERVER            (LIBAVFORMAT_VERSION_MAJOR < 59)
-#endif
 #ifndef FF_API_FORMAT_FILENAME
 #define FF_API_FORMAT_FILENAME          (LIBAVFORMAT_VERSION_MAJOR < 59)
 #endif
-- 
2.31.1



More information about the ffmpeg-devel mailing list