FFMPEG: Add more custom options, add audio-only decoder option, update pkg release...
authorthess <thess@kitschensync.net>
Wed, 16 Jul 2014 17:43:49 +0000 (13:43 -0400)
committerTed Hess <thess@kitschensync.net>
Wed, 16 Jul 2014 19:32:17 +0000 (15:32 -0400)
Signed-off-by: Ted Hess <thess@kitschensync.net>
multimedia/ffmpeg/Config.in
multimedia/ffmpeg/Makefile

index 461926d955940252e07fb3249d5fb44225c2b69b..69234522d5ca19dade9e61029a5f1160f4e6b38d 100644 (file)
@@ -105,17 +105,35 @@ config FFMPEG_CUSTOM_DECODER_aac
        depends on FFMPEG_CUSTOM_PATENTED
        select FFMPEG_CUSTOM_PARSER_aac
 
+config FFMPEG_CUSTOM_SELECT_adpcm
+       bool "ADPCM (multiple types)"
+
 config FFMPEG_CUSTOM_DECODER_ac3
        bool "AC3"
        depends on FFMPEG_CUSTOM_PATENTED
        select FFMPEG_CUSTOM_PARSER_ac3
 
+config FFMPEG_CUSTOM_DECODER_alac
+       bool "ALAC"
+
+config FFMPEG_CUSTOM_DECODER_amrnb
+       bool "AMR-NB"
+       select FFMPEG_CUSTOM_DEMUXER_amr
+
+config FFMPEG_CUSTOM_DECODER_amrwb
+       bool "AMR-WB"
+       select FFMPEG_CUSTOM_DEMUXER_amr
+
+config FFMPEG_CUSTOM_DECODER_ape
+       bool "APE"
+
 config FFMPEG_CUSTOM_DECODER_atrac3
        bool "ATRAC3"
        depends on FFMPEG_CUSTOM_PATENTED
 
 config FFMPEG_CUSTOM_DECODER_flac
        bool "FLAC"
+       select FFMPEG_CUSTOM_PARSER_flac
 
 config FFMPEG_CUSTOM_DECODER_gif
        bool "GIF"
@@ -149,6 +167,14 @@ config FFMPEG_CUSTOM_DECODER_mpeg4
        bool "MPEG-4"
        depends on FFMPEG_CUSTOM_PATENTED
 
+config FFMPEG_CUSTOM_DECODER_mpc7
+       bool "Musepack 7"
+       select FFMPEG_CUSTOM_DEMUXER_mpc
+
+config FFMPEG_CUSTOM_DECODER_mpc8
+       bool "Musepack 8"
+       select FFMPEG_CUSTOM_DEMUXER_mpc8
+
 config FFMPEG_CUSTOM_DECODER_pcm_s16be
        bool "PCM signed 16-bit big-endian"
 
@@ -159,9 +185,15 @@ config FFMPEG_CUSTOM_DECODER_png
        bool "PNG"
        select FFMPEG_CUSTOM_DECODER_zlib
 
+config FFMPEG_CUSTOM_SELECT_speex
+       bool "Speex"
+
 config FFMPEG_CUSTOM_DECODER_vorbis
        bool "Vorbis"
 
+config FFMPEG_CUSTOM_DECODER_wavpack
+       bool "Wavpack"
+
 config FFMPEG_CUSTOM_DECODER_wmav1
        bool "WMAv1"
        depends on FFMPEG_CUSTOM_PATENTED
@@ -218,6 +250,12 @@ config FFMPEG_CUSTOM_DEMUXER_avi
 config FFMPEG_CUSTOM_DEMUXER_ac3
        bool "AC3"
 
+config FFMPEG_CUSTOM_DEMUXER_amr
+       bool "AMR"
+
+config FFMPEG_CUSTOM_DEMUXER_ape
+       bool "APE"
+
 config FFMPEG_CUSTOM_DEMUXER_flac
        bool "FLAC"
 
@@ -249,6 +287,12 @@ config FFMPEG_CUSTOM_DEMUXER_mpegps
 config FFMPEG_CUSTOM_DEMUXER_mpegts
        bool "MPEG-2 (TS)"
 
+config FFMPEG_CUSTOM_DEMUXER_mpc
+       bool "Musepack"
+
+config FFMPEG_CUSTOM_DEMUXER_mpc8
+       bool "Musepack 8"
+
 config FFMPEG_CUSTOM_DEMUXER_ogg
        bool "Ogg"
 
@@ -261,11 +305,21 @@ config FFMPEG_CUSTOM_DEMUXER_rtsp
        bool "RTSP"
        select FFMPEG_CUSTOM_DEMUXER_rm
        select FFMPEG_CUSTOM_DEMUXER_sdp
