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

Fix simulcast issues #121

Merged
merged 3 commits into from
Jun 24, 2024
Merged

Fix simulcast issues #121

merged 3 commits into from
Jun 24, 2024

Conversation

LVala
Copy link
Member

@LVala LVala commented Jun 21, 2024

This PR:

  • fixes send_pli not working with simulcast
  • fixes duplicate id of inbound_rtp sections in get_stats
  • adds rids field to MediaStreamTrack, which contains negotiated RIDs

@LVala LVala requested a review from mickel8 June 21, 2024 14:35
@LVala LVala self-assigned this Jun 21, 2024
Copy link

codecov bot commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 61.11111% with 7 lines in your changes missing coverage. Please review.

Project coverage is 87.20%. Comparing base (e6c8dad) to head (41ff049).

Current head 41ff049 differs from pull request most recent head f5eaf38

Please upload reports for the commit f5eaf38 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #121      +/-   ##
==========================================
- Coverage   87.50%   87.20%   -0.31%     
==========================================
  Files          34       34              
  Lines        1721     1727       +6     
==========================================
  Hits         1506     1506              
- Misses        215      221       +6     
Files Coverage Δ
lib/ex_webrtc/media_stream_track.ex 100.00% <100.00%> (ø)
lib/ex_webrtc/rtp_receiver.ex 70.49% <100.00%> (-9.84%) ⬇️
lib/ex_webrtc/rtp_transceiver.ex 91.46% <100.00%> (-0.06%) ⬇️
lib/ex_webrtc/sdp_utils.ex 92.41% <100.00%> (+0.32%) ⬆️
lib/ex_webrtc/peer_connection.ex 82.30% <0.00%> (+0.27%) ⬆️

... and 1 file with indirect coverage changes


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 e6c8dad...f5eaf38. Read the comment docs.

@@ -213,8 +213,10 @@ defmodule ExWebRTC.RTPReceiver do
@spec get_stats(receiver(), non_neg_integer()) :: [map()]
def get_stats(receiver, timestamp) do
Enum.map(receiver.layers, fn {rid, layer} ->
id = if(rid == nil, do: receiver.track.id, else: "#{receiver.track.id}, rid: #{rid}")
Copy link
Member

Choose a reason for hiding this comment

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

I would favor using : and no spaces as puting spaces and commas in id isn't a common practice

Suggested change
id = if(rid == nil, do: receiver.track.id, else: "#{receiver.track.id}, rid: #{rid}")
id = if(rid == nil, do: receiver.track.id, else: "#{receiver.track.id}:#{rid}")

@LVala LVala merged commit 2fb532b into master Jun 24, 2024
1 check passed
@LVala LVala deleted the simulcast-fixes branch June 24, 2024 13:08
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