Unified · Split
| @@ -870,45 +870,6 @@ const AVCodec *av_codec_iterate(void **opaque) · 869 unmodified lines | ||
| 870 | 870 | return c; |
| 871 | 871 | } |
| 872 | 872 | |
| 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 | − | |
| 912 | 873 | static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id) |
| 913 | 874 | { |
| 914 | 875 | switch(id){ |
| @@ -2728,16 +2728,6 @@ typedef struct AVSubtitle { · 2727 unmodified lines | ||
| 2728 | 2728 | int64_t pts; ///< Same as packet pts, in AV_TIME_BASE |
| 2729 | 2729 | } AVSubtitle; |
| 2730 | 2730 | |
| 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 | − | |
| 2741 | 2731 | /** |
| 2742 | 2732 | * Return the LIBAVCODEC_VERSION_INT constant. |
| 2743 | 2733 | */ |
| @@ -2753,20 +2743,6 @@ const char *avcodec_configuration(void); · 9 unmodified lines | ||
| 2753 | 2743 | */ |
| 2754 | 2744 | const char *avcodec_license(void); |
| 2755 | 2745 | |
| 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 | − | |
| 2770 | 2746 | /** |
| 2771 | 2747 | * Allocate an AVCodecContext and set its fields to default values. The |
| 2772 | 2748 | * resulting struct should be freed with avcodec_free_context(). |
| @@ -3553,10 +3529,6 @@ typedef struct AVCodecParser { · 780 unmodified lines | ||
| 3553 | 3529 | const uint8_t *buf, int buf_size); |
| 3554 | 3530 | void (*parser_close)(AVCodecParserContext *s); |
| 3555 | 3531 | 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 | |
| 3560 | 3532 | } AVCodecParser; |
| 3561 | 3533 | |
| 3562 | 3534 | /** |
| @@ -3570,13 +3542,6 @@ typedef struct AVCodecParser { · 7 unmodified lines | ||
| 3570 | 3542 | */ |
| 3571 | 3543 | const AVCodecParser *av_parser_iterate(void **opaque); |
| 3572 | 3544 | |
| 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 | |
| 3580 | 3545 | AVCodecParserContext *av_parser_init(int codec_id); |
| 3581 | 3546 | |
| 3582 | 3547 | /** |
| @@ -4065,11 +4030,6 @@ attribute_deprecated · 482 unmodified lines | ||
| 4065 | 4030 | const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f); |
| 4066 | 4031 | #endif |
| 4067 | 4032 | |
| 4068 | −#if FF_API_NEXT | |
| 4069 | −attribute_deprecated | |
| 4070 | −const AVBitStreamFilter *av_bsf_next(void **opaque); | |
| 4071 | −#endif | |
| 4072 | − | |
| 4073 | 4033 | /* memory */ |
| 4074 | 4034 | |
| 4075 | 4035 | /** |
| @@ -75,12 +75,6 @@ const AVBitStreamFilter *av_bsf_iterate(void **opaque) · 74 unmodified lines | ||
| 75 | 75 | return f; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | −#if FF_API_NEXT | |
| 79 | −const AVBitStreamFilter *av_bsf_next(void **opaque) { | |
| 80 | − return av_bsf_iterate(opaque); | |
| 81 | −} | |
| 82 | −#endif | |
| 83 | − | |
| 84 | 78 | const AVBitStreamFilter *av_bsf_get_by_name(const char *name) |
| 85 | 79 | { |
| 86 | 80 | const AVBitStreamFilter *f = NULL; |
| @@ -243,9 +243,6 @@ typedef struct AVCodec { · 242 unmodified lines | ||
| 243 | 243 | ***************************************************************** |
| 244 | 244 | */ |
| 245 | 245 | int priv_data_size; |
| 246 | −#if FF_API_NEXT | |
| 247 | − struct AVCodec *next; | |
| 248 | −#endif | |
| 249 | 246 | /** |
| 250 | 247 | * @name Frame-level threading support functions |
| 251 | 248 | * @{ |
| @@ -18,10 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | |
| 19 | 19 | #include <stdint.h> |
| 20 | 20 | |
| 21 | −#include "libavutil/thread.h" | |
| 22 | − | |
| 23 | 21 | #include "avcodec.h" |
| 24 | −#include "version.h" | |
| 25 | 22 | |
| 26 | 23 | extern AVCodecParser ff_aac_parser; |
| 27 | 24 | extern AVCodecParser ff_aac_latm_parser; |
| @@ -78,38 +75,6 @@ extern AVCodecParser ff_xma_parser; · 50 unmodified lines | ||
| 78 | 75 | |
| 79 | 76 | #include "libavcodec/parser_list.c" |
| 80 | 77 | |
| 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 | − | |
| 113 | 78 | const AVCodecParser *av_parser_iterate(void **opaque) |
| 114 | 79 | { |
| 115 | 80 | uintptr_t i = (uintptr_t)*opaque; |
| @@ -120,9 +120,6 @@ · 119 unmodified lines | ||
| 120 | 120 | #ifndef FF_API_LOCKMGR |
| 121 | 121 | #define FF_API_LOCKMGR (LIBAVCODEC_VERSION_MAJOR < 59) |
| 122 | 122 | #endif |
| 123 | −#ifndef FF_API_NEXT | |
| 124 | −#define FF_API_NEXT (LIBAVCODEC_VERSION_MAJOR < 59) | |
| 125 | −#endif | |
| 126 | 123 | #ifndef FF_API_UNSANITIZED_BITRATES |
| 127 | 124 | #define FF_API_UNSANITIZED_BITRATES (LIBAVCODEC_VERSION_MAJOR < 59) |
| 128 | 125 | #endif |