+       select FFMPEG_CUSTOM_DEMUXER_rtp
 
 config FFMPEG_CUSTOM_DEMUXER_sdp
        bool "SDP"
        select FFMPEG_CUSTOM_DEMUXER_mpegts
 
+config FFMPEG_CUSTOM_DEMUXER_rtp
+       bool "RTP"
+
+config FFMPEG_CUSTOM_DEMUXER_wav
+       bool "WAV"
+
+config FFMPEG_CUSTOM_DEMUXER_wv
+       bool "WV"
+
 comment "Parsers ---"
 
 config FFMPEG_CUSTOM_PARSER_aac
@@ -275,6 +329,9 @@ config FFMPEG_CUSTOM_PARSER_aac
 config FFMPEG_CUSTOM_PARSER_ac3
        bool "AC3"
 
+config FFMPEG_CUSTOM_PARSER_flac
+       bool "FLAC"
+
 config FFMPEG_CUSTOM_PARSER_h264
        bool "H.264"
        depends on FFMPEG_CUSTOM_PATENTED
index 7880f8982a0233861a1e6e241a719afa6ce893be..81112cfdca6b0a2cbaa2e958bdb30ec3dcbcd099 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2006-2013 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,11 +9,12 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ffmpeg
 PKG_VERSION:=0.11.5
-PKG_RELEASE:=1
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://ffmpeg.org/releases/
 PKG_MD5SUM:=ea25fc252c132141f12988ed5506bfe8
+PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
 
 PKG_LICENSE:=LGPLv2.1+ GPLv2+ LGPLv3
 PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
@@ -33,6 +34,10 @@ FFMPEG_CUSTOM_ENCODERS:= \
 FFMPEG_CUSTOM_DECODERS:= \
        aac \
        ac3 \
+       alac \
+       amrnb \
+       amrwb \
+       ape \
        atrac3 \
        flac \
        gif \
@@ -44,10 +49,13 @@ FFMPEG_CUSTOM_DECODERS:= \
        mpeg2video \
        mpeg4 \
        mpegvideo \
+       mpc7 \
+       mpc8 \
        pcm_s16be \
        pcm_s16le \
        png \
        vorbis \
+       wavpack \
        wmav1 \
        wmav2 \
        zlib \
@@ -67,6 +75,8 @@ FFMPEG_CUSTOM_MUXERS:= \
 FFMPEG_CUSTOM_DEMUXERS:= \
        aac \
        ac3 \
+       amr \
+       ape \
        avi \
        flac \
        ffm \
@@ -77,14 +87,20 @@ FFMPEG_CUSTOM_DEMUXERS:= \
        mpegps \
        mpegts \
        mpegvideo \
+       mpc \
+       mpc8 \
        ogg \
        rm \
        rtsp \
+       rtp \
        sdp \
        v4l2 \
+       wav \
+       wv \
 
 FFMPEG_CUSTOM_PARSERS:= \
        aac \
+       flac \
        ac3 \
        h264 \
        mpegaudio \
@@ -129,6 +145,7 @@ FFMPEG_MINI_DEMUXERS := \
        mp3 \
        mpegts \
        mpegvideo \
+       sdp \
        rtsp \
 
 FFMPEG_MINI_PARSERS:= \
@@ -142,6 +159,64 @@ FFMPEG_MINI_PARSERS:= \
 FFMPEG_MINI_PROTOCOLS := \
        file http rtp tcp udp \
 
+FFMPEG_AUDIO_DECODERS:= \
+       aac \
+       aac_latm \
+       ac3 \
+       adpcm_* \
+       alac \
+       amrnb \
+       amrwb \
+       ape \
+       atrac3 \
+       flac \
+       mp2 \
+       mp3* \
+       mpc7 \
+       mpc8 \
+       pcm_* \
+       vorbis \
+       wavpack \
+       wmav1 \
+       wmav2 \
+       wmalossless \
+       wmapro \
+       zlib \
+
+FFMPEG_AUDIO_DEMUXERS:= \
+       aac \
+       ac3 \
+       aiff \
+       amr \
+       ape \
+       avi \
+       flac \
+       ffm \
+       matroska \
+       mp3 \
+       mov \
+       mpc \
+       mpc8 \
+       mpegts \
+       ogg \
+       rm \
+       rtsp \
+       rtp \
+       sdp \
+       wav \
+       wv \
+
+FFMPEG_AUDIO_PARSERS:= \
+       aac \
+       aac_latm \
+       flac \
+       ac3 \
+       mpegaudio \
+
+FFMPEG_AUDIO_PROTOCOLS:= \
+       file http rtp tcp udp
+
+
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
 PKG_CONFIG_DEPENDS:= \
