Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin2/master' into 3deye_version
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanov Kirill committed Oct 20, 2020
2 parents 2f0fef4 + 2ead345 commit a127e29
Show file tree
Hide file tree
Showing 63 changed files with 3,929 additions and 763 deletions.
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
> If you want to open an issue, please make sure that:
> **IMPORTANT! READ OR WE WILL JUST CLOSE YOUR ISSUE!**
>
> 1. you actually found a bug: for generic questions, use the [meetecho-janus](http://groups.google.com/d/forum/meetecho-janus) group instead;
> 2. nobody opened the same bug already (do a search);
> 3. the issue wasn't already solved in master;
> 4. you don't paste a huge amount of text in the issue or comments: use a service like [pastebin](http://pastebin.com/) or similar;
> 5. you provide a GDB stacktrace if Janus crashed on you, and/or output from AddressSanitizer or Valgrind (more details available [here](http://janus.conf.meetecho.com/docs/debug.html)).
> 1. We only use GitHub for code issues, **NOT** for connectivity/negotiation/WebRTC issues or questions: for those, use the [meetecho-janus](http://groups.google.com/d/forum/meetecho-janus) group instead.
> 2. If you think you really found a bug, make sure nobody reported it already (do a search first, and check open issues);
> 3. Make sure the issue wasn't already solved in master: we will ignore the issue otherwise.
> 4. Do **NOT** paste large amounts of text inline in the issue or comments: it makes the exchanges much harder to follow. If you need to provide logs or code snippets, either use a service like [pastebin](http://pastebin.com/) and [gist](https://gist.github.com/), or use the `details` and code block Markdown features to collapse them.
> 5. If you're encountering crashes, make sure you provide a useful trace of what happened: depending on the issue, we may need output from AddressSanitizer or GDB stacktraces (more details available [here](http://janus.conf.meetecho.com/docs/debug)).
>
> If so, just remove this text and share your findings!
> If you understood the guidelines, please do remove this text and share your findings. Notice that if you remove this text without reading the guidelines, or you just ignore them, we'll close the issue without further explanation.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ before_script:
- travis_retry git clone -b v2.3.0 https://github.com/cisco/libsrtp.git libsrtp
- pushd libsrtp && ./configure --prefix=/usr --enable-openssl && make -j$(nproc) shared_library && sudo make install && popd
- if [ $DATACHANNELS = YES ]; then git clone -b master https://github.com/sctplab/usrsctp usrsctp; fi
- if [ $DATACHANNELS = YES ]; then pushd usrsctp && ./bootstrap && ./configure --prefix=/usr --disable-static --disable-debug --disable-programs && make -j$(nproc) && sudo make install && popd; fi
- if [ $DATACHANNELS = YES ]; then pushd usrsctp && ./bootstrap && ./configure --prefix=/usr --disable-static --disable-debug --disable-programs --disable-inet --disable-inet6 && make -j$(nproc) && sudo make install && popd; fi
- travis_retry git clone -b v3.2.2 https://github.com/warmcat/libwebsockets.git libwebsockets
- pushd libwebsockets && mkdir -p build && pushd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLWS_WITH_STATIC=OFF -DLWS_WITHOUT_CLIENT=ON -DLWS_WITHOUT_TESTAPPS=ON -DLWS_WITHOUT_TEST_SERVER=ON -DLWS_WITH_HTTP2=OFF .. && make -j$(nproc) && sudo make install && popd && popd
- travis_retry git clone -b v0.10.0 https://github.com/alanxz/rabbitmq-c rabbitmq-c
Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.


## [v0.10.6] - 2020-10-05

- New mechanism to tweak/query transport plugins via Admin API [[PR-2354](https://github.com/meetecho/janus-gateway/pull/2354)]
- Fixed occasional segfault when using event handlers and VideoRoom [[Issue-2352](https://github.com/meetecho/janus-gateway/issues/2352)]
- Fixed occasional "Unsupported codec 'none'" log errors (thanks @neilyoung!) [[PR-2357](https://github.com/meetecho/janus-gateway/pull/2357)]
- Fixed broken AudioBridge RTP forwarding when using G711 [[Issue-2375](https://github.com/meetecho/janus-gateway/issues/2375)]
- Added helper threads support to RTSP mountpoints as well [[PR-2361](https://github.com/meetecho/janus-gateway/pull/2361)]
- Fixed data channels not working as expected in Streaming plugin when using helper threads
- Fixed simulcast occasionally not working in Streaming plugin until manual PLI trigger
- Added proper fragmentation in WebSockets transport plugin [[PR-2355](https://github.com/meetecho/janus-gateway/pull/2355)]
- Fixed timing resolution issue in MQTT transport (thanks @feymartynov!)) [[PR-2358](https://github.com/meetecho/janus-gateway/pull/2358)]
- Fixed MQTT transport issue when trying to shutdown gracefully (thanks @feymartynov!)) [[PR-2374](https://github.com/meetecho/janus-gateway/pull/2374)]
- Fixed broken configuration of Nanomsg Admin API (thanks @sdamodharan!)) [[PR-2372](https://github.com/meetecho/janus-gateway/pull/2372)]
- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!)

## [v0.10.5] - 2020-09-08

- Fixed occasional crash in event handlers [[Issue-2312](https://github.com/meetecho/janus-gateway/issues/2312)]
- Fixed occasional crash in VideoRoom plugin [[Issue-2318](https://github.com/meetecho/janus-gateway/issues/2318)]
- Fixed missing PLI when switching Streaming mountpoint [[Issue-2333](https://github.com/meetecho/janus-gateway/issues/2333)]
- Fixed broken recordings in VideoCall plugin (thanks @SamyCookie!) [[PR-2325](https://github.com/meetecho/janus-gateway/pull/2325)]
- Fixed "kick" not working in TextRoom plugin (thanks @backface!) [[PR-2332](https://github.com/meetecho/janus-gateway/pull/2332)]
- Fixed occasional post-processing issues with incomplete mjr files (thanks @SamyCookie!) [[PR-2356](https://github.com/meetecho/janus-gateway/pull/2356)]
- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!)

## [v0.10.4] - 2020-08-07

- Fixed usrsctp vulnerability by using internal hashmap in SCTP code [[PR-2302](https://github.com/meetecho/janus-gateway/pull/2302)]
- Fixed some issues when using BoringSSL for DTLS (thanks @fancycode!) [[PR-2278](https://github.com/meetecho/janus-gateway/pull/2278)]
- Added support for multiple nat-1-1 addresses (thanks @fancycode!) [[PR-2279](https://github.com/meetecho/janus-gateway/pull/2279)]
- Fixed negotiation issue on Firefox when Janus is built without datachannels [[PR-2281](https://github.com/meetecho/janus-gateway/pull/2281)]
- Fixed small memory leaks when dealing with local candidates (thanks @fancycode!) [[PR-2288](https://github.com/meetecho/janus-gateway/pull/2288)]
- Fixed occasional segfault in VideoRoom when failing to setup a new subscriber [[Issue-2277](https://github.com/meetecho/janus-gateway/issues/2277)]
- Fixed potential deadlock in AudioBridge when switching rooms (thanks @JeckLabs!) [[PR-2280](https://github.com/meetecho/janus-gateway/pull/2280)]
- Fixed small memory leak in AudioBridge (thanks @JeckLabs!) [[PR-2298](https://github.com/meetecho/janus-gateway/pull/2298)]
- Fixed occasional segfault in VideoCall when hanging up calls [[Issue-2300](https://github.com/meetecho/janus-gateway/issues/2300)]
- Fixed occasional curl hiccups with RTSP on some cameras
- Added reconnect mechanism to RabbitMQ event handler (thanks @david-goncalves!) [[PR-2267](https://github.com/meetecho/janus-gateway/pull/2267)]
- Extended MQTT support in transport and event handler to v5 (thanks @feymartynov!) [[PR-2273](https://github.com/meetecho/janus-gateway/pull/2273)]
- Added settings to configure MQTT buffers in the transport plugin (thanks @feymartynov!) [[PR-2286](https://github.com/meetecho/janus-gateway/pull/2286)]
- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!)


## [v0.10.3] - 2020-07-09

- Fixed occasional crashes in VideoRoom related to subscribers activity [[PR-2236](https://github.com/meetecho/janus-gateway/pull/2236)] [[PR-2253](https://github.com/meetecho/janus-gateway/pull/2253)]
- Fixed AudioBridge compilation issues when libogg is missing (thanks @ffontaine!) [[PR-2238](https://github.com/meetecho/janus-gateway/pull/2238)]
- Fixed broken SRTP forwarders in AudioBridge [[PR-2258](https://github.com/meetecho/janus-gateway/pull/2258)]
- Fixed occasional segfaults due to race conditions in SIP plugin [[PR-2247](https://github.com/meetecho/janus-gateway/pull/2247)]
- Fixed occasional recording issues in Janus and Duktape plugins
- Added timeout (120s) on idle connections in HTTP transport
- Fixed Opus recordings occasionally being way too large than the source file when processed via janus-pp-rec (thanks @neilkinnish!) [[PR-2250](https://github.com/meetecho/janus-gateway/pull/2250)]
- Added a new web demo to use canvas elements as a media source for PeerConnections [[PR-2261](https://github.com/meetecho/janus-gateway/pull/2261)]
- Other smaller fixes and improvements (thanks to all who contributed pull requests and reported issues!)


## [v0.10.2] - 2020-06-17

- Fixed sscanf-related security issues [[PR-2229](https://github.com/meetecho/janus-gateway/pull/2229)]
Expand Down
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To install it, you'll need to satisfy the following dependencies:
* [libconfig](https://hyperrealm.github.io/libconfig/)
* [libnice](https://libnice.freedesktop.org/) (at least v0.1.16 suggested, master recommended)
* [OpenSSL](http://www.openssl.org/) (at least v1.0.1e)
* [libsrtp](https://github.com/cisco/libsrtp) (at least v1.5 suggested)
* [libsrtp](https://github.com/cisco/libsrtp) (at least v2.x suggested)
* [usrsctp](https://github.com/sctplab/usrsctp) (only needed if you are interested in Data Channels)
* [libmicrohttpd](http://www.gnu.org/software/libmicrohttpd/) (at least v0.9.59; only needed if you are interested in REST support for the Janus API)
* [libwebsockets](https://libwebsockets.org/) (only needed if you are interested in WebSockets support for the Janus API)
Expand Down Expand Up @@ -73,15 +73,7 @@ To build libnice, you need Python 3, Meson and Ninja:

In case you're interested in compiling the sample Event Handler plugin, you'll need to install the development version of libcurl as well (usually `libcurl-devel` on Fedora/CentOS, `libcurl4-openssl-dev` on Ubuntu/Debian).

If your distro ships a pre-1.5 version of libsrtp, you'll have to uninstall that version and [install 1.5.x, 1.6.x or 2.x manually](https://github.com/cisco/libsrtp/releases). In fact, 1.4.x is known to cause several issues with WebRTC. Installation of version 1.5.4 is quite straightforward:

wget https://github.com/cisco/libsrtp/archive/v1.5.4.tar.gz
tar xfv v1.5.4.tar.gz
cd libsrtp-1.5.4
./configure --prefix=/usr --enable-openssl
make shared_library && sudo make install

The instructions for version 2.x are practically the same. Notice that the following steps are for version 2.2.0, but there may be more recent versions available:
If your distro ships a pre-1.5 version of libsrtp, you'll have to uninstall that version and [install 1.5.x, 1.6.x or 2.x manually](https://github.com/cisco/libsrtp/releases). In fact, 1.4.x is known to cause several issues with WebRTC. While 1.5.x is supported, we recommend installing 2.x instead Notice that the following steps are for version 2.2.0, but there may be more recent versions available:

wget https://github.com/cisco/libsrtp/archive/v2.2.0.tar.gz
tar xfv v2.2.0.tar.gz
Expand Down Expand Up @@ -121,7 +113,8 @@ For what concerns usrsctp, which is needed for Data Channels support, it is usua
git clone https://github.com/sctplab/usrsctp
cd usrsctp
./bootstrap
./configure --prefix=/usr && make && sudo make install
./configure --prefix=/usr --disable-programs --disable-inet --disable-inet6
make && sudo make install

* *Note:* you may need to pass `--libdir=/usr/lib64` to the configure script if you're installing on a x86_64 distribution.

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.3",
"version": "0.10.7",
"homepage": "https://github.com/meetecho/janus-gateway",
"authors": [
"Lorenzo Miniero <[email protected]>",
Expand Down
6 changes: 6 additions & 0 deletions conf/janus.eventhandler.mqttevh.jcfg.sample
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ general: {
# plain (no indentation) or compact (no indentation and no spaces)

url = "tcp://localhost:1883" # The URL of the MQTT server. Only tcp supported at this time.
#mqtt_version = "3.1.1" # Protocol version. Available values: 3.1, 3.1.1 (default), 5.
client_id = "janus.example.com" # Janus client id. You have to configure a unique ID (default: guest).
#keep_alive_interval = 20 # Keep connection for N seconds (default: 30)
#cleansession = 0 # Clean session flag (default: off)
#retain = 0 # Default MQTT retain flag for published events
#qos = 1 # Default MQTT QoS for published events
#max_inflight = 10 # Maximum number of inflight messages
#max_buffered = 100 # Maximum number of buffered messages
#disconnect_timeout = 100 # Seconds to wait before destroying client
#username = "guest" # Username for authentication (default: no authentication)
#password = "guest" # Password for authentication (default: no authentication)
Expand All @@ -46,4 +49,7 @@ general: {
#tls_client_key = "/path/to/key.pem"
#tls_ciphers
#tls_version

# These options work with MQTT 5 only.
#add_user_properties = () # List of user property ["key", "value"] pairs to add.
}
1 change: 1 addition & 0 deletions conf/janus.eventhandler.rabbitmqevh.jcfg.sample
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ general: {
#exchange = "janus-exchange"
route_key = "janus-events" # Name of the queue for event messages
#exchange_type = "fanout" # Rabbitmq exchange_type can be one of the available types: direct, topic, headers and fanout (fanout by defualt).
#heartbeat = 60 # Defines the seconds without communication that should pass before considering the TCP connection has unreachable.

#ssl_enable = false # Whether ssl support must be enabled
#ssl_verify_peer = true # Whether peer verification must be enabled
Expand Down
3 changes: 3 additions & 0 deletions conf/janus.jcfg.sample.in
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ nat: {
# If you'd rather keep the private IP address in place, rather than
# replacing it (and so have both of them as advertised candidates),
# then set the 'keep_private_host' property to true.
# Multiple public IP addresses can be specified as a comma separated list
# if the Janus is deployed in a DMZ between two 1-1 NAT for internal and
# external users.
#nat_1_1_mapping = "1.2.3.4"
#keep_private_host = true

Expand Down
4 changes: 2 additions & 2 deletions conf/janus.plugin.videoroom.jcfg.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# is_private = true|false (whether this room should be in the public list, default=true)
# secret = <optional password needed for manipulating (e.g. destroying) the room>
# pin = <optional password needed for joining the room>
# require_pvtid = true|false (whether subscriptions are required to provide a valid
# a valid private_id to associate with a publisher, default=false)
# require_pvtid = true|false (whether subscriptions are required to provide a valid private_id
# to associate with a publisher, default=false)
# publishers = <max number of concurrent senders> (e.g., 6 for a video
# conference or 1 for a webinar)
# bitrate = <max video bitrate for senders> (e.g., 128000)
Expand Down
10 changes: 8 additions & 2 deletions conf/janus.transport.mqtt.jcfg.sample
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ general: {
#password = "guest" # Password to use to authenticate, if needed
#keep_alive_interval = 20 # Keep connection for N seconds
#cleansession = 0 # Clean session flag
#max_inflight = 10 # Maximum number of inflight messages
#max_buffered = 100 # Maximum number of buffered messages
#disconnect_timeout = 100 # Milliseconds to wait before destroying client
subscribe_topic = "to-janus" # Topic for incoming messages
#subscribe_qos = 1 # QoS for incoming messages
Expand All @@ -28,6 +30,10 @@ general: {
#certfile = /path/to/cert.pem
#keyfile = /path/to/key.pem

# These options work with MQTT 5 only.
#vacuum_interval = 60 # Interval for removing old transaction states in seconds.
#proxy_transaction_user_properties = [] # Array of user property names to copy from the incoming message.
#add_transaction_user_properties = () # List of user property ["key", "value"] pairs to add.
}

admin: {
Expand All @@ -48,6 +54,6 @@ status: {
#disconnect_message = "{\"online\": false}"

#topic = "status" # Status topic (default: "status")
#qos = 1 # QoS for status messages (default: 1)
#retain = false # Whether status messages should be retained (default: false)
#qos = 1 # QoS for status messages (default: 1)
#retain = false # Whether status messages should be retained (default: false)
}
6 changes: 3 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([Janus WebRTC Server],[0.10.3],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
AC_INIT([Janus WebRTC Server],[0.10.7],[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 @@ -69,9 +69,9 @@ clang*)
-Wunused-but-set-variable"
esac

JANUS_VERSION=103
JANUS_VERSION=107
AC_SUBST(JANUS_VERSION)
JANUS_VERSION_STRING="0.10.3"
JANUS_VERSION_STRING="0.10.7"
AC_SUBST(JANUS_VERSION_STRING)

case "$host_os" in
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.3
PROJECT_NUMBER = 0.10.7

# 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: 6 additions & 4 deletions dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ gchar *janus_dtls_get_local_fingerprint(void) {
}


#if JANUS_USE_OPENSSL_PRE_1_1_API
#if JANUS_USE_OPENSSL_PRE_1_1_API && !defined(HAVE_BORINGSSL)
/*
* DTLS locking stuff to make OpenSSL thread safe (not needed for 1.1.0)
*
Expand Down Expand Up @@ -373,7 +373,7 @@ const char *janus_get_ssl_version(void) {
gint janus_dtls_srtp_init(const char *server_pem, const char *server_key, const char *password,
const char *ciphers, guint16 timeout, gboolean rsa_private_key, gboolean accept_selfsigned) {
const char *crypto_lib = NULL;
#if JANUS_USE_OPENSSL_PRE_1_1_API
#if JANUS_USE_OPENSSL_PRE_1_1_API && !defined(HAVE_BORINGSSL)
#if defined(LIBRESSL_VERSION_NUMBER)
crypto_lib = "LibreSSL";
#else
Expand All @@ -399,7 +399,7 @@ gint janus_dtls_srtp_init(const char *server_pem, const char *server_key, const
#endif

/* Go on and create the DTLS context */
#if JANUS_USE_OPENSSL_PRE_1_1_API
#if JANUS_USE_OPENSSL_PRE_1_1_API && !defined(HAVE_BORINGSSL)
#if defined(LIBRESSL_VERSION_NUMBER)
ssl_ctx = SSL_CTX_new(DTLSv1_method());
#else
Expand Down Expand Up @@ -534,7 +534,7 @@ void janus_dtls_srtp_cleanup(void) {
SSL_CTX_free(ssl_ctx);
ssl_ctx = NULL;
}
#if JANUS_USE_OPENSSL_PRE_1_1_API
#if JANUS_USE_OPENSSL_PRE_1_1_API && !defined(HAVE_BORINGSSL)
g_free(janus_dtls_locks);
#endif
}
Expand Down Expand Up @@ -1055,7 +1055,9 @@ void janus_dtls_sctp_data_ready(janus_dtls_srtp *dtls) {
void janus_dtls_wrap_sctp_data(janus_dtls_srtp *dtls, char *label, char *protocol, gboolean textdata, char *buf, int len) {
if(dtls == NULL || !dtls->ready || dtls->sctp == NULL || buf == NULL || len < 1)
return;
janus_refcount_increase(&dtls->sctp->ref);
janus_sctp_send_data(dtls->sctp, label, protocol, textdata, buf, len);
janus_refcount_decrease(&dtls->sctp->ref);
}

int janus_dtls_send_sctp_data(janus_dtls_srtp *dtls, char *buf, int len) {
Expand Down
5 changes: 4 additions & 1 deletion events.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ void janus_events_notify_handlers(int type, int subtype, guint64 session_id, ...
char *instance = va_arg(args, void *);
char id[32];
memset(id, 0, sizeof(id));
g_snprintf(id, sizeof(id), "%p", instance);
/* To avoid sending a stringified version of the transport pointer
* around, we convert it to a number and hash it instead */
uint64_t p = janus_uint64_hash(GPOINTER_TO_UINT(instance));
g_snprintf(id, sizeof(id), "%"SCNu64, p);
json_object_set_new(body, "id", json_string(id));
json_t *data = va_arg(args, json_t *);
json_object_set_new(body, "data", data);
Expand Down
Loading

0 comments on commit a127e29

Please sign in to comment.