Просмотр исходного кода

FFMPEG: Add more custom options, add audio-only decoder option, update pkg release, copyright, add myself as pkg maintainer

Signed-off-by: Ted Hess <thess@kitschensync.net>
thess 10 лет назад
Родитель
Сommit
f61fe11ce0
2 измененных файлов: 199 добавлений и 3 удалений
  1. 57
    0
      multimedia/ffmpeg/Config.in
  2. 142
    3
      multimedia/ffmpeg/Makefile

+ 57
- 0
multimedia/ffmpeg/Config.in Просмотреть файл

@@ -105,17 +105,35 @@ config FFMPEG_CUSTOM_DECODER_aac
105 105
 	depends on FFMPEG_CUSTOM_PATENTED
106 106
 	select FFMPEG_CUSTOM_PARSER_aac
107 107
 
108
+config FFMPEG_CUSTOM_SELECT_adpcm
109
+	bool "ADPCM (multiple types)"
110
+
108 111
 config FFMPEG_CUSTOM_DECODER_ac3
109 112
 	bool "AC3"
110 113
 	depends on FFMPEG_CUSTOM_PATENTED
111 114
 	select FFMPEG_CUSTOM_PARSER_ac3
112 115
 
116
+config FFMPEG_CUSTOM_DECODER_alac
117
+	bool "ALAC"
118
+
119
+config FFMPEG_CUSTOM_DECODER_amrnb
120
+	bool "AMR-NB"
121
+	select FFMPEG_CUSTOM_DEMUXER_amr
122
+
123
+config FFMPEG_CUSTOM_DECODER_amrwb
124
+	bool "AMR-WB"
125
+	select FFMPEG_CUSTOM_DEMUXER_amr
126
+
127
+config FFMPEG_CUSTOM_DECODER_ape
128
+	bool "APE"
129
+
113 130
 config FFMPEG_CUSTOM_DECODER_atrac3
114 131
 	bool "ATRAC3"
115 132
 	depends on FFMPEG_CUSTOM_PATENTED
116 133
 
117 134
 config FFMPEG_CUSTOM_DECODER_flac
118 135
 	bool "FLAC"
136
+	select FFMPEG_CUSTOM_PARSER_flac
119 137
 
120 138
 config FFMPEG_CUSTOM_DECODER_gif
121 139
 	bool "GIF"
@@ -149,6 +167,14 @@ config FFMPEG_CUSTOM_DECODER_mpeg4
149 167
 	bool "MPEG-4"
150 168
 	depends on FFMPEG_CUSTOM_PATENTED
151 169
 
170
+config FFMPEG_CUSTOM_DECODER_mpc7
171
+	bool "Musepack 7"
172
+	select FFMPEG_CUSTOM_DEMUXER_mpc
173
+
174
+config FFMPEG_CUSTOM_DECODER_mpc8
175
+	bool "Musepack 8"
176
+	select FFMPEG_CUSTOM_DEMUXER_mpc8
177
+
152 178
 config FFMPEG_CUSTOM_DECODER_pcm_s16be
153 179
 	bool "PCM signed 16-bit big-endian"
154 180
 
@@ -159,9 +185,15 @@ config FFMPEG_CUSTOM_DECODER_png
159 185
 	bool "PNG"
160 186
 	select FFMPEG_CUSTOM_DECODER_zlib
161 187
 
188
+config FFMPEG_CUSTOM_SELECT_speex
189
+	bool "Speex"
190
+
162 191
 config FFMPEG_CUSTOM_DECODER_vorbis
163 192
 	bool "Vorbis"
164 193
 
194
+config FFMPEG_CUSTOM_DECODER_wavpack
195
+	bool "Wavpack"
196
+
165 197
 config FFMPEG_CUSTOM_DECODER_wmav1
166 198
 	bool "WMAv1"
167 199
 	depends on FFMPEG_CUSTOM_PATENTED
@@ -218,6 +250,12 @@ config FFMPEG_CUSTOM_DEMUXER_avi
218 250
 config FFMPEG_CUSTOM_DEMUXER_ac3
219 251
 	bool "AC3"
220 252
 
