History

avcodec: Remove AVCodec, AVParser and AVBitStreamFilter next API

Andreas Rheinhardt committed 5 years ago

Commit 4b2be3f1 parent b06082d6 files · +0 −126Browse files

Unified · Split

6 files
  1. libavcodec/allcodecs.c +0 −39
  2. libavcodec/avcodec.h +0 −40
  3. libavcodec/bitstream_filters.c +0 −6
  4. libavcodec/codec.h +0 −3
  5. libavcodec/parsers.c +0 −35
  6. libavcodec/version.h +0 −3
libavcodec/allcodecs.c+0−39
@@ -870,45 +870,6 @@ const AVCodec *av_codec_iterate(void **opaque) · 869 unmodified lines
870870 return c;
871871 }
872872
873−#if FF_API_NEXT
874−FF_DISABLE_DEPRECATION_WARNINGS
875−static AVOnce av_codec_next_init = AV_ONCE_INIT;
876−
877−static void av_codec_init_next(void)
878−{
879− AVCodec *prev = NULL, *p;
880− void *i = 0;
881− while ((p = (AVCodec*)av_codec_iterate(&i))) {
882− if (prev)
883− prev->next = p;
884− prev = p;
885− }
886−}
887−
888−
889−
890−av_cold void avcodec_register(AVCodec *codec)
891−{
892− ff_thread_once(&av_codec_next_init, av_codec_init_next);
893−}
894−
895−AVCodec *av_codec_next(const AVCodec *c)
896−{
897− ff_thread_once(&av_codec_next_init, av_codec_init_next);
898−
899− if (c)
900− return c->next;
901− else
902− return (AVCodec*)codec_list[0];
903−}
904−
905−void avcodec_register_all(void)
906−{
907− ff_thread_once(&av_codec_next_init, av_codec_init_next);
908−}
909−FF_ENABLE_DEPRECATION_WARNINGS
910−#endif
911−
912873 static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
913874 {
914875 switch(id){
libavcodec/avcodec.h+0−40
@@ -2728,16 +2728,6 @@ typedef struct AVSubtitle { · 2727 unmodified lines
27282728 int64_t pts; ///< Same as packet pts, in AV_TIME_BASE
27292729 } AVSubtitle;
27302730
2731−#if FF_API_NEXT
2732−/**
2733− * If c is NULL, returns the first registered codec,
2734− * if c is non-NULL, returns the next registered codec after c,
2735− * or NULL if c is the last one.
2736− */
2737−attribute_deprecated
2738−AVCodec *av_codec_next(const AVCodec *c);
2739−#endif
2740−
27412731 /**
27422732 * Return the LIBAVCODEC_VERSION_INT constant.
27432733 */
@@ -2753,20 +2743,6 @@ const char *avcodec_configuration(void); · 9 unmodified lines
27532743 */
27542744 const char *avcodec_license(void);
27552745
2756−#if FF_API_NEXT
2757−/**
2758− * @deprecated Calling this function is unnecessary.
2759− */
2760−attribute_deprecated
2761−void avcodec_register(AVCodec *codec);
2762−
2763−/**
2764− * @deprecated Calling this function is unnecessary.
2765− */
2766−attribute_deprecated
2767−void avcodec_register_all(void);
2768−#endif
2769−
27702746 /**
27712747 * Allocate an AVCodecContext and set its fields to default values. The
27722748 * resulting struct should be freed with avcodec_free_context().
@@ -3553,10 +3529,6 @@ typedef struct AVCodecParser { · 780 unmodified lines
35533529 const uint8_t *buf, int buf_size);
35543530 void (*parser_close)(AVCodecParserContext *s);
35553531 int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
3556−#if FF_API_NEXT
3557− attribute_deprecated
3558− struct AVCodecParser *next;
3559−#endif
35603532 } AVCodecParser;
35613533
35623534 /**
@@ -3570,13 +3542,6 @@ typedef struct AVCodecParser { · 7 unmodified lines
35703542 */
35713543 const AVCodecParser *av_parser_iterate(void **opaque);
35723544
3573−#if FF_API_NEXT
3574−attribute_deprecated
3575−AVCodecParser *av_parser_next(const AVCodecParser *c);
3576−
3577−attribute_deprecated
3578−void av_register_codec_parser(AVCodecParser *parser);
3579−#endif
35803545 AVCodecParserContext *av_parser_init(int codec_id);
35813546
35823547 /**
@@ -4065,11 +4030,6 @@ attribute_deprecated · 482 unmodified lines
40654030 const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f);
40664031 #endif
40674032
4068−#if FF_API_NEXT
4069−attribute_deprecated
4070−const AVBitStreamFilter *av_bsf_next(void **opaque);
4071−#endif
4072−
40734033 /* memory */
40744034
40754035 /**
libavcodec/bitstream_filters.c+0−6
@@ -75,12 +75,6 @@ const AVBitStreamFilter *av_bsf_iterate(void **opaque) · 74 unmodified lines
7575 return f;
7676 }
7777
78−#if FF_API_NEXT
79−const AVBitStreamFilter *av_bsf_next(void **opaque) {
80− return av_bsf_iterate(opaque);
81−}
82−#endif
83−
8478 const AVBitStreamFilter *av_bsf_get_by_name(const char *name)
8579 {
8680 const AVBitStreamFilter *f = NULL;
libavcodec/codec.h+0−3
@@ -243,9 +243,6 @@ typedef struct AVCodec { · 242 unmodified lines
243243 *****************************************************************
244244 */
245245 int priv_data_size;
246−#if FF_API_NEXT
247− struct AVCodec *next;
248−#endif
249246 /**
250247 * @name Frame-level threading support functions
251248 * @{
libavcodec/parsers.c+0−35
@@ -18,10 +18,7 @@ · 17 unmodified lines
1818
1919 #include <stdint.h>
2020
21−#include "libavutil/thread.h"
22−
2321 #include "avcodec.h"
24−#include "version.h"
2522
2623 extern AVCodecParser ff_aac_parser;
2724 extern AVCodecParser ff_aac_latm_parser;
@@ -78,38 +75,6 @@ extern AVCodecParser ff_xma_parser; · 50 unmodified lines
7875
7976 #include "libavcodec/parser_list.c"
8077
81−#if FF_API_NEXT
82−FF_DISABLE_DEPRECATION_WARNINGS
83−static AVOnce av_parser_next_init = AV_ONCE_INIT;
84−
85−static void av_parser_init_next(void)
86−{
87− AVCodecParser *prev = NULL, *p;
88− int i = 0;
89− while ((p = (AVCodecParser*)parser_list[i++])) {
90− if (prev)
91− prev->next = p;
92− prev = p;
93− }
94−}
95−
96−AVCodecParser *av_parser_next(const AVCodecParser *p)
97−{
98− ff_thread_once(&av_parser_next_init, av_parser_init_next);
99−
100− if (p)
101− return p->next;
102− else
103− return (AVCodecParser*)parser_list[0];
104−}
105−
106−void av_register_codec_parser(AVCodecParser *parser)
107−{
108− ff_thread_once(&av_parser_next_init, av_parser_init_next);
109−}
110−FF_ENABLE_DEPRECATION_WARNINGS
111−#endif
112−
11378 const AVCodecParser *av_parser_iterate(void **opaque)
11479 {
11580 uintptr_t i = (uintptr_t)*opaque;
libavcodec/version.h+0−3
@@ -120,9 +120,6 @@ · 119 unmodified lines
120120 #ifndef FF_API_LOCKMGR
121121 #define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59)
122122 #endif
123−#ifndef FF_API_NEXT
124−#define FF_API_NEXT (LIBAVCODEC_VERSION_MAJOR < 59)
125−#endif
126123 #ifndef FF_API_UNSANITIZED_BITRATES
127124 #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59)
128125 #endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t