diff mbox series

[FFmpeg-devel,35/87] avformat: Remove deprecated old open callbacks

Message ID 20210419141024.8174-36-jamrial@gmail.com
State Accepted
Commit 119ebd642a6ceeeb506f46aa229870aefa97794b
Headers show
Series Major bump
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

James Almer April 19, 2021, 2:09 p.m. UTC
From: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
---
 libavformat/avformat.h | 26 --------------------------
 libavformat/options.c  |  7 -------
 libavformat/utils.c    |  5 -----
 libavformat/version.h  |  3 ---
 4 files changed, 41 deletions(-)
diff mbox series

Patch

diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 578ccbd87d..14063ac5e5 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -1743,28 +1743,6 @@  typedef struct AVFormatContext {
      */
     enum AVCodecID data_codec_id;
 
-#if FF_API_OLD_OPEN_CALLBACKS
-    /**
-     * Called to open further IO contexts when needed for demuxing.
-     *
-     * This can be set by the user application to perform security checks on
-     * the URLs before opening them.
-     * The function should behave like avio_open2(), AVFormatContext is provided
-     * as contextual information and to reach AVFormatContext.opaque.
-     *
-     * If NULL then some simple checks are used together with avio_open2().
-     *
-     * Must not be accessed directly from outside avformat.
-     * @See av_format_set_open_cb()
-     *
-     * Demuxing: Set by user.
-     *
-     * @deprecated Use io_open and io_close.
-     */
-    attribute_deprecated
-    int (*open_cb)(struct AVFormatContext *s, AVIOContext **p, const char *url, int flags, const AVIOInterruptCB *int_cb, AVDictionary **options);
-#endif
-
     /**
      * ',' separated list of allowed protocols.
      * - encoding: unused
@@ -1864,10 +1842,6 @@  attribute_deprecated
 av_format_control_message av_format_get_control_message_cb(const AVFormatContext *s);
 attribute_deprecated
 void      av_format_set_control_message_cb(AVFormatContext *s, av_format_control_message callback);
-#if FF_API_OLD_OPEN_CALLBACKS
-attribute_deprecated AVOpenCallback av_format_get_open_cb(const AVFormatContext *s);
-attribute_deprecated void av_format_set_open_cb(AVFormatContext *s, AVOpenCallback callback);
-#endif
 #endif
 
 /**
diff --git a/libavformat/options.c b/libavformat/options.c
index 07403b533e..632d450c90 100644
--- a/libavformat/options.c
+++ b/libavformat/options.c
@@ -181,13 +181,6 @@  static int io_open_default(AVFormatContext *s, AVIOContext **pb,
 
     av_log(s, loglevel, "Opening \'%s\' for %s\n", url, flags & AVIO_FLAG_WRITE ? "writing" : "reading");
 
-#if FF_API_OLD_OPEN_CALLBACKS
-FF_DISABLE_DEPRECATION_WARNINGS
-    if (s->open_cb)
-        return s->open_cb(s, pb, url, flags, &s->interrupt_callback, options);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     return ffio_open_whitelist(pb, url, flags, &s->interrupt_callback, options, s->protocol_whitelist, s->protocol_blacklist);
 }
 
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 7d944268d3..bb0351d7f5 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -122,11 +122,6 @@  MAKE_ACCESSORS(AVFormatContext, format, AVCodec *, data_codec)
 MAKE_ACCESSORS(AVFormatContext, format, int, metadata_header_padding)
 MAKE_ACCESSORS(AVFormatContext, format, void *, opaque)
 MAKE_ACCESSORS(AVFormatContext, format, av_format_control_message, control_message_cb)
-#if FF_API_OLD_OPEN_CALLBACKS
-FF_DISABLE_DEPRECATION_WARNINGS
-MAKE_ACCESSORS(AVFormatContext, format, AVOpenCallback, open_cb)
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 #endif
 
 int64_t av_stream_get_end_pts(const AVStream *st)
diff --git a/libavformat/version.h b/libavformat/version.h
index de18399298..e264abd77b 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -55,9 +55,6 @@ 
  * at once through the bump. This improves the git bisect-ability of the change.
  *
  */
-#ifndef FF_API_OLD_OPEN_CALLBACKS
-#define FF_API_OLD_OPEN_CALLBACKS       (LIBAVFORMAT_VERSION_MAJOR < 59)
-#endif
 #ifndef FF_API_LAVF_AVCTX
 #define FF_API_LAVF_AVCTX               (LIBAVFORMAT_VERSION_MAJOR < 59)
 #endif