ffmpeg: clean up, fix config errors
authorFelix Fietkau <nbd@openwrt.org>
Mon, 5 Oct 2009 20:58:54 +0000 (20:58 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 5 Oct 2009 20:58:54 +0000 (20:58 +0000)
SVN-Revision: 17937

libs/libdlna/Makefile
multimedia/ffmpeg/Config.in
multimedia/ffmpeg/Makefile

index a8e9f51..1968dc4 100644 (file)
@@ -22,7 +22,7 @@ define Package/libdlna
  CATEGORY:=Libraries
  TITLE:= Reference DLNA implementation
  URL:=http://libdlna.geexbox.org/
- DEPENDS:=+libffmpeg
+ DEPENDS:=+libffmpeg +@FFMPEG_LIBDLNA_SUPPORT
 endef
 
 define Package/libdlna/description
index 259cb8f..d2cd36c 100644 (file)
@@ -1,9 +1,10 @@
 
 # FFmpeg configuration
 
+if PACKAGE_libffmpeg
+
 config FFMPEG_FFSERVER_SUPPORT
        bool
-       default y if PACKAGE_ffserver
        select FFMPEG_MUXER_ffm
        select FFMPEG_DEMUXER_rtsp
        select FFMPEG_PROTOCOL_rtp
@@ -263,3 +264,4 @@ config FFMPEG_PROTOCOL_IPv6
        bool
        prompt "IPv6"
 
+endif
index 35dba7c..6d496cc 100644 (file)
@@ -17,6 +17,73 @@ PKG_MD5SUM:=63aeb859941b96ed3ef7b0c7a643bf4d
 
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-export-2008-04-19
 
+FFMPEG_ENCODERS:= \
+       ac3 \
+       jpegls \
+       mpeg1video \
+       mpeg2video \
+       mpeg4 \
+       png \
+       zlib \
+
+FFMPEG_DECODERS:= \
+       ac3 \
+       atrac3 \
+       gif \
+       h264 \
+       jpegls \
+       mp3 \
+       mpeg1video \
+       mpeg2video \
+       mpeg4 \
+       mpeg4aac \
+       mpegvideo \
+       png \
+       wmav1 \
+       wmav2 \
+       zlib \
+
+FFMPEG_MUXERS:= \
+       ac3 \
+       ffm \
+       h264 \
+       mp3 \
+       mp4 \
+       mpeg1video \
+       mpeg2video \
+       mpegts \
+       rtp \
+
+FFMPEG_DEMUXERS:= \
+       ac3 \
+       ffm \
+       h264 \
+       mp3 \
+       mpegps \
+       mpegts \
+       mpegvideo \
+       rtsp \
+       sdp \
+       v4l2 \
+
+FFMPEG_PARSERS:= \
+       ac3 \
+       h264 \
+       mpegaudio \
+       mpegvideo \
+       mpeg4video \
+
+FFMPEG_PROTOCOLS:= \
+       file http pipe rtp tcp udp
+
+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))
+
 include $(INCLUDE_DIR)/package.mk
 
 define Package/ffmpeg/Default
@@ -48,7 +115,7 @@ $(call Package/ffserver/Default)
  SECTION:=multimedia
  CATEGORY:=Multimedia
  TITLE+= streaming server
- DEPENDS+= +libpthread +libffmpeg
+ DEPENDS+= +libpthread +libffmpeg +@FFMPEG_FFSERVER_SUPPORT
 endef
 
 define Package/ffserver/description
@@ -67,10 +134,7 @@ $(call Package/ffmpeg/Default)
 endef
 
 define Package/libffmpeg/config
-               menu "Configuration"
-                               depends on PACKAGE_libffmpeg
-               source "$(SOURCE)/Config.in"
-               endmenu
+source "$(SOURCE)/Config.in"
 endef
 
 define Package/libffmeg/description
@@ -87,94 +151,17 @@ define Package/libpostproc
  DEPENDS:=+libffmpeg
 endef
 
-FFMPEG_ENCODERS:= \
-       ac3 \
-       jpegls \
-       mpeg1video \
-       mpeg2video \
-       mpeg4 \
-       png \
-       zlib \
-
-FFMPEG_DECODERS:= \
-       ac3 \
-       atrac3 \
-       gif \
-       h264 \
-       jpegls \
-       mp3 \
-       mpeg1video \
-       mpeg2video \
-       mpeg4 \
-       mpeg4aac \
-       mpegvideo \
-       png \
-       wmav1 \
-       wmav2 \
-       zlib \
-
-FFMPEG_MUXERS:= \
-       ac3 \
-       ffm \
-       h264 \
-       mp3 \
-       mp4 \
-       mpeg1video \
-       mpeg2video \
-       mpegts \
-       rtp \
-
-FFMPEG_DEMUXERS:= \
-       ac3 \
-       ffm \
-       h264 \
-       mp3 \
-       mpegps \
-       mpegts \
-       mpegvideo \
-       rtsp \
-       sdp \
-       v4l2 \
-
-FFMPEG_PARSERS:= \
-       ac3 \
-       h264 \
-       mpegaudio \
-       mpegvideo \
-       mpeg4video \
-
-FFMPEG_PROTOCOLS:= \
-       file http pipe rtp tcp udp \
-
-FFMPEG_CONFIGURE_ENCODERS:= \
-       $(foreach c, $(FFMPEG_ENCODERS), \
-               $(if $(CONFIG_FFMPEG_ENCODER_$(c)),--enable-encoder="$(c)") \
-       )
-
-FFMPEG_CONFIGURE_DECODERS:= \
-       $(foreach c, $(FFMPEG_DECODERS), \
-               $(if $(CONFIG_FFMPEG_DECODER_$(c)),--enable-decoder="$(c)") \
+FILTER_CONFIG= \
+       $(foreach c, $(3), \
+               $(if $(CONFIG_FFMPEG_$(1)_$(c)),--enable-$(2)="$(c)") \
        )
 
-FFMPEG_CONFIGURE_MUXERS:= \
-       $(foreach c, $(FFMPEG_MUXERS), \
-               $(if $(CONFIG_FFMPEG_MUXER_$(c)),--enable-muxer="$(c)") \
-       )
-
-FFMPEG_CONFIGURE_DEMUXERS:= \
-       $(foreach c, $(FFMPEG_DEMUXERS), \
-               $(if $(CONFIG_FFMPEG_DEMUXER_$(c)),--enable-demuxer="$(c)") \
-       )
-
-FFMPEG_CONFIGURE_PARSERS:= \
-       $(foreach c, $(FFMPEG_PARSERS), \
-               $(if $(CONFIG_FFMPEG_PARSER_$(c)),--enable-parser="$(c)") \
-       )
-
-FFMPEG_CONFIGURE_PROTOCOLS:= \
-       $(foreach c, $(FFMPEG_PROTOCOLS), \
-               $(if $(CONFIG_FFMPEG_PROTOCOL_$(c)),--enable-protocol="$(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 Build/Configure
        # this is *NOT* GNU configure