There is no reason to wrap them in #ifndef guards, they should only be defined here and nowhere else. The define guards just add the possibility to accidentally use the same FF_API name in different libraries.
Unified · Split
| @@ -51,41 +51,17 @@ · 50 unmodified lines | |||
| 51 | * at once through the bump. This improves the git bisect-ability of the change. | 51 | * at once through the bump. This improves the git bisect-ability of the change. |
| 52 | */ | 52 | */ |
| 53 | 53 | ||
| 54 | #ifndef FF_API_OPENH264_SLICE_MODE | ||
| 55 | #define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60) | 54 | #define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60) |
| 56 | #endif | ||
| 57 | #ifndef FF_API_OPENH264_CABAC | ||
| 58 | #define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60) | 55 | #define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60) |
| 59 | #endif | ||
| 60 | #ifndef FF_API_UNUSED_CODEC_CAPS | ||
| 61 | #define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60) | 56 | #define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60) |
| 62 | #endif | ||
| 63 | #ifndef FF_API_THREAD_SAFE_CALLBACKS | ||
| 64 | #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) | 57 | #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60) |
| 65 | #endif | ||
| 66 | #ifndef FF_API_DEBUG_MV | ||
| 67 | #define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60) | 58 | #define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60) |
| 68 | #endif | ||
| 69 | #ifndef FF_API_GET_FRAME_CLASS | ||
| 70 | #define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60) | 59 | #define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60) |
| 71 | #endif | ||
| 72 | #ifndef FF_API_AUTO_THREADS | ||
| 73 | #define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60) | 60 | #define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60) |
| 74 | #endif | ||
| 75 | #ifndef FF_API_INIT_PACKET | ||
| 76 | #define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60) | 61 | #define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60) |
| 77 | #endif | ||
| 78 | #ifndef FF_API_AVCTX_TIMEBASE | ||
| 79 | #define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60) | 62 | #define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60) |
| 80 | #endif | ||
| 81 | #ifndef FF_API_MPEGVIDEO_OPTS | ||
| 82 | #define FF_API_MPEGVIDEO_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) | 63 | #define FF_API_MPEGVIDEO_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) |
| 83 | #endif | ||
| 84 | #ifndef FF_API_FLAG_TRUNCATED | ||
| 85 | #define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60) | 64 | #define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60) |
| 86 | #endif | ||
| 87 | #ifndef FF_API_SUB_TEXT_FORMAT | ||
| 88 | #define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60) | 65 | #define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60) |
| 89 | #endif | ||
| 90 | 66 | ||
| 91 | #endif /* AVCODEC_VERSION_H */ | 67 | #endif /* AVCODEC_VERSION_H */ |
| @@ -46,8 +46,6 @@ · 45 unmodified lines | |||
| 46 | * dropped at a future version bump. The defines themselves are not part of | 46 | * dropped at a future version bump. The defines themselves are not part of |
| 47 | * the public API and may change, break or disappear at any time. | 47 | * the public API and may change, break or disappear at any time. |
| 48 | */ | 48 | */ |
| 49 | #ifndef FF_API_DEVICE_CAPABILITIES | ||
| 50 | #define FF_API_DEVICE_CAPABILITIES (LIBAVDEVICE_VERSION_MAJOR < 60) | 49 | #define FF_API_DEVICE_CAPABILITIES (LIBAVDEVICE_VERSION_MAJOR < 60) |
| 51 | #endif | ||
| 52 | 50 | ||
| 53 | #endif /* AVDEVICE_VERSION_H */ | 51 | #endif /* AVDEVICE_VERSION_H */ |
| @@ -50,14 +50,8 @@ · 49 unmodified lines | |||
| 50 | * the public API and may change, break or disappear at any time. | 50 | * the public API and may change, break or disappear at any time. |
| 51 | */ | 51 | */ |
| 52 | 52 | ||
| 53 | #ifndef FF_API_SWS_PARAM_OPTION | ||
| 54 | #define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 9) | 53 | #define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 9) |
| 55 | #endif | ||
| 56 | #ifndef FF_API_BUFFERSINK_ALLOC | ||
| 57 | #define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9) | 54 | #define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9) |
| 58 | #endif | ||
| 59 | #ifndef FF_API_PAD_COUNT | ||
| 60 | #define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9) | 55 | #define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9) |
| 61 | #endif | ||
| 62 | 56 | ||
| 63 | #endif /* AVFILTER_VERSION_H */ | 57 | #endif /* AVFILTER_VERSION_H */ |
| @@ -55,18 +55,10 @@ · 54 unmodified lines | |||
| 55 | * at once through the bump. This improves the git bisect-ability of the change. | 55 | * at once through the bump. This improves the git bisect-ability of the change. |
| 56 | * | 56 | * |
| 57 | */ | 57 | */ |
| 58 | #ifndef FF_API_LAVF_PRIV_OPT | ||
| 59 | #define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) | 58 | #define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60) |
| 60 | #endif | ||
| 61 | #ifndef FF_API_COMPUTE_PKT_FIELDS2 | ||
| 62 | #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) | 59 | #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60) |
| 63 | #endif | ||
| 64 | #ifndef FF_API_AVIOCONTEXT_WRITTEN | ||
| 65 | #define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) | 60 | #define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60) |
| 66 | #endif | ||
| 67 | 61 | ||
| 68 | 62 | ||
| 69 | #ifndef FF_API_R_FRAME_RATE | ||
| 70 | #define FF_API_R_FRAME_RATE 1 | 63 | #define FF_API_R_FRAME_RATE 1 |
| 71 | #endif | ||
| 72 | #endif /* AVFORMAT_VERSION_H */ | 64 | #endif /* AVFORMAT_VERSION_H */ |
| @@ -105,18 +105,10 @@ · 104 unmodified lines | |||
| 105 | * @{ | 105 | * @{ |
| 106 | */ | 106 | */ |
| 107 | 107 | ||
| 108 | #ifndef FF_API_D2STR | ||
| 109 | #define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58) | 108 | #define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58) |
| 110 | #endif | ||
| 111 | #ifndef FF_API_DECLARE_ALIGNED | ||
| 112 | #define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58) | 109 | #define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58) |
| 113 | #endif | ||
| 114 | #ifndef FF_API_COLORSPACE_NAME | ||
| 115 | #define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58) | 110 | #define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58) |
| 116 | #endif | ||
| 117 | #ifndef FF_API_AV_MALLOCZ_ARRAY | ||
| 118 | #define FF_API_AV_MALLOCZ_ARRAY (LIBAVUTIL_VERSION_MAJOR < 58) | 111 | #define FF_API_AV_MALLOCZ_ARRAY (LIBAVUTIL_VERSION_MAJOR < 58) |
| 119 | #endif | ||
| 120 | 112 | ||
| 121 | /** | 113 | /** |
| 122 | * @} | 114 | * @} |