@@ -226,7 +301,7 @@ endef
 define Package/libffmpeg-custom
 $(call Package/libffmpeg/Default)
  TITLE+= (mini)
- DEPENDS+= @DEVEL
+ DEPENDS+= @DEVEL +libspeex
  VARIANT:=custom
  MENU:=1
 endef
@@ -242,6 +317,20 @@ $(call Package/ffmpeg/Default/description)
 endef
 
 
+define Package/libffmpeg-audio-dec
+$(call Package/libffmpeg/Default)
+ TITLE+= (audio)
+ DEPENDS+= @DEVEL +libspeex
+ VARIANT:=audio-dec
+endef
+
+define Package/libffmpeg-audio-dec/description
+$(call Package/ffmpeg/Default/description)
+ .
+ This package contains FFmpeg shared libraries for audio decoding
+endef
+
+
 define Package/libffmpeg-full
 $(call Package/libffmpeg/Default)
  TITLE+= (full)
@@ -292,6 +381,7 @@ FFMPEG_CONFIGURE:= \
        --disable-doc \
        --disable-dxva2 \
        --enable-pthreads \
+       --disable-optimizations \
        --enable-small \
        --disable-stripping \
        --enable-zlib \
@@ -321,6 +411,46 @@ ifeq ($(BUILD_VARIANT),custom)
        $(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_CUSTOM_PARSER) \
        $(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_CUSTOM_PROTOCOL) \
 
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_adpcm),y)
+  FFMPEG_CONFIGURE+= \
+       --enable-decoder=adpcm_ima_wav \
+       --enable-decoder=adpcm_ima_qt \
+       --enable-decoder=adpcm_ms \
+
+endif
+
+ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_speex),y)
+  FFMPEG_CONFIGURE+= \
+       --enable-libspeex --enable-decoder=libspeex \
+
+endif
+
+endif
+
+ifeq ($(BUILD_VARIANT),audio-dec)
+
+  FFMPEG_ENABLE= \
+       $(foreach c, $(2), \
+               --enable-$(1)="$(c)" \
+       )
+
+  FFMPEG_CONFIGURE+= \
+       --disable-ffmpeg \
+       --disable-ffplay \
+       --disable-ffprobe \
+       --disable-ffserver \
+       --disable-avfilter \
+       --disable-postproc \
+       --disable-swresample \
+       --disable-swscale \
+       --disable-everything \
+       $(call FFMPEG_ENABLE,decoder,$(FFMPEG_AUDIO_DECODERS)) \
+       $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
+       $(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \
+       $(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
+       --enable-libspeex --enable-decoder=libspeex \
+       --disable-decoder=pcm_bluray,pcm_dvd \
+
 endif
 
 ifeq ($(BUILD_VARIANT),mini)
@@ -382,6 +512,7 @@ define Build/InstallDev/full
 endef
 
 Build/InstallDev/mini = $(Build/InstallDev/custom)
+Build/InstallDev/audio-dec = $(Build/InstallDev/custom)
 
 # XXX: attempt at installing "best" dev files available
 ifeq ($(BUILD_VARIANT),custom)
@@ -390,6 +521,12 @@ ifeq ($(BUILD_VARIANT),custom)
     Build/InstallDev = $(Build/InstallDev/custom)
   endif
 endif
+ifeq ($(BUILD_VARIANT),audio-dec)
+  # XXX: only install "audio-dec" dev files if -full & -mini are not selected
+  ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
+    Build/InstallDev = $(Build/InstallDev/audio-dec)
+  endif
+endif
 ifeq ($(BUILD_VARIANT),full)
   # XXX: always install "full" dev files if -full is selected
   Build/InstallDev = $(Build/InstallDev/full)
@@ -427,6 +564,7 @@ define Package/libffmpeg-full/install
 endef
 
 Package/libffmpeg-mini/install = $(Package/libffmpeg-custom/install)
+Package/libffmpeg-audio-dec/install = $(Package/libffmpeg-custom/install)
 
 $(eval $(call BuildPackage,ffmpeg))
 $(eval $(call BuildPackage,ffprobe))
@@ -434,3 +572,4 @@ $(eval $(call BuildPackage,ffserver))
 $(eval $(call BuildPackage,libffmpeg-custom))
 $(eval $(call BuildPackage,libffmpeg-full))
 $(eval $(call BuildPackage,libffmpeg-mini))
+$(eval $(call BuildPackage,libffmpeg-audio-dec))