1931 Commits

Author SHA1 Message Date
Sean DuBois
cdb03f2b49 Update module github.com/pion/ice/v2 to v2.3.38 v3.3.6 2025-07-30 12:15:55 -04:00
Sean DuBois
ed84fadb26 Use intersection of codecs to generate rtcp-fb
Update MediaEngine codec creation to take into account remote
and local rtcp-fb. Before we would incorrectly always take
the remote rtcp-fb and ignore local.

Resolves #2943
Resolves #2944
Resolves #1968
v3.3.5
2024-12-15 13:42:39 +01:00
boks1971
90222f6620 Update ICE version v3.3.4 2024-10-07 21:27:43 +05:30
boks1971
c3c7178e56 Add ice transport api to get selected pair stats
In use cases like SFU, it is useful to get just the selected candidate
pair stats to have access to current RTT on the peer connection. The
standard has a way to do `GetSelectedCandidatePair` on `ICETransport`,
but does not have a way to get stats of that pair.

Although not in standard, adding a method to `ICETransport` to get
selected candidate pair along similar lines of above method.
2024-10-07 21:01:38 +05:30
boks1971
c0887556ca Update ICE v3.3.3 2024-09-17 00:03:44 +05:30
boks1971
8bf9954a38 Return object icluding stat id for selected pair
Returning the object with stat id is useful when cross-referencing
stats.
v3.3.2
2024-09-16 17:44:00 +05:30
cnderrauber
f99d4ed2f1 Don't reuse transceiver in one round negotiation
Should not reuse transceiver (remove & add track)
in one round negotiation, it cause the transceiver
changes ssrc/id without transit to inactive and the
remote peer connection can't fire track close and
OnTrack event.
v3.3.1
2024-09-06 22:56:23 +08:00
Eric Daniels
540af5bcf9 Prevent ICETransport start/stop deadlock 2024-09-04 13:21:29 -04:00
Eric Daniels
6ac4b71eee Fix concurrent pc.GracefulClose 2024-08-26 10:51:47 -04:00
Eric Daniels
a49914b253 Revert "Run ops.GracefulClose earlier in pc.Close"
This reverts commit 887b10f264.
v3.3.0
2024-08-14 14:36:23 -04:00
sukun
cef1db8adb Fix SCTPTransport OnClose test 2024-08-13 20:44:42 +05:30
sukun
b6f806a24b Provide SCTP Association OnClose callback 2024-08-13 20:44:42 +05:30
Eric Daniels
887b10f264 Run ops.GracefulClose earlier in pc.Close 2024-08-13 10:08:50 -04:00
Eric Daniels
4e4a67d7a2 Add PeerConnection.GracefulClose v3.2.51 2024-08-06 10:07:09 -04:00
Juan Navarro
b8d3a7bba7 Fix disordered RIDs in SDP
Map iteration order is not guaranteed by Go, so it's an error to iterate
over a map in places where maintaining the same ordering is important.

This change replaces the map of simulcastRid{} with an array of the same
type. The simulcastRid{} type is extended to hold the rid-id which
previously was used as the key in the map.

Accesses to the map are replaced with range loops to find the desired
rid-id for each case.

Fixes #2838
2024-08-01 10:57:06 -04:00
Sean DuBois
9836d58351 Enable tests for /v3 branch
Resolves #2841
2024-08-01 10:28:30 -04:00
cnderrauber
2364173ced Fix our-of-order twcc fb cause by rtx blocked
Fix #2830. The TrackRemote.Read could block in
readRTP if the buffer is empty then rtx packets
arrival before next media rtp packet will be
readed after the next media rtp packet and cause
out-of-order fb and mess up remote peer's
bandwidth estimation.
v3.2.50
2024-07-26 00:05:36 -04:00
Eric Daniels
69cd4e4907 Close unhandled rtcp simulcast streams
handleIncomingSSRC will call streamsForSSRC which
opens rtp/rtcp streams that if unhandled can be
leaked resources. Now we will proactively open
them before calling handleIncomingSSRC and close
then later. In the future it would be better to
do this inside handleIncomingSSRC to protect other
callers.
2024-07-23 00:03:48 -04:00
Eric Daniels
a598bab318 Bump ice to v2.3.31 2024-07-22 23:34:24 -04:00
sirzooro
5437ff5ac9 Added support for SRTP_NULL_HMAC_SHA1_80 cipher
Added support for SRTP_NULL_HMAC_SHA1_80 protection profile (cipher).
It is disabled by default. You need to use SettingEngine and set list
of allowed SRTP protection profiles using its SetSRTPProtectionProfiles
function called with dtls.SRTP_NULL_HMAC_SHA1_80 as a parameter. You
need to do this for both pion peers. For non-pion ones you may need to
enable it somewhere too, as NULL cipher is usually disabled for security
reasons.
v3.2.49
2024-07-21 09:37:29 +02:00
Sean DuBois
bd3aaaebda Fix TestPeerConnection_Simulcast
SSRC of 0 is consumed by probing
v3.2.48
2024-07-20 22:31:13 -04:00
Sean DuBois
af63d2b25d Properly handle non-media probes
libwebrtc has started sending media probes on an unannounced SSRC(0).
Currently Pion will ignore this as the SSRC hasn't been declared
explicitly and no RID/MID RTP Headers.

