Skip to content

Commit 33f4728

Browse files
committed
Merge branch 'master' into libconfig
2 parents 51dd0ed + a1876f0 commit 33f4728

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2719
-1323
lines changed

Makefile.am

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ confdir = $(sysconfdir)/janus
4444
conf_DATA = conf/janus.jcfg.sample
4545

4646
certdir = $(datadir)/janus/certs
47-
cert_DATA = certs/mycert.key certs/mycert.pem
47+
dist_cert_DATA = certs/mycert.key certs/mycert.pem
4848

4949
plugindir = $(libdir)/janus/plugins
5050
plugin_LTLIBRARIES = $(NULL)
@@ -56,7 +56,7 @@ eventdir = $(libdir)/janus/events
5656
event_LTLIBRARIES = $(NULL)
5757

5858
SUBDIRS = html
59-
html_DATA = README.md
59+
dist_html_DATA = README.md
6060

6161
streamdir = $(datadir)/janus/streams
6262
stream_DATA = $(NULL)
@@ -168,7 +168,7 @@ janus_LDADD = \
168168
$(JANUS_MANUAL_LIBS) \
169169
$(NULL)
170170

171-
man1_MANS = janus.1
171+
dist_man1_MANS = janus.1
172172

173173
bin_PROGRAMS += janus-cfgconv
174174

@@ -190,10 +190,12 @@ janus_cfgconv_LDADD = \
190190
$(JANUS_MANUAL_LIBS) \
191191
$(NULL)
192192

193-
man1_MANS += janus-cfgconv.1
193+
dist_man1_MANS += janus-cfgconv.1
194194

195195
BUILT_SOURCES = cmdline.c cmdline.h version.c
196196

197+
cmdline.h: cmdline.c
198+
197199
cmdline.c: janus.c
198200
gengetopt --set-package="janus" --set-version="$(VERSION)" < janus.ggo
199201

@@ -333,6 +335,16 @@ conf_DATA += conf/janus.eventhandler.rabbitmqevh.jcfg.sample
333335
EXTRA_DIST += conf/janus.eventhandler.rabbitmqevh.jcfg.sample
334336
endif
335337

338+
if ENABLE_MQTTEVH
339+
event_LTLIBRARIES += events/libjanus_mqttevh.la
340+
events_libjanus_mqttevh_la_SOURCES = events/janus_mqttevh.c
341+
events_libjanus_mqttevh_la_CFLAGS = $(events_cflags)
342+
events_libjanus_mqttevh_la_LDFLAGS = $(events_ldflags) -lpaho-mqtt3as
343+
events_libjanus_mqttevh_la_LIBADD = $(events_libadd)
344+
conf_DATA += conf/janus.eventhandler.mqttevh.cfg.sample
345+
EXTRA_DIST += conf/janus.eventhandler.mqttevh.cfg.sample
346+
endif
347+
336348
##
337349
# Plugins
338350
##
@@ -511,7 +523,6 @@ endif
511523

512524
if ENABLE_POST_PROCESSING
513525
bin_PROGRAMS += janus-pp-rec
514-
man1_MANS += postprocessing/janus-pp-rec.1
515526

516527
janus_pp_rec_SOURCES = \
517528
postprocessing/pp-g711.c \
@@ -542,6 +553,7 @@ janus_pp_rec_LDADD = \
542553
$(POST_PROCESSING_LIBS) \
543554
$(NULL)
544555
endif
556+
dist_man1_MANS += postprocessing/janus-pp-rec.1
545557

546558
##
547559
# Docs
@@ -557,28 +569,22 @@ endif
557569

558570
if ENABLE_JAVASCRIPT_ES_MODULE
559571
jsmodules_DATA += npm/bundles/janus.es.js
560-
EXTRA_DIST += npm/bundles/janus.es.js
561-
CLEANFILES += npm/bundles/janus.es.js
562572
endif
563573

564574
if ENABLE_JAVASCRIPT_UMD_MODULE
565575
jsmodules_DATA += npm/bundles/janus.umd.js
566-
EXTRA_DIST += npm/bundles/janus.umd.js
567-
CLEANFILES += npm/bundles/janus.umd.js
568576
endif
569577

570578
if ENABLE_JAVASCRIPT_IIFE_MODULE
571579
jsmodules_DATA += npm/bundles/janus.iife.js
572-
EXTRA_DIST += npm/bundles/janus.iife.js
573-
CLEANFILES += npm/bundles/janus.iife.js
574580
endif
575581

576582
if ENABLE_JAVASCRIPT_COMMON_JS_MODULE
577583
jsmodules_DATA += npm/bundles/janus.cjs.js
578-
EXTRA_DIST += npm/bundles/janus.cjs.js
579-
CLEANFILES += npm/bundles/janus.cjs.js
580584
endif
581585