253
+config FFMPEG_CUSTOM_DEMUXER_amr
254
+	bool "AMR"
255
+
256
+config FFMPEG_CUSTOM_DEMUXER_ape
257
+	bool "APE"
258
+
221 259
 config FFMPEG_CUSTOM_DEMUXER_flac
222 260
 	bool "FLAC"
223 261
 
@@ -249,6 +287,12 @@ config FFMPEG_CUSTOM_DEMUXER_mpegps
249 287
 config FFMPEG_CUSTOM_DEMUXER_mpegts
250 288
 	bool "MPEG-2 (TS)"
251 289
 
290
+config FFMPEG_CUSTOM_DEMUXER_mpc
291
+	bool "Musepack"
292
+
293
+config FFMPEG_CUSTOM_DEMUXER_mpc8
294
+	bool "Musepack 8"
295
+
252 296
 config FFMPEG_CUSTOM_DEMUXER_ogg
253 297
 	bool "Ogg"
254 298
 
@@ -261,11 +305,21 @@ config FFMPEG_CUSTOM_DEMUXER_rtsp
261 305
 	bool "RTSP"
262 306
 	select FFMPEG_CUSTOM_DEMUXER_rm
263 307
 	select FFMPEG_CUSTOM_DEMUXER_sdp
308
+	select FFMPEG_CUSTOM_DEMUXER_rtp
264 309
 
265 310
 config FFMPEG_CUSTOM_DEMUXER_sdp
266 311
 	bool "SDP"
267 312
 	select FFMPEG_CUSTOM_DEMUXER_mpegts
268 313
 
314
+config FFMPEG_CUSTOM_DEMUXER_rtp
315
+	bool "RTP"
316
+
317
+config FFMPEG_CUSTOM_DEMUXER_wav
318
+	bool "WAV"
319
+
320
+config FFMPEG_CUSTOM_DEMUXER_wv
321
+	bool "WV"
322
+
269 323
 comment "Parsers ---"
270 324
 
271 325
 config FFMPEG_CUSTOM_PARSER_aac
@@ -275,6 +329,9 @@ config FFMPEG_CUSTOM_PARSER_aac
275 329
 config FFMPEG_CUSTOM_PARSER_ac3
276 330
 	bool "AC3"
277 331
 
332
+config FFMPEG_CUSTOM_PARSER_flac
333
+	bool "FLAC"
334
+
278 335
 config FFMPEG_CUSTOM_PARSER_h264
279 336
 	bool "H.264"
280 337
 	depends on FFMPEG_CUSTOM_PATENTED

+ 142
- 3
multimedia/ffmpeg/Makefile Просмотреть файл

@@ -1,5 +1,5 @@
1 1
 #
2
-# Copyright (C) 2006-2013 OpenWrt.org
2
+# Copyright (C) 2006-2014 OpenWrt.org
3 3
 #
4 4
 # This is free software, licensed under the GNU General Public License v2.
5 5
 # See /LICENSE for more information.
@@ -9,11 +9,12 @@ include $(TOPDIR)/rules.mk
9 9
 
10 10
 PKG_NAME:=ffmpeg
11 11
 PKG_VERSION:=0.11.5
12
-PKG_RELEASE:=1
12
+PKG_RELEASE:=4
13 13
 
14 14
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 15
 PKG_SOURCE_URL:=http://ffmpeg.org/releases/
16 16
 PKG_MD5SUM:=ea25fc252c132141f12988ed5506bfe8
17
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
17 18
 
18 19
 PKG_LICENSE:=LGPLv2.1+ GPLv2+ LGPLv3
19 20
 PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
@@ -33,6 +34,10 @@ FFMPEG_CUSTOM_ENCODERS:= \
33 34
 FFMPEG_CUSTOM_DECODERS:= \
34 35
 	aac \
35 36
 	ac3 \
37
+	alac \
38
+	amrnb \
39
+	amrwb \
40
+	ape \
36 41
 	atrac3 \
37 42
 	flac \
38 43
 	gif \
@@ -44,10 +49,13 @@ FFMPEG_CUSTOM_DECODERS:= \
44 49
 	mpeg2video \
45 50
 	mpeg4 \
46 51
 	mpegvideo \
52
+	mpc7 \
53
+	mpc8 \
47 54
 	pcm_s16be \
48 55
 	pcm_s16le \
49 56
 	png \
50 57
 	vorbis \
