Skip to content

Conversation

@spe-dev
Copy link

@spe-dev spe-dev commented Apr 18, 2022

The TotalLost field is defined as an uint32. But RFC 3550 mentions that the field can be set with negative values as it's a int24. To avoid bit manipulation in each apps that use pion, this PR do the job during Marshal/Unmarshal funcs.
Ref: https://datatracker.ietf.org/doc/html/rfc3550 Section 6.4 & A.3

@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.37%. Comparing base (ad1dcea) to head (5f40168).
⚠️ Report is 60 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
+ Coverage   76.28%   76.37%   +0.09%     
==========================================
  Files          21       21              
  Lines        2353     2362       +9     
==========================================
+ Hits         1795     1804       +9     
  Misses        461      461              
  Partials       97       97              
Flag Coverage Δ
go 76.37% <100.00%> (+0.09%) ⬆️
wasm 76.37% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The total number of packets lost is a signed number and can be
negative to communicate multiple transmissions of a packet.
@Sean-Der
Copy link
Member

Changing this will cause the following packages to not compile, so I think it is worth a /v2 ! Great timing also, we can move pion/webrtc to the new version for 3.2.0

  • Galene
  • ion-sfu
  • LiveKit

@Sean-Der Sean-Der mentioned this pull request Apr 19, 2022
@enobufs
Copy link
Member

enobufs commented Apr 20, 2022

We could potentially get around the breaking change by adding two helper methods to ReceiptionReport:

func (*ReceptionReport) SetTotalLostInt32(totalLost int32) {...}
func (*ReceptionReport) TotalLostInt32() int32 {...}

2c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants