* [Buildroot] Add ffmpeg support
@ 2010-06-12 16:22 Luca Ceresoli
2010-06-12 16:22 ` [Buildroot] [PATCH 1/4] ffmpeg: add new package Luca Ceresoli
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Luca Ceresoli @ 2010-06-12 16:22 UTC (permalink / raw)
To: buildroot
FFmpeg is a complete, cross-platform solution to record, convert and stream
audio and video. It includes libavcodec - the leading audio/video codec library.
This patchset adds support for building ffmpeg in buildroot.
Most high-level options are provided via kconfig options, and there is a hook
in the last commit to allow passing .configure any parameters not directly
supported (very handy for machine support, for example).
Note that this support is much more complete than the one in bug 401
(https://bugs.busybox.net/show_bug.cgi?id=401).
Thanks,
Luca
ffmpeg: add new package
ffmpeg: add commandline programs
ffmpeg: allow customization of codecs, (de)muxers and other components
ffmpeg: add user-defined configure parameters
CHANGES | 2 +-
package/multimedia/Config.in | 1 +
package/multimedia/ffmpeg/Config.in | 145 +++++++++++++++++++
.../ffmpeg-0.5.2-fix-sdl-config-search.patch | 17 +++
package/multimedia/ffmpeg/ffmpeg.mk | 150 ++++++++++++++++++++
5 files changed, 314 insertions(+), 1 deletions(-)
Luca
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/4] ffmpeg: add new package
2010-06-12 16:22 [Buildroot] Add ffmpeg support Luca Ceresoli
@ 2010-06-12 16:22 ` Luca Ceresoli
2010-06-13 11:54 ` Peter Korsgaard
2010-06-12 16:22 ` [Buildroot] [PATCH 2/4] ffmpeg: add commandline programs Luca Ceresoli
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Luca Ceresoli @ 2010-06-12 16:22 UTC (permalink / raw)
To: buildroot
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
CHANGES | 2 +-
package/multimedia/Config.in | 1 +
package/multimedia/ffmpeg/Config.in | 25 +++++++++++
package/multimedia/ffmpeg/ffmpeg.mk | 79 +++++++++++++++++++++++++++++++++++
4 files changed, 106 insertions(+), 1 deletions(-)
create mode 100644 package/multimedia/ffmpeg/Config.in
create mode 100644 package/multimedia/ffmpeg/ffmpeg.mk
diff --git a/CHANGES b/CHANGES
index 3ba7195..6ca4fc9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,7 @@
New GTK-based configurator, usable using 'make gconfig'.
- New packages: cgilua, copas, coxpcall, luafilesystem,
+ New packages: cgilua, copas, coxpcall, ffmpeg, luafilesystem,
luasocket, rings, wsapi, xavante
Updated/fixed packages: cdrkit, file, gawk, gstreamer, intltool,
diff --git a/package/multimedia/Config.in b/package/multimedia/Config.in
index 3305f7b..3b0eec5 100644
--- a/package/multimedia/Config.in
+++ b/package/multimedia/Config.in
@@ -3,6 +3,7 @@ source "package/multimedia/alsa-lib/Config.in"
source "package/multimedia/alsa-utils/Config.in"
source "package/multimedia/aumix/Config.in"
source "package/multimedia/flac/Config.in"
+source "package/multimedia/ffmpeg/Config.in"
source "package/multimedia/gstreamer/Config.in"
source "package/multimedia/gst-plugins-base/Config.in"
source "package/multimedia/gst-plugins-good/Config.in"
diff --git a/package/multimedia/ffmpeg/Config.in b/package/multimedia/ffmpeg/Config.in
new file mode 100644
index 0000000..bc8fb22
--- /dev/null
+++ b/package/multimedia/ffmpeg/Config.in
@@ -0,0 +1,25 @@
+menuconfig BR2_PACKAGE_FFMPEG
+ bool "ffmpeg"
+ 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"
+ default n
+ help
+ allow use of GPL code, the resulting libs and binaries will
+ be under GPL
+
+config BR2_PACKAGE_FFMPEG_NONFREE
+ bool "Enable nonfree code"
+ default n
+ help
+ allow use of nonfree code, the resulting libs and binaries
+ will be unredistributable
+
+endif
diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
new file mode 100644
index 0000000..b4abefb
--- /dev/null
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -0,0 +1,79 @@
+#############################################################
+#
+# ffmpeg
+#
+#############################################################
+FFMPEG_VERSION := 0.5.2
+FFMPEG_SOURCE := ffmpeg-$(FFMPEG_VERSION).tar.bz2
+FFMPEG_SITE := http://ffmpeg.org/releases
+FFMPEG_INSTALL_STAGING = YES
+FFMPEG_INSTALL_TARGET = YES
+
+FFMPEG_CONF_OPT = \
+ --prefix=/usr \
+ --enable-shared \
+ --disable-ffmpeg \
+ --disable-ffplay \
+ --disable-ffserver \
+ --disable-avfilter \
+ --disable-postproc \
+ --disable-swscale \
+ --disable-vhook \
+
+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_PTHREADS_NONE),y)
+FFMPEG_CONF_OPT += --disable-pthreads
+else
+FFMPEG_CONF_OPT += --enable-pthreads
+endif
+
+ifeq ($(BR2_INET_IPV6),y)
+FFMPEG_CONF_OPT += --enable-ipv6
+else
+FFMPEG_CONF_OPT += --disable-ipv6
+endif
+
+ifeq ($(BR2_PACKAGE_ZLIB),y)
+FFMPEG_CONF_OPT += --enable-zlib
+FFMPEG_DEPENDENCIES += zlib
+else
+FFMPEG_CONF_OPT += --disable-zlib
+endif
+
+# 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) \
+ $(TARGET_CONFIGURE_ENV) \
+ $(FFMPEG_CONF_ENV) \
+ ./configure \
+ --enable-cross-compile \
+ --cross-prefix=$(TARGET_CROSS) \
+ --sysroot=$(STAGING_DIR) \
+ --host-cc=$(HOSTCC) \
+ --cc=$(TARGET_CC) \
+ --arch=$(BR2_ARCH) \
+ --extra-cflags=-fPIC \
+ $(DISABLE_NLS) \
+ $(DISABLE_LARGEFILE) \
+ $(DISABLE_IPV6) \
+ $(FFMPEG_CONF_OPT) \
+ )
+endef
+
+# Override FFMPEG_INSTALL_TARGET_OPT: FFmpeg does not support install-strip
+FFMPEG_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
+
+$(eval $(call AUTOTARGETS,package/multimedia,ffmpeg))
--
1.7.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 2/4] ffmpeg: add commandline programs
2010-06-12 16:22 [Buildroot] Add ffmpeg support Luca Ceresoli
2010-06-12 16:22 ` [Buildroot] [PATCH 1/4] ffmpeg: add new package Luca Ceresoli
@ 2010-06-12 16:22 ` Luca Ceresoli
2010-06-12 16:22 ` [Buildroot] [PATCH 3/4] ffmpeg: allow customization of codecs, (de)muxers and other components Luca Ceresoli
2010-06-12 16:22 ` [Buildroot] [PATCH 4/4] ffmpeg: add user-defined configure parameters Luca Ceresoli
3 siblings, 0 replies; 8+ messages in thread
From: Luca Ceresoli @ 2010-06-12 16:22 UTC (permalink / raw)
To: buildroot
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
package/multimedia/ffmpeg/Config.in | 25 ++++++++++++++++++++
.../ffmpeg-0.5.2-fix-sdl-config-search.patch | 17 +++++++++++++
package/multimedia/ffmpeg/ffmpeg.mk | 23 ++++++++++++++++--
3 files changed, 62 insertions(+), 3 deletions(-)
create mode 100644 package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch
diff --git a/package/multimedia/ffmpeg/Config.in b/package/multimedia/ffmpeg/Config.in
index bc8fb22..736a8ec 100644
--- a/package/multimedia/ffmpeg/Config.in
+++ b/package/multimedia/ffmpeg/Config.in
@@ -22,4 +22,29 @@ config BR2_PACKAGE_FFMPEG_NONFREE
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)"
+ 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
+ default n
+ 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"
+ default n
+ help
+ FFserver is a streaming server for both audio and video.
+
endif
diff --git a/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch b/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch
new file mode 100644
index 0000000..58d08aa
--- /dev/null
+++ b/package/multimedia/ffmpeg/ffmpeg-0.5.2-fix-sdl-config-search.patch
@@ -0,0 +1,17 @@
+Allow FFmpeg's ./configure script to use a custom sdl-config command.
+
+Inspired from:
+http://www.mail-archive.com/uclinux-dist-commits at blackfin.uclinux.org/msg01099.html
+
+diff -u ffmpeg-0.5.2-orig/configure ffmpeg-0.5.2/configure
+--- a/configure
++++ b/configure
+@@ -2066,7 +2066,7 @@
+
+ disable sdl_too_old
+ disable sdl
+-SDL_CONFIG="${cross_prefix}sdl-config"
++SDL_CONFIG="${SDL_CONFIG-${cross_prefix}sdl-config}"
+ if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+ sdl_cflags=`"${SDL_CONFIG}" --cflags`
+ temp_cflags $sdl_cflags
diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
index b4abefb..0af08e5 100644
--- a/package/multimedia/ffmpeg/ffmpeg.mk
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -12,9 +12,6 @@ FFMPEG_INSTALL_TARGET = YES
FFMPEG_CONF_OPT = \
--prefix=/usr \
--enable-shared \
- --disable-ffmpeg \
- --disable-ffplay \
- --disable-ffserver \
--disable-avfilter \
--disable-postproc \
--disable-swscale \
@@ -32,6 +29,26 @@ 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_PTHREADS_NONE),y)
FFMPEG_CONF_OPT += --disable-pthreads
else
--
1.7.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/4] ffmpeg: allow customization of codecs, (de)muxers and other components
2010-06-12 16:22 [Buildroot] Add ffmpeg support Luca Ceresoli
2010-06-12 16:22 ` [Buildroot] [PATCH 1/4] ffmpeg: add new package Luca Ceresoli
2010-06-12 16:22 ` [Buildroot] [PATCH 2/4] ffmpeg: add commandline programs Luca Ceresoli
@ 2010-06-12 16:22 ` Luca Ceresoli
2010-06-13 12:01 ` Peter Korsgaard
2010-06-12 16:22 ` [Buildroot] [PATCH 4/4] ffmpeg: add user-defined configure parameters Luca Ceresoli
3 siblings, 1 reply; 8+ messages in thread
From: Luca Ceresoli @ 2010-06-12 16:22 UTC (permalink / raw)
To: buildroot
Add the option to customize the list of decoders, encoders, muxers, demuxers,
parsers, protocols, bsfs and filters to be built into ffmpeg, and to compile or
exclude input and output devices.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
package/multimedia/ffmpeg/Config.in | 88 +++++++++++++++++++++++++++++++++++
package/multimedia/ffmpeg/ffmpeg.mk | 52 ++++++++++++++++++++
2 files changed, 140 insertions(+), 0 deletions(-)
diff --git a/package/multimedia/ffmpeg/Config.in b/package/multimedia/ffmpeg/Config.in
index 736a8ec..7530929 100644
--- a/package/multimedia/ffmpeg/Config.in
+++ b/package/multimedia/ffmpeg/Config.in
@@ -47,4 +47,92 @@ config BR2_PACKAGE_FFMPEG_FFSERVER
help
FFserver is a streaming server for both audio and video.
+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
+
endif
diff --git a/package/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
index 0af08e5..3fc4990 100644
--- a/package/multimedia/ffmpeg/ffmpeg.mk
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -49,6 +49,58 @@ else
FFMPEG_CONF_OPT += --disable-ffserver
endif
+ifneq ($(BR2_PACKAGE_FFMPEG_ENCODERS),"all")
+FFMPEG_CONF_OPT += --disable-encoders \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x))
+endif
+
+ifneq ($(BR2_PACKAGE_FFMPEG_DECODERS),"all")
+FFMPEG_CONF_OPT += --disable-decoders \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x))
+endif
+
+ifneq ($(BR2_PACKAGE_FFMPEG_MUXERS),"all")
+FFMPEG_CONF_OPT += --disable-muxers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x))
+endif
+
+ifneq ($(BR2_PACKAGE_FFMPEG_DEMUXERS),"all")
+FFMPEG_CONF_OPT += --disable-demuxers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x))
+endif
+
+ifneq ($(BR2_PACKAGE_FFMPEG_PARSERS),"all")
+FFMPEG_CONF_OPT += --disable-parsers \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x))
+endif
+
+ifneq ($(BR2_PACKAGE_FFMPEG_BSFS),"all")
+FFMPEG_CONF_OPT += --disable-bsfs \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsf=$(x))
+endif
+
+ifneq ($(BR2_PACKAGE_FFMPEG_PROTOCOLS),"all")
+FFMPEG_CONF_OPT += --disable-protocols \
+ $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x))
+endif
+
+ifneq ($(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_PTHREADS_NONE),y)
FFMPEG_CONF_OPT += --disable-pthreads
else
--
1.7.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 4/4] ffmpeg: add user-defined configure parameters
2010-06-12 16:22 [Buildroot] Add ffmpeg support Luca Ceresoli
` (2 preceding siblings ...)
2010-06-12 16:22 ` [Buildroot] [PATCH 3/4] ffmpeg: allow customization of codecs, (de)muxers and other components Luca Ceresoli
@ 2010-06-12 16:22 ` Luca Ceresoli
3 siblings, 0 replies; 8+ messages in thread
From: Luca Ceresoli @ 2010-06-12 16:22 UTC (permalink / raw)
To: buildroot
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
package/multimedia/ffmpeg/Config.in | 7 +++++++
package/multimedia/ffmpeg/ffmpeg.mk | 2 ++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/package/multimedia/ffmpeg/Config.in b/package/multimedia/ffmpeg/Config.in
index 7530929..1049903 100644
--- a/package/multimedia/ffmpeg/Config.in
+++ b/package/multimedia/ffmpeg/Config.in
@@ -135,4 +135,11 @@ 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/multimedia/ffmpeg/ffmpeg.mk b/package/multimedia/ffmpeg/ffmpeg.mk
index 3fc4990..d23f0e9 100644
--- a/package/multimedia/ffmpeg/ffmpeg.mk
+++ b/package/multimedia/ffmpeg/ffmpeg.mk
@@ -120,6 +120,8 @@ else
FFMPEG_CONF_OPT += --disable-zlib
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 && \
--
1.7.0.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/4] ffmpeg: add new package
2010-06-12 16:22 ` [Buildroot] [PATCH 1/4] ffmpeg: add new package Luca Ceresoli
@ 2010-06-13 11:54 ` Peter Korsgaard
0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2010-06-13 11:54 UTC (permalink / raw)
To: buildroot
>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:
Luca> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Looks good - A few comments though:
Luca> ---
Luca> CHANGES | 2 +-
Luca> package/multimedia/Config.in | 1 +
Luca> package/multimedia/ffmpeg/Config.in | 25 +++++++++++
Luca> package/multimedia/ffmpeg/ffmpeg.mk | 79 +++++++++++++++++++++++++++++++++++
Luca> 4 files changed, 106 insertions(+), 1 deletions(-)
Luca> create mode 100644 package/multimedia/ffmpeg/Config.in
Luca> create mode 100644 package/multimedia/ffmpeg/ffmpeg.mk
Luca> diff --git a/CHANGES b/CHANGES
Luca> index 3ba7195..6ca4fc9 100644
Luca> --- a/CHANGES
Luca> +++ b/CHANGES
Luca> @@ -4,7 +4,7 @@
Luca> New GTK-based configurator, usable using 'make gconfig'.
Luca> - New packages: cgilua, copas, coxpcall, luafilesystem,
Luca> + New packages: cgilua, copas, coxpcall, ffmpeg, luafilesystem,
Luca> luasocket, rings, wsapi, xavante
I would prefer if patches don't edit CHANGES - There's too high risk for
merge conflicts.
Luca> +config BR2_PACKAGE_FFMPEG_GPL
Luca> + bool "Enable GPL code"
Luca> + default n
Luca> +config BR2_PACKAGE_FFMPEG_NONFREE
Luca> + bool "Enable nonfree code"
Luca> + default n
'n' is default, so there's no need for those lines.
Luca> +ifeq ($(BR2_INET_IPV6),y)
Luca> +FFMPEG_CONF_OPT += --enable-ipv6
Luca> +else
Luca> +FFMPEG_CONF_OPT += --disable-ipv6
Luca> +endif
We do have a generic DISABLE_IPV6 if ffmpeg detects ipv6 support
automatically even if --enable-ipv6 isn' passed.
Luca> +# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
Luca> +define FFMPEG_CONFIGURE_CMDS
Luca> + (cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \
Luca> + $(TARGET_CONFIGURE_OPTS) \
Luca> + $(TARGET_CONFIGURE_ARGS) \
Luca> + $(TARGET_CONFIGURE_ENV) \
Luca> + $(FFMPEG_CONF_ENV) \
Luca> + ./configure \
Luca> + --enable-cross-compile \
Luca> + --cross-prefix=$(TARGET_CROSS) \
Luca> + --sysroot=$(STAGING_DIR) \
Luca> + --host-cc=$(HOSTCC) \
Luca> + --cc=$(TARGET_CC) \
Luca> + --arch=$(BR2_ARCH) \
Luca> + --extra-cflags=-fPIC \
Luca> + $(DISABLE_NLS) \
Luca> + $(DISABLE_LARGEFILE) \
Luca> + $(DISABLE_IPV6) \
Luca> + $(FFMPEG_CONF_OPT) \
Does ffmpeg configure handle the -q (quiet) flag? If so, please add
$(QUIET) as well.
Is --cc needed? Doesn't it just use the CC environment variable? If not,
what about TARGET_CFLAGS / TARGET_LDFLAGS?
Luca> + )
Luca> +endef
Luca> +
Luca> +# Override FFMPEG_INSTALL_TARGET_OPT: FFmpeg does not support install-strip
Luca> +FFMPEG_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
FYI, in the future I would like to get rid of the 'make install vs make
install-strip', but for now this is fine.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 3/4] ffmpeg: allow customization of codecs, (de)muxers and other components
2010-06-12 16:22 ` [Buildroot] [PATCH 3/4] ffmpeg: allow customization of codecs, (de)muxers and other components Luca Ceresoli
@ 2010-06-13 12:01 ` Peter Korsgaard
0 siblings, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2010-06-13 12:01 UTC (permalink / raw)
To: buildroot
>>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:
Luca> Add the option to customize the list of decoders, encoders,
Luca> muxers, demuxers, parsers, protocols, bsfs and filters to be
Luca> built into ffmpeg, and to compile or exclude input and output
Luca> devices.
Luca> +++ b/package/multimedia/ffmpeg/ffmpeg.mk
Luca> @@ -49,6 +49,58 @@ else
Luca> FFMPEG_CONF_OPT += --disable-ffserver
Luca> endif
Luca> +ifneq ($(BR2_PACKAGE_FFMPEG_ENCODERS),"all")
Luca> +FFMPEG_CONF_OPT += --disable-encoders \
Luca> + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x))
Luca> +endif
Luca> +
Luca> +ifneq ($(BR2_PACKAGE_FFMPEG_DECODERS),"all")
I would suggest you use qstrip + strip here as well, so it doesn't break if the
user accidently added extra spaces or so.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] [PATCH 1/4] ffmpeg: add new package
@ 2010-06-14 8:45 Luca Ceresoli
0 siblings, 0 replies; 8+ messages in thread
From: Luca Ceresoli @ 2010-06-14 8:45 UTC (permalink / raw)
To: buildroot
Peter Korsgaard wrote:
> >>>>> "Luca" == Luca Ceresoli <luca@lucaceresoli.net> writes:
>
> Luca> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
>
> Looks good - A few comments though:
Ok with almost all. See below.
>
> Luca> ---
> Luca> CHANGES | 2 +-
> Luca> package/multimedia/Config.in | 1 +
> Luca> package/multimedia/ffmpeg/Config.in | 25 +++++++++++
> Luca> package/multimedia/ffmpeg/ffmpeg.mk | 79 +++++++++++++++++++++++++++++++++++
> Luca> 4 files changed, 106 insertions(+), 1 deletions(-)
> Luca> create mode 100644 package/multimedia/ffmpeg/Config.in
> Luca> create mode 100644 package/multimedia/ffmpeg/ffmpeg.mk
>
> Luca> diff --git a/CHANGES b/CHANGES
> Luca> index 3ba7195..6ca4fc9 100644
> Luca> --- a/CHANGES
> Luca> +++ b/CHANGES
> Luca> @@ -4,7 +4,7 @@
>
> Luca> New GTK-based configurator, usable using 'make gconfig'.
>
> Luca> - New packages: cgilua, copas, coxpcall, luafilesystem,
> Luca> + New packages: cgilua, copas, coxpcall, ffmpeg, luafilesystem,
> Luca> luasocket, rings, wsapi, xavante
>
> I would prefer if patches don't edit CHANGES - There's too high risk for
> merge conflicts.
>
> Luca> +config BR2_PACKAGE_FFMPEG_GPL
> Luca> + bool "Enable GPL code"
> Luca> + default n
> Luca> +config BR2_PACKAGE_FFMPEG_NONFREE
> Luca> + bool "Enable nonfree code"
> Luca> + default n
>
> 'n' is default, so there's no need for those lines.
>
> Luca> +ifeq ($(BR2_INET_IPV6),y)
> Luca> +FFMPEG_CONF_OPT += --enable-ipv6
> Luca> +else
> Luca> +FFMPEG_CONF_OPT += --disable-ipv6
> Luca> +endif
>
> We do have a generic DISABLE_IPV6 if ffmpeg detects ipv6 support
> automatically even if --enable-ipv6 isn' passed.
>
> Luca> +# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others
> Luca> +define FFMPEG_CONFIGURE_CMDS
> Luca> + (cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \
> Luca> + $(TARGET_CONFIGURE_OPTS) \
> Luca> + $(TARGET_CONFIGURE_ARGS) \
> Luca> + $(TARGET_CONFIGURE_ENV) \
> Luca> + $(FFMPEG_CONF_ENV) \
> Luca> + ./configure \
> Luca> + --enable-cross-compile \
> Luca> + --cross-prefix=$(TARGET_CROSS) \
> Luca> + --sysroot=$(STAGING_DIR) \
> Luca> + --host-cc=$(HOSTCC) \
> Luca> + --cc=$(TARGET_CC) \
> Luca> + --arch=$(BR2_ARCH) \
> Luca> + --extra-cflags=-fPIC \
> Luca> + $(DISABLE_NLS) \
> Luca> + $(DISABLE_LARGEFILE) \
> Luca> + $(DISABLE_IPV6) \
> Luca> + $(FFMPEG_CONF_OPT) \
>
> Does ffmpeg configure handle the -q (quiet) flag? If so, please add
> $(QUIET) as well.
It doesn't.
>
> Is --cc needed? Doesn't it just use the CC environment variable? If not,
> what about TARGET_CFLAGS / TARGET_LDFLAGS?
>
> Luca> + )
> Luca> +endef
> Luca> +
> Luca> +# Override FFMPEG_INSTALL_TARGET_OPT: FFmpeg does not support install-strip
> Luca> +FFMPEG_INSTALL_TARGET_OPT = DESTDIR=$(TARGET_DIR) install
>
> FYI, in the future I would like to get rid of the 'make install vs make
> install-strip', but for now this is fine.
>
> --
> Bye, Peter Korsgaard
>
Luca
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-06-14 8:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-12 16:22 [Buildroot] Add ffmpeg support Luca Ceresoli
2010-06-12 16:22 ` [Buildroot] [PATCH 1/4] ffmpeg: add new package Luca Ceresoli
2010-06-13 11:54 ` Peter Korsgaard
2010-06-12 16:22 ` [Buildroot] [PATCH 2/4] ffmpeg: add commandline programs Luca Ceresoli
2010-06-12 16:22 ` [Buildroot] [PATCH 3/4] ffmpeg: allow customization of codecs, (de)muxers and other components Luca Ceresoli
2010-06-13 12:01 ` Peter Korsgaard
2010-06-12 16:22 ` [Buildroot] [PATCH 4/4] ffmpeg: add user-defined configure parameters Luca Ceresoli
-- strict thread matches above, loose matches on Subject: below --
2010-06-14 8:45 [Buildroot] [PATCH 1/4] ffmpeg: add new package Luca Ceresoli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox