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

📦 Hand RTP packets directly to JanusStream #106

Merged
merged 13 commits into from
Mar 15, 2021

Conversation

danstiner
Copy link
Collaborator

@danstiner danstiner commented Mar 12, 2021

Going back and doing ebefe00 the right way this time.

This shortens the path for RTP packets to only require a single lock at the stream level.

@danstiner danstiner requested a review from haydenmc March 12, 2021 07:49
@danstiner danstiner marked this pull request as ready for review March 12, 2021 07:49
@danstiner danstiner force-pushed the danstiner/rtp-packet-sink branch from 7143ed9 to caed328 Compare March 12, 2021 08:05
src/FtlServer.cpp Outdated Show resolved Hide resolved
@danstiner danstiner requested a review from haydenmc March 13, 2021 21:33
@danstiner
Copy link
Collaborator Author

danstiner commented Mar 13, 2021

Tested locally on edge and ingest nodes. I see about 0.6% dropped frames and I'm not sure why. Will test if I see the same an older commit but I suspect I will. (webrtc-internals says 0 nacks, but 30+ picture loss indicators so it might even be an issue on the decoding side)

Copy link
Member

@haydenmc haydenmc left a comment

Choose a reason for hiding this comment

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

Couple little nits, and a little locking concern, other than that (and your outstanding investigation on lost packets), looks good to me

src/JanusStream.cpp Outdated Show resolved Hide resolved
src/JanusStream.cpp Show resolved Hide resolved
src/JanusStream.cpp Outdated Show resolved Hide resolved
@haydenmc
Copy link
Member

Tested locally on edge and ingest nodes. I see about 0.6% dropped frames and I'm not sure why. Will test if I see the same an older commit but I suspect I will. (webrtc-internals says 0 nacks, but 30+ picture loss indicators so it might even be an issue on the decoding side)

Possible you're running into #101? If you're only seeing freezes and not actual packet loss.

Copy link
Member

@haydenmc haydenmc left a comment

Choose a reason for hiding this comment

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

One outstanding comment, but if it is a non-concern then we're all good!


void JanusStream::StopRelays()
{
std::lock_guard lock(mutex);
Copy link
Member

Choose a reason for hiding this comment

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

This is my only remaining concern, and you said something over voip about this being reasonable, so it could be that my concern is not warranted. :)

Copy link
Member

Choose a reason for hiding this comment

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

(concern being holding a lock while stopping every individual relay)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think my justification was if this is only called when we're killing the stream, so we don't care about delaying packets. But might as well clean it up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cleaned it up with some swaps

@haydenmc haydenmc merged commit 2231138 into master Mar 15, 2021
@haydenmc haydenmc deleted the danstiner/rtp-packet-sink branch March 15, 2021 19:41
haydenmc pushed a commit that referenced this pull request Mar 16, 2021
Resolves infinite loop introduced by #106
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