@@ -84,36 +84,26 @@ impl AVFeature {
84
84
}
85
85
86
86
static AVUTIL_FEATURES : & [ AVFeature ] = & [
87
- AVFeature :: new ( "OLD_AVOPTIONS" ) ,
88
- AVFeature :: new ( "PIX_FMT" ) ,
89
- AVFeature :: new ( "CONTEXT_SIZE" ) ,
90
- AVFeature :: new ( "PIX_FMT_DESC" ) ,
91
- AVFeature :: new ( "AV_REVERSE" ) ,
92
- AVFeature :: new ( "AUDIOCONVERT" ) ,
93
- AVFeature :: new ( "CPU_FLAG_MMX2" ) ,
94
- AVFeature :: new ( "LLS_PRIVATE" ) ,
95
- AVFeature :: new ( "AVFRAME_LAVC" ) ,
96
- AVFeature :: new ( "VDPAU" ) ,
97
- AVFeature :: new ( "GET_CHANNEL_LAYOUT_COMPAT" ) ,
98
- AVFeature :: new ( "XVMC" ) ,
99
- AVFeature :: new ( "OPT_TYPE_METADATA" ) ,
100
- AVFeature :: new ( "DLOG" ) ,
101
- AVFeature :: new ( "HMAC" ) ,
87
+ // before 5.0 (< v57)
102
88
AVFeature :: new ( "VAAPI" ) ,
103
89
AVFeature :: new ( "PKT_PTS" ) ,
104
90
AVFeature :: new ( "ERROR_FRAME" ) ,
105
91
AVFeature :: new ( "FRAME_QP" ) ,
92
+ // before 6.0 (< v58)
106
93
AVFeature :: new ( "D2STR" ) ,
107
94
AVFeature :: new ( "DECLARE_ALIGNED" ) ,
108
95
AVFeature :: new ( "COLORSPACE_NAME" ) ,
109
96
AVFeature :: new ( "AV_MALLOCZ_ARRAY" ) ,
97
+ // before 7.0 (< v59)
98
+ AVFeature :: new ( "XVMC" ) ,
110
99
AVFeature :: new ( "FIFO_PEEK2" ) ,
111
100
AVFeature :: new ( "FIFO_OLD_API" ) ,
112
101
AVFeature :: new ( "OLD_CHANNEL_LAYOUT" ) ,
113
102
AVFeature :: new ( "AV_FOPEN_UTF8" ) ,
114
103
AVFeature :: new ( "PKT_DURATION" ) ,
115
104
AVFeature :: new ( "REORDERED_OPAQUE" ) ,
116
105
AVFeature :: new ( "FRAME_PICTURE_NUMBER" ) ,
106
+ // before 8.0 (< v60)
117
107
AVFeature :: new ( "HDR_VIVID_THREE_SPLINE" ) ,
118
108
AVFeature :: new ( "FRAME_PKT" ) ,
119
109
AVFeature :: new ( "INTERLACED_FRAME" ) ,
@@ -127,58 +117,9 @@ static AVUTIL_FEATURES: &[AVFeature] = &[
127
117
] ;
128
118
129
119
static AVCODEC_FEATURES : & [ AVFeature ] = & [
130
- AVFeature :: new ( "VIMA_DECODER" ) ,
131
- AVFeature :: new ( "REQUEST_CHANNELS" ) ,
132
- AVFeature :: new ( "OLD_DECODE_AUDIO" ) ,
133
- AVFeature :: new ( "OLD_ENCODE_AUDIO" ) ,
134
- AVFeature :: new ( "OLD_ENCODE_VIDEO" ) ,
135
- AVFeature :: new ( "CODEC_ID" ) ,
136
- AVFeature :: new ( "AUDIO_CONVERT" ) ,
137
- AVFeature :: new ( "AVCODEC_RESAMPLE" ) ,
138
- AVFeature :: new ( "DEINTERLACE" ) ,
139
- AVFeature :: new ( "DESTRUCT_PACKET" ) ,
140
- AVFeature :: new ( "GET_BUFFER" ) ,
141
- AVFeature :: new ( "MISSING_SAMPLE" ) ,
120
+ // before 5.0 (< v59)
142
121
AVFeature :: new ( "LOWRES" ) ,
143
- AVFeature :: new ( "CAP_VDPAU" ) ,
144
- AVFeature :: new ( "BUFS_VDPAU" ) ,
145
- AVFeature :: new ( "VOXWARE" ) ,
146
- AVFeature :: new ( "SET_DIMENSIONS" ) ,
147
- AVFeature :: new ( "DEBUG_MV" ) ,
148
- AVFeature :: new ( "AC_VLC" ) ,
149
- AVFeature :: new ( "OLD_MSMPEG4" ) ,
150
- AVFeature :: new ( "ASPECT_EXTENDED" ) ,
151
- AVFeature :: new ( "THREAD_OPAQUE" ) ,
152
- AVFeature :: new ( "CODEC_PKT" ) ,
153
- AVFeature :: new ( "ARCH_ALPHA" ) ,
154
- AVFeature :: new ( "ERROR_RATE" ) ,
155
- AVFeature :: new ( "QSCALE_TYPE" ) ,
156
- AVFeature :: new ( "MB_TYPE" ) ,
157
- AVFeature :: new ( "MAX_BFRAMES" ) ,
158
- AVFeature :: new ( "NEG_LINESIZES" ) ,
159
- AVFeature :: new ( "EMU_EDGE" ) ,
160
- AVFeature :: new ( "ARCH_SH4" ) ,
161
- AVFeature :: new ( "ARCH_SPARC" ) ,
162
- AVFeature :: new ( "UNUSED_MEMBERS" ) ,
163
- AVFeature :: new ( "IDCT_XVIDMMX" ) ,
164
- AVFeature :: new ( "INPUT_PRESERVED" ) ,
165
- AVFeature :: new ( "NORMALIZE_AQP" ) ,
166
- AVFeature :: new ( "GMC" ) ,
167
- AVFeature :: new ( "MV0" ) ,
168
- AVFeature :: new ( "CODEC_NAME" ) ,
169
- AVFeature :: new ( "AFD" ) ,
170
- AVFeature :: new ( "VISMV" ) ,
171
- AVFeature :: new ( "DV_FRAME_PROFILE" ) ,
172
- AVFeature :: new ( "AUDIOENC_DELAY" ) ,
173
- AVFeature :: new ( "VAAPI_CONTEXT" ) ,
174
- AVFeature :: new ( "AVCTX_TIMEBASE" ) ,
175
- AVFeature :: new ( "MPV_OPT" ) ,
176
- AVFeature :: new ( "STREAM_CODEC_TAG" ) ,
177
- AVFeature :: new ( "QUANT_BIAS" ) ,
178
- AVFeature :: new ( "RC_STRATEGY" ) ,
179
122
AVFeature :: new ( "CODED_FRAME" ) ,
180
- AVFeature :: new ( "MOTION_EST" ) ,
181
- AVFeature :: new ( "WITHOUT_PREFIX" ) ,
182
123
AVFeature :: new ( "CONVERGENCE_DURATION" ) ,
183
124
AVFeature :: new ( "PRIVATE_OPT" ) ,
184
125
AVFeature :: new ( "CODER_TYPE" ) ,
@@ -187,15 +128,18 @@ static AVCODEC_FEATURES: &[AVFeature] = &[
187
128
AVFeature :: new ( "VBV_DELAY" ) ,
188
129
AVFeature :: new ( "SIDEDATA_ONLY_PKT" ) ,
189
130
AVFeature :: new ( "AVPICTURE" ) ,
131
+ // before 6.0 (< v60)
190
132
AVFeature :: new ( "OPENH264_SLICE_MODE" ) ,
191
133
AVFeature :: new ( "OPENH264_CABAC" ) ,
192
134
AVFeature :: new ( "UNUSED_CODEC_CAPS" ) ,
193
135
AVFeature :: new ( "THREAD_SAFE_CALLBACKS" ) ,
136
+ AVFeature :: new ( "DEBUG_MV" ) ,
194
137
AVFeature :: new ( "GET_FRAME_CLASS" ) ,
195
138
AVFeature :: new ( "AUTO_THREADS" ) ,
196
- AVFeature :: new ( "INIT_PACKET " ) ,
139
+ AVFeature :: new ( "AVCTX_TIMEBASE " ) ,
197
140
AVFeature :: new ( "FLAG_TRUNCATED" ) ,
198
141
AVFeature :: new ( "SUB_TEXT_FORMAT" ) ,
142
+ // before 7.0 (< v61)
199
143
AVFeature :: new ( "IDCT_NONE" ) ,
200
144
AVFeature :: new ( "SVTAV1_OPTS" ) ,
201
145
AVFeature :: new ( "AYUV_CODECID" ) ,
@@ -204,6 +148,7 @@ static AVCODEC_FEATURES: &[AVFeature] = &[
204
148
AVFeature :: new ( "VT_HWACCEL_CONTEXT" ) ,
205
149
AVFeature :: new ( "AVCTX_FRAME_NUMBER" ) ,
206
150
AVFeature :: new ( "SLICE_OFFSET" ) ,
151
+ // before 8.0 (< v62)
207
152
AVFeature :: new ( "SUBFRAMES" ) ,
208
153
AVFeature :: new ( "TICKS_PER_FRAME" ) ,
209
154
AVFeature :: new ( "DROPCHANGED" ) ,
@@ -213,58 +158,67 @@ static AVCODEC_FEATURES: &[AVFeature] = &[
213
158
AVFeature :: new ( "BUFFER_MIN_SIZE" ) ,
214
159
AVFeature :: new ( "VDPAU_ALLOC_GET_SET" ) ,
215
160
AVFeature :: new ( "QUALITY_FACTOR" ) ,
161
+ AVFeature :: new ( "INIT_PACKET" ) ,
162
+ AVFeature :: new ( "TICKS_PER_FRAME" ) ,
163
+ AVFeature :: new ( "DROPCHANGED" ) ,
164
+ AVFeature :: new ( "AVFFT" ) ,
165
+ AVFeature :: new ( "FF_PROFILE_LEVEL" ) ,
166
+ AVFeature :: new ( "AVCODEC_CLOSE" ) ,
167
+ AVFeature :: new ( "BUFFER_MIN_SIZE" ) ,
168
+ AVFeature :: new ( "VDPAU_ALLOC_GET_SET" ) ,
169
+ AVFeature :: new ( "QUALITY_FACTOR" ) ,
216
170
] ;
217
171
218
172
static AVFORMAT_FEATURES : & [ AVFeature ] = & [
219
- AVFeature :: new ( "LAVF_BITEXACT" ) ,
220
- AVFeature :: new ( "LAVF_FRAC" ) ,
221
- AVFeature :: new ( "URL_FEOF" ) ,
222
- AVFeature :: new ( "PROBESIZE_32" ) ,
173
+ // before 5.0 (< v59)
223
174
AVFeature :: new ( "LAVF_AVCTX" ) ,
224
175
AVFeature :: new ( "OLD_OPEN_CALLBACKS" ) ,
176
+ // before 6.0 (< v60)
225
177
AVFeature :: new ( "LAVF_PRIV_OPT" ) ,
226
- AVFeature :: new ( "COMPUTE_PKT_FIELDS2" ) ,
227
178
AVFeature :: new ( "AVIOCONTEXT_WRITTEN" ) ,
228
- AVFeature :: new ( "AVSTREAM_CLASS" ) ,
229
- AVFeature :: new ( "R_FRAME_RATE" ) ,
179
+ // before 7.0 (< v61)
230
180
AVFeature :: new ( "GET_END_PTS" ) ,
231
181
AVFeature :: new ( "AVIODIRCONTEXT" ) ,
232
182
AVFeature :: new ( "AVFORMAT_IO_CLOSE" ) ,
233
183
AVFeature :: new ( "AVIO_WRITE_NONCONST" ) ,
184
+ // before 8.0 (< v62)
185
+ AVFeature :: new ( "COMPUTE_PKT_FIELDS2" ) ,
234
186
AVFeature :: new ( "LAVF_SHORTEST" ) ,
235
187
AVFeature :: new ( "ALLOW_FLUSH" ) ,
236
188
AVFeature :: new ( "AVSTREAM_SIDE_DATA" ) ,
237
189
AVFeature :: new ( "GET_DUR_ESTIMATE_METHOD" ) ,
238
190
AVFeature :: new ( "INTERNAL_TIMING" ) ,
191
+ // after 5.0 (> v59)
192
+ AVFeature :: new ( "AVSTREAM_CLASS" ) ,
193
+ // for all eternity
194
+ AVFeature :: new ( "R_FRAME_RATE" ) ,
239
195
] ;
240
196
241
197
static AVDEVICE_FEATURES : & [ AVFeature ] = & [
198
+ // before 6.0 (< v60)
242
199
AVFeature :: new ( "DEVICE_CAPABILITIES" ) ,
200
+ // before 8.0 (< v62)
243
201
AVFeature :: new ( "BKTR_DEVICE" ) ,
244
202
AVFeature :: new ( "OPENGL_DEVICE" ) ,
245
203
AVFeature :: new ( "SDL2_DEVICE" ) ,
246
204
] ;
247
205
248
206
static AVFILTER_FEATURES : & [ AVFeature ] = & [
249
- AVFeature :: new ( "AVFILTERPAD_PUBLIC" ) ,
250
- AVFeature :: new ( "FOO_COUNT" ) ,
251
- AVFeature :: new ( "OLD_FILTER_OPTS" ) ,
207
+ // before 5.0 (< v8)
252
208
AVFeature :: new ( "OLD_FILTER_OPTS_ERROR" ) ,
253
- AVFeature :: new ( "AVFILTER_OPEN" ) ,
254
- AVFeature :: new ( "OLD_FILTER_REGISTER" ) ,
255
- AVFeature :: new ( "OLD_GRAPH_PARSE" ) ,
256
- AVFeature :: new ( "NOCONST_GET_NAME" ) ,
209
+ // before 6.0 (< v9)
257
210
AVFeature :: new ( "SWS_PARAM_OPTION" ) ,
258
211
AVFeature :: new ( "BUFFERSINK_ALLOC" ) ,
259
212
AVFeature :: new ( "PAD_COUNT" ) ,
213
+ // before 7.0 (< v10)
260
214
AVFeature :: new ( "LIBPLACEBO_OPTS" ) ,
215
+ // before 8.0 (< v11)
261
216
AVFeature :: new ( "LINK_PUBLIC" ) ,
262
217
] ;
263
218
264
- static AVRESAMPLE_FEATURES : & [ AVFeature ] = & [ AVFeature :: new ( "RESAMPLE_CLOSE_OPEN" ) ] ;
219
+ static AVRESAMPLE_FEATURES : & [ AVFeature ] = & [ ] ;
265
220
266
- static SWSCALE_FEATURES : & [ AVFeature ] =
267
- & [ AVFeature :: new ( "SWS_CPU_CAPS" ) , AVFeature :: new ( "ARCH_BFIN" ) ] ;
221
+ static SWSCALE_FEATURES : & [ AVFeature ] = & [ ] ;
268
222
269
223
static SWRESAMPLE_FEATURES : & [ AVFeature ] = & [ ] ;
270
224
@@ -863,7 +817,10 @@ fn check_features(include_paths: &[PathBuf]) {
863
817
. expect ( "Unable to find the version for lib{lib}" ) ;
864
818
865
819
// This allows removing a lot of #[cfg] attributes.
866
- assert ! ( lavc_version >= ( 58 , 54 ) , "FFmpeg 4.2 or higher is required, but found avcodec version {lavc_version:?}" ) ;
820
+ assert ! (
821
+ lavc_version >= ( 58 , 54 ) ,
822
+ "FFmpeg 4.2 or higher is required, but found avcodec version {lavc_version:?}"
823
+ ) ;
867
824
868
825
for & ( ffmpeg_version_flag, lavc_version_major, lavc_version_minor) in & ffmpeg_lavc_versions {
869
826
// Every possible feature needs an unconditional check-cfg to prevent warnings
0 commit comments