]> git.sesse.net Git - ffmpeg/commitdiff
avcodec: Remove AVCodec, AVParser and AVBitStreamFilter next API
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Thu, 25 Feb 2021 13:02:44 +0000 (14:02 +0100)
committerJames Almer <jamrial@gmail.com>
Tue, 27 Apr 2021 13:42:58 +0000 (10:42 -0300)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/allcodecs.c
libavcodec/avcodec.h
libavcodec/bitstream_filters.c
libavcodec/codec.h
libavcodec/parsers.c
libavcodec/version.h

index b748c9718e5956158f6d97863d5de60dfa7cd754..5a935c1a0e43e80f2150ca2f7e97d1104db8e3e0 100644 (file)
@@ -870,45 +870,6 @@ const AVCodec *av_codec_iterate(void **opaque)
     return c;
 }
 
-#if FF_API_NEXT
-FF_DISABLE_DEPRECATION_WARNINGS
-static AVOnce av_codec_next_init = AV_ONCE_INIT;
-
-static void av_codec_init_next(void)
-{
-    AVCodec *prev = NULL, *p;
-    void *i = 0;
-    while ((p = (AVCodec*)av_codec_iterate(&i))) {
-        if (prev)
-            prev->next = p;
-        prev = p;
-    }
-}
-
-
-
-av_cold void avcodec_register(AVCodec *codec)
-{
-    ff_thread_once(&av_codec_next_init, av_codec_init_next);
-}
-
-AVCodec *av_codec_next(const AVCodec *c)
-{
-    ff_thread_once(&av_codec_next_init, av_codec_init_next);
-
-    if (c)
-        return c->next;
-    else
-        return (AVCodec*)codec_list[0];
-}
-
-void avcodec_register_all(void)
-{
-    ff_thread_once(&av_codec_next_init, av_codec_init_next);
-}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
 {
     switch(id){
index 8a71c042308e37a89dbf357d8f9b276dd4ebcbf9..483ab9a358b4b9abf680f744851e06dc2a8245cd 100644 (file)
@@ -2728,16 +2728,6 @@ typedef struct AVSubtitle {
     int64_t pts;    ///< Same as packet pts, in AV_TIME_BASE
 } AVSubtitle;
 
-#if FF_API_NEXT
-/**
- * If c is NULL, returns the first registered codec,
- * if c is non-NULL, returns the next registered codec after c,
- * or NULL if c is the last one.
- */
-attribute_deprecated
-AVCodec *av_codec_next(const AVCodec *c);
-#endif
-
 /**
  * Return the LIBAVCODEC_VERSION_INT constant.
  */
@@ -2753,20 +2743,6 @@ const char *avcodec_configuration(void);
  */
 const char *avcodec_license(void);
 
-#if FF_API_NEXT
-/**
- * @deprecated Calling this function is unnecessary.
- */
-attribute_deprecated
-void avcodec_register(AVCodec *codec);
-
-/**
- * @deprecated Calling this function is unnecessary.
- */
-attribute_deprecated
-void avcodec_register_all(void);
-#endif
-
 /**
  * Allocate an AVCodecContext and set its fields to default values. The
  * resulting struct should be freed with avcodec_free_context().
@@ -3553,10 +3529,6 @@ typedef struct AVCodecParser {
                         const uint8_t *buf, int buf_size);
     void (*parser_close)(AVCodecParserContext *s);
     int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
-#if FF_API_NEXT
-    attribute_deprecated
-    struct AVCodecParser *next;
-#endif
 } AVCodecParser;
 
 /**
@@ -3570,13 +3542,6 @@ typedef struct AVCodecParser {
  */
 const AVCodecParser *av_parser_iterate(void **opaque);
 
-#if FF_API_NEXT
-attribute_deprecated
-AVCodecParser *av_parser_next(const AVCodecParser *c);
-
-attribute_deprecated
-void av_register_codec_parser(AVCodecParser *parser);
-#endif
 AVCodecParserContext *av_parser_init(int codec_id);
 
 /**
@@ -4065,11 +4030,6 @@ attribute_deprecated
 const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f);
 #endif
 
-#if FF_API_NEXT
-attribute_deprecated
-const AVBitStreamFilter *av_bsf_next(void **opaque);
-#endif
-
 /* memory */
 
 /**
index 02d33abb18b3df84824e982233ee36b3e1b665c7..3de2af92d3f4a60b05ca40d80fee048950c57ac1 100644 (file)
@@ -75,12 +75,6 @@ const AVBitStreamFilter *av_bsf_iterate(void **opaque)
     return f;
 }
 
-#if FF_API_NEXT
-const AVBitStreamFilter *av_bsf_next(void **opaque) {
-    return av_bsf_iterate(opaque);
-}
-#endif
-
 const AVBitStreamFilter *av_bsf_get_by_name(const char *name)
 {
     const AVBitStreamFilter *f = NULL;
index de050b2815ffb2aa650cc9769d7d4835dc1ee024..c95078491d6e87eda1be9c6ee2b002edcffc604d 100644 (file)
@@ -243,9 +243,6 @@ typedef struct AVCodec {
      *****************************************************************
      */
     int priv_data_size;
-#if FF_API_NEXT
-    struct AVCodec *next;
-#endif
     /**
      * @name Frame-level threading support functions
      * @{
index 3d944f5222ec0789639380384afe07528d6bb45d..40b42e6d1a02569b36be93c8f3bb7381a626b9da 100644 (file)
 
 #include <stdint.h>
 
-#include "libavutil/thread.h"
-
 #include "avcodec.h"
-#include "version.h"
 
 extern AVCodecParser ff_aac_parser;
 extern AVCodecParser ff_aac_latm_parser;
@@ -78,38 +75,6 @@ extern AVCodecParser ff_xma_parser;
 
 #include "libavcodec/parser_list.c"
 
-#if FF_API_NEXT
-FF_DISABLE_DEPRECATION_WARNINGS
-static AVOnce av_parser_next_init = AV_ONCE_INIT;
-
-static void av_parser_init_next(void)
-{
-    AVCodecParser *prev = NULL, *p;
-    int i = 0;
-    while ((p = (AVCodecParser*)parser_list[i++])) {
-        if (prev)
-            prev->next = p;
-        prev = p;
-    }
-}
-
-AVCodecParser *av_parser_next(const AVCodecParser *p)
-{
-    ff_thread_once(&av_parser_next_init, av_parser_init_next);
-
-    if (p)
-        return p->next;
-    else
-        return (AVCodecParser*)parser_list[0];
-}
-
-void av_register_codec_parser(AVCodecParser *parser)
-{
-    ff_thread_once(&av_parser_next_init, av_parser_init_next);
-}
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
 const AVCodecParser *av_parser_iterate(void **opaque)
 {
     uintptr_t i = (uintptr_t)*opaque;
index 78c14f1c0d3c095e320a38cc953835648fa2881f..8d189312ed294d4ad0281d1dfd0f473ca937f699 100644 (file)
 #ifndef FF_API_LOCKMGR
 #define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif
-#ifndef FF_API_NEXT
-#define FF_API_NEXT              (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
 #ifndef FF_API_UNSANITIZED_BITRATES
 #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59)
 #endif