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 v11 26/26] package/freeswitch: enable video support
Date: Sun,  3 Apr 2016 16:18:38 +0200	[thread overview]
Message-ID: <1459693118-19072-27-git-send-email-bernd.kuhls@t-online.de> (raw)
In-Reply-To: <1459693118-19072-1-git-send-email-bernd.kuhls@t-online.de>

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

diff --git a/package/freeswitch/Config.in b/package/freeswitch/Config.in
index a641008..70e8055 100644
--- a/package/freeswitch/Config.in
+++ b/package/freeswitch/Config.in
@@ -22,6 +22,20 @@ config BR2_PACKAGE_FREESWITCH
 
 	  https://www.freeswitch.org
 
+if BR2_PACKAGE_FREESWITCH
+
+config BR2_PACKAGE_FREESWITCH_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_TOOLCHAIN_HAS_THREADS \
diff --git a/package/freeswitch/freeswitch.mk b/package/freeswitch/freeswitch.mk
index 38483f9..8e74a83 100644
--- a/package/freeswitch/freeswitch.mk
+++ b/package/freeswitch/freeswitch.mk
@@ -61,8 +61,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 \
@@ -269,4 +267,40 @@ ifeq ($(BR2_PACKAGE_XZ),y)
 FREESWITCH_DEPENDENCIES += xz
 endif
 
+ifeq ($(BR2_PACKAGE_FREESWITCH_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-03 14:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-03 14:18 [Buildroot] [PATCH v11 00/26] package/freeswitch: new package Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 01/26] " Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 02/26] package/freeswitch: enable optional modules Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 03/26] package/freeswitch: add optional dependency to libuuid Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 04/26] package/freeswitch: add optional dependency to libedit Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 05/26] package/freeswitch: enable mod_enum Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 06/26] package/freeswitch: add optional dependency to libpng Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 07/26] package/freeswitch: add optional dependency to unixodbc Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 08/26] package/freeswitch: add optional dependency to freetype Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 09/26] package/freeswitch: enable mod_yaml Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 10/26] package/freeswitch: enable mod_lua Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 11/26] package/freeswitch: enable mod_bv Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 12/26] package/freeswitch: enable mod_codec2 Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 13/26] package/freeswitch: add optional dependency to libg7221 Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 14/26] package/freeswitch: enable mod_ilbc Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 15/26] package/freeswitch: enable mod_isac Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 16/26] package/freeswitch: enable mod_opus Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 17/26] package/freeswitch: enable mod_portaudio Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 18/26] package/freeswitch: enable mod_silk Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 19/26] package/freeswitch: enable mod_sndfile Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 20/26] package/freeswitch: enable mod_alsa Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 21/26] package/freeswitch: enable mod_soundtouch Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 22/26] package/freeswitch: enable mod_xml_rpc Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 23/26] package/freeswitch: add optional dependency to xz Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 24/26] package/freeswitch: enable mod_memcache Bernd Kuhls
2016-04-03 14:18 ` [Buildroot] [PATCH v11 25/26] package/freeswitch: enable mod_imagick Bernd Kuhls
2016-04-03 14:18 ` 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=1459693118-19072-27-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.