Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for multistream PeerConnections (replaces #1459) #2211

Merged
merged 110 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
c45739b
Aligned to latest changes in master
lminiero Jun 4, 2020
b0525de
Aligned to latest changes in master
lminiero Jun 5, 2020
2acd4c1
Aligned with master
lminiero Jun 8, 2020
048f718
Updated demos and janus.js to use tracks instead of streams
lminiero Jun 8, 2020
dffdcb9
Restored #2089 behaviour for RTCP Report Blocks
lminiero Jun 17, 2020
6a17b6f
Reset simulcast/SVC properties when switching in VideoRoom
lminiero Jun 17, 2020
c576014
Fixed broken response (and memory leak) when creating RTP forwarders …
lminiero Jun 26, 2020
ed7a983
Fix memory leak in sdp-utils.c (#2294)
Jul 23, 2020
3ebc568
Fixed validation of subscriber_parameters with string_ids true in vid…
ZeXtrasJay Jul 28, 2020
1efb4ef
Fixed lookup of participants in janus_vdeoroom.c if using string_ids …
ZeXtrasJay Aug 7, 2020
c2c2ecf
Notify VideoRoom participants about changes in publishers
lminiero Sep 3, 2020
675ca43
Fixed broken rid-based simulcast for substreams<3
lminiero Sep 11, 2020
0bad8f5
Fix stats event firing for only one stream (#2371)
Sep 23, 2020
fa26f9d
insert disabled property for inactive m-line in streams for joined ev…
bwqr Oct 26, 2020
484ce59
[multistream] Fix videoroom support for h264 / vp9 (#2398)
tomleavy Oct 29, 2020
b04ff92
Fixed H.264/VP9 profiles being passed when generating audio m-line (f…
lminiero Nov 2, 2020
8bf3742
Removed checks on media type for SDP utils processing
lminiero Nov 3, 2020
34e3029
[Multistream] random port allocation for simulcast ports (#2463)
rahmanash-dbz Dec 2, 2020
c5013f8
Fixed simulcast integration in multistream branch for Lua and Duktape…
lminiero Dec 10, 2020
7a86943
Aligned to latest changes in master
lminiero Jan 28, 2021
dfd1548
Aligned to most recent changes in master
lminiero Feb 23, 2021
68e6c9c
Fixed segfault when negotiating PeerConnections in AudioBridge
lminiero Feb 23, 2021
f2be6df
Fixed broken audiocodec/videocodec support when provided by publishers
lminiero Feb 23, 2021
50c5600
Added NULL check (fixes #2572)
lminiero Mar 4, 2021
428d900
Fixed missing support for string IDs in a few sections (fixes #2617)
lminiero Apr 2, 2021
9cd70c8
Increase buffer for generated SDP dynamically
lminiero Apr 9, 2021
4924287
Fixed conflicts with master
lminiero Apr 15, 2021
0cc72cb
Imported latest changes from master
lminiero Apr 23, 2021
665bbca
Prevent too high shift exponent
lminiero Apr 23, 2021
1638954
Fixed small nits in demo pages
lminiero Apr 26, 2021
2f1dd09
Fixed overflow runtime error
lminiero Apr 28, 2021
33474bd
Fixed missing simulcast2 usage in multistream VideoRoom demo
lminiero Apr 28, 2021
aa7dbd7
Fixed missing data_mindex initialization (fixes #2647)
lminiero Apr 28, 2021
4b22f71
Updated canvas demo to use multistream (leftover)
lminiero Apr 29, 2021
0ec7ab0
Fixed duplicate video in multiopus demo
lminiero Apr 29, 2021
b9d0126
Fixed conflicts with master
lminiero Apr 30, 2021
fe9207a
Aligned to latest changes in master
lminiero May 6, 2021
2b8878a
Fixed types
lminiero May 10, 2021
5ce053f
Added NULL check
lminiero May 14, 2021
cefb8e1
Fixed broken screensharing demo
lminiero May 20, 2021
17da878
Removed unused variable
lminiero May 28, 2021
6b51712
Fixed broken datachannel support in VideoRoom
lminiero May 28, 2021
cfdddc6
Fixed broken routing of datachannel messages in VideoRoom
lminiero May 28, 2021
43dd523
Fixed typos in VideoRoom docs
lminiero May 31, 2021
05cfc2e
Fixed NULL pointer access
lminiero Jun 8, 2021
9391a78
Fixed conflicts, and fixed buffer overflow when switching Streaming m…
lminiero Jun 21, 2021
9b1991d
Remove broken checks in demos
lminiero Jun 21, 2021
66696cb
Fixed broken simulcast when using Firefox
lminiero Jun 21, 2021
97f2261
Fixed documentation for "create" in Streaming plugin
lminiero Jun 29, 2021
e0c2b11
Remove extra unref when querying VideoRoom publisher (fixes #2728)
lminiero Jul 6, 2021
99ff15c
Send an event back even when subscribe/unsubscribe result in no SDP c…
lminiero Jul 6, 2021
5fa108b
Aligned with master and fixed conflicts
lminiero Jul 20, 2021
f976215
Fixed conflicts with master
lminiero Jul 28, 2021
610cb5e
Fix continuous ssrc setting and log spamming for incoming audio.
atoppi Aug 23, 2021
e741411
Fix forwarders iteration when destroying a publisher (fixes #2758).
atoppi Aug 23, 2021
0d0aacd
Check recording file name before playing it out.
atoppi Aug 24, 2021
2794894
Fixed stream being incorrectly disabled when unsubscribing (fixes #2755)
lminiero Sep 3, 2021
f42f3b0
Fixed remote publishers descriptions being overwritten
lminiero Sep 6, 2021
c87bc12
Allow publisher streams descriptions to be updated without a renegoti…
lminiero Sep 6, 2021
8ce504a
Better management of changing mids
lminiero Sep 16, 2021
fafff64
Additional check when processing RTP packets in VideoRoom
lminiero Sep 16, 2021
ca33fb4
Protect access to handle SDP when processing packets
lminiero Sep 16, 2021
3c6716a
Fix race condition when renegotiating (see #2761)
lminiero Sep 16, 2021
06c1822
Make mid SDP attribute available to plugins
lminiero Sep 17, 2021
18872d8
Fix publisher's video profile setting (see #2756).
atoppi Sep 21, 2021
3455005
Aligned to latest changes and fixed conflicts
lminiero Sep 27, 2021
d93290f
Fixed broken partial subscriptions in Streaming plugin (wrong mindex …
lminiero Sep 27, 2021
f311c56
add streams info to publish event sent to event handlers (#2765)
aberrios1 Sep 29, 2021
e280b2e
fix ssrc header of transport-cc (#2747)
magiclin99 Sep 29, 2021
04c118c
Fixed conflicts
lminiero Oct 5, 2021
6d34673
Handle concurrent hangup of publisher and subscriber (fixes #2775).
atoppi Oct 7, 2021
624df49
Avoid ICE local setup if handle has been destroyed (fix some memory l…
atoppi Oct 7, 2021
8b74b56
Fixed conflict
lminiero Oct 7, 2021
df7db71
Aligned to changes in event handlers
lminiero Oct 8, 2021
5acad5a
Fixed conflict
lminiero Oct 8, 2021
3149559
Add lock when iterating table
lminiero Nov 2, 2021
00a4856
Aligned with latest changes
lminiero Nov 3, 2021
30e79ba
Fixed missing DTX in subscribers offers, when available
lminiero Nov 3, 2021
17e5a46
Fixed g_strlcat leftovers
lminiero Nov 3, 2021
53eadbc
Add missing NULL check (fixes #2801)
lminiero Nov 9, 2021
bc9da47
Reverse order of VideoRoom publishers dereferences
lminiero Nov 10, 2021
acf0a76
Fixed broken NoSIP demo (see #2809)
lminiero Nov 16, 2021
115a110
Moved too early deallocation of VideoRoom message
lminiero Nov 22, 2021
259ec96
fix mediaState arguments order (#2809)
aet Nov 23, 2021
46571c4
Fixed a couple of additional early deallocations of VideoRoom messages
lminiero Nov 24, 2021
f9683f0
Implemented #2817 fixes in multistream too
lminiero Nov 25, 2021
45b5a29
Fixed conflicts
lminiero Nov 26, 2021
27ea970
Aligned with fix on master
lminiero Nov 26, 2021
933ccc4
Fixed out of bounds access in VideoRoom simulcast usage
lminiero Dec 1, 2021
130b380
Aligned with latest changes, and added some fixes to media receiving …
lminiero Dec 7, 2021
237282e
Fixed conflicts with master, and pulled latest fixes
lminiero Dec 15, 2021
5c36f0c
Fixed broken listforwarders in VideoRoom (fixes #2846)
lminiero Jan 3, 2022
88ebebd
Multistream add orient extmap (#2852)
adnanel Jan 10, 2022
b4c84c3
Aligned with latest changes
lminiero Jan 10, 2022
b506848
Preliminary changes for 1.0.0 version
lminiero Jan 10, 2022
520d7f9
Use a higher plugin version for multistream
lminiero Jan 14, 2022
b12228f
Fixed broken link in navbar
lminiero Jan 20, 2022
bc1ff1a
Fixed conflicts
lminiero Jan 24, 2022
b49662e
Clarify this is the multistream branch in the README
lminiero Jan 24, 2022
7e94be5
Aligned with new RED support and fixed conflicts
lminiero Jan 25, 2022
47ed533
Aligned with new DD support and fixed conflicts
lminiero Jan 25, 2022
e33c8f0
Fixed conflict
lminiero Jan 25, 2022
504d20b
Aligned with latest changes and fixed conflicts
lminiero Jan 28, 2022
81dbdd6
Added missing NULL check for pc in janus_ice_media_stopped
lminiero Jan 31, 2022
fa8f214
Fixed conflicts
lminiero Feb 2, 2022
5dbc4e6
Allow legacy mountpoint create, and show warnings when using legacy APIs
lminiero Feb 3, 2022
ad7b867
Fixed check in wrong place when preparsing SDPs
lminiero Feb 4, 2022
2c8ceda
Aligned with master and fixed conflicts
lminiero Feb 7, 2022
a8a0b93
Imported runtime error fix
lminiero Feb 7, 2022
7e7ffc0
Release mutex before goto (#2877)
Feb 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,9 @@ stream_DATA += \
plugins/streams/music.mulaw \
plugins/streams/radio.alaw \
plugins/streams/test_gstreamer.sh \
plugins/streams/test_gstreamer_1.sh
plugins/streams/test_gstreamer1.sh \
plugins/streams/test_gstreamer_multistream.sh \
plugins/streams/test_gstreamer1_multistream.sh
EXTRA_DIST += \
conf/janus.plugin.streaming.jcfg.sample.in \
$(stream_DATA)
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Janus is an open source, general purpose, WebRTC server designed and developed b

For some online demos and documentations, make sure you pay the [project website](https://janus.conf.meetecho.com/) a visit!

> **Note well:** this is the main branch for the `multistream` version of Janus, which is the new version. If you want to check the legacy version of Janus instead (i.e., `0.x`, a.k.a. "master") click [here](https://github.com/meetecho/janus-gateway/tree/0.x) instead.
If you have questions on Janus, or wish to discuss Janus with us and other users, please join our [meetecho-janus](https://groups.google.com/forum/#!forum/meetecho-janus) Google Group. If you encounter bugs, please submit an issue on [GitHub](https://github.com/meetecho/janus-gateway/issues): make sure you read the [guidelines](.github/ISSUE_TEMPLATE.md) before opening an issue, though.


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.11.8",
"version": "1.0.0",
"homepage": "https://github.com/meetecho/janus-gateway",
"authors": [
"Lorenzo Miniero <[email protected]>",
Expand Down
50 changes: 50 additions & 0 deletions conf/janus.plugin.streaming.jcfg.sample.in
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,56 @@ rtp-sample: {
secret = "adminpwd"
}

#
# This is a better example that uses the new settings to configure a live
# mountpoint to send multiple streams of the same type at the same time:
# that is, not simulcasting, but different streams (e.g., two audio
# streams and two video streams). To do so, you don't set the audio,
# video and data properties inline, but use an array of properties instead,
# each identifying a single stream to add, that will then translate to
# a dedicated m-line in the SDP. For each stream, you specify the type,
# a unique ID (mid), and can provide a short description (label) so that
# the client side can know what's what when rendering the streams. Notice
# how the port/pt/rtpmap/fmtp/etc. stuff is called just like that, without
# any audio/video/data prefix: in fact, each media stream can be configured
# the same way, and it's the type that allows us to differentiate them.
# As such, you can use the same approach for creating regular mountpoints
# as well (e.g., 1 audio and 1 video) in a much clearer, and cleaner, way.
#
multistream-test: {
type = "rtp"
id = 123
description = "Multistream test (1 audio, 2 video)"
metadata = "This is an example of a multistream mountpoint: you'll get an audio stream and two video feeds"
media = (
{
type = "audio"
mid = "a"
label = "Audio stream"
port = 5102
pt = 111
rtpmap = "opus/48000/2"
},
{
type = "video"
mid = "v1"
label = "Video stream #1"
port = 5104
pt = 100
rtpmap = "VP8/90000"
},
{
type = "video"
mid = "v2"
label = "Video stream #2"
port = 5106
pt = 100
rtpmap = "VP8/90000"
}
)
secret = "adminpwd"
}

#
# This is a sample of the file-based streaming support. Specifically,
# this simulates a radio broadcast by streaming (in a loop) raw a-Law
Expand Down
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.11.8],[https://github.com/meetecho/janus-gateway],[janus-gateway],[https://janus.conf.meetecho.com])
AC_INIT([Janus WebRTC Server],[1.0.0],[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 @@ -75,9 +75,9 @@ cc*)
-Wunused-but-set-variable"
esac

JANUS_VERSION=118
JANUS_VERSION=1000
AC_SUBST(JANUS_VERSION)
JANUS_VERSION_STRING="0.11.8"
JANUS_VERSION_STRING="1.0.0"
AC_SUBST(JANUS_VERSION_STRING)

case "$host_os" in
Expand Down
1 change: 1 addition & 0 deletions docs/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<li class="active"><a href="index.html">Documentation</a></li>
<li><a href="https://janus.conf.meetecho.com/citeus.html">Papers</a></li>
<li><a href="https://janus.conf.meetecho.com/support.html">Need help?</a></li>
<li><a href="https://janus-legacy.conf.meetecho.com/">Janus (0.x)</a></li>
<li><a class="januscon" target="_blank" href="https://januscon.it">JanusCon!</a></li>
</ul>
<div class="navbar-header navbar-right">
Expand Down
6 changes: 3 additions & 3 deletions docs/janus-doxygen.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "Janus"
PROJECT_NAME = "Janus (multistream)"

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.11.8
PROJECT_NUMBER = 1.0.0

# 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
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = "Janus WebRTC Server"
PROJECT_BRIEF = "Janus WebRTC Server (multistream)"

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
Expand Down
21 changes: 8 additions & 13 deletions dtls-bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,17 +132,12 @@ static int janus_dtls_bio_agent_write(BIO *bio, const char *in, int inl) {
JANUS_LOG(LOG_ERR, "No DTLS-SRTP stack, no DTLS bridge...\n");
return -1;
}
janus_ice_component *component = (janus_ice_component *)dtls->component;
if(component == NULL) {
JANUS_LOG(LOG_ERR, "No component, no DTLS bridge...\n");
janus_ice_peerconnection *pc = (janus_ice_peerconnection *)dtls->pc;
if(pc == NULL) {
JANUS_LOG(LOG_ERR, "No WebRTC PeerConnection, no DTLS bridge...\n");
return -1;
}
janus_ice_stream *stream = component->stream;
if(!stream) {
JANUS_LOG(LOG_ERR, "No stream, no DTLS bridge...\n");
return -1;
}
janus_ice_handle *handle = stream->handle;
janus_ice_handle *handle = pc->handle;
if(!handle || !handle->agent || !dtls->write_bio) {
JANUS_LOG(LOG_ERR, "No handle/agent/bio, no DTLS bridge...\n");
return -1;
Expand All @@ -152,17 +147,17 @@ static int janus_dtls_bio_agent_write(BIO *bio, const char *in, int inl) {
/* FIXME Just a warning for now, this will need to be solved with proper fragmentation */
JANUS_LOG(LOG_WARN, "[%"SCNu64"] The DTLS stack is trying to send a packet of %d bytes, this may be larger than the MTU and get dropped!\n", handle->handle_id, inl);
}
int bytes = nice_agent_send(handle->agent, component->stream_id, component->component_id, inl, in);
int bytes = nice_agent_send(handle->agent, pc->stream_id, pc->component_id, inl, in);
if(bytes < inl) {
JANUS_LOG(LOG_ERR, "[%"SCNu64"] Error sending DTLS message on component %d of stream %d (%d)\n", handle->handle_id, component->component_id, stream->stream_id, bytes);
JANUS_LOG(LOG_ERR, "[%"SCNu64"] Error sending DTLS message on component %d of stream %d (%d)\n", handle->handle_id, pc->component_id, pc->stream_id, bytes);
} else {
JANUS_LOG(LOG_HUGE, "[%"SCNu64"] >> >> ... and sent %d of those bytes on the socket\n", handle->handle_id, bytes);
}
/* Update stats (TODO Do the same for the last second window as well)
* FIXME: the Data stats includes the bytes used for the handshake */
if(bytes > 0) {
component->out_stats.data.packets++;
component->out_stats.data.bytes += bytes;
pc->dtls_out_stats.info[0].packets++;
pc->dtls_out_stats.info[0].bytes += bytes;
}
return bytes;
}
Expand Down
Loading