586+
EXTRA_DIST += $(jsmodules_DATA)
587+
582588
if ENABLE_JAVASCRIPT_MODULES
583589

584590
npm/node_modules/rollup/bin/rollup: npm/package.json

README.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ To install it, you'll need to satisfy the following dependencies:
2222

2323
* [Jansson](http://www.digip.org/jansson/)
2424
* [libconfig](https://hyperrealm.github.io/libconfig/)
25-
* [libnice](http://nice.freedesktop.org/wiki/)
25+
* [libnice](http://nice.freedesktop.org/wiki/) (at least v0.1.13 suggested, master recommended)
2626
* [OpenSSL](http://www.openssl.org/) (at least v1.0.1e)
2727
* [libsrtp](https://github.com/cisco/libsrtp) (at least v1.5 suggested)
2828
* [usrsctp](https://github.com/sctplab/usrsctp) (only needed if you
@@ -34,9 +34,9 @@ you are interested in WebSockets support for the Janus API)
3434
* [cmake](http://www.cmake.org/) (only needed if you are interested in
3535
WebSockets and/or BoringSSL support, as they make use of it)
3636
* [rabbitmq-c](https://github.com/alanxz/rabbitmq-c) (only needed if
37-
you are interested in RabbitMQ support for the Janus API)
37+
you are interested in RabbitMQ support for the Janus API or events)
3838
* [paho.mqtt.c](https://eclipse.org/paho/clients/c) (only needed if
39-
you are interested in MQTT support for the Janus API)
39+
you are interested in MQTT support for the Janus API or events)
4040
* [nanomsg](https://nanomsg.org/) (only needed if
4141
you are interested in Nanomsg support for the Janus API)
4242
* [libcurl](https://curl.haxx.se/libcurl/) (only needed if you are
@@ -81,10 +81,16 @@ On Ubuntu or Debian, it would require something like this:
8181
on Ubuntu or Debian, unless you're using a recent version (e.g., Ubuntu
8282
14.04 LTS). In that case, you'll have to [install it manually](http://www.opus-codec.org).
8383

84-
* *Note:* For custom installations of libnice, you can run
85-
`pkg-config --cflags --libs nice` to make sure Janus can find the
86-
installation. If not, you may need to set the `PKG_CONFIG_PATH`
87-
environment variable prior to compiling Janus, eg.
84+
* *Note:* We always recommend the master version of libnice (or even the
85+
experimental patch that optimize its performances), or at the very least
86+
version 0.1.13, which should be available out of the box on most distros.
87+
If you're on an older version, consider upgrading it manually as they're
88+
known to cause trouble. Ideally, you'll want to remove the distro version
89+
and install the newer one manually. In case you want to keep both for
90+
some reason, for custom installations of libnice, you can run
91+
`pkg-config --cflags --libs nice` to make sure Janus can find the right
92+
installation. If that fails, you may need to set the `PKG_CONFIG_PATH`
93+
environment variable prior to compiling Janus, e.g.,
8894
`export PKG_CONFIG_PATH=/path/to/libnice/lib/pkgconfig`
8995

9096
In case you're interested in compiling the sample Event Handler plugin,
@@ -188,9 +194,9 @@ the first line with this:
188194

189195
The same applies for Eclipse Paho MQTT C client library, which is needed
190196
for the optional MQTT support. If you're interested in integrating MQTT
191-
queues as an alternative (or replacement) to HTTP and/or WebSockets
192-
to control Janus, you can install the latest version with the
193-
following steps:
197+
channels as an alternative (or replacement) to HTTP and/or WebSockets
198+
to control Janus, or as a carrier of Janus Events, you can install the
199+
latest version with the following steps:
194200

195201
git clone https://github.com/eclipse/paho.mqtt.c.git
196202
cd paho.mqtt.c
@@ -326,7 +332,7 @@ or on the command line:
326332

327333
<installdir>/bin/janus --help
328334

329-
janus 0.4.4
335+
janus 0.4.5
330336

331337
Usage: janus [OPTIONS]...
332338

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.4",
3+
"version": "0.4.5",
44
"homepage": "https://github.com/meetecho/janus-gateway",
55
"authors": [
66
"Lorenzo Miniero <[email protected]>",
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
; This configures the MQTT event handler. Events are sent either on
2+
; one topic or on a topic per event type.
3+
;
4+
; By default, configuration topics for handle and webrtc event types
5+
; with the base topic are configured to /janus/events, e.g.:
6+
; /janus/events/handle
7+
; /janus/events/webrtc
8+
9+
[general]
10+
enabled = no ; By default the module is not enabled
11+
events = all ; Comma separated list of the events mask you're interested
12+
; in. Valid values are none, sessions, handles, jsep, webrtc,
13+
; media, plugins, transports, core, external and all. By
14+
; default we subscribe to everything (all)
15+
json = indented ; Whether the JSON messages should be indented (default),
16+
; plain (no indentation) or compact (no indentation and no spaces)
17+
18+
url = tcp://localhost:1883 ; The URL of the MQTT server. Only tcp supported at this time.
19+
client_id = janus.example.com ; Janus client id. You have to configure a unique ID.
20+
;keep_alive_interval = 20 ; Keep connection for N seconds (default: 30)
21+
;cleansession = 0 ; Clean session flag (default: off)
22+
;mqtt_qos = 1 ; Default MQTT QoS for published events
23+
;disconnect_timeout = 100 ; Seconds to wait before destroying client
24+
;username = guest ; Username for authentication (default: no authentication)
25+
;password = guest ; Password for authentication (default: no authentication)
26+
;topic=/janus/events ; Base topic (default: /janus/events)
27+
;addtype = yes ; Whether we should add the event type to the base topic
28+
29+
30+
; Additional parameters if "mqtts://" schema is used
31+
;tls_verify_peer = yes ; Whether peer verification must be enabled
32+
;tls_verify_hostname = yes ; Whether hostname verification must be enabled
33+
34+
; Certificates to use when SSL support is enabled, if needed
35+
;tls_cacert = /path/to/cacert.pem
36+
;tls_client_cert = /path/to/cert.pem
37+
;tls_client_key = /path/to/key.pem
38+
;tls_ciphers
39+
;tls_version

conf/janus.eventhandler.rabbitmqevh.jcfg.sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ general: {
99
grouping = true # Whether events should be sent individually , or if it's ok
1010
# to group them. The default is 'yes' to limit the number of
1111
# messages
12+
json = "indented" # Whether the JSON messages should be indented (default),
13+
# plain (no indentation) or compact (no indentation and no spaces)
14+
1215
host = "localhost" # The address of the RabbitMQ server
1316
#port = 5672 # The port of the RabbitMQ server (5672 by default)
1417
#username = "guest" # Username to use to authenticate, if needed

conf/janus.eventhandler.sampleevh.jcfg.sample

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ general: {
1818
# requests with an application/json payload. In case
1919
# authentication is required to contact the backend, set
2020
# the credentials as well (basic authentication only).
21+
json = "indented" # Whether the JSON messages should be indented (default),
22+
# plain (no indentation) or compact (no indentation and no spaces)
23+
2124
backend = "http://your.webserver.here/and/a/path"
2225
#backend_user = "myuser"
2326
#backend_pwd = "mypwd"

conf/janus.jcfg.sample.in

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,20 @@ certificates: {
9999
# starting MTU for DTLS (1200 by default, it adapts automatically), and
100100
# finally how much time, in seconds, should pass with no media (audio or
101101
# video) being received before Janus notifies you about this (default=1s,
102-
# 0 disables these events entirely).
102+
# 0 disables these events entirely). Finally, if you're using BoringSSL
103+
# you can customize the frequency of retransmissions: OpenSSL has a fixed
104+
# value of 1 second (the default), while BoringSSL can override that. Notice
105+
# that lower values (e.g., 100ms) will typically get you faster connection
106+
# times, but may not work in case the RTT of the user is high: as such,
107+
# you should pick a reasonable trade-off (usually 2*max expected RTT).
103108
media: {
104109
#ipv6 = true
105110
#max_nack_queue = 500
106111
#rfc_4588 = true
107112
#rtp_port_range = "20000-40000"
108113
#dtls_mtu = 1200
109114
#no_media_timer = 1
115+
#dtls_timeout = 500
110116
}
111117

112118
# NAT-related stuff: specifically, you can configure the STUN/TURN
@@ -139,8 +145,8 @@ nat: {
139145
# all host candidates (which normally have a private IP address) to
140146
# be rewritten with the public address provided in the settings. As
141147
# such, use the option with caution and only if you know what you're doing.
142-
# Besides, it's still recommended to also enable STUN in those cases,
143-
# and keep ICE Lite disabled as it's not strictly speaking a public server.
148+
# Make sure you keep ICE Lite disabled, though, as it's not strictly
149+
# speaking a publicly reachable server, and a NAT is still involved.
144150
#nat_1_1_mapping = "1.2.3.4"
145151

146152
# You can configure a TURN server in two different ways: specifying a

configure.ac

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([Janus WebRTC Server],[0.4.4],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
1+
AC_INIT([Janus WebRTC Server],[0.4.5],[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=44
18+
JANUS_VERSION=45
1919
AC_SUBST(JANUS_VERSION)
20-
JANUS_VERSION_STRING="0.4.4"
20+
JANUS_VERSION_STRING="0.4.5"
2121
AC_SUBST(JANUS_VERSION_STRING)
2222

2323
case "$host_os" in
@@ -142,6 +142,8 @@ AC_ARG_ENABLE([all-handlers],
142142
[enable_sample_event_handler=no])
143143
AS_IF([test "x$enable_rabbitmq_event_handler" != "xyes"],
144144
[enable_rabbitmq_event_handler=no])
145+
AS_IF([test "x$enable_mqtt_event_handler" != "xyes"],
146+
[enable_mqtt_event_handler=no])
145147
],
146148
[])
147149

@@ -212,6 +214,13 @@ AC_ARG_ENABLE([rabbitmq-event-handler],
212214
[enable_rabbitmq_event_handler=no])],
213215
[enable_rabbitmq_event_handler=maybe])
214216

217+
AC_ARG_ENABLE([mqtt-event-handler],
218+
[AS_HELP_STRING([--disable-mqtt-event-handler],
219+
[Disable MQTT event handler ])],
220+
[AS_IF([test "x$enable_mqtt_event_handler" != "xyes"],
221+
[enable_mqtt_event_handler=no])],
222+
[enable_mqtt_event_handler=maybe])
223+
215224
AC_ARG_ENABLE([systemd-sockets],
216225
[AS_HELP_STRING([--enable-systemd-sockets],
217226
[Enable Systemd Unix Sockets management])],
@@ -451,7 +460,6 @@ AC_CHECK_LIB([rabbitmq],
451460
AC_DEFINE(HAVE_RABBITMQEVH)
452461
enable_rabbitmq_event_handler=yes
453462
])
454-
455463
],
456464
[
457465
AS_IF([test "x$enable_rabbitmq" = "xyes"],
@@ -467,10 +475,17 @@ AC_CHECK_LIB([paho-mqtt3a],
467475
AC_DEFINE(HAVE_MQTT)
468476
enable_mqtt=yes
469477
])
478+
AS_IF([test "x$enable_mqtt_event_handler" != "xno"],
479+
[
480+
AC_DEFINE(HAVE_MQTTEVH)
481+
enable_mqtt_event_handler=yes
482+
])
470483
],
471484
[
472485
AS_IF([test "x$enable_mqtt" = "xyes"],
473486
[AC_MSG_ERROR([paho c client not found. See README.md for installation instructions or use --disable-mqtt])])
487+
AS_IF([test "x$enable_mqtt_event_handler" = "xyes"],
488+
[AC_MSG_ERROR([paho c not found. See README.md for installation instructions or use --disable-mqtt-event-handler])])
474489
])
475490
AC_CHECK_LIB([nanomsg],
476491
[nn_socket],
@@ -488,6 +503,7 @@ AC_CHECK_LIB([nanomsg],
488503
AM_CONDITIONAL([ENABLE_RABBITMQ], [test "x$enable_rabbitmq" = "xyes"])
489504
AM_CONDITIONAL([ENABLE_RABBITMQEVH], [test "x$enable_rabbitmq_event_handler" = "xyes"])
490505
AM_CONDITIONAL([ENABLE_MQTT], [test "x$enable_mqtt" = "xyes"])
506+
AM_CONDITIONAL([ENABLE_MQTTEVH], [test "x$enable_mqtt_event_handler" = "xyes"])
491507
AM_CONDITIONAL([ENABLE_NANOMSG], [test "x$enable_nanomsg" = "xyes"])
492508

493509
AC_TRY_COMPILE([
@@ -522,7 +538,7 @@ AS_IF([test "x$enable_systemd_sockets" = "xyes"],
522538
[AC_MSG_ERROR([libsystemd not found. systemd unix domain socket service not supported])])
523539
])
524540

525-
541+
526542
##
527543
# Plugins
528544
##
@@ -928,6 +944,9 @@ AM_COND_IF([ENABLE_SAMPLEEVH],
928944
AM_COND_IF([ENABLE_RABBITMQEVH],
929945
[echo " RabbitMQ event handler:yes"],
930946
[echo " RabbitMQ event handler:no"])
947+
AM_COND_IF([ENABLE_MQTTEVH],
948+
[echo " MQTT event handler: yes"],
949+
[echo " MQTT event handler: no"])
931950
AM_COND_IF([ENABLE_JAVASCRIPT_MODULES], [
932951
echo "JavaScript modules: yes"
933952
echo " Using npm: $NPM"

docs/janus-doxygen.cfg

Lines changed: 1 addition & 1 deletion
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.4
35+
PROJECT_NUMBER = 0.4.5
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

0 commit comments

Comments
 (0)