[FFmpeg-devel] [PATCH 05/16] lavf: remove FF_API_REGISTER_PROTOCOL cruft

Anton Khirnov anton
Thu Feb 3 16:36:32 CET 2011


---
 libavformat/avio.c    |   23 -----------------------
 libavformat/avio.h    |   16 ----------------
 libavformat/version.h |    3 ---
 3 files changed, 0 insertions(+), 42 deletions(-)

diff --git a/libavformat/avio.c b/libavformat/avio.c
index 9a4d735..7750513 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -71,29 +71,6 @@ int av_register_protocol2(URLProtocol *protocol, int size)
     return 0;
 }
 
-#if FF_API_REGISTER_PROTOCOL
-/* The layout of URLProtocol as of when major was bumped to 52 */
-struct URLProtocol_compat {
-    const char *name;
-    int (*url_open)(URLContext *h, const char *filename, int flags);
-    int (*url_read)(URLContext *h, unsigned char *buf, int size);
-    int (*url_write)(URLContext *h, unsigned char *buf, int size);
-    int64_t (*url_seek)(URLContext *h, int64_t pos, int whence);
-    int (*url_close)(URLContext *h);
-    struct URLProtocol *next;
-};
-
-int av_register_protocol(URLProtocol *protocol)
-{
-    return av_register_protocol2(protocol, sizeof(struct URLProtocol_compat));
-}
-
-int register_protocol(URLProtocol *protocol)
-{
-    return av_register_protocol2(protocol, sizeof(struct URLProtocol_compat));
-}
-#endif
-
 static int url_alloc_for_protocol (URLContext **puc, struct URLProtocol *up,
                                    const char *filename, int flags)
 {
diff --git a/libavformat/avio.h b/libavformat/avio.h
index 0e4fd2b..ccfc96c 100644
--- a/libavformat/avio.h
+++ b/libavformat/avio.h
@@ -275,10 +275,6 @@ typedef struct URLProtocol {
     const AVClass *priv_data_class;
 } URLProtocol;
 
-#if FF_API_REGISTER_PROTOCOL
-extern URLProtocol *first_protocol;
-#endif
-
 extern URLInterruptCB *url_interrupt_cb;
 
 /**
@@ -288,18 +284,6 @@ extern URLInterruptCB *url_interrupt_cb;
  */
 URLProtocol *av_protocol_next(URLProtocol *p);
 
-#if FF_API_REGISTER_PROTOCOL
-/**
- * @deprecated Use av_register_protocol() instead.
- */
-attribute_deprecated int register_protocol(URLProtocol *protocol);
-
-/**
- * @deprecated Use av_register_protocol2() instead.
- */
-attribute_deprecated int av_register_protocol(URLProtocol *protocol);
-#endif
-
 /**
  * Register the URLProtocol protocol.
  *
diff --git a/libavformat/version.h b/libavformat/version.h
index a12edce..db8ed2e 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -44,9 +44,6 @@
 #ifndef FF_API_URL_CLASS
 #define FF_API_URL_CLASS               (LIBAVFORMAT_VERSION_MAJOR >= 53)
 #endif
-#ifndef FF_API_REGISTER_PROTOCOL
-#define FF_API_REGISTER_PROTOCOL       (LIBAVFORMAT_VERSION_MAJOR < 53)
-#endif
 #ifndef FF_API_GUESS_FORMAT
 #define FF_API_GUESS_FORMAT            (LIBAVFORMAT_VERSION_MAJOR < 53)
 #endif
-- 
1.7.2.3




More information about the ffmpeg-devel mailing list