All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernd Kuhls <bernd.kuhls@t-online.de>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v12 31/31] package/freeswitch: enable video support
Date: Sun, 10 Apr 2016 11:41:39 +0200	[thread overview]
Message-ID: <1460281299-2385-32-git-send-email-bernd.kuhls@t-online.de> (raw)
In-Reply-To: <1460281299-2385-1-git-send-email-bernd.kuhls@t-online.de>

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/freeswitch/Config.in     | 16 +++++++++++++++-
 package/freeswitch/freeswitch.mk | 38 ++++++++++++++++++++++++++++++++++++--
 2 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/package/freeswitch/Config.in b/package/freeswitch/Config.in
index c521647..d552ccb 100644
--- a/package/freeswitch/Config.in
+++ b/package/freeswitch/Config.in
@@ -1,4 +1,4 @@
-config BR2_PACKAGE_FREESWITCH
+menuconfig BR2_PACKAGE_FREESWITCH
 	bool "freeswitch"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on !BR2_STATIC_LIBS # apr, included in freeswitch source
@@ -22,6 +22,20 @@ config BR2_PACKAGE_FREESWITCH
 
 	  https://www.freeswitch.org
 
+if BR2_PACKAGE_FREESWITCH
+
+config BR2_PACKAGE_FREESWITCH_MODULE_VIDEO
+	bool "Video support"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # libyuv (in-tree)
+	select BR2_PACKAGE_FFMPEG
+	select BR2_PACKAGE_FFMPEG_AVRESAMPLE
+	select BR2_PACKAGE_FFMPEG_SWSCALE
+
+comment "Video support needs a toolchain w/ gcc >= 4.8"
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
+endif
+
 comment "freeswitch needs a toolchain w/ C++, dynamic library, threads"
 	depends on BR2_USE_MMU
 	depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS \
diff --git a/package/freeswitch/freeswitch.mk b/package/freeswitch/freeswitch.mk
index 8695b30..70345b9 100644
--- a/package/freeswitch/freeswitch.mk
+++ b/package/freeswitch/freeswitch.mk
@@ -54,8 +54,6 @@ FREESWITCH_CONF_ENV += \
 	ac_cv_gcc_supports_w_no_unused_result=no
 
 FREESWITCH_CONF_OPTS = \
-	--disable-libvpx \
-	--disable-libyuv \
 	--without-erlang \
 	--enable-fhs \
 	--without-python \
@@ -282,4 +280,40 @@ ifeq ($(BR2_PACKAGE_XZ),y)
 FREESWITCH_DEPENDENCIES += xz
 endif
 
+ifeq ($(BR2_PACKAGE_FREESWITCH_MODULE_VIDEO),y)
+FREESWITCH_CONF_OPTS += --enable-libvpx --enable-libyuv
+FREESWITCH_DEPENDENCIES += host-yasm ffmpeg
+FREESWITCH_ENABLED_MODULES += applications/mod_av
+FREESWITCH_ENABLED_MODULES += applications/mod_fsv
+
+# freeswitch uses its own copy of libvpx since 1.6.7
+# the implementation of libvpx into the freeswitch build system is not
+# cross-compile friendly so we compile libvpx ourselves by copying
+# most of packages/libvpx/libvpx.mk here, added by some --disable-
+# options from freeswitch-1.6.7/Makefile.am, line 536
+define FREESWITCH_CROSS_COMPILE_LIBVPX
+	(cd $(@D)/libs/libvpx && \
+	$(TARGET_CONFIGURE_OPTS) \
+	$(TARGET_CONFIGURE_ARGS) \
+	LD="$(TARGET_CC)" \
+	CROSS=$(GNU_TARGET_NAME) \
+	./configure \
+		--target=generic-gnu \
+		--enable-pic \
+		--prefix=/usr \
+		--disable-docs \
+		--disable-examples \
+		--disable-install-bins \
+		--disable-install-srcs \
+		--disable-unit-tests \
+		--extra-cflags="-fvisibility=hidden" \
+	)
+	$(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) -C $(@D)/libs/libvpx
+endef
+FREESWITCH_POST_CONFIGURE_HOOKS += FREESWITCH_CROSS_COMPILE_LIBVPX
+
+else
+FREESWITCH_CONF_OPTS += --disable-libvpx --disable-libyuv
+endif
+
 $(eval $(autotools-package))
-- 
2.8.0.rc3

      parent reply	other threads:[~2016-04-10  9:41 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-10  9:41 [Buildroot] [PATCH v12 00/31] package/freeswitch: new package Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 01/31] " Bernd Kuhls
2016-04-13 21:02   ` Thomas Petazzoni
2016-04-14 19:04     ` Bernd Kuhls
2016-04-13 21:53   ` Arnout Vandecappelle
2016-04-10  9:41 ` [Buildroot] [PATCH v12 02/31] package/freeswitch: enable optional modules Bernd Kuhls
2016-04-13 21:56   ` Arnout Vandecappelle
2016-04-10  9:41 ` [Buildroot] [PATCH v12 03/31] package/freeswitch: add optional dependency to libuuid Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 04/31] package/freeswitch: add optional dependency to libedit Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 05/31] package/freeswitch: enable mod_enum Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 06/31] package/freeswitch: add optional dependency to libpng Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 07/31] package/freeswitch: add optional dependency to unixodbc Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 08/31] package/freeswitch: add optional dependency to freetype Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 09/31] package/freeswitch: enable mod_yaml Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 10/31] package/freeswitch: enable mod_lua Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 11/31] package/freeswitch: enable mod_bv Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 12/31] package/freeswitch: enable mod_codec2 Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 13/31] package/freeswitch: add optional dependency to libg7221 Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 14/31] package/freeswitch: enable mod_ilbc Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 15/31] package/freeswitch: enable mod_isac Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 16/31] package/freeswitch: enable mod_opus Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 17/31] package/freeswitch: enable mod_portaudio Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 18/31] package/freeswitch: enable mod_silk Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 19/31] package/freeswitch: enable mod_sndfile Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 20/31] package/freeswitch: enable mod_alsa Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 21/31] package/freeswitch: enable mod_soundtouch Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 22/31] package/freeswitch: enable mod_xml_rpc Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 23/31] package/freeswitch: add optional dependency to xz Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 24/31] package/freeswitch: enable mod_memcache Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 25/31] package/freeswitch: enable mod_imagick Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 26/31] package/freeswitch: enable mod_cv Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 27/31] package/freeswitch: enable mod_shout Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 28/31] package/freeswitch: add optional dependency to openldap Bernd Kuhls
2016-04-10  9:41 ` [Buildroot] [PATCH v12 29/31] package/flite: bump version to 2.0.0 Bernd Kuhls
2016-04-13 22:16   ` Arnout Vandecappelle
2016-04-10  9:41 ` [Buildroot] [PATCH v12 30/31] package/freeswitch: enable mod_flite Bernd Kuhls
2016-04-10  9:41 ` Bernd Kuhls [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460281299-2385-32-git-send-email-bernd.kuhls@t-online.de \
    --to=bernd.kuhls@t-online.de \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.