-
Notifications
You must be signed in to change notification settings - Fork 8
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
Generate NACKs and handle incoming RTX packets #90
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #90 +/- ##
==========================================
- Coverage 88.74% 88.46% -0.28%
==========================================
Files 31 32 +1
Lines 1502 1561 +59
==========================================
+ Hits 1333 1381 +48
- Misses 169 180 +11
Continue to review full report in Codecov by Sentry.
|
@@ -104,20 +101,19 @@ defmodule ExWebRTC.RTPSender do | |||
%ExRTP.Packet.Extension.SourceDescription{text: sender.mid} | |||
|> ExRTP.Packet.Extension.SourceDescription.to_raw(mid_extmap.id) | |||
|
|||
next_seq_num = sender.last_seq_num + 1 &&& 0xFFFF | |||
packet = %{packet | payload_type: sender.pt, ssrc: sender.ssrc, sequence_number: next_seq_num} | |||
packet = %{packet | payload_type: sender.pt, ssrc: sender.ssrc} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs are outdated
} = generator | ||
|
||
delta = packet.sequence_number - last_sn | ||
in_order? = delta < -@breakpoint or (delta > 0 and delta < @breakpoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we could move this to a separate RTP utils module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't, the amount of repetition is nearly non-existent and moving a single-line function to a separate module would make it harder to read, arguably.
No description provided.