Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
lucylu-star committed Apr 8, 2021
2 parents 596de9c + e674f1a commit 1a70ad4
Show file tree
Hide file tree
Showing 66 changed files with 1,178 additions and 427 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/janus-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ jobs:
if: ${{ matrix.deps_from_src == 'yes' }}
uses: actions/setup-python@v2
with:
python-version: '3.x'
python-version: '3.8.5'
architecture: 'x64'
- name: install python packages
if: ${{ matrix.deps_from_src == 'yes' }}
run: pip3 install wheel meson
run: pip3 install -Iv wheel meson==0.54.3
- name: setup libnice from sources
if: ${{ matrix.deps_from_src == 'yes' }}
run: |
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,41 @@
All notable changes to this project will be documented in this file.


## [v0.11.1] - 2021-04-06

- Add new option to configure ICE nomination mode, if libnice is recent enough [[PR-2541](#2541)]
- Added support for per-session timeout values (thanks @alg!) [[PR-2577](#2577)]
- Added support for compilation on FreeBSD (thanks @jsm222!) [[PR-2508](#2508)]
- Fixed occasional auth errors when using both API secret and stored tokens (thanks @deep9!) [[PR-2581](#2581)]
- Added support for stdout logging to daemon-mode as well (thanks @mtorromeo!) [[PR-2591](#2591)]
- Fixed odr-violation issue between Lua and Duktape plugins [[PR-2540](#2540)]
- Fixed missing simulcast stats in Admin API and Event Handlers when using rid [[Issue-2610](#2610)]
- Fixed VideoRoom recording not stopped for participants entering after global recording was started [[PR-2550](#2550)]
- Fixed 'audiocodec'/'videocodec' being ignored when joining a VideoRoom via 'joinandconfigure'
- Added content type support to MESSAGE in SIP plugin (thanks @tijmenNL!) [[PR-2567](#2567)]
- Made RTSP timeouts configurable in Streaming plugin (thanks @pontscho!) [[PR-2598](#2598)]
- Fixed incorrect parsing of backend URL in WebSockets event handler [[Issue-2603](#2603)]
- Added support for secure connections and lws debugging to WebSockets event handler
- Fixed occasionally broken AV1 recordings post-processing
- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!)

## [v0.10.10] - 2021-02-06

- Reduced verbosity of a few LOG_WARN messages at startup
- Close libnice agent resources asynchronously when hanging up PeerConnections (thanks @fbellet!) [[PR-2492](#2492)]
- Fixed broken parsing of SDP when trying to match specific codec profiles [[PR-2549](#2549)]
- Added muting/moderation API to the VideoRoom plugin [[PR-2513](#2513)]
- Fixed a few race conditions in VideoRoom plugin that could lead to crashes [[PR-2539](#2539)]
- Send 480 instead of BYE when hanging up calls in early dialog in the SIP plugin (thanks @zayim!) [[PR-2521](#2521)]
- Added configurable media direction when putting calls on-hold in the SIP plugin [[PR-2525](#2525)]
- Fixed rare race condition in AudioBridge when using "changeroom" (thanks @JeckLabs!) [[PR-2535](#2535)]
- Fixed broken API secret management in HTTP long polls (thanks @remvst!) [[PR-2524](#2524)]
- Report failure if binding to a socket fails in WebSockets transport plugin (thanks @Symbiatch!) [[PR-2534](#2534)]
- Updated RabbitMQ logic in both transport and event handler (thanks @chriswiggins!) [[PR-2430](#2430)]
- Fixed segfault in WebSocket event handler when backend was unreachable
- Added TLS support to MQTT event handler (thanks @RSATom!) [[PR-2517](#2517)]
- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!)

## [v0.10.9] - 2020-12-23

- Replaced Travis CI with GitHub Actions [[PR-2486](#2486)]
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,17 @@ If Doxygen and graphviz are available, the process can also build the documentat

You can also selectively enable/disable other features (e.g., specific plugins you don't care about, or whether or not you want to build the recordings post-processor). Use the --help option when configuring for more info.

### Building on FreeBSD
* *Note*: rtp_forward of streams only works streaming to IPv6,
because of #2051 and thus the feature is not supported on FreeBSD at the moment.

When building on FreeBSD you can install the depencencies from ports or packages, here only pkg method is used. You also need to use `gmake` instead of `make`,
since it is a GNU makefile. `./configure` can be run without arguments since the default prefix is `/usr/local` which is your default `LOCALBASE`.
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 \
libtool gmake autoconf autoconf-wrapper glib gengetopt


### Building on MacOS
While most of the above instructions will work when compiling Janus on MacOS as well, there are a few aspects to highlight when doing that.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "janus-gateway",
"version": "0.10.10",
"version": "0.11.2",
"homepage": "https://github.com/meetecho/janus-gateway",
"authors": [
"Lorenzo Miniero <[email protected]>",
Expand Down
13 changes: 9 additions & 4 deletions conf/janus.eventhandler.wsevh.jcfg.sample
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,18 @@ general: {
# (one or more per HTTP POST, JSON array with objects)
# The default is 'yes' to limit the number of connections.

# Address the plugin will send all events to as HTTP POST
# requests with an application/json payload. In case
# authentication is required to contact the backend, set
# the credentials as well (basic authentication only).
json = "indented" # Whether the JSON messages should be indented (default),
# plain (no indentation) or compact (no indentation and no spaces)

# Address the plugin will send all events to as WebSocket
# messages. In case authentication is required to contact
# the backend, set the credentials as well.
backend = "ws://your.websocket.here"
# subprotocol = "your-subprotocol"

# In case you need to debug connection issues, you can configure
# the libwebsockets debugging level as a comma separated list of things
# to debug, supported values: err, warn, notice, info, debug, parser,
# header, ext, client, latency, user, count (plus 'none' and 'all')
#ws_logging = "err,warn"
}
12 changes: 11 additions & 1 deletion conf/janus.jcfg.sample.in
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,15 @@ media: {
# configured to do full-trickle (Janus also trickles its candidates to
# users) rather than the default half-trickle (Janus supports trickle
# candidates from users, but sends its own within the SDP), and whether
# it should work in ICE-Lite mode (by default it doesn't). Finally,
# it should work in ICE-Lite mode (by default it doesn't). If libnice is
# at least 0.1.15, you can choose which ICE nomination mode to use: valid
# values are "regular" and "aggressive" (the default depends on the libnice
# version itself; if we can set it, we set aggressive nomination). You can
# also configure whether to use connectivity checks as keep-alives, which
# might help detecting when a peer is no longer available (notice that
# current libnice master is breaking connections after 50 seconds when
# keepalive-conncheck is being used, so if you want to use it, better
# sticking to 0.1.18 until the issue is addressed upstream). Finally,
# you can also enable ICE-TCP support (beware that this may lead to problems
# if you do not enable ICE Lite as well), choose which interfaces should
# be used for gathering candidates, and enable or disable the
Expand All @@ -249,6 +257,8 @@ nat: {
#stun_port = 3478
nice_debug = false
#full_trickle = true
#ice_nomination = "regular"
#ice_keepalive_conncheck = true
#ice_lite = true
#ice_tcp = true

Expand Down
16 changes: 14 additions & 2 deletions conf/janus.plugin.streaming.jcfg.sample.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,20 @@
# DO NOT SET THIS PROPERTY IF YOU DON'T KNOW WHAT YOU'RE DOING!
# e2ee = true
#
# The following options are only valid for the 'rstp' type:
# The following options are only valid for the 'rtsp' type:
# url = RTSP stream URL (only for restreaming RTSP)
# rtsp_user = RTSP authorization username (only if type=rtsp)
# rtsp_pwd = RTSP authorization password (only if type=rtsp)
# rtspiface = network interface or IP address to bind to, if any (binds to all otherwise), when receiving RTSP streams
# rtsp_failcheck = whether an error should be returned if connecting to the RTSP server fails (default=true)
# rtspiface = network interface or IP address to bind to, if any (binds to all otherwise), when receiving RTSP streams
# rtsp_reconnect_delay = after n seconds passed and no media assumed, the RTSP server has gone and schedule a reconnect (default=5s)
# rtsp_session_timeout = by default the streaming plugin will check the RTSP connection with an OPTIONS query,
# the value of the timeout comes from the RTSP session initializer and by default
# this session timeout is the half of this value In some cases this value can be too high (for example more than one minute)
# because of the media server. In that case this plugin will calculate the timeout with this
# formula: timeout = min(session_timeout, rtsp_session_timeout / 2). (default=0s)
# rtsp_timeout = communication timeout (CURLOPT_TIMEOUT) for cURL call gathering the RTSP information (default=10s)
# rtsp_conn_timeout = connection timeout for cURL (CURLOPT_CONNECTTIMEOUT) call gathering the RTSP information (default=5s)
#
# Notice that, for 'rtsp' mountpoints, normally the plugin uses the exact
# SDP rtpmap and fmtp attributes the remote camera or RTSP server sent.
Expand Down Expand Up @@ -249,4 +257,8 @@ file-ondemand-sample: {
#rtsp_user = "username"
#rtsp_pwd = "password"
#secret = "adminpwd"
#reconnect_delay = 5
#session_timeout = 0
# rtsp_timeout = 10
# rtsp_conn_timeout = 5
#}
2 changes: 1 addition & 1 deletion config.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ janus_config *janus_config_parse(const char *config_file) {
/* Open file */
FILE *file = fopen(config_file, "rt");
if(!file) {
JANUS_LOG(LOG_ERR, " -- Error reading configuration file '%s'... error %d (%s)\n", filename, errno, strerror(errno));
JANUS_LOG(LOG_ERR, " -- Error reading configuration file '%s'... error %d (%s)\n", filename, errno, g_strerror(errno));
g_free(tmp_filename);
return NULL;
}
Expand Down
43 changes: 35 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([Janus WebRTC Server],[0.10.10],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
AC_INIT([Janus WebRTC Server],[0.11.2],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
AC_LANG(C)
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -61,6 +61,11 @@ clang*)
-Wno-cast-align \
-Wno-initializer-overrides"
;;
cc*)
CFLAGS="$CFLAGS \
-Wno-cast-align \
-Wno-initializer-overrides"
;;
*)
# Specific gcc flags
CFLAGS="$CFLAGS \
Expand All @@ -70,9 +75,9 @@ clang*)
-Wunused-but-set-variable"
esac

JANUS_VERSION=110
JANUS_VERSION=112
AC_SUBST(JANUS_VERSION)
JANUS_VERSION_STRING="0.10.10"
JANUS_VERSION_STRING="0.11.2"
AC_SUBST(JANUS_VERSION_STRING)

case "$host_os" in
Expand All @@ -83,6 +88,12 @@ darwin*)
LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/local/opt/openssl/lib -L/opt/local/lib -L/usr/local/libsrtp/lib"
AM_CONDITIONAL([DARWIN_OS], true)
;;
freebsd*)
CFLAGS="$CFLAGS -I/usr/include/openssl"
LDFLAGS="$LDFLAGS -Xlinker --export-dynamic"
LDFLAGS="$LDFLAGS -L/usr/lib/openssl -lcrypto -lssl -L/usr/local/lib"
AM_CONDITIONAL([DARWIN_OS], false)
;;
*)
LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
AM_CONDITIONAL([DARWIN_OS], false)
Expand Down Expand Up @@ -337,17 +348,27 @@ AC_ARG_ENABLE([systemd-sockets],
[],
[enable_systemd_sockets=no])

PKG_CHECK_MODULES([JANUS],
[
glib-2.0 >= $glib_version
case "$host_os" in
freebsd*)
PKGCHECKMODULES="glib-2.0 >= $glib_version
gio-2.0 >= $glib_version
libconfig
nice
jansson >= $jansson_version
zlib"
;;
*)
PKGCHECKMODULES="glib-2.0 >= $glib_version
gio-2.0 >= $glib_version
libconfig
nice
jansson >= $jansson_version
libssl >= $ssl_version
libcrypto
zlib
])
zlib"
esac
PKG_CHECK_MODULES([JANUS],"$PKGCHECKMODULES")

JANUS_MANUAL_LIBS="${JANUS_MANUAL_LIBS} -lm"
AC_SUBST(JANUS_MANUAL_LIBS)

Expand Down Expand Up @@ -402,6 +423,12 @@ AC_CHECK_LIB([nice],
[AC_MSG_NOTICE([libnice version does not have nice_agent_close_async])]
)

AC_CHECK_LIB([nice],
[nice_agent_new_full],
[AC_DEFINE(HAVE_ICE_NOMINATION)],
[AC_MSG_NOTICE([libnice version does not have nice_agent_new_full])]
)

AC_CHECK_LIB([dl],
[dlopen],
[JANUS_MANUAL_LIBS="${JANUS_MANUAL_LIBS} -ldl"],
Expand Down
2 changes: 1 addition & 1 deletion docs/janus-doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Janus"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.10.10
PROJECT_NUMBER = 0.11.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
10 changes: 5 additions & 5 deletions events/janus_gelfevh.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ static int janus_gelfevh_connect(void) {
janus_network_address_to_string_buffer(&addr, &addr_buf) != 0) {
if(res)
freeaddrinfo(res);
JANUS_LOG(LOG_ERR, "Could not resolve address (%s): %d (%s)\n", backend, errno, strerror(errno));
JANUS_LOG(LOG_ERR, "Could not resolve address (%s): %d (%s)\n", backend, errno, g_strerror(errno));
return -1;
}
char *host = g_strdup(janus_network_address_string_from_buffer(&addr_buf));
freeaddrinfo(res);

if((sockfd = socket(AF_INET, transport, 0)) < 0 ) {
JANUS_LOG(LOG_ERR, "Socket creation failed: %d (%s)\n", errno, strerror(errno));
JANUS_LOG(LOG_ERR, "Socket creation failed: %d (%s)\n", errno, g_strerror(errno));
g_free(host);
return -1;
}
Expand Down Expand Up @@ -206,7 +206,7 @@ static int janus_gelfevh_send(char *message) {
while(length > 0) {
out_bytes = send(sockfd, buffer, length + 1, 0);
if(out_bytes <= 0) {
JANUS_LOG(LOG_WARN, "Sending TCP message failed, dropping event: %d (%s)\n", errno, strerror(errno));
JANUS_LOG(LOG_WARN, "Sending TCP message failed, dropping event: %d (%s)\n", errno, g_strerror(errno));
close(sockfd);
return -1;
}
Expand Down Expand Up @@ -240,7 +240,7 @@ static int janus_gelfevh_send(char *message) {
if(total == 1) {
int n = send(sockfd, buf, len, 0);
if(n < 0) {
JANUS_LOG(LOG_WARN, "Sending UDP message failed, dropping event: %d (%s)\n", errno, strerror(errno));
JANUS_LOG(LOG_WARN, "Sending UDP message failed, dropping event: %d (%s)\n", errno, g_strerror(errno));
return -1;
}
return 0;
Expand All @@ -262,7 +262,7 @@ static int janus_gelfevh_send(char *message) {
buf += bytesToSend;
int n = send(sockfd, head, bytesToSend + 12, 0);
if(n < 0) {
JANUS_LOG(LOG_WARN, "Sending UDP message failed: %d (%s)\n", errno, strerror(errno));
JANUS_LOG(LOG_WARN, "Sending UDP message failed: %d (%s)\n", errno, g_strerror(errno));
return -1;
}
offset += bytesToSend;
Expand Down
6 changes: 3 additions & 3 deletions events/janus_mqttevh.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,22 +929,22 @@ static int janus_mqttevh_init(const char *config_path) {
item = janus_config_get(config, config_general, janus_config_type_item, "ssl_cacert");
}
if(item && item->value) {
ctx->tls.cacert_file = g_strdup(item->value);
ctx->tls.cacert_file = janus_make_absolute_path(config_path, item->value);
}

item = janus_config_get(config, config_general, janus_config_type_item, "tls_client_cert");
if(!item) {
item = janus_config_get(config, config_general, janus_config_type_item, "ssl_client_cert");
}
if(item && item->value) {
ctx->tls.cert_file = g_strdup(item->value);
ctx->tls.cert_file = janus_make_absolute_path(config_path, item->value);
}
item = janus_config_get(config, config_general, janus_config_type_item, "tls_client_key");
if(!item) {
item = janus_config_get(config, config_general, janus_config_type_item, "ssl_client_key");
}
if(item && item->value) {
ctx->tls.key_file = g_strdup(item->value);
ctx->tls.key_file = janus_make_absolute_path(config_path, item->value);
}
item = janus_config_get(config, config_general, janus_config_type_item, "tls_verify_peer");
if(!item) {
Expand Down
Loading

0 comments on commit 1a70ad4

Please sign in to comment.