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

Initial support to negotiate SDPs in Single Peer Connection #1167

Merged

Conversation

jcague
Copy link
Contributor

@jcague jcague commented Mar 15, 2018

Description

More work towards having Single Peer Connection in Lynckia. With this PR we start to have negotiation working in some cases with Chrome. I had to touch multiple files and how the negotiation is performed, so I don't want to add and fix more things to Single Peer Connection in this PR and test that it doesn't break anything.

[] It needs and includes Unit Tests

Changes in Client or Server public APIs

Nothing changes in the public APIs.
I added a thing to be considered by Native Clients: a new attribute called label that is needed to identify the stream in the web clients.

[] It includes documentation for these changes in /doc.

Copy link
Contributor

@lodoyun lodoyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Looks really good. Just a couple of questions.

@@ -95,6 +96,9 @@ window.onload = function () {
room = Erizo.Room({token: token});

var subscribeToStreams = function (streams) {
if (onlyPublish) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 This is useful. I did exactly the same for the SinglePC prototype and never actually added it to master.

@@ -767,55 +730,6 @@ namespace erizo {
}
}

if (isSsrc != std::string::npos) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯x 👍 To removing the SSRC parsing from here

connection.close();
if (this.ErizoConnectionsMap.get(connection.erizoId) !== undefined) {
delete this.ErizoConnectionsMap.get(connection.erizoId)[connection.sessionId];
if (connection.streamsMap.size() === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good place to check if the connection really has to be closed 👍. Consider changing the method name to maybeCloseConnection and update the log accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -127,8 +129,8 @@ bool MediaStream::setRemoteSdp(std::shared_ptr<SdpInfo> sdp) {

bundle_ = remote_sdp_->isBundle;

setVideoSourceSSRCList(remote_sdp_->video_ssrc_list);
setAudioSourceSSRC(remote_sdp_->audio_ssrc);
setVideoSourceSSRCList(remote_sdp_->video_ssrc_map[getLabel()]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I like the ssrc[label] map.

@@ -183,6 +190,18 @@ bool WebRtcConnection::setRemoteSdpInfo(std::shared_ptr<SdpInfo> sdp) {

std::shared_ptr<SdpInfo> WebRtcConnection::getLocalSdpInfo() {
ELOG_DEBUG("%s message: getting local SDPInfo", toLog());
forEachMediaStream([this] (const std::shared_ptr<MediaStream> &media_stream) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get why this is added here... Aren't we adding the SinkSSRCs to the local_sdp in both createOffer and processRemoteSdp. So in both cases of the negotiation we should have the local_sdp correctly filled in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, I'll make sure we don't need this by running some test

@jcague jcague merged commit a7cc8c4 into lynckia:master Mar 20, 2018
Arri98 pushed a commit to Arri98/licode that referenced this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants