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

Generate NACKs and handle incoming RTX packets #90

Merged
merged 10 commits into from
Mar 29, 2024
Merged

Generate NACKs and handle incoming RTX packets #90

merged 10 commits into from
Mar 29, 2024

Conversation

LVala
Copy link
Member

@LVala LVala commented Mar 20, 2024

No description provided.

@LVala LVala self-assigned this Mar 20, 2024
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Merging #90 (552e504) into master (07de1c1) will decrease coverage by 0.28%.
The diff coverage is 84.88%.

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     
Files Coverage Δ
lib/ex_webrtc/rtp_receiver/nack_generator.ex 100.00% <100.00%> (ø)
lib/ex_webrtc/rtp_sender.ex 100.00% <100.00%> (ø)
lib/ex_webrtc/dtls_transport.ex 82.60% <0.00%> (ø)
lib/ex_webrtc/peer_connection/configuration.ex 89.33% <88.23%> (-1.44%) ⬇️
lib/ex_webrtc/peer_connection.ex 85.32% <80.00%> (-0.26%) ⬇️
lib/ex_webrtc/rtp_receiver.ex 83.87% <62.50%> (-8.44%) ⬇️
lib/ex_webrtc/rtp_transceiver.ex 90.97% <82.35%> (-1.57%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 07de1c1...552e504. Read the comment docs.

@LVala LVala mentioned this pull request Mar 22, 2024
52 tasks
@LVala LVala marked this pull request as ready for review March 26, 2024 13:40
@LVala LVala requested a review from mickel8 March 26, 2024 13:40
@@ -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}
Copy link
Member

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)
Copy link
Member

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

Copy link
Member Author

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.

@LVala LVala merged commit 87b58f8 into master Mar 29, 2024
3 checks passed
@LVala LVala deleted the rtx-handling branch March 29, 2024 09:39
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.

None yet

2 participants