[packages] ffmpeg: use VARIANTs for building libffmeg

* libffmeg-custom (configurable, for developers)
 * libffmeg-mini (hopefully suitable for DLNA)
 * libffmeg-full (full-blown)
 


git-svn-id: svn://svn.openwrt.org/openwrt/packages@28467 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nico 2011-10-17 10:41:49 +00:00
parent d6570784c9
commit 8bd55e3a03
4 changed files with 357 additions and 314 deletions

View File

@ -25,7 +25,7 @@ define Package/libdlna
CATEGORY:=Libraries
TITLE:= Reference DLNA implementation
URL:=http://libdlna.geexbox.org/
DEPENDS:=+libffmpeg +@FFMPEG_LIBDLNA_SUPPORT
DEPENDS:=+libffmpeg
endef
define Package/libdlna/description

View File

@ -1,361 +1,314 @@
menu "Configuration"
depends PACKAGE_libffmpeg
depends PACKAGE_libffmpeg-custom
comment "Libav* build options ---"
config FFMPEG_LIBAV_FULL
bool "Toggle for full libav* support"
select FFMPEG_BSFS
select FFMPEG_DECODE
select FFMPEG_ENCODE
select FFMPEG_FILTERS
select FFMPEG_INDEVS
select FFMPEG_OUTDEVS
select FFMPEG_HWACCELS
select FFMPEG_PARSERS
select FFMPEG_PROTOCOLS
depends FFMPEG_PATENTED
help
This options selects each of the FFmpeg's toggles to create a full build
of the libav* libraries. Note: This is a large binary and not suitable
for most users.
config FFMPEG_BSFS
bool "Toggle for FFmpeg's bitstream filter support"
config FFMPEG_DECODE
bool "Toggle for FFmpeg's decoder/demuxer support"
depends FFMPEG_PATENTED
config FFMPEG_ENCODE
bool "Toggle for FFmpeg's encoder/muxer support"
depends FFMPEG_PATENTED
config FFMPEG_FILTERS
bool "Toggle for FFmpeg's video processing filter support"
config FFMPEG_INDEVS
bool "Toggle for FFmpeg's input device (camera, etc) support"
config FFMPEG_OUTDEVS
bool "Toggle for FFmpeg's output device support"
config FFMPEG_HWACCELS
bool "Toggle for FFmpeg's video hardware acceleration support"
config FFMPEG_PARSERS
bool "Toggle for FFmpeg's stream parsing support"
config FFMPEG_PROTOCOLS
bool "Toggle for FFmpeg's protocol support"
config FFMPEG_PATENTED
config FFMPEG_CUSTOM_PATENTED
bool "Include patented codecs and technologies"
default BUILD_PATENTED
comment "Package Profiles ---"
comment "Profiles ---"
config FFMPEG_FFSERVER_SUPPORT
config FFMPEG_CUSTOM_FFSERVER_SUPPORT
bool "Include support for ffserver (FFmpeg streaming server)"
select FFMPEG_MUXER_ffm
select FFMPEG_DEMUXER_ffm
select FFMPEG_DEMUXER_rtsp
select FFMPEG_PROTOCOL_rtp
select FFMPEG_CUSTOM_MUXER_ffm
select FFMPEG_CUSTOM_DEMUXER_ffm
select FFMPEG_CUSTOM_DEMUXER_rtsp
select FFMPEG_CUSTOM_PROTOCOL_rtp
config FFMPEG_LIBDLNA_SUPPORT
config FFMPEG_CUSTOM_LIBDLNA_SUPPORT
bool "Include support for libdlna/ushare"
depends FFMPEG_PATENTED
select FFMPEG_DECODER_ac3
select FFMPEG_DECODER_atrac3
select FFMPEG_DECODER_h264
select FFMPEG_DECODER_jpegls
select FFMPEG_DECODER_mp3
select FFMPEG_DECODER_mpeg1video
select FFMPEG_DECODER_mpeg2video
select FFMPEG_DECODER_mpeg4
select FFMPEG_DECODER_mpegvideo
select FFMPEG_DECODER_wmav1
select FFMPEG_DECODER_wmav2
select FFMPEG_DECODER_png
select FFMPEG_DEMUXER_ac3
select FFMPEG_DEMUXER_h264
select FFMPEG_DEMUXER_mp3
select FFMPEG_DEMUXER_mpegvideo
depends FFMPEG_CUSTOM_PATENTED
select FFMPEG_CUSTOM_DECODER_ac3
select FFMPEG_CUSTOM_DECODER_atrac3
select FFMPEG_CUSTOM_DECODER_h264
select FFMPEG_CUSTOM_DECODER_jpegls
select FFMPEG_CUSTOM_DECODER_mp3
select FFMPEG_CUSTOM_DECODER_mpeg1video
select FFMPEG_CUSTOM_DECODER_mpeg2video
select FFMPEG_CUSTOM_DECODER_mpeg4
select FFMPEG_CUSTOM_DECODER_mpegvideo
select FFMPEG_CUSTOM_DECODER_wmav1
select FFMPEG_CUSTOM_DECODER_wmav2
select FFMPEG_CUSTOM_DECODER_png
select FFMPEG_CUSTOM_DEMUXER_ac3
select FFMPEG_CUSTOM_DEMUXER_h264
select FFMPEG_CUSTOM_DEMUXER_mp3
select FFMPEG_CUSTOM_DEMUXER_mpegvideo
config FFMPEG_MINIDLNA_SUPPORT
config FFMPEG_CUSTOM_MINIDLNA_SUPPORT
bool "Include support for minidlna"
depends FFMPEG_PATENTED
select FFMPEG_DECODER_aac
select FFMPEG_DECODER_ac3
select FFMPEG_DECODER_flac
select FFMPEG_DECODER_h264
select FFMPEG_DECODER_jpegls
select FFMPEG_DECODER_mp3
select FFMPEG_DECODER_mpeg1video
select FFMPEG_DECODER_mpeg2video
select FFMPEG_DECODER_mpeg4
select FFMPEG_DECODER_mpegvideo
select FFMPEG_DECODER_wmav1
select FFMPEG_DECODER_wmav2
select FFMPEG_DECODER_png
select FFMPEG_DEMUXER_aac
select FFMPEG_DEMUXER_ac3
select FFMPEG_DEMUXER_avi
select FFMPEG_DEMUXER_flac
select FFMPEG_DEMUXER_h264
select FFMPEG_DEMUXER_matroska
select FFMPEG_DEMUXER_mov
select FFMPEG_DEMUXER_mp3
select FFMPEG_DEMUXER_mpegvideo
select FFMPEG_PROTOCOL_file
depends FFMPEG_CUSTOM_PATENTED
select FFMPEG_CUSTOM_DECODER_aac
select FFMPEG_CUSTOM_DECODER_ac3
select FFMPEG_CUSTOM_DECODER_flac
select FFMPEG_CUSTOM_DECODER_h264
select FFMPEG_CUSTOM_DECODER_jpegls
select FFMPEG_CUSTOM_DECODER_mp3
select FFMPEG_CUSTOM_DECODER_mpeg1video
select FFMPEG_CUSTOM_DECODER_mpeg2video
select FFMPEG_CUSTOM_DECODER_mpeg4
select FFMPEG_CUSTOM_DECODER_mpegvideo
select FFMPEG_CUSTOM_DECODER_wmav1
select FFMPEG_CUSTOM_DECODER_wmav2
select FFMPEG_CUSTOM_DECODER_png
select FFMPEG_CUSTOM_DEMUXER_aac
select FFMPEG_CUSTOM_DEMUXER_ac3
select FFMPEG_CUSTOM_DEMUXER_avi
select FFMPEG_CUSTOM_DEMUXER_flac
select FFMPEG_CUSTOM_DEMUXER_h264
select FFMPEG_CUSTOM_DEMUXER_matroska
select FFMPEG_CUSTOM_DEMUXER_mov
select FFMPEG_CUSTOM_DEMUXER_mp3
select FFMPEG_CUSTOM_DEMUXER_mpegvideo
select FFMPEG_CUSTOM_PROTOCOL_file
comment "Encoders ---"
config FFMPEG_ENCODER_ac3
config FFMPEG_CUSTOM_ENCODER_ac3
bool "AC3"
depends FFMPEG_PATENTED
select FFMPEG_PARSER_ac3
depends FFMPEG_CUSTOM_PATENTED
select FFMPEG_CUSTOM_PARSER_ac3
config FFMPEG_ENCODER_jpegls
config FFMPEG_CUSTOM_ENCODER_jpegls
bool "JPEG-LS"
config FFMPEG_ENCODER_mpeg1video
config FFMPEG_CUSTOM_ENCODER_mpeg1video
bool "MPEG-1 Video"
config FFMPEG_ENCODER_mpeg2video
config FFMPEG_CUSTOM_ENCODER_mpeg2video
bool "MPEG-2 Video"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_ENCODER_mpeg4
config FFMPEG_CUSTOM_ENCODER_mpeg4
bool "MPEG-4"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_ENCODER_pcm_s16be
config FFMPEG_CUSTOM_ENCODER_pcm_s16be
bool "PCM signed 16-bit big-endian"
config FFMPEG_ENCODER_pcm_s16le
config FFMPEG_CUSTOM_ENCODER_pcm_s16le
bool "PCM signed 16-bit little-endian"
config FFMPEG_ENCODER_png
config FFMPEG_CUSTOM_ENCODER_png
bool "PNG"
select FFMPEG_ENCODER_zlib
select FFMPEG_CUSTOM_ENCODER_zlib
config FFMPEG_ENCODER_vorbis
config FFMPEG_CUSTOM_ENCODER_vorbis
bool "Vorbis"
config FFMPEG_ENCODER_zlib
config FFMPEG_CUSTOM_ENCODER_zlib
bool "Zlib"
comment "Decoders ---"
config FFMPEG_DECODER_aac
config FFMPEG_CUSTOM_DECODER_aac
bool "AAC (Advanced Audio Coding)"
depends FFMPEG_PATENTED
select FFMPEG_PARSER_aac
depends FFMPEG_CUSTOM_PATENTED
select FFMPEG_CUSTOM_PARSER_aac
config FFMPEG_DECODER_ac3
config FFMPEG_CUSTOM_DECODER_ac3
bool "AC3"
depends FFMPEG_PATENTED
select FFMPEG_PARSER_ac3
depends FFMPEG_CUSTOM_PATENTED
select FFMPEG_CUSTOM_PARSER_ac3
config FFMPEG_DECODER_atrac3
config FFMPEG_CUSTOM_DECODER_atrac3
bool "ATRAC3"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DECODER_flac
config FFMPEG_CUSTOM_DECODER_flac
bool "FLAC"
config FFMPEG_DECODER_gif
config FFMPEG_CUSTOM_DECODER_gif
bool "GIF"
config FFMPEG_DECODER_h264
config FFMPEG_CUSTOM_DECODER_h264
bool "H.264"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DECODER_jpegls
config FFMPEG_CUSTOM_DECODER_jpegls
bool "JPEG-LS"
config FFMPEG_DECODER_mp2
config FFMPEG_CUSTOM_DECODER_mp2
bool "MP2 (MPEG Audio Layer 2)"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DECODER_mp3
config FFMPEG_CUSTOM_DECODER_mp3
bool "MP3 (MPEG Audio Layer 2)"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DECODER_mpegvideo
config FFMPEG_CUSTOM_DECODER_mpegvideo
bool "MPEG Video"
config FFMPEG_DECODER_mpeg1video
config FFMPEG_CUSTOM_DECODER_mpeg1video
bool "MPEG-1 Video"
config FFMPEG_DECODER_mpeg2video
config FFMPEG_CUSTOM_DECODER_mpeg2video
bool "MPEG-2 Video"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DECODER_mpeg4
config FFMPEG_CUSTOM_DECODER_mpeg4
bool "MPEG-4"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DECODER_pcm_s16be
config FFMPEG_CUSTOM_DECODER_pcm_s16be
bool "PCM signed 16-bit big-endian"
config FFMPEG_DECODER_pcm_s16le
config FFMPEG_CUSTOM_DECODER_pcm_s16le
bool "PCM signed 16-bit little-endian"
config FFMPEG_DECODER_png
config FFMPEG_CUSTOM_DECODER_png
bool "PNG"
select FFMPEG_DECODER_zlib
select FFMPEG_CUSTOM_DECODER_zlib
config FFMPEG_DECODER_vorbis
config FFMPEG_CUSTOM_DECODER_vorbis
bool "Vorbis"
config FFMPEG_DECODER_wmav1
config FFMPEG_CUSTOM_DECODER_wmav1
bool "WMAv1"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DECODER_wmav2
config FFMPEG_CUSTOM_DECODER_wmav2
bool "WMAv2"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DECODER_zlib
config FFMPEG_CUSTOM_DECODER_zlib
bool "Zlib"
comment "Muxers ---"
config FFMPEG_MUXER_ac3
config FFMPEG_CUSTOM_MUXER_ac3
bool "AC3"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_MUXER_ffm
config FFMPEG_CUSTOM_MUXER_ffm
bool "FFM (ffserver live feed)"
config FFMPEG_MUXER_h264
config FFMPEG_CUSTOM_MUXER_h264
bool "H.264"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_MUXER_mp3
config FFMPEG_CUSTOM_MUXER_mp3
bool "MP3 (MPEG Audio Layer 3)"
config FFMPEG_MUXER_mp4
config FFMPEG_CUSTOM_MUXER_mp4
bool "MP4"
config FFMPEG_MUXER_mpeg1video
config FFMPEG_CUSTOM_MUXER_mpeg1video
bool "MPEG-1 Video"
config FFMPEG_MUXER_mpeg2video
config FFMPEG_CUSTOM_MUXER_mpeg2video
bool "MPEG-2 Video"
config FFMPEG_MUXER_mpegts
config FFMPEG_CUSTOM_MUXER_mpegts
bool "MPEG-2 (TS)"
config FFMPEG_MUXER_ogg
config FFMPEG_CUSTOM_MUXER_ogg
bool "Ogg"
config FFMPEG_MUXER_rtp
config FFMPEG_CUSTOM_MUXER_rtp
bool "RTP"
comment "Demuxers ---"
config FFMPEG_DEMUXER_aac
config FFMPEG_CUSTOM_DEMUXER_aac
bool "AAC"
config FFMPEG_DEMUXER_avi
config FFMPEG_CUSTOM_DEMUXER_avi
bool "AVI (Audio Video Interleave)"
config FFMPEG_DEMUXER_ac3
config FFMPEG_CUSTOM_DEMUXER_ac3
bool "AC3"
config FFMPEG_DEMUXER_flac
config FFMPEG_CUSTOM_DEMUXER_flac
bool "FLAC"
config FFMPEG_DEMUXER_ffm
config FFMPEG_CUSTOM_DEMUXER_ffm
bool "FFM (ffserver live feed)"
config FFMPEG_DEMUXER_h264
config FFMPEG_CUSTOM_DEMUXER_h264
bool "H.264"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_DEMUXER_matroska
config FFMPEG_CUSTOM_DEMUXER_matroska
bool "Matroska (MKA,MKV)"
select FFMPEG_DECODER_zlib
select FFMPEG_CUSTOM_DECODER_zlib
config FFMPEG_DEMUXER_mov
config FFMPEG_CUSTOM_DEMUXER_mov
bool "MOV/MP4/M4A/3GP/3G2/MJ2"
select FFMPEG_DECODER_zlib
select FFMPEG_CUSTOM_DECODER_zlib
config FFMPEG_DEMUXER_mp3
config FFMPEG_CUSTOM_DEMUXER_mp3
bool "MP3 (MPEG Audio Layer 3)"
select FFMPEG_PARSER_mpegaudio
select FFMPEG_CUSTOM_PARSER_mpegaudio
config FFMPEG_DEMUXER_mpegvideo
config FFMPEG_CUSTOM_DEMUXER_mpegvideo
bool "MPEG Video"
config FFMPEG_DEMUXER_mpegps
config FFMPEG_CUSTOM_DEMUXER_mpegps
bool "MPEG-2 (PS)"
config FFMPEG_DEMUXER_mpegts
config FFMPEG_CUSTOM_DEMUXER_mpegts
bool "MPEG-2 (TS)"
config FFMPEG_DEMUXER_ogg
config FFMPEG_CUSTOM_DEMUXER_ogg
bool "Ogg"
config FFMPEG_DEMUXER_rm
config FFMPEG_CUSTOM_DEMUXER_rm
bool "RM"
help
RealMedia format demuxer
config FFMPEG_DEMUXER_rtsp
config FFMPEG_CUSTOM_DEMUXER_rtsp
bool "RTSP"
select FFMPEG_DEMUXER_rm
select FFMPEG_DEMUXER_sdp
select FFMPEG_CUSTOM_DEMUXER_rm
select FFMPEG_CUSTOM_DEMUXER_sdp
config FFMPEG_DEMUXER_sdp
config FFMPEG_CUSTOM_DEMUXER_sdp
bool "SDP"
select FFMPEG_DEMUXER_mpegts
select FFMPEG_CUSTOM_DEMUXER_mpegts
comment "Parsers ---"
config FFMPEG_PARSER_aac
config FFMPEG_CUSTOM_PARSER_aac
bool "AAC (Advanced Audio Coding)"
depends FFMPEG_PATENTED
depends FFMPEG_CUSTOM_PATENTED
config FFMPEG_PARSER_ac3
config FFMPEG_CUSTOM_PARSER_ac3
bool "AC3"
config FFMPEG_PARSER_h264
config FFMPEG_CUSTOM_PARSER_h264
bool "H.264"
depends FFMPEG_PATENTED
select FFMPEG_DECODER_h264
depends FFMPEG_CUSTOM_PATENTED
select FFMPEG_CUSTOM_DECODER_h264
config FFMPEG_PARSER_mpegaudio
config FFMPEG_CUSTOM_PARSER_mpegaudio
bool "MPEG Audio"
config FFMPEG_PARSER_mpegvideo
config FFMPEG_CUSTOM_PARSER_mpegvideo
bool "MPEG Video"
config FFMPEG_PARSER_mpeg4video
config FFMPEG_CUSTOM_PARSER_mpeg4video
bool "MPEG-4 Video"
comment "Protocols ---"
config FFMPEG_PROTOCOL_file
config FFMPEG_CUSTOM_PROTOCOL_file
bool "file:"
config FFMPEG_PROTOCOL_http
config FFMPEG_CUSTOM_PROTOCOL_http
bool "http:"
config FFMPEG_PROTOCOL_pipe
config FFMPEG_CUSTOM_PROTOCOL_pipe
bool "pipe:"
config FFMPEG_PROTOCOL_rtp
config FFMPEG_CUSTOM_PROTOCOL_rtp
bool "rtp:"
select FFMPEG_PROTOCOL_udp
select FFMPEG_CUSTOM_PROTOCOL_udp
config FFMPEG_PROTOCOL_tcp
config FFMPEG_CUSTOM_PROTOCOL_tcp
bool "tcp:"
config FFMPEG_PROTOCOL_udp
config FFMPEG_CUSTOM_PROTOCOL_udp
bool "udp:"
endmenu

