Skip to content

Commit

Permalink
Ship speexdsp's jitter buffer as part of local AudioBridge dependenci…
Browse files Browse the repository at this point in the history
…es (see #3348)
  • Loading branch information
lminiero committed Apr 2, 2024
1 parent a7a9938 commit 4fc8a08
Show file tree
Hide file tree
Showing 13 changed files with 1,642 additions and 38 deletions.
27 changes: 5 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,15 @@ Makefile.in
/config.status
/config.sub

/*.o
/plugins/*.o
/plugins/*.lo
/plugins/*.la
/plugins/.libs
/plugins/duktape-deps/*.lo
/plugins/duktape-deps/.libs
/transports/*.o
/transports/*.lo
/transports/*.la
/transports/.libs
/events/*.o
/events/*.lo
/events/*.la
/events/.libs
/loggers/*.o
/loggers/*.lo
/loggers/*.la
/loggers/.libs
/postprocessing/*.o
*.o
*.a
*.lo
*.la
.libs
/postprocessing/pp-cmdline.c
/postprocessing/pp-cmdline.h
/postprocessing/p2m-cmdline.c
/postprocessing/p2m-cmdline.h
/fuzzers/*.a
/fuzzers/*.o
/fuzzers/out

/conf/janus.cfg.sample
Expand Down
5 changes: 4 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,10 @@ plugins_libadd = \

if ENABLE_PLUGIN_AUDIOBRIDGE
plugin_LTLIBRARIES += plugins/libjanus_audiobridge.la
plugins_libjanus_audiobridge_la_SOURCES = plugins/janus_audiobridge.c
plugins_libjanus_audiobridge_la_SOURCES = plugins/janus_audiobridge.c \
plugins/audiobridge-deps/jitter.c plugins/audiobridge-deps/arch.h \
plugins/audiobridge-deps/os_support.h plugins/audiobridge-deps/speex/speex_jitter.h \
plugins/audiobridge-deps/speex/speexdsp_types.h plugins/audiobridge-deps/speex/speexdsp_config_types.h
plugins_libjanus_audiobridge_la_CFLAGS = $(plugins_cflags) $(OPUS_CFLAGS) $(OGG_CFLAGS) $(LIBSRTP_CFLAGS)
plugins_libjanus_audiobridge_la_LDFLAGS = $(plugins_ldflags) $(OPUS_LDFLAGS) $(OPUS_LIBS) $(OGG_LDFLAGS) $(OGG_LIBS)
plugins_libjanus_audiobridge_la_LIBADD = $(plugins_libadd) $(OPUS_LIBADD) $(OGG_LIBADD)
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ A couple of plugins depend on a few more libraries:

* [Sofia-SIP](https://github.com/freeswitch/sofia-sip) (only needed for the SIP plugin)
* [libopus](https://opus-codec.org/) (only needed for the AudioBridge plugin)
* [speexdsp](https://www.speex.org/) (only needed for AudioBridge plugin)
* [libogg](https://xiph.org/ogg/) (needed for the VoiceMail plugin and/or post-processor, and optionally AudioBridge and Streaming plugins)
* [libcurl](https://curl.haxx.se/libcurl/) (only needed if you are interested in RTSP support in the Streaming plugin or in the sample Event Handler plugin)
* [Lua](https://www.lua.org/download.html) (only needed for the Lua plugin)
Expand All @@ -53,7 +52,7 @@ All of those libraries are usually available on most of the most common distribu
yum install libmicrohttpd-devel jansson-devel \
openssl-devel libsrtp-devel sofia-sip-devel glib2-devel \
opus-devel libogg-devel libcurl-devel pkgconfig gengetopt \
speexdsp-devel libconfig-devel libtool autoconf automake
libconfig-devel libtool autoconf automake

Notice that you may have to `yum install epel-release` as well if you're attempting an installation on a CentOS machine instead.

Expand All @@ -62,7 +61,7 @@ On Ubuntu or Debian, it would require something like this:
aptitude install libmicrohttpd-dev libjansson-dev \
libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
libspeexdsp-dev libconfig-dev pkg-config gengetopt libtool automake
libconfig-dev pkg-config gengetopt libtool automake

* *Note:* please notice that libopus may not be available out of the box on your distro. In that case, you'll have to [install it manually](http://www.opus-codec.org).

Expand Down Expand Up @@ -220,7 +219,7 @@ since it is a GNU makefile. `./configure` can be run without arguments since the
Note that the `configure.ac` is coded to use openssl in base. If you wish to use openssl from ports or any other ssl you must change `configure.ac` accordingly.

pkg install libsrtp2 libusrsctp jansson libnice libmicrohttpd libwebsockets curl opus sofia-sip libogg jansson libnice libconfig \
speexdsp libtool gmake autoconf autoconf-wrapper glib gengetopt
libtool gmake autoconf autoconf-wrapper glib gengetopt


### Building on MacOS
Expand All @@ -230,7 +229,7 @@ First of all, you can use `brew` to install most of the dependencies:

brew install jansson libnice openssl srtp libusrsctp libmicrohttpd \
libwebsockets cmake rabbitmq-c sofia-sip opus libogg curl glib \
speexdsp libconfig pkg-config gengetopt autoconf automake libtool
libconfig pkg-config gengetopt autoconf automake libtool

For what concerns libwebsockets, though, make sure that the installed version is higher than `2.4.1`, or you might encounter the problems described in [this post](https://groups.google.com/forum/#!topic/meetecho-janus/HsFaEXBz4Cg). If `brew` doesn't provide a more recent version, you'll have to install the library manually.

Expand Down
12 changes: 9 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -804,15 +804,21 @@ AC_SUBST([SOFIA_LIBS])
PKG_CHECK_MODULES([OPUS],
[
opus
speexdsp
],
[
AS_IF([test "x$enable_plugin_audiobridge" = "xmaybe"],
[enable_plugin_audiobridge=yes])
[
enable_plugin_audiobridge=yes
])
AS_IF([test "x$enable_plugin_audiobridge" = "xyes"],
[
AC_DEFINE(FLOATING_POINT)
AC_DEFINE([EXPORT], [], [Symbol visibility prefix])
])
],
[
AS_IF([test "x$enable_plugin_audiobridge" = "xyes"],
[AC_MSG_ERROR([libopus or libspeexdsp not found. See README.md for installation instructions or use --disable-plugin-audiobridge])])
[AC_MSG_ERROR([libopus not found. See README.md for installation instructions or use --disable-plugin-audiobridge])])
])
AC_SUBST([OPUS_CFLAGS])
AC_SUBST([OPUS_LIBS])
Expand Down
2 changes: 0 additions & 2 deletions mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
* - \b nanomsg: https://nanomsg.org/ (\c optional, Nanomsg)
* - \b Sofia-SIP: https://github.com/freeswitch/sofia-sip (\c optional, only needed for the SIP plugin)
* - \b libopus: http://opus-codec.org/ (\c optional, only needed for the AudioBridge plugin)
* - \b speexdsp: http://www.speex.org/ (\c optional, only needed for the AudioBridge plugin)
* - \b libogg: http://xiph.org/ogg/ (\c optional, only needed for the AudioBridge and Streaming plugins)
* - \b libcurl: https://curl.haxx.se/libcurl/ (\c optional, only needed for the TURN REST API,
* RTSP support in the Streaming plugin and the sample Event Handler plugin)
Expand Down Expand Up @@ -3861,7 +3860,6 @@ ldd janus | grep asan
* - \b nanomsg: https://nanomsg.org/ (\c optional, Nanomsg)
* - \b Sofia-SIP: https://github.com/freeswitch/sofia-sip (\c optional, only needed for the SIP plugin)
* - \b libopus: http://opus-codec.org/ (\c optional, only needed for the AudioBridge plugin)
* - \b speexdsp: http://www.speex.org/ (\c optional, only needed for the AudioBridge plugin)
* - \b libogg: http://xiph.org/ogg/ (\c optional, only needed for the AudioBridge and Streaming plugins)
* - \b libcurl: https://curl.haxx.se/libcurl/ (\c optional, only needed for the TURN REST API,
* RTSP support in the Streaming plugin and the sample Event Handler plugin)
Expand Down
35 changes: 35 additions & 0 deletions plugins/audiobridge-deps/COPYING
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Copyright 2002-2008 Xiph.org Foundation
Copyright 2002-2008 Jean-Marc Valin
Copyright 2005-2007 Analog Devices Inc.
Copyright 2005-2008 Commonwealth Scientific and Industrial Research
Organisation (CSIRO)
Copyright 1993, 2002, 2006 David Rowe
Copyright 2003 EpicGames
Copyright 1992-1994 Jutta Degener, Carsten Bormann

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

- Neither the name of the Xiph.org Foundation nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit 4fc8a08

Please sign in to comment.