This adds a special case to accept SSRC 0 and Read the RTP packets. This
allows the TWCC reports to properly be generated.
2024-07-20 22:21:36 -04:00
sirzooro
482d9ebf2b Updated pion modules to latest versions 2024-07-20 23:07:43 +02:00
Eric Daniels
48cfc6302d Hold pc.mu while populating local candidates 2024-07-19 12:15:11 -04:00
cnderrauber
7407903280 Match header extensions to remote media sections
Firefox would send updated header extension
in renegotiation, e.g. publish a track without
simucalst then renegotiate second track with
simucalst, the two media secontions will have
different rtp header extensions in offer. Need
to match remote header extentions for each
media sections to avoid second track publish
failed.
v3.2.47
2024-07-18 12:31:32 +08:00
Sean DuBois
49ccf87b26 Update ice to v2.3.28 v3.2.46 2024-07-15 12:25:08 -04:00
Sean DuBois
5bf5bed1eb Revert 7c8bfbd44a and add test
Don't block Close on spawned goroutines
v3.2.45
2024-07-15 12:12:42 -04:00
Eric Daniels
f3f3750808 Update ice to v2.3.27 v3.2.44 2024-07-02 10:55:04 -04:00
Eric Daniels
c8fa88f133 Make pc.Close wait on spawned goroutines to close 2024-07-02 10:53:40 -04:00
aler9
68f19e2272 Add links to RTP payload format specifications 2024-06-25 18:21:39 -04:00
Eric Daniels
b3856ffcfc Make onNegotiationNeeded conform to spec
- Removes non-canon logic
v3.2.43
2024-06-24 11:04:51 -04:00
aler9
4430f4194c Fix race condition in test
In TestPeerConnection_Zero_PayloadType, WriteSample might be called
after closePairNow, resulting in failure. This patch fixes the issue.
2024-06-16 00:01:43 -04:00
Eric Daniels
43a6a6996b Reset state machine after negotiationNeededOp
- Fixes #2774
v3.2.42
2024-06-11 10:50:29 -07:00
aler9
952fbe068c Fix AV1 and VP9 codec matching
Currently, AV1 or VP9 formats are matched regardless of the profile
parameter. This was not noticeable until browsers started advertising
multiple VP9 formats at the same time, each with a different profile
ID, in order to allow the counterpart to send different streams on the
basis of supported profiles.

This causes two issues: first, the library includes in the SDP all
formats passed by the browser, regardless of the fact that the profile
ID is registered in the API or not. Then, the library is unable to
choose the correct format for streaming, causing an intermittent
failure.

This patch fixes the matching algorithm and also covers the case in
which the profile ID is missing, by using values dictated by
specifications.

Tests were refactored since previous ones covered the same lines
multiple times.
v3.2.41
2024-06-10 11:44:05 +02:00
Michael Klingbeil
6981562e6d Properly update metadata when PayloadType is 0
In the case where a remote track is sending PCMU with payload type 0
checkAndUpdateTrack will fail to update the track codec and params
(because t.PayloadType() is already 0). Add an extra check to handle
this case.
2024-06-05 11:11:51 -04:00
Aleksandr Alekseev
1778f7fcc2 Fix tests for simulcast rtx on v3 2024-05-14 07:50:50 -04:00
renovate[bot]
7cad104f43 Update module github.com/pion/ice/v2 to v2.3.24
Generated by renovateBot
v3.2.40
2024-05-02 14:24:07 -04:00
cnderrauber
e7cf3ba869 Update RtxSSRC for simulcast track remote
Fix #2751, updates remote track's rtx ssrc for
simulcast track doesn't contain rtx ssrc in sdp
since readRTX relies on rtx ssrc to determine if
it has a rtx stream.
v3.2.39
2024-04-26 11:37:19 +08:00
Paul Wells
7be0482567 Update module github.com/pion/sctp to v1.8.16 v3.2.38 2024-04-15 22:47:44 -07:00
Paul Wells
9d762408bd Update module github.com/pion/ice/v2 to v2.3.15 2024-04-15 22:47:04 -07:00
Alex Pokotilo
a43143e7ac Add padding support to TrackLocalStaticSample
To add padding-only samples call GeneratePadding
v3.2.37
2024-04-10 10:04:27 -04:00
Sean DuBois
2f0fe9334a Declare Go 1.17 as minimum version
With f53f0a9c2a 1.17 and above is now supported
v3.2.36
2024-04-08 12:25:51 -04:00
Sean DuBois
f53f0a9c2a Update github.com/pion/transport/v2 to v2.2.4 v3.2.35 2024-04-08 12:16:29 -04:00
Hans Gylling
c1e5386454 Declare Go 1.19 as minimum version 2024-04-03 22:43:34 -04:00
Sean DuBois
cb8ab4ab28 Update github.com/pion/sctp to v1.8.14 v3.2.34 2024-04-03 15:28:01 -04:00
Sean DuBois
eb6e39557d Retract v3.2.28
The SCTP implementation used in v3.2.28 fails to establish a connection
with other WebRTC implementations. The implementation of ZeroChecksum
assumes incorrectly that the feature is bi-directional

SCTP ZeroChecksum is actually a uni-directional feature which causes the
Assocations to be unable to communicate.
v3.2.33
2024-04-03 13:20:00 -04:00
Sean DuBois
4c25aa67f4 Include msid-semantic in Session Attributes
Chrome doesn't include the msid when responding to
recvonly transceivers

See crbug[0] for discussion

[0] https://issues.chromium.org/u/1/issues/328522463
v3.2.32
2024-04-01 13:21:10 -04:00
Sean DuBois
b84753eae4 Update github.com/pion/rtp to v1.8.5 v3.2.31 2024-03-29 09:51:09 -04:00
Sean DuBois
10dca094ae Update github.com/pion/sdp/v3 to v3.0.9 v3.2.30 2024-03-28 21:59:53 -04:00
Sean DuBois
de2e7b7e01 Put SCTP Zero Checksum behind SettingEngine
Old versions of Pion break against it
2024-03-18 09:37:11 -04:00