2264 Commits

Author SHA1 Message Date
renovate[bot]
706c75b864 Update module github.com/pion/srtp/v3 to v3.0.8
Generated by renovateBot
2025-09-25 16:53:53 +00:00
Pion
43976dc075 Update CI configs to v0.11.29
Update lint scripts and CI configs.
2025-09-21 22:38:33 -04:00
Sean DuBois
e0181e91e1 Update TestPeerConnection_SessionID to run on WASM
Relates to #2714
2025-09-19 16:56:07 -04:00
Joe Turki
5a0e56e105 Prefer makezero with a cap 2025-09-19 06:19:21 +03:00
Joe Turki
9acbc661f6 Cleanup statsGetter after peer is closed 2025-09-19 05:42:41 +03:00
Shreyas Jaganmohan
4c1261ff83 Add inbound-rtp stats
Remove comments

Add collectStats test

Fix linter issues

Remove comment

Fix tests

Address comments

Fix comment

Fix function comment
2025-09-18 23:25:24 +02:00
philipch07
370412f694 Improve code cov 2025-09-16 21:39:38 -04:00
philipch07
7f1ab45859 Remove unused file 2025-09-16 21:39:38 -04:00
philipch07
39d1b3cb9d Apply go modernize suggestions 2025-09-14 18:20:19 -04:00
Sean DuBois
781ff736bf Create examples/data-channels-detach-create
Pion <-> Pion DataChannels example

Resolves #2706
2025-09-12 15:31:59 -04:00
renovate[bot]
f5fd0fadda Update dependency @roamhq/wrtc to v0.9.1
Generated by renovateBot
2025-09-12 08:22:32 -07:00
Sean DuBois
6ef2888a26 Fix RTPSender.SetReadDeadline crash
Add nil pointer check when calling SetReadDeadline. I don't believe this
can happen with WebRTC, but is possible with `ortc`.

A future improvement would be to cache the `SetReadDeadline` call. At
this time the complexity seems to outweight the reward.

Resolves #2889
2025-09-12 08:13:19 -07:00
Sean DuBois
634a904ba9 Fire OnBufferedAmountLow in a goroutine
If a user blocks this routine it would stop inbound message handling in
SCTP. To reduce the sharp edge fire it in a goroutine so users don't
need to worry about blocking.

`data-channels-flow-control` exhibited no differences in throughput from
this change.

Resolves #846
2025-09-11 11:32:00 -07:00
Sean DuBois
1527bfa2e3 Allow IVFWriter Framerate to be modified
Before was hardcoded to 30/1

Resolves #696
2025-09-09 10:45:38 -07:00
Sean DuBois
cf7625dff8 Allow IVFWriter Width/Height to be modified
Before was hardcoded to 640x480

Relates to #696
2025-09-09 09:55:13 -07:00
renovate[bot]
882f699ca5 Update actions/setup-node action to v5
Generated by renovateBot
2025-09-04 22:18:52 -04:00
Sean DuBois
e9efed4d18 Fix trailing space in rtcp-fb with no Parameter
Media construction would always do "%s %s" even if no Parameter was
available. This commit fixes that by checking if Parameter is empty or
not.

Resolves #3207
2025-09-04 10:45:00 -04:00
renovate[bot]
457679c440 Update module github.com/pion/rtp to v1.8.22
Generated by renovateBot
2025-09-03 21:14:19 +00:00
renovate[bot]
3bb8fcea4a Update module github.com/pion/sdp/v3 to v3.0.16
Generated by renovateBot
2025-09-01 16:24:48 +00:00
renovate[bot]
4eebb3eddc Update actions/checkout action to v5
Generated by renovateBot
2025-09-01 11:59:43 -04:00
Pion
5b098de582 Update CI configs to v0.11.26
Update lint scripts and CI configs.
2025-08-31 23:25:58 -04:00
Pion
cda9130802 Update CI configs to v0.11.25
Update lint scripts and CI configs.
2025-08-31 23:04:59 -04:00
Pion
e7183f9e18 Update CI configs to v0.11.24
Update lint scripts and CI configs.
2025-08-29 23:44:50 -04:00
boks1971
c376d0edf9 Match codec order of remote peer
Done when creating a transceiver from remote description to respect
codec order preference of remote peer.

