summaryrefslogtreecommitdiffstats
path: root/package/ffmpeg
diff options
context:
space:
mode:
authorJérôme Pouiller <jezz@sysmic.org>2013-08-30 11:05:57 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2013-09-08 21:41:39 +0200
commitadf6511013b8921d6856f5dc0e053cdd27891244 (patch)
tree14f1ba25f8ae138743e3f3954b85883c636714d8 /package/ffmpeg
parentbafa8fcc6ce90553843b5c24e68de57c40f94abe (diff)
downloadbuildroot-adf6511013b8921d6856f5dc0e053cdd27891244.tar.gz
buildroot-adf6511013b8921d6856f5dc0e053cdd27891244.zip
Remove multimedia subdirectory
Unless it was a group of sub-packages, packages was never regrouped by category. multimedia/ was an exception to this rule. This patch move packages/multimedia/ sub-directories to packages/. It keeps two subdirectories for gstream 0.10 and gstreamer 1.X. Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/ffmpeg')
-rw-r--r--package/ffmpeg/Config.in158
-rw-r--r--package/ffmpeg/ffmpeg-sdlconfig.patch17
-rw-r--r--package/ffmpeg/ffmpeg.mk193
3 files changed, 368 insertions, 0 deletions
diff --git a/package/ffmpeg/Config.in b/package/ffmpeg/Config.in
new file mode 100644
index 0000000000..d11233e947
--- /dev/null
+++ b/package/ffmpeg/Config.in
@@ -0,0 +1,158 @@
+comment "ffmpeg requires a toolchain with LARGEFILE and IPV6 support"
+ depends on !(BR2_LARGEFILE && BR2_INET_IPV6)
+
+menuconfig BR2_PACKAGE_FFMPEG
+ bool "ffmpeg"
+ depends on BR2_LARGEFILE
+ depends on BR2_INET_IPV6
+ help
+ FFmpeg is a complete, cross-platform solution to record, convert
+ and stream audio and video.
+
+ http://www.ffmpeg.org
+
+if BR2_PACKAGE_FFMPEG
+
+config BR2_PACKAGE_FFMPEG_GPL
+ bool "Enable GPL code"
+ help
+ allow use of GPL code, the resulting libs and binaries will
+ be under GPL
+
+config BR2_PACKAGE_FFMPEG_NONFREE
+ bool "Enable nonfree code"
+ help
+ allow use of nonfree code, the resulting libs and binaries
+ will be unredistributable
+
+config BR2_PACKAGE_FFMPEG_FFMPEG
+ bool "Build ffmpeg (the command line application)"
+ select BR2_PACKAGE_FFMPEG_SWSCALE
+ default y
+ help
+ FFmpeg is a very fast video and audio converter.
+ It can also grab from a live audio/video source.
+
+ It is not needed if you want to link the FFmpeg libraries
+ to your application.
+
+config BR2_PACKAGE_FFMPEG_FFPLAY
+ bool "Build ffplay"
+ select BR2_PACKAGE_SDL
+ help
+ FFplay is a very simple and portable media player using the
+ FFmpeg libraries and the SDL library.
+ It is mostly used as a testbed for the various FFmpeg APIs.
+
+config BR2_PACKAGE_FFMPEG_FFSERVER
+ bool "Build ffserver"
+ help
+ FFserver is a streaming server for both audio and video.
+
+config BR2_PACKAGE_FFMPEG_POSTPROC
+ bool "Build libpostproc"
+ depends on BR2_PACKAGE_FFMPEG_GPL
+ help
+ Postproc is a library of video postprocessing routines.
+
+config BR2_PACKAGE_FFMPEG_SWSCALE
+ bool "Build libswscale"
+ help
+ Swscale is a library of video scaling routines.
+
+config BR2_PACKAGE_FFMPEG_ENCODERS
+ string "Enabled encoders"
+ default "all"
+ help
+ Space-separated list of encoders to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-encoders in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_DECODERS
+ string "Enabled decoders"
+ default "all"
+ help
+ Space-separated list of decoders to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-decoders in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_MUXERS
+ string "Enabled muxers"
+ default "all"
+ help
+ Space-separated list of muxers to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-muxers in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_DEMUXERS
+ string "Enabled demuxers"
+ default "all"
+ help
+ Space-separated list of demuxers to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-demuxers in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_PARSERS
+ string "Enabled parsers"
+ default "all"
+ help
+ Space-separated list of parsers to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-parsers in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_BSFS
+ string "Enabled bitstreams"
+ default "all"
+ help
+ Space-separated list of bitstream filters to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-bsfs in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_PROTOCOLS
+ string "Enabled protocols"
+ default "all"
+ help
+ Space-separated list of protocols to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-protocols in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_FILTERS
+ string "Enabled filters"
+ default "all"
+ help
+ Space-separated list of filters to build in FFmpeg,
+ or "all" to build all of them.
+
+ Run ./configure --list-filters in the ffmpeg sources
+ directory to know the available options.
+
+config BR2_PACKAGE_FFMPEG_INDEVS
+ bool "Enable input devices"
+ default y
+
+config BR2_PACKAGE_FFMPEG_OUTDEVS
+ bool "Enable output devices"
+ default y
+
+config BR2_PACKAGE_FFMPEG_EXTRACONF
+ string "Additional parameters for ./configure"
+ default ""
+ help
+ Extra parameters that will be appended to FFmpeg's
+ ./configure commandline.
+
+endif
diff --git a/package/ffmpeg/ffmpeg-sdlconfig.patch b/package/ffmpeg/ffmpeg-sdlconfig.patch
new file mode 100644
index 0000000000..64371b29f3
--- /dev/null
+++ b/package/ffmpeg/ffmpeg-sdlconfig.patch
@@ -0,0 +1,17 @@
+We need to pass the location sdl-config so that ffmpeg picks it up.
+So just pass the whole string to make things simpler.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura ffmpeg-0.8.7.orig/configure ffmpeg-0.8.7/configure
+--- ffmpeg-0.8.7.orig/configure 2011-11-21 16:49:30.000000000 -0300
++++ ffmpeg-0.8.7/configure 2011-12-02 08:13:36.746619395 -0300
+@@ -2957,7 +2957,7 @@
+ enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
+ enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
+
+-SDL_CONFIG="${cross_prefix}sdl-config"
++SDL_CONFIG="${SDL_CONFIG}"
+ if check_pkg_config sdl SDL_version.h SDL_Linked_Version; then
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+ enable sdl &&
diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk
new file mode 100644
index 0000000000..b102af12c2
--- /dev/null
+++ b/package/ffmpeg/ffmpeg.mk
@@ -0,0 +1,193 @@
+################################################################################
+#
+# ffmpeg
+#
+################################################################################
+
+FFMPEG_VERSION = 0.8.12
+FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.bz2
+FFMPEG_SITE = http://ffmpeg.org/releases
+FFMPEG_INSTALL_STAGING = YES
+
+FFMPEG_LICENSE = LGPLv2.1+, libjpeg license
+FFMPEG_LICENSE_FILES = LICENSE COPYING.LGPLv2.1
+ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
+FFMPEG_LICENSE += and GPLv2+
+FFMPEG_LICENSE_FILES += COPYING.GPLv2
+endif
+
+FFMPEG_CONF_OPT = \
+ --prefix=/usr \
+ --disable-avfilter \
+ $(if $(BR2_HAVE_DOCUMENTATION),,--disable-doc)
+
+ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
+FFMPEG_CONF_OPT += --enable-gpl
+else
+FFMPEG_CONF_OPT += --disable-gpl
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y)
+FFMPEG_CONF_OPT += --enable-nonfree
+else
+FFMPEG_CONF_OPT += --disable-nonfree
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y)
+FFMPEG_CONF_OPT += --enable-ffmpeg
+else
+FFMPEG_CONF_OPT += --disable-ffmpeg
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y)
+FFMPEG_DEPENDENCIES += sdl
+FFMPEG_CONF_OPT += --enable-ffplay
+FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config
+else
+FFMPEG_CONF_OPT += --disable-ffplay
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y)
+FFMPEG_CONF_OPT += --enable-ffserver
+else
+FFMPEG_CONF_OPT += --disable-ffserver
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y)
+FFMPEG_CONF_OPT += --enable-postproc
+else
+FFMPEG_CONF_OPT += --disable-postproc
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
+FFMPEG_CONF_OPT += --enable-swscale
+else
+FFMPEG_CONF_OPT += --disable-swscale
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all)
+FFMPEG_CONF_OPT += --disable-encoders \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),all)
+FFMPEG_CONF_OPT += --disable-decoders \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),all)
+FFMPEG_CONF_OPT += --disable-muxers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),all)
+FFMPEG_CONF_OPT += --disable-demuxers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),all)
+FFMPEG_CONF_OPT += --disable-parsers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),all)
+FFMPEG_CONF_OPT += --disable-bsfs \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsf=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),all)
+FFMPEG_CONF_OPT += --disable-protocols \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x))
+endif
+
+ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),all)
+FFMPEG_CONF_OPT += --disable-filters \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x))
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y)
+FFMPEG_CONF_OPT += --enable-indevs
+else
+FFMPEG_CONF_OPT += --disable-indevs
+endif
+
+ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y)
+FFMPEG_CONF_OPT += --enable-outdevs
+else
+FFMPEG_CONF_OPT += --disable-outdevs
+endif
+
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+FFMPEG_CONF_OPT += --enable-pthreads
+else
+FFMPEG_CONF_OPT += --disable-pthreads
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+FFMPEG_CONF_OPT += --enable-zlib
+FFMPEG_DEPENDENCIES += zlib
+else
+FFMPEG_CONF_OPT += --disable-zlib
+endif
+
+ifeq ($(BR2_i386)$(BR2_x86_64),y)
+# MMX on is default for x86, disable it for lowly x86-type processors
+ifeq ($(BR2_x86_i386)$(BR2_x86_i486)$(BR2_x86_i586)$(BR2_x86_i686)$(BR2_x86_pentiumpro)$(BR2_x86_geode),y)
+FFMPEG_CONF_OPT += --disable-mmx
+else
+# If it is enabled, nasm is required
+FFMPEG_DEPENDENCIES += host-nasm
+endif
+endif
+
+# Explicitly disable everything that doesn't match for ARM
+# FFMPEG "autodetects" by compiling an extended instruction via AS
+# This works on compilers that aren't built for generic by default
+ifeq ($(BR2_arm7tdmi)$(BR2_arm720t)$(BR2_arm920t)$(BR2_arm922t)$(BR2_strongarm)$(BR2_fa526),y)
+FFMPEG_CONF_OPT += --disable-armv5te
+endif
+ifeq ($(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf_s),y)
+FFMPEG_CONF_OPT += --enable-armv6
+else
+FFMPEG_CONF_OPT += --disable-armv6 --disable-armv6t2
+endif
+ifeq ($(BR2_arm10)$(BR2_arm1136jf_s)$(BR2_arm1176jz_s)$(BR2_arm1176jzf_s)$(BR2_cortex_a5)$(BR2_cortex_a8)$(BR2_cortex_a9)$(BR2_cortex_a15),y)
+FFMPEG_CONF_OPT += --enable-armvfp
+else
+FFMPEG_CONF_OPT += --disable-armvfp
+endif
+ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
+FFMPEG_CONF_OPT += --enable-neon
+endif
+
+# Set powerpc altivec appropriately
+ifeq ($(BR2_powerpc),y)
+ifeq ($(BR2_powerpc_7400)$(BR2_powerpc_7450)$(BR2_powerpc_970),y)
+FFMPEG_CONF_OPT += --enable-altivec
+else
+FFMPEG_CONF_OPT += --disable-altivec
+endif
+endif
+
+FFMPEG_CONF_OPT += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF))
+
+# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
+define FFMPEG_CONFIGURE_CMDS
+ (cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ $(FFMPEG_CONF_ENV) \
+ ./configure \
+ --enable-cross-compile \
+ --cross-prefix=$(TARGET_CROSS) \
+ --sysroot=$(STAGING_DIR) \
+ --host-cc="$(HOSTCC)" \
+ --arch=$(BR2_ARCH) \
+ --target-os=linux \
+ --extra-cflags=-fPIC \
+ $(SHARED_STATIC_LIBS_OPTS) \
+ $(FFMPEG_CONF_OPT) \
+ )
+endef
+
+$(eval $(autotools-package))
OpenPOWER on IntegriCloud