mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 21:22:09 +00:00
FS-7655: attempt to make libvpx and libyuv optional (none of the video features will work without them) The following modules require these libraries to be installed still: mod_av mod_cv mod_fsv mod_mp4v2 mod_openh264 mod_vpx mod_imagick mod_vpx mod_yuv mod_png mod_vlc
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_av
|
||||
|
||||
if HAVE_YUV
|
||||
if HAVE_VPX
|
||||
if HAVE_AVFORMAT
|
||||
|
||||
mod_LTLIBRARIES = mod_av.la
|
||||
@@ -16,3 +18,18 @@ 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
|
||||
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libyuv-dev to build mod_av)
|
||||
endif
|
||||
|
||||
|
||||
@@ -12982,6 +12982,11 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c
|
||||
|
||||
conference->conf_video_mode = conf_video_mode;
|
||||
|
||||
if (!switch_core_has_video() && (conference->conf_video_mode == CONF_VIDEO_MODE_MUX || conference->conf_video_mode == CONF_VIDEO_MODE_TRANSCODE)) {
|
||||
conference->conf_video_mode = CONF_VIDEO_MODE_PASSTHROUGH;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "video-mode invalid, only valid setting is 'passthrough' due to no video capabilities\n");
|
||||
}
|
||||
|
||||
if (conference->conf_video_mode == CONF_VIDEO_MODE_MUX) {
|
||||
int canvas_w = 0, canvas_h = 0;
|
||||
if (video_canvas_size) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_cv
|
||||
|
||||
if HAVE_YUV
|
||||
if HAVE_VPX
|
||||
if HAVE_OPENCV
|
||||
|
||||
mod_LTLIBRARIES = mod_cv.la
|
||||
@@ -16,3 +18,18 @@ 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
|
||||
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libyuv-dev to build mod_cv)
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,8 +1,28 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_fsv
|
||||
|
||||
if HAVE_YUV
|
||||
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
|
||||
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libyuv-dev to build mod_fsv)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,27 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_mp4v2
|
||||
|
||||
if HAVE_YUV
|
||||
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
|
||||
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libyuv-dev to build mod_mp4v2)
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_openh264
|
||||
|
||||
if HAVE_YUV
|
||||
if HAVE_VPX
|
||||
|
||||
OPENH264_DIR=/usr/local/
|
||||
|
||||
mod_LTLIBRARIES = mod_openh264.la
|
||||
@@ -9,3 +12,18 @@ 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
|
||||
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libyuv-dev to build mod_openh264)
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_imagick
|
||||
|
||||
if HAVE_YUV
|
||||
if HAVE_VPX
|
||||
if HAVE_MAGICK
|
||||
|
||||
mod_LTLIBRARIES = mod_imagick.la
|
||||
@@ -16,3 +18,18 @@ 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
|
||||
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libyuv-dev to build mod_imagick)
|
||||
endif
|
||||
|
||||
|
||||
@@ -6,3 +6,4 @@ mod_local_stream_la_SOURCES = mod_local_stream.c
|
||||
mod_local_stream_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_local_stream_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_local_stream_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
|
||||
|
||||
|
||||
if (is_open) {
|
||||
if (switch_core_file_has_video(use_fh)) {
|
||||
if (switch_core_has_video() && switch_core_file_has_video(use_fh)) {
|
||||
switch_frame_t vid_frame = { 0 };
|
||||
|
||||
if (switch_core_file_read_video(use_fh, &vid_frame, SVR_FLUSH) == SWITCH_STATUS_SUCCESS) {
|
||||
@@ -1124,7 +1124,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_local_stream_load)
|
||||
file_interface->file_open = local_stream_file_open;
|
||||
file_interface->file_close = local_stream_file_close;
|
||||
file_interface->file_read = local_stream_file_read;
|
||||
file_interface->file_read_video = local_stream_file_read_video;
|
||||
|
||||
if (switch_core_has_video()) {
|
||||
file_interface->file_read_video = local_stream_file_read_video;
|
||||
}
|
||||
|
||||
if (switch_event_bind(modname, SWITCH_EVENT_SHUTDOWN, SWITCH_EVENT_SUBCLASS_ANY, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind event handler!\n");
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_vlc
|
||||
|
||||
if HAVE_YUV
|
||||
if HAVE_VPX
|
||||
if HAVE_VLC
|
||||
|
||||
mod_LTLIBRARIES = mod_vlc.la
|
||||
@@ -16,3 +18,17 @@ 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
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
error:
|
||||
$(error You must install libyuv-dev to build mod_vlc)
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user