58
+	wavpack \
51 59
 	wmav1 \
52 60
 	wmav2 \
53 61
 	zlib \
@@ -67,6 +75,8 @@ FFMPEG_CUSTOM_MUXERS:= \
67 75
 FFMPEG_CUSTOM_DEMUXERS:= \
68 76
 	aac \
69 77
 	ac3 \
78
+	amr \
79
+	ape \
70 80
 	avi \
71 81
 	flac \
72 82
 	ffm \
@@ -77,14 +87,20 @@ FFMPEG_CUSTOM_DEMUXERS:= \
77 87
 	mpegps \
78 88
 	mpegts \
79 89
 	mpegvideo \
90
+	mpc \
91
+	mpc8 \
80 92
 	ogg \
81 93
 	rm \
82 94
 	rtsp \
95
+	rtp \
83 96
 	sdp \
84 97
 	v4l2 \
98
+	wav \
99
+	wv \
85 100
 
86 101
 FFMPEG_CUSTOM_PARSERS:= \
87 102
 	aac \
103
+	flac \
88 104
 	ac3 \
89 105
 	h264 \
90 106
 	mpegaudio \
@@ -129,6 +145,7 @@ FFMPEG_MINI_DEMUXERS := \
129 145
 	mp3 \
130 146
 	mpegts \
131 147
 	mpegvideo \
148
+	sdp \
132 149
 	rtsp \
133 150
 
134 151
 FFMPEG_MINI_PARSERS:= \
@@ -142,6 +159,64 @@ FFMPEG_MINI_PARSERS:= \
142 159
 FFMPEG_MINI_PROTOCOLS := \
143 160
 	file http rtp tcp udp \
144 161
 
162
+FFMPEG_AUDIO_DECODERS:= \
163
+	aac \
164
+	aac_latm \
165
+	ac3 \
166
+	adpcm_* \
167
+	alac \
168
+	amrnb \
169
+	amrwb \
170
+	ape \
171
+	atrac3 \
172
+	flac \
173
+	mp2 \
174
+	mp3* \
175
+	mpc7 \
176
+	mpc8 \
177
+	pcm_* \
178
+	vorbis \
179
+	wavpack \
180
+	wmav1 \
181
+	wmav2 \
182
+	wmalossless \
183
+	wmapro \
184
+	zlib \
185
+
186
+FFMPEG_AUDIO_DEMUXERS:= \
187
+	aac \
188
+	ac3 \
189
+	aiff \
190
+	amr \
191
+	ape \
192
+	avi \
193
+	flac \
194
+	ffm \
195
+	matroska \
196
+	mp3 \
197
+	mov \
198
+	mpc \
199
+	mpc8 \
200
+	mpegts \
201
+	ogg \
202
+	rm \
203
+	rtsp \
204
+	rtp \
205
+	sdp \
206
+	wav \
207
+	wv \
208
+
209
+FFMPEG_AUDIO_PARSERS:= \
210
+	aac \
211
+	aac_latm \
212
+	flac \
213
+	ac3 \
214
+	mpegaudio \
215
+
216
+FFMPEG_AUDIO_PROTOCOLS:= \
217
+	file http rtp tcp udp
218
+
219
+
145 220
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
146 221
 
147 222
 PKG_CONFIG_DEPENDS:= \
@@ -226,7 +301,7 @@ endef
226 301
 define Package/libffmpeg-custom
227 302
 $(call Package/libffmpeg/Default)
228 303
  TITLE+= (mini)
229
- DEPENDS+= @DEVEL
304
+ DEPENDS+= @DEVEL +libspeex
230 305
  VARIANT:=custom
231 306
  MENU:=1
232 307
 endef
@@ -242,6 +317,20 @@ $(call Package/ffmpeg/Default/description)
242 317
 endef
243 318
 
244 319
 
320
+define Package/libffmpeg-audio-dec
321
+$(call Package/libffmpeg/Default)
322
+ TITLE+= (audio)
323
+ DEPENDS+= @DEVEL +libspeex
324
+ VARIANT:=audio-dec
325
+endef
326
+
327
+define Package/libffmpeg-audio-dec/description
328
+$(call Package/ffmpeg/Default/description)
329
+ .
330
+ This package contains FFmpeg shared libraries for audio decoding
331
+endef
332
+
333
+
245 334
 define Package/libffmpeg-full