View File

@ -15,7 +15,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ffmpeg.org/releases/
PKG_MD5SUM:=967d481c98161582d149aced6e3b2f31
FFMPEG_ENCODERS:= \
FFMPEG_CUSTOM_ENCODERS:= \
ac3 \
jpegls \
mpeg1video \
@ -27,7 +27,7 @@ FFMPEG_ENCODERS:= \
vorbis \
zlib \
FFMPEG_DECODERS:= \
FFMPEG_CUSTOM_DECODERS:= \
aac \
ac3 \
atrac3 \
@ -49,7 +49,7 @@ FFMPEG_DECODERS:= \
wmav2 \
zlib \
FFMPEG_MUXERS:= \
FFMPEG_CUSTOM_MUXERS:= \
ac3 \
ffm \
h264 \
@ -61,7 +61,7 @@ FFMPEG_MUXERS:= \
ogg \
rtp \
FFMPEG_DEMUXERS:= \
FFMPEG_CUSTOM_DEMUXERS:= \
aac \
ac3 \
avi \
@ -80,7 +80,7 @@ FFMPEG_DEMUXERS:= \
sdp \
v4l2 \
FFMPEG_PARSERS:= \
FFMPEG_CUSTOM_PARSERS:= \
aac \
ac3 \
h264 \
@ -88,16 +88,66 @@ FFMPEG_PARSERS:= \
mpeg4video \
mpegvideo \
FFMPEG_PROTOCOLS:= \
FFMPEG_CUSTOM_PROTOCOLS:= \
file http pipe rtp tcp udp
FFMPEG_MINI_ENCODERS:= \
FFMPEG_MINI_DECODERS:= \
aac \
ac3 \
atrac3 \
flac \
h263 \
h264 \
jpegls \
mp3 \
mpeg1video \
mpeg2video \
mpeg4 \
mpegvideo \
png \
wmav1 \
wmav2 \
FFMPEG_MINI_MUXERS:= \
ffm \
FFMPEG_MINI_DEMUXERS := \
aac \
ac3 \
asf \
avi \
ffm \
flac \
h264 \
matroska \
mov \
mp3 \
mpegts \
mpegvideo \
rtsp \
FFMPEG_MINI_PARSERS:= \
ac3 \
flac \
h263 \
h264 \
mpeg4video \
mpegaudio \
FFMPEG_MINI_PROTOCOLS := \
file http rtp tcp udp \
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_CONFIG_DEPENDS:= \
$(patsubst %,CONFIG_FFMPEG_ENCODER_%,$(FFMPEG_ENCODERS)) \
$(patsubst %,CONFIG_FFMPEG_DECODER_%,$(FFMPEG_DECODERS)) \
$(patsubst %,CONFIG_FFMPEG_MUXER_%,$(FFMPEG_DEMUXERS)) \
$(patsubst %,CONFIG_FFMPEG_DEMUXER_%,$(FFMPEG_DEMUXERS)) \
$(patsubst %,CONFIG_FFMPEG_PARSER_%,$(FFMPEG_PARSERS)) \
$(patsubst %,CONFIG_FFMPEG_PROTOCOL_%,$(FFMPEG_PROTOCOLS))
$(patsubst %,CONFIG_FFMPEG_CUSTOM_ENCODER_%,$(FFMPEG_CUSTOM_ENCODERS)) \
$(patsubst %,CONFIG_FFMPEG_CUSTOM_DECODER_%,$(FFMPEG_CUSTOM_DECODERS)) \
$(patsubst %,CONFIG_FFMPEG_CUSTOM_MUXER_%,$(FFMPEG_CUSTOM_DEMUXERS)) \
$(patsubst %,CONFIG_FFMPEG_CUSTOM_DEMUXER_%,$(FFMPEG_CUSTOM_DEMUXERS)) \
$(patsubst %,CONFIG_FFMPEG_CUSTOM_PARSER_%,$(FFMPEG_CUSTOM_PARSERS)) \
$(patsubst %,CONFIG_FFMPEG_CUSTOM_PROTOCOL_%,$(FFMPEG_CUSTOM_PROTOCOLS))
include $(INCLUDE_DIR)/package.mk
@ -111,12 +161,14 @@ define Package/ffmpeg/Default/description
audio and video in numerous formats.
endef
define Package/ffmpeg
$(call Package/ffmpeg/Default)
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE+= program
DEPENDS+= +libpthread +libffmpeg +libpostproc +libswscale
DEPENDS+= +libpthread +libffmpeg
VARIANT:=full
endef
define Package/ffmpeg/description
@ -125,12 +177,14 @@ $(call Package/ffmpeg/Default/description)
This package contains the FFmpeg command line tool.
endef
define Package/ffprobe
$(call Package/ffmpeg/Default)
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE+= CLI media identifier
DEPENDS+= +libffmpeg
VARIANT:=full
endef
define Package/ffprobe/description
@ -139,12 +193,14 @@ $(call Package/ffmpeg/Default/description)
This package contains the FFprobe command line tool.
endef
define Package/ffserver
$(call Package/ffserver/Default)
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE+= streaming server
DEPENDS+= +libpthread +libffmpeg +@FFMPEG_FFSERVER_SUPPORT
DEPENDS+= +libpthread +libffmpeg
VARIANT:=full
endef
define Package/ffserver/description
@ -153,114 +209,152 @@ $(call Package/ffmpeg/Default/description)
This package contains the FFmpeg streaming server.
endef
define Package/libffmpeg
define Package/libffmpeg/Default
$(call Package/ffmpeg/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= libraries
DEPENDS+= +libpthread +zlib
PROVIDES:= libffmpeg
endef
define Package/libffmpeg-custom
$(call Package/libffmpeg/Default)
TITLE+= (mini)
DEPENDS+= @DEVEL
VARIANT:=custom
MENU:=1
endef
define Package/libffmpeg/config
define Package/libffmpeg-custom/config
source "$(SOURCE)/Config.in"
endef
define Package/libffmpeg/description
define Package/libffmpeg-custom/description
$(call Package/ffmpeg/Default/description)
.
This package contains FFmpeg shared libraries.
This package contains customized FFmpeg shared libraries.
endef
define Package/libpostproc
$(call Package/ffmpeg/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libpostproc
DEPENDS+= +libffmpeg
define Package/libffmpeg-full
$(call Package/libffmpeg/Default)
TITLE+= (full)
DEPENDS+= @BUILD_PATENTED +alsa-libs
VARIANT:=full
endef
define Package/libswscale
$(call Package/ffmpeg/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libswscale
DEPENDS+= +libffmpeg
define Package/libffmpeg-full/description
$(call Package/ffmpeg/Default/description)
.
This package contains full-featured FFmpeg shared libraries.
endef
FILTER_CONFIG= \
$(foreach c, $(3), \
$(if $(CONFIG_FFMPEG_$(1)_$(c)),--enable-$(2)="$(c)") \
)
FFMPEG_CONFIGURE_ENCODERS:=$(call FILTER_CONFIG,ENCODER,encoder,$(FFMPEG_ENCODERS))
FFMPEG_CONFIGURE_DECODERS:=$(call FILTER_CONFIG,DECODER,decoder,$(FFMPEG_DECODERS))
FFMPEG_CONFIGURE_MUXERS:=$(call FILTER_CONFIG,MUXER,muxer,$(FFMPEG_MUXERS))
FFMPEG_CONFIGURE_DEMUXERS:=$(call FILTER_CONFIG,DEMUXER,demuxer,$(FFMPEG_DEMUXERS))
FFMPEG_CONFIGURE_PARSERS:=$(call FILTER_CONFIG,PARSER,parser,$(FFMPEG_PARSERS))
FFMPEG_CONFIGURE_PROTOCOLS:=$(call FILTER_CONFIG,PROTOCOL,protocol,$(FFMPEG_PROTOCOLS))
define Package/libffmpeg-mini
$(call Package/libffmpeg/Default)
TITLE+= (mini)
DEPENDS+= @BUILD_PATENTED
VARIANT:=mini
endef
define Package/libffmpeg-mini/description
$(call Package/ffmpeg/Default/description)
.
This package contains minimal-featured FFmpeg shared libraries.
endef
ifneq ($(CONFIG_TARGET_x86),)
TARGET_CFLAGS += -fomit-frame-pointer
endif
# XXX: add --disable-mmx & --disable-mmx2 to fix build failure on x86
# libpostproc/postprocess_template.c:2195: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
# libpostproc/postprocess_template.c:3124: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
# libpostproc/postprocess_template.c:3207: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
define Build/Configure
# this is *NOT* GNU configure
( cd $(PKG_BUILD_DIR); \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
./configure \
--enable-cross-compile \
--cross-prefix="$(TARGET_CROSS)" \
--arch="$(ARCH)" \
--target-os=linux \
--prefix="/usr" \
--enable-shared \
--enable-static \
--disable-debug \
\
--enable-gpl \
--enable-version3 \
\
--disable-doc \
--disable-dxva2 \
--disable-mmx \
--disable-mmx2 \
--enable-pthreads \
--disable-optimizations \
--enable-small \
--disable-stripping \
--enable-zlib \
--enable-postproc \
--enable-swscale \
\
$(if $(CONFIG_FFMPEG_BSFS),,--disable-bsfs) \
$(if $(CONFIG_FFMPEG_OUTDEVS),,--disable-outdevs) \
$(if $(CONFIG_FFMPEG_INDEVS),,--disable-indevs) \
$(if $(CONFIG_FFMPEG_FILTERS),,--disable-filters) \
$(if $(CONFIG_FFMPEG_HWACCELS),,--disable-hwaccels) \
$(if $(CONFIG_FFMPEG_PARSERS),,--disable-parsers) \
$(if $(CONFIG_FFMPEG_PROTOCOLS),,--disable-protocols) \
$(if $(CONFIG_FFMPEG_ENCODE),,--disable-encoders --disable-muxers) \
$(if $(CONFIG_FFMPEG_DECODE),,--disable-decoders --disable-demuxers) \
$(FFMPEG_CONFIGURE_ENCODERS) \
$(FFMPEG_CONFIGURE_DECODERS) \
$(FFMPEG_CONFIGURE_MUXERS) \
$(FFMPEG_CONFIGURE_DEMUXERS) \
$(FFMPEG_CONFIGURE_PARSERS) \
$(FFMPEG_CONFIGURE_PROTOCOLS) \
\
$(if $(CONFIG_PACKAGE_ffmpeg),,--disable-ffmpeg) \
--disable-ffplay \
$(if $(CONFIG_PACKAGE_ffprobe),,--disable-ffprobe) \
$(if $(CONFIG_PACKAGE_ffserver),,--disable-ffserver) \
\
FFMPEG_CONFIGURE:= \
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
PKG_CONFIG="pkg-config" \
./configure \
--enable-cross-compile \
--cross-prefix="$(TARGET_CROSS)" \
--arch="$(ARCH)" \
--target-os=linux \
--prefix="/usr" \
--enable-shared \
--enable-static \
--disable-debug \
\
--enable-gpl \
--enable-version3 \
\
--disable-doc \
--disable-dxva2 \
--disable-mmx \
--disable-mmx2 \
--enable-pthreads \
--disable-optimizations \
--enable-small \
--disable-stripping \
--enable-zlib \
ifeq ($(BUILD_VARIANT),custom)
FFMPEG_ENABLE= \
$(foreach c, $(2), \
$(if $($(3)_$(c)),--enable-$(1)="$(c)") \
)
FFMPEG_CONFIGURE+= \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avfilter \
--disable-postproc \
--disable-swscale \
--disable-everything \
$(call FFMPEG_ENABLE,encoder,$(FFMPEG_CUSTOM_ENCODERS),CONFIG_FFMPEG_ENCODER) \
$(call FFMPEG_ENABLE,decoder,$(FFMPEG_CUSTOM_DECODERS),CONFIG_FFMPEG_DECODER) \
$(call FFMPEG_ENABLE,muxer,$(FFMPEG_CUSTOM_MUXERS),CONFIG_FFMPEG_MUXER) \
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_CUSTOM_DEMUXERS),CONFIG_FFMPEG_DEMUXER) \
$(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_PARSER) \
$(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_PROTOCOL) \
endif
ifeq ($(BUILD_VARIANT),mini)
FFMPEG_ENABLE= \
$(foreach c, $(2), \
--enable-$(1)="$(c)" \
)
FFMPEG_CONFIGURE+= \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avfilter \
--disable-postproc \
--disable-swscale \
--disable-everything \
$(call FFMPEG_ENABLE,encoder,$(FFMPEG_MINI_ENCODERS)) \
$(call FFMPEG_ENABLE,decoder,$(FFMPEG_MINI_DECODERS)) \
$(call FFMPEG_ENABLE,muxer,$(FFMPEG_MINI_MUXERS)) \
$(call FFMPEG_ENABLE,demuxer,$(FFMPEG_MINI_DEMUXERS)) \
$(call FFMPEG_ENABLE,parser,$(FFMPEG_MINI_PARSERS)) \
$(call FFMPEG_ENABLE,protocol,$(FFMPEG_MINI_PROTOCOLS)) \
endif
ifneq ($(CONFIG_TARGET_x86),)
TARGET_CFLAGS += -fomit-frame-pointer
endif
define Build/Configure
( cd $(PKG_BUILD_DIR); $(FFMPEG_CONFIGURE) )
endef
define Build/Compile
@ -269,20 +363,16 @@ define Build/Compile
all install
endef
define Build/InstallDev
ifeq ($(BUILD_VARIANT),full)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/libav{codec,device,format,util} $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/libswscale $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swscale} $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libav{codec,device,format,util}.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libswscale.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swscale}.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libav{codec,device,format,util}.pc $(1)/usr/lib/pkgconfig/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libswscale.pc $(1)/usr/lib/pkgconfig/
endef
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swscale}.pc $(1)/usr/lib/pkgconfig/
endef
endif
define Package/ffmpeg/install
$(INSTALL_DIR) $(1)/usr/bin
@ -299,24 +389,24 @@ define Package/ffserver/install
$(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/
endef
define Package/libffmpeg/install
define Package/libffmpeg-custom/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libav{codec,device,format,util}.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
endef
define Package/libpostproc/install
define Package/libffmpeg-full/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avutil,postproc,swscale}.so.* $(1)/usr/lib/
endef
define Package/libswscale/install
define Package/libffmpeg-mini/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libswscale.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,ffmpeg))
$(eval $(call BuildPackage,ffprobe))
$(eval $(call BuildPackage,ffserver))
$(eval $(call BuildPackage,libffmpeg))
$(eval $(call BuildPackage,libpostproc))
$(eval $(call BuildPackage,libswscale))
$(eval $(call BuildPackage,libffmpeg-custom))
$(eval $(call BuildPackage,libffmpeg-full))
$(eval $(call BuildPackage,libffmpeg-mini))

View File

@ -30,7 +30,7 @@ define Package/minidlna
TITLE:=UPnP A/V & DLNA Media Server
URL:=http://minidlna.sourceforge.net/
DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \
+@FFMPEG_MINIDLNA_SUPPORT +libid3tag +libflac +libvorbis +libuuid \
+libid3tag +libflac +libvorbis +libuuid \
$(ICONV_DEPENDS) $(INTL_DEPENDS)
endef