FS-8867: build using in tree libvpx, vpx no longer optional and does not use system libvpx due to issues with having to update it frequently conflicting with system libraries, now we link to the static in tree version instead. Also, mod_vpx is now a core module instead of a loadable module, so mod_vpx.so will no longer be built

This commit is contained in:
Michael Jerris
2016-02-24 18:43:21 -05:00
parent bcbb2fd873
commit febe0f8dac
27 changed files with 793 additions and 140 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ extern "C" {
* types, removing or reassigning enums, adding/removing/rearranging
* fields to structures
*/
#define VPX_IMAGE_ABI_VERSION (3) /**<\hideinitializer*/
#define VPX_IMAGE_ABI_VERSION (4) /**<\hideinitializer*/
#define VPX_IMG_FMT_PLANAR 0x100 /**< Image is a planar format. */
-8
View File
@@ -1,7 +1,6 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_av
if HAVE_VPX
if HAVE_AVFORMAT
mod_LTLIBRARIES = mod_av.la
@@ -16,10 +15,3 @@ all: error
error:
$(error You must install libavformat-dev to build mod_av)
endif
else
install: error
all: error
error:
$(error You must install libvpx2-dev to build mod_av)
endif
-8
View File
@@ -1,7 +1,6 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_cv
if HAVE_VPX
if HAVE_OPENCV
mod_LTLIBRARIES = mod_cv.la
@@ -16,10 +15,3 @@ all: error
error:
$(error You must install libopencv-dev to build mod_cv)
endif
else
install: error
all: error
error:
$(error You must install libvpx2-dev to build mod_cv)
endif
-9
View File
@@ -1,17 +1,8 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_fsv
if HAVE_VPX
mod_LTLIBRARIES = mod_fsv.la
mod_fsv_la_SOURCES = mod_fsv.c
mod_fsv_la_CFLAGS = $(AM_CFLAGS)
mod_fsv_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_fsv_la_LDFLAGS = -avoid-version -module -no-undefined -shared
else
install: error
all: error
error:
$(error You must install libvpx2-dev to build mod_fsv)
endif
@@ -1,17 +1,8 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_mp4v2
if HAVE_VPX
mod_LTLIBRARIES = mod_mp4v2.la
mod_mp4v2_la_SOURCES = mod_mp4v2.c
mod_mp4v2_la_CFLAGS = $(AM_CFLAGS)
mod_mp4v2_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_mp4v2_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lmp4v2
else
install: error
all: error
error:
$(error You must install libvpx2-dev to build mod_mp4v2)
endif
-9
View File
@@ -1,8 +1,6 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_openh264
if HAVE_VPX
OPENH264_DIR=/usr/local/
mod_LTLIBRARIES = mod_openh264.la
@@ -10,10 +8,3 @@ mod_openh264_la_SOURCES = mod_openh264.cpp
mod_openh264_la_CXXFLAGS = $(AM_CXXFLAGS) -I$(OPENH264_DIR)/include/wels
mod_openh264_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_openh264_la_LDFLAGS = -L$(OPENH264_DIR)/lib/ -lopenh264 -avoid-version -module -no-undefined -shared
else
install: error
all: error
error:
$(error You must install libvpx2-dev to build mod_openh264)
endif
-15
View File
@@ -1,15 +0,0 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_vpx
if HAVE_VPX
mod_LTLIBRARIES = mod_vpx.la
mod_vpx_la_SOURCES = mod_vpx.c
mod_vpx_la_LIBADD = $(switch_builddir)/libfreeswitch.la
mod_vpx_la_CFLAGS = $(VPX_CFLAGS) $(SWITCH_AM_CFLAGS)
mod_vpx_la_LDFLAGS = $(VPX_LIBS) -avoid-version -module -no-undefined -shared
else
install: error
all: error
error:
$(error You must install your distros libvpx-dev to build mod_vpx)
endif
-9
View File
@@ -1,9 +0,0 @@
To build this module I used the following steps:
apt-get install yasm
git /usr/local/src/
git clone https://chromium.googlesource.com/webm/libvpx
cd libvpx/build/
../configure --enable-pic --enable-shared
make
make install
-8
View File
@@ -1,7 +1,6 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_imagick
if HAVE_VPX
if HAVE_MAGICK
mod_LTLIBRARIES = mod_imagick.la
@@ -16,10 +15,3 @@ all: error
error:
$(error You must install libmagickcore-dev to build mod_imagick)
endif
else
install: error
all: error
error:
$(error You must install libvpx2-dev to build mod_imagick)
endif
-8
View File
@@ -1,7 +1,6 @@
include $(top_srcdir)/build/modmake.rulesam
MODNAME=mod_vlc
if HAVE_VPX
if HAVE_VLC
mod_LTLIBRARIES = mod_vlc.la
@@ -16,10 +15,3 @@ all: error
error:
$(error You must install libvlc-dev to build mod_vlc)
endif
else
install: error
all: error
error:
$(error You must install libvpx2-dev to build mod_vlc)
endif
+2 -2
View File
@@ -31,8 +31,8 @@
#ifdef SWITCH_HAVE_VPX
#include "vpx/vpx_image.h"
#if VPX_IMAGE_ABI_VERSION != (3)
#error VPX_IMAGE_ABI_VERSION is not (3)
#if VPX_IMAGE_ABI_VERSION != (4)
#error VPX_IMAGE_ABI_VERSION is not (4)
#endif
#endif
+1
View File
@@ -1876,6 +1876,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_init(switch_bool_t autolo
switch_loadable_module_load_module("", "CORE_SOFTTIMER_MODULE", SWITCH_FALSE, &err);
switch_loadable_module_load_module("", "CORE_PCM_MODULE", SWITCH_FALSE, &err);
switch_loadable_module_load_module("", "CORE_SPEEX_MODULE", SWITCH_FALSE, &err);
switch_loadable_module_load_module("", "CORE_VPX_MODULE", SWITCH_FALSE, &err);
if ((xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
@@ -241,7 +241,7 @@ static inline int IS_VP8_KEY_FRAME(uint8_t *data)
#define IS_VP9_START_PKT(byte) ((byte) & 0x02)
SWITCH_MODULE_LOAD_FUNCTION(mod_vpx_load);
SWITCH_MODULE_DEFINITION(mod_vpx, mod_vpx_load, NULL, NULL);
SWITCH_MODULE_DEFINITION(CORE_VPX_MODULE, mod_vpx_load, NULL, NULL);
struct vpx_context {
switch_codec_t *codec;