There was a recent change to include partial matches which overwrote
same codecs and also rtx was getting magled.

Change it by removing codecs from search space as matches are found so
that a codec match is applied only once.

Also, move RTX matching to separate block to ensure proper RTXes ar
matched.
2025-08-28 10:15:58 +05:30
renovate[bot]
42b3cfd2ca Update module github.com/stretchr/testify to v1.11.1
Generated by renovateBot
2025-08-27 19:47:58 +00:00
boks1971
2af60a491d Filter unattached RTX when getting codecs
Recently added filtering out unattached RTX in SetCodecPrefrences.
Turns out it is needed in `getCodecs()` also in the following
scenario
- AddTrack from answer side adds a tracks and has media engine codecs
- An offer is received and negotiated codecs get updated in
  media engine. And this does not have one of the codecs added
  AddTrack above (default media engine codecs)
- Generate answer will do `getCodecs` which will filter out
  the codec missing from the `offer`, but would have let the
  corresponding RTX pass through and get added to the answer.
2025-08-27 01:34:35 +05:30
renovate[bot]
123f1388c4 Update module github.com/stretchr/testify to v1.11.0
Generated by renovateBot
2025-08-25 22:38:30 +00:00
boks1971
4b37165dcc Tests to ensure proper direction in SDP
Per @Sean-Der's comments in this PR
(https://github.com/pion/webrtc/pull/3198), adding a couple of more
tests to ensure that direction in SDP is correct when remote offer is
processed and transceivers are matched up against existing ones using
type and direction.

Test flow
- AddTrack first on answer side. This should create a transceiver with
  `sendrecv`
- Receive remote description offer
- First time, it will try to match using type and direction.
  o If the remote offer had a media section with `sendonly`, the above
    should fail to find a match. In this case, a new transceiver will
    be created. So, there should be 2 transceivers (one from this +
    one from AddTrack in Step 1). In this case, the answer will have
    only one media section as the offer had only one slot. And the
    directions should be `remote = sendonly` and `local = recvonly`.
  o If the remote offer is `sendrecv`, it should find a match. So, there
    should be only one transceiver (the one created with AddTrack gets
    used for receive).  In this case, the answer will have
    only one media section as the offer had only one slot. And the
    directions should be `remote = sendrecv` and `local = sendrecv`.
- Then the remote track is removed from offer. Processing that remote
  decription will find a transceiver by `mid`, but directions are
  checked in the SDP to ensure they have correct values.
2025-08-25 21:55:55 +05:30
boks1971
6424d85a10 Consider remote direction in add track
A follow on to https://github.com/pion/webrtc/pull/3200.
This removes the setting engine flag and uses knowledge
of remote direction to decide if a transceiver can be
re-used for sending.

Refactored the code a bit and moved the check into
RTPTransceiver.isSendAllowed.

Re-did the UT to check for re-use cases.
2025-08-25 10:15:56 -06:00
boks1971
469ca2cf1b Disallow incompatible transceiver directions
This effectively reverts part of
https://github.com/pion/webrtc/pull/2412.

The answer was incorrect under the following conditions
- Answer side added a track, it created a new transceicer with Sendrecv
  direction.
- When the remote offer comes in later, SetRemoteDescription tries to
  find an existing tranceiver by type and direction. It ends up picking
  what was added above even if the remote side is using `sendonly`.
- That results in answer marking the section as `sendrecv` which is
  incompatible with the offer.
2025-08-24 21:44:41 +05:30
boks1971
2299a71701 Add opt control transceiver re-use in recvonly
SetDisableTransceiverReuseInRecvonly controls if a
transceiver is re-used when its current direction is `recvonly`.

This is useful for the following scenario
  - Remote side sends `offer` with `sendonly` media section.
  - Local side creates transceiver in `SetRemoteDescription`
    and sets direction to `recvonly.
  - Local side calls `AddTrack`.
  - As the current direction is `recvonly`, the transceiver added
    above will be re-used. That will set the direction to `sendrecv`
    and the generated `answer` will have `sendrecv` for that
    media section.
  - That answer becomes incompatible as the offerer is using
    `sendonly`.

Note that local transceiver will be in `recvonly` for both `sendrecv`
and `sendonly` directions in the media section. If the `offer` did use
`sendrecv`, it is possible to re-use that transceiver for sending.
So, disabling re-use will prohibit re-use in the `sendrecv` case also
and hence is slightly wasteful.
2025-08-24 21:38:59 +05:30
cnderrauber
3e84081c87 Add partialMatch codecs to transceiver from remote
When a recvonly transceiver is created from remote
offer, skip partial matched codec will cause the
receiver can't be reused to send the codec.
2025-08-24 16:47:00 +08:00
boks1971
c82d96cb75 Remove RTX codec if no primary
While adding transceivers from SetRemoteDescription,
the filtered codecs could filter out the primart codec
and leave the RTX codec in. Generating an answer with
that fails `SetRemoteDescription` on remote peer due
to an unrecognisable codec. Fix it by filtering out
RTX is primary is not there.
2025-08-22 23:46:49 +05:30
boks1971
8efd17e592 Do not create receiver for ealy media in offerer
For offerer, if the remote side sends early media
before the remote description (answer) is received,
the undeclared SSRC processor can create a receiver
and that receiver could be left dangling as
transceiver `mid` is not updated from remote
description answer.

Still leaving the simulcast probe path and only
avoiding creating a receiver for non-simulcast path.

Add a flag `handleUndeclaredSSRCWithoutAnswer` to control handling
of early media without SDP answer for non-simulcast tracks.
The default behaviour is to not process early media without SDP answer.
v4.1.4
2025-08-21 18:36:58 +05:30
renovate[bot]
29e1e00639 Update module github.com/pion/turn/v4 to v4.1.1
Generated by renovateBot
2025-08-17 19:41:48 +03:00
Anton Manakin
afcb3487d9 Add ice-proxy example 2025-08-17 19:19:00 +03:00
Pion
1557d318e2 Update CI configs to v0.11.22
Update lint scripts and CI configs.
2025-08-16 18:41:40 +03:00
Joe Turki
22cf05c358 Upgrade to golangci-lint@v2 2025-08-16 18:31:44 +03:00
renovate[bot]
941b7413fa Update module github.com/pion/dtls/v3 to v3.0.7
Generated by renovateBot
2025-08-16 14:50:24 +00:00
renovate[bot]
bea05f64d0 Update module github.com/pion/srtp/v3 to v3.0.7
Generated by renovateBot
2025-08-14 10:40:22 +00:00
renovate[bot]
4f1a2879dc Update golang Docker tag to v1.25
Generated by renovateBot
2025-08-14 02:47:34 +00:00
arjunshajitech
7a94394db0 Log error when Read is used with simulcast 2025-07-25 14:13:39 +05:30
Kostya Vasilyev
5c3d5826a5 WHIP-WHEP example improvements
- Add TWCC extension, and generator.
- Handle CORS preflight requests.
- Add audio track.
- Handle EOF without panicking.
2025-07-24 21:17:30 +03:00
renovate[bot]
f06b6bc1e1 Update module github.com/pion/sdp/v3 to v3.0.15
Generated by renovateBot
2025-07-19 02:09:57 +00:00
renovate[bot]
1355f024a5 Update module github.com/pion/rtp to v1.8.21
Generated by renovateBot
2025-07-15 23:13:10 +00:00
cnderrauber
4c1af4c3e6 H265 reader & writer
H265 raeder & writer
v4.1.3
2025-06-30 16:14:49 +08:00
renovate[bot]
e602e15ff3 Update module github.com/pion/rtp to v1.8.20
Generated by renovateBot
2025-06-30 07:29:21 +00:00
Xiaobo Liu
4f67c90d22 Replace custom atomicBool with sync/atomic.Bool
- Remove custom atomicBool implementation
- Replace all atomicBool usages with standard library sync/atomic.Bool

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
2025-06-25 18:05:03 +08:00
3DRX
887f5c6e0c Add sender receiver report 2025-06-23 13:31:35 +08:00
renovate[bot]
d3151fe573 Update module github.com/pion/logging to v0.2.4
Generated by renovateBot
2025-06-23 01:42:02 +00:00