Skip to content

Commit a6904a7

Browse files
committed
Merge branch 'master' into libconfig
2 parents 33f4728 + 101f090 commit a6904a7

30 files changed

+883
-549
lines changed

README.md

Lines changed: 65 additions & 184 deletions
Large diffs are not rendered by default.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "janus-gateway",
3-
"version": "0.4.5",
3+
"version": "0.5.0",
44
"homepage": "https://github.com/meetecho/janus-gateway",
55
"authors": [
66
"Lorenzo Miniero <lorenzo@meetecho.com>",

conf/janus.jcfg.sample.in

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ general: {
6666
# be considered an invalid value and ignored.
6767
#reclaim_session_timeout = 0 # How long (in seconds) we should wait for a
6868
# janus session to be reclaimed after the transport
69-
# is gone. After the transport is gone, a session
70-
# times out when no request is received for
69+
# is gone. After the transport is gone, a session
70+
# times out when no request is received for
7171
# reclaim_session_timeout seconds (default=0s).
7272
# Setting this to 0 will disable the timeout
7373
# mechanism, and sessions will be destroyed immediately
@@ -82,6 +82,23 @@ general: {
8282
# external scripts), then uncomment and set the
8383
# recordings_tmp_ext property to the extension
8484
# to add to the base (e.g., tmp --> .mjr.tmp).
85+
#event_loops = 8 # By default, Janus handles each have their own
86+
# event loop and related thread for all the media
87+
# routing and management. If for some reason you'd
88+
# rather limit the number of loop/threads, and
89+
# you want handles to share those, you can do that
90+
# configuring the event_loops property: this will
91+
# spawn the specified amount of threads at startup,
92+
# run a separate event loop on each of them, and
93+
# add new handles to one of them when attaching.
94+
# Notice that, while cutting the number of threads
95+
# and possibly reducing context switching, this
96+
# might have an impact on the media delivery,
97+
# especially if the available loops can't take
98+
# care of all the handles and their media in time.
99+
# As such, if you want to use this you should
100+
# provision the correct value according to the
101+
# available resources (e.g., CPUs available).
85102
}
86103

87104
# Certificate and key to use for DTLS (and passphrase if needed).
@@ -130,7 +147,7 @@ media: {
130147
# you can also enable ICE-TCP support (beware that it currently *only*
131148
# works if you enable ICE Lite as well), choose which interfaces should
132149
# be used for gathering candidates, and enable or disable the
133-
# internal libnice debugging, if needed.
150+
# internal libnice debugging, if needed.
134151
nat: {
135152
#stun_server = "stun.voip.eutelia.it"
136153
#stun_port = 3478

configure.ac

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([Janus WebRTC Server],[0.4.5],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
1+
AC_INIT([Janus WebRTC Server],[0.5.0],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
22
AC_CONFIG_AUX_DIR([.])
33
AC_CONFIG_MACRO_DIR([m4])
44

@@ -15,9 +15,9 @@ AC_PROG_CC
1515
LT_PREREQ([2.2])
1616
LT_INIT
1717

18-
JANUS_VERSION=45
18+
JANUS_VERSION=50
1919
AC_SUBST(JANUS_VERSION)
20-
JANUS_VERSION_STRING="0.4.5"
20+
JANUS_VERSION_STRING="0.5.0"
2121
AC_SUBST(JANUS_VERSION_STRING)
2222

2323
case "$host_os" in
@@ -76,6 +76,12 @@ AC_ARG_ENABLE([dtls-settimeout],
7676
[],
7777
[enable_dtls_settimeout=no])
7878

79+
AC_ARG_ENABLE([pthread-mutex],
80+
[AS_HELP_STRING([--enable-pthread-mutex],
81+
[Use pthread_mutex instead of GMutex (see #1397)])],
82+
[],
83+
[enable_pthread_mutex=no])
84+
7985
AC_ARG_ENABLE([turn-rest-api],
8086
[AS_HELP_STRING([--disable-turn-rest-api],
8187
[Disable TURN REST API client (via libcurl)])],
@@ -260,6 +266,13 @@ AS_IF([test "x$enable_dtls_settimeout" = "xyes"],
260266
])
261267
AM_CONDITIONAL([ENABLE_DTLS_SETTIMEOUT], [test "x$enable_dtls_settimeout" = "xyes"])
262268

269+
AS_IF([test "x$enable_pthread_mutex" = "xyes"],
270+
[
271+
AC_DEFINE(USE_PTHREAD_MUTEX)
272+
AC_MSG_NOTICE([Will use pthread_mutex instead of GMutex])
273+
])
274+
AM_CONDITIONAL([ENABLE_PTHREAD_MUTEX], [test "x$enable_pthread_mutex" = "xyes"])
275+
263276
AC_SEARCH_LIBS([tls_config_set_ca_mem],[tls],
264277
[AM_CONDITIONAL([LIBRESSL_DETECTED], true)],
265278
[AM_CONDITIONAL([LIBRESSL_DETECTED], false)]
@@ -866,6 +879,9 @@ AM_COND_IF([ENABLE_BORINGSSL],
866879
[echo "SSL/crypto library: LibreSSL"],
867880
[echo "SSL/crypto library: OpenSSL"])
868881
echo "DTLS set-timeout: not available"])
882+
AM_COND_IF([ENABLE_PTHREAD_MUTEX],
883+
[echo "Mutex implementation: pthread mutex"],
884+
[echo "Mutex implementation: GMutex (native futex on Linux)"])
869885
AM_COND_IF([ENABLE_SCTP],
870886
[echo "DataChannels support: yes"],
871887
[echo "DataChannels support: no"])

docs/janus-doxygen.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ PROJECT_NAME = "Janus"
3232
# This could be handy for archiving the generated documentation or
3333
# if some version control system is used.
3434

35-
PROJECT_NUMBER = 0.4.5
35+
PROJECT_NUMBER = 0.5.0
3636

3737
# Using the PROJECT_BRIEF tag one can provide an optional one line description
3838
# for a project that appears at the top of each page and should give viewer
@@ -52,7 +52,7 @@ PROJECT_LOGO =
5252
# If a relative path is entered, it will be relative to the location
5353
# where doxygen was started. If left blank the current directory will be used.
5454

55-
OUTPUT_DIRECTORY =
55+
OUTPUT_DIRECTORY =
5656

5757
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
5858
# 4096 sub-directories (in 2 levels) under the output directory of each output

dtls.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ gchar *janus_dtls_get_local_fingerprint(void) {
146146
* which does indeed implement the callbacks the OpenSSL docs suggest.
147147
*
148148
*/
149-
static janus_mutex *janus_dtls_locks;
149+
static pthread_mutex_t *janus_dtls_locks;
150150

151151
static void janus_dtls_cb_openssl_threadid(CRYPTO_THREADID *tid) {
152152
/* FIXME Assuming pthread, which is fine as GLib wraps pthread and
@@ -162,9 +162,9 @@ static void janus_dtls_cb_openssl_threadid(CRYPTO_THREADID *tid) {
162162

163163
static void janus_dtls_cb_openssl_lock(int mode, int type, const char *file, int line) {
164164
if((mode & CRYPTO_LOCK)) {
165-
janus_mutex_lock(&janus_dtls_locks[type]);
165+
pthread_mutex_lock(&janus_dtls_locks[type]);
166166
} else {
167-
janus_mutex_unlock(&janus_dtls_locks[type]);
167+
pthread_mutex_unlock(&janus_dtls_locks[type]);
168168
}
169169
}
170170
#endif
@@ -334,7 +334,7 @@ gint janus_dtls_srtp_init(const char *server_pem, const char *server_key, const
334334
janus_dtls_locks = g_malloc0(sizeof(*janus_dtls_locks) * CRYPTO_num_locks());
335335
int l=0;
336336
for(l = 0; l < CRYPTO_num_locks(); l++) {
337-
janus_mutex_init(&janus_dtls_locks[l]);
337+
pthread_mutex_init(&janus_dtls_locks[l], NULL);
338338
}
339339
CRYPTO_THREADID_set_callback(janus_dtls_cb_openssl_threadid);
340340
CRYPTO_set_locking_callback(janus_dtls_cb_openssl_lock);

html/css/demo.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,11 @@ div.no-video-container {
9797
.meetecho-logo > img {
9898
height: 26px;
9999
}
100+
101+
pre {
102+
white-space: pre-wrap;
103+
white-space: -moz-pre-wrap;
104+
white-space: -pre-wrap;
105+
white-space: -o-pre-wrap;
106+
word-wrap: break-word;
107+
}

html/janus.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Janus.init = function(options) {
293293
Janus.attachMediaStream = function(element, stream) {
294294
if(Janus.webRTCAdapter.browserDetails.browser === 'chrome') {
295295
var chromever = Janus.webRTCAdapter.browserDetails.version;
296-
if(chromever >= 43) {
296+
if(chromever >= 52) {
297297
element.srcObject = stream;
298298
} else if(typeof element.src !== 'undefined') {
299299
element.src = URL.createObjectURL(stream);
@@ -307,7 +307,7 @@ Janus.init = function(options) {
307307
Janus.reattachMediaStream = function(to, from) {
308308
if(Janus.webRTCAdapter.browserDetails.browser === 'chrome') {
309309
var chromever = Janus.webRTCAdapter.browserDetails.version;
310-
if(chromever >= 43) {
310+
if(chromever >= 52) {
311311
to.srcObject = from.srcObject;
312312
} else if(typeof to.src !== 'undefined') {
313313
to.src = from.src;

html/support.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<link rel="stylesheet" href="css/demo.css" type="text/css"/>
2020
</head>
2121
<body>
22-
22+
2323
<a href="https://github.com/meetecho/janus-gateway"><img style="position: absolute; top: 0; left: 0; border: 0; z-index: 1001;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png" alt="Fork me on GitHub"></a>
2424

2525
<nav class="navbar navbar-default navbar-static-top">
@@ -39,7 +39,7 @@ <h1>Support</h1>
3939
<a target="_blank" href="http://groups.google.com/d/forum/meetecho-janus">Community</a>
4040
you can interact with (e.g., to discuss deployment or runtime issues,
4141
potential new features, ideas and so on). Besides, our
42-
<a target="_blank" href="https://github.com/meetecho/janus-gateway/blob/master/CONTRIBUTING.md">GitHub repo</a>
42+
<a target="_blank" href="https://github.com/meetecho/janus-gateway/blob/master/.github/CONTRIBUTING.md">GitHub repo</a>
4343
is the place to go when you find issues you think need to be solved,
4444
or whenever you've implemented something and want to contribute
4545
it back to the project.</p>

0 commit comments

Comments
 (0)