History

*/version.h: define FF_API macros unconditionally

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.

Anton Khirnov committed 5 years ago

Commit db932241 parent 9e8cdb25 files · +0 −48Browse files

Unified · Split

5 files
  1. libavcodec/version.h +0 −24
  2. libavdevice/version.h +0 −2
  3. libavfilter/version.h +0 −6
  4. libavformat/version.h +0 −8
  5. libavutil/version.h +0 −8
libavcodec/version.h+0−24
@@ -51,41 +51,17 @@ · 50 unmodified lines
5151 * at once through the bump. This improves the git bisect-ability of the change.
5252 */
5353
54−#ifndef FF_API_OPENH264_SLICE_MODE
5554 #define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 60)
56−#endif
57−#ifndef FF_API_OPENH264_CABAC
5855 #define FF_API_OPENH264_CABAC (LIBAVCODEC_VERSION_MAJOR < 60)
59−#endif
60−#ifndef FF_API_UNUSED_CODEC_CAPS
6156 #define FF_API_UNUSED_CODEC_CAPS (LIBAVCODEC_VERSION_MAJOR < 60)
62−#endif
63−#ifndef FF_API_THREAD_SAFE_CALLBACKS
6457 #define FF_API_THREAD_SAFE_CALLBACKS (LIBAVCODEC_VERSION_MAJOR < 60)
65−#endif
66−#ifndef FF_API_DEBUG_MV
6758 #define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 60)
68−#endif
69−#ifndef FF_API_GET_FRAME_CLASS
7059 #define FF_API_GET_FRAME_CLASS (LIBAVCODEC_VERSION_MAJOR < 60)
71−#endif
72−#ifndef FF_API_AUTO_THREADS
7360 #define FF_API_AUTO_THREADS (LIBAVCODEC_VERSION_MAJOR < 60)
74−#endif
75−#ifndef FF_API_INIT_PACKET
7661 #define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60)
77−#endif
78−#ifndef FF_API_AVCTX_TIMEBASE
7962 #define FF_API_AVCTX_TIMEBASE (LIBAVCODEC_VERSION_MAJOR < 60)
80−#endif
81−#ifndef FF_API_MPEGVIDEO_OPTS
8263 #define FF_API_MPEGVIDEO_OPTS (LIBAVCODEC_VERSION_MAJOR < 60)
83−#endif
84−#ifndef FF_API_FLAG_TRUNCATED
8564 #define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60)
86−#endif
87−#ifndef FF_API_SUB_TEXT_FORMAT
8865 #define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60)
89−#endif
9066
9167 #endif /* AVCODEC_VERSION_H */
libavdevice/version.h+0−2
@@ -46,8 +46,6 @@ · 45 unmodified lines
4646 * dropped at a future version bump. The defines themselves are not part of
4747 * the public API and may change, break or disappear at any time.
4848 */
49−#ifndef FF_API_DEVICE_CAPABILITIES
5049 #define FF_API_DEVICE_CAPABILITIES (LIBAVDEVICE_VERSION_MAJOR < 60)
51−#endif
5250
5351 #endif /* AVDEVICE_VERSION_H */
libavfilter/version.h+0−6
@@ -50,14 +50,8 @@ · 49 unmodified lines
5050 * the public API and may change, break or disappear at any time.
5151 */
5252
53−#ifndef FF_API_SWS_PARAM_OPTION
5453 #define FF_API_SWS_PARAM_OPTION (LIBAVFILTER_VERSION_MAJOR < 9)
55−#endif
56−#ifndef FF_API_BUFFERSINK_ALLOC
5754 #define FF_API_BUFFERSINK_ALLOC (LIBAVFILTER_VERSION_MAJOR < 9)
58−#endif
59−#ifndef FF_API_PAD_COUNT
6055 #define FF_API_PAD_COUNT (LIBAVFILTER_VERSION_MAJOR < 9)
61−#endif
6256
6357 #endif /* AVFILTER_VERSION_H */
libavformat/version.h+0−8
@@ -55,18 +55,10 @@ · 54 unmodified lines
5555 * at once through the bump. This improves the git bisect-ability of the change.
5656 *
5757 */
58−#ifndef FF_API_LAVF_PRIV_OPT
5958 #define FF_API_LAVF_PRIV_OPT (LIBAVFORMAT_VERSION_MAJOR < 60)
60−#endif
61−#ifndef FF_API_COMPUTE_PKT_FIELDS2
6259 #define FF_API_COMPUTE_PKT_FIELDS2 (LIBAVFORMAT_VERSION_MAJOR < 60)
63−#endif
64−#ifndef FF_API_AVIOCONTEXT_WRITTEN
6560 #define FF_API_AVIOCONTEXT_WRITTEN (LIBAVFORMAT_VERSION_MAJOR < 60)
66−#endif
6761
6862
69−#ifndef FF_API_R_FRAME_RATE
7063 #define FF_API_R_FRAME_RATE 1
71−#endif
7264 #endif /* AVFORMAT_VERSION_H */
libavutil/version.h+0−8
@@ -105,18 +105,10 @@ · 104 unmodified lines
105105 * @{
106106 */
107107
108−#ifndef FF_API_D2STR
109108 #define FF_API_D2STR (LIBAVUTIL_VERSION_MAJOR < 58)
110−#endif
111−#ifndef FF_API_DECLARE_ALIGNED
112109 #define FF_API_DECLARE_ALIGNED (LIBAVUTIL_VERSION_MAJOR < 58)
113−#endif
114−#ifndef FF_API_COLORSPACE_NAME
115110 #define FF_API_COLORSPACE_NAME (LIBAVUTIL_VERSION_MAJOR < 58)
116−#endif
117−#ifndef FF_API_AV_MALLOCZ_ARRAY
118111 #define FF_API_AV_MALLOCZ_ARRAY (LIBAVUTIL_VERSION_MAJOR < 58)
119−#endif
120112
121113 /**
122114 * @}

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