246 335
 $(call Package/libffmpeg/Default)
247 336
  TITLE+= (full)
@@ -292,6 +381,7 @@ FFMPEG_CONFIGURE:= \
292 381
 	--disable-doc \
293 382
 	--disable-dxva2 \
294 383
 	--enable-pthreads \
384
+	--disable-optimizations \
295 385
 	--enable-small \
296 386
 	--disable-stripping \
297 387
 	--enable-zlib \
@@ -321,6 +411,46 @@ ifeq ($(BUILD_VARIANT),custom)
321 411
 	$(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_CUSTOM_PARSER) \
322 412
 	$(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_CUSTOM_PROTOCOL) \
323 413
 
414
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_adpcm),y)
415
+  FFMPEG_CONFIGURE+= \
416
+	--enable-decoder=adpcm_ima_wav \
417
+	--enable-decoder=adpcm_ima_qt \
418
+	--enable-decoder=adpcm_ms \
419
+
420
+endif
421
+
422
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_speex),y)
423
+  FFMPEG_CONFIGURE+= \
424
+	--enable-libspeex --enable-decoder=libspeex \
425
+
426
+endif
427
+
428
+endif
429
+
430
+ifeq ($(BUILD_VARIANT),audio-dec)
431
+
432
+  FFMPEG_ENABLE= \
433
+	$(foreach c, $(2), \
434
+		--enable-$(1)="$(c)" \
435
+	)
436
+
437
+  FFMPEG_CONFIGURE+= \
438
+	--disable-ffmpeg \
439
+	--disable-ffplay \
440
+	--disable-ffprobe \
441
+	--disable-ffserver \
442
+	--disable-avfilter \
443
+	--disable-postproc \
444
+	--disable-swresample \
445
+	--disable-swscale \
446
+	--disable-everything \
447
+	$(call FFMPEG_ENABLE,decoder,$(FFMPEG_AUDIO_DECODERS)) \
448
+	$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
449
+	$(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \
450
+	$(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
451
+	--enable-libspeex --enable-decoder=libspeex \
452
+	--disable-decoder=pcm_bluray,pcm_dvd \
453
+
324 454
 endif
325 455
 
326 456
 ifeq ($(BUILD_VARIANT),mini)
@@ -382,6 +512,7 @@ define Build/InstallDev/full
382 512
 endef
383 513
 
384 514
 Build/InstallDev/mini = $(Build/InstallDev/custom)
515
+Build/InstallDev/audio-dec = $(Build/InstallDev/custom)
385 516
 
386 517
 # XXX: attempt at installing "best" dev files available
387 518
 ifeq ($(BUILD_VARIANT),custom)
@@ -390,6 +521,12 @@ ifeq ($(BUILD_VARIANT),custom)
390 521
     Build/InstallDev = $(Build/InstallDev/custom)
391 522
   endif
392 523
 endif
524
+ifeq ($(BUILD_VARIANT),audio-dec)
525
+  # XXX: only install "audio-dec" dev files if -full & -mini are not selected
526
+  ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
527
+    Build/InstallDev = $(Build/InstallDev/audio-dec)
528
+  endif
529
+endif
393 530
 ifeq ($(BUILD_VARIANT),full)
394 531
   # XXX: always install "full" dev files if -full is selected
395 532
   Build/InstallDev = $(Build/InstallDev/full)
@@ -427,6 +564,7 @@ define Package/libffmpeg-full/install
427 564
 endef
428 565
 
429 566
 Package/libffmpeg-mini/install = $(Package/libffmpeg-custom/install)
567
+Package/libffmpeg-audio-dec/install = $(Package/libffmpeg-custom/install)
430 568
 
431 569
 $(eval $(call BuildPackage,ffmpeg))
432 570
 $(eval $(call BuildPackage,ffprobe))
@@ -434,3 +572,4 @@ $(eval $(call BuildPackage,ffserver))
434 572
 $(eval $(call BuildPackage,libffmpeg-custom))
435 573
 $(eval $(call BuildPackage,libffmpeg-full))
436 574
 $(eval $(call BuildPackage,libffmpeg-mini))
575
+$(eval $(call BuildPackage,libffmpeg-audio-dec))