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 for multiple MediaStreams in a single WebRtcConnection #1162

Merged
merged 3 commits into from
Mar 6, 2018

Conversation

jcague
Copy link
Contributor

@jcague jcague commented Mar 2, 2018

Description

This PR adds initial support for handling multiple streams in a single WebRtcConnection inside Erizo.
[] It needs and includes Unit Tests

Changes in Client or Server public APIs

Not needed.

[] 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.

I've identified a possible issue in the SSRC routing, other than that it looks good

RtcpHeader *chead = reinterpret_cast<RtcpHeader*> (buf);
uint32_t ssrc = head->getSSRC();
if (chead->isRtcp()) {
ssrc = chead->getSourceSSRC();
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 won't work for sender reports. In that case, we need chead->getSSRC()

ssrc = chead->getSourceSSRC();
}
forEachMediaStream([packet, transport, ssrc] (const std::shared_ptr<MediaStream> &media_stream) {
if (media_stream->isSourceSSRC(ssrc) || media_stream->isSinkSSRC(ssrc)) {
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 ok. isSourceSSRC would make sure packets from a publisher are properly routed while isSink would work for feedback packets from a subscriber.

local_sdp_->audio_ssrc = media_stream_->getAudioSinkSSRC();
forEachMediaStream([this] (const std::shared_ptr<MediaStream> &media_stream) {
local_sdp_->video_ssrc_list.push_back(media_stream->getVideoSinkSSRC());
local_sdp_->audio_ssrc = media_stream->getAudioSinkSSRC();
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 not part of this PR but, do you have a plan here? The obvious solution is to have another list for audio ssrcs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd rather move the ssrc tracking to a new class called stream_sdp or similar.

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.

Looks good to me.

@jcague jcague merged commit 4a517f1 into lynckia:master Mar 6, 2018
@jcague jcague deleted the add/mux_streams_by_ssrcs branch March 6, 2018 12:33
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