28 Commits

Author SHA1 Message Date
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
Joe Turki
740e5166c5 Update lint rules, force testify/assert for tests
Use testify's assert package instead of the standard library's testing
package.
2025-03-27 12:08:37 +02:00
Joe Turki
feeeebf251 Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-18 07:16:06 -06:00
cnderrauber
2553783e53 Fix nil rtcpInterceptor on track.Bind
Create rtcpInterceptor before bind called.
2024-11-28 18:28:12 +08:00
Sean DuBois
5637661fef Add E2E Test for RTX
Assert that generation of NACKs and sending of RTX operates as expected.
2024-10-05 01:05:12 -04:00
Sean DuBois
4541b73b1a Add Retransmission and FEC to TrackLocal
If the MediaEngine contains support for them a SSRC will be generated
appropriately

Co-authored-by: aggresss <aggresss@163.com>
Co-authored-by: Kevin Wang <kevmo314@gmail.com>

Resolves #1989
Resolves #1675
2024-10-03 20:44:49 -07:00
Pion
752e442994 Update CI configs to v0.11.15
Update lint scripts and CI configs.
2024-08-16 14:13:11 -04:00
Sean DuBois
9c6604df0a Drop calls to RegisterDefaultCodecs in tests
Not needed anymore
2024-07-18 16:14:23 -04:00
Sean DuBois
dc4b591c4d Start pion/webrtc/v4
60eea43 is a breaking change
2023-09-05 11:48:14 -04:00
renovate[bot]
ea23dec2b9 Update module transport, srtp, ice and turn
ReplayDetector introduced a breaking change
2023-09-03 23:59:43 -04:00
Steffen Vogel
683fc837d0 Make repo REUSE compliant 2023-05-05 11:58:49 -04:00
Steffen Vogel
eafdc7742a Use new pion/transport Net interface
This change adapts pion/ice to use a new interface for most network
related operations. The interface was formerly a simple struct vnet.Net
which was originally intended to facilicate testing. By replacing it
with an interface we have greater flexibility and allow users to hook
into the networking stack by providing their own implementation of
the interface.
2023-02-09 09:39:33 +01:00
boks1971
37e16a3b15 Bolting on send side simulcast
Introduces AddEncoding method in RTP sender to add simulcast encodings.

Added UTs for AddEncoding.
Also modified the Simulcast send test to use the new API.
2022-02-24 23:55:17 -08:00
Sean DuBois
94262c1b2b Add DTLS, ICE and SCTP Transport to WASM
Only available in the browser, not in wrtc yet.

Resolves #2099
2022-02-08 00:37:47 -05:00
Kevin Wang
f644649329 Add ability to set RTP stream ID on TrackLocal
This change makes it possible to set the RTP stream ID to
allow forwarding and production of simulcast streams.
2022-01-14 12:37:06 -05:00
Len
d4b645635c Fix RTPSender.Send crash
If PeerConnection removes track while RTPSender is
created and being negotiated, RTPSender.Send would
access nil pointer. Check If track is nil.

Relates to #2065
2022-01-07 10:46:18 -05:00
Sean DuBois
26ce88e87a Fix RTPSender.GetParameters crash
If a RTPSender doesn't have a track currently set and GetParameters is
called we would call a method on a nil pointer. Now instead of checking
the Track kind we store the kind in the RTPSender.

Resolves #2065
2021-12-26 22:50:52 -05:00
Sean DuBois
0735efd344 Throw error earlier for RTPSender with no codecs
It isn't possible to send media if a MediaEngine has no codecs. This
catches a common misconfiguration issues that users find themselves in.

Resolves #1702
2021-08-15 07:54:53 -04:00
OrlandoCo
5253475ec7 Check for nil transceivers on get parameters
For ORTC API senders does not have a transceiver causing
panics on getting parameters.
2021-08-07 22:06:10 -04:00
Patryk Rogalski
3af80189da Fixes ReplaceTrack
When ReplaceTrack was set previously to nil
it would be impossible to ReplaceTrack again
with a non-nil value as r.track was set to nil.
2021-07-20 12:41:22 -04:00
digitalix
f8a8c09949 Support PayloadTypes changing a TrackRemote
If the PayloadType changes for a SSRC update the codec on the
TrackRemote.

Resolves #1850
2021-06-27 14:44:02 -04:00
Sean DuBois
9c7b365144 Use closePairNow in tests
Instead of explicitly closing each PeerConnection use helper.
No change in test behavior, just makes code more consistent.
2021-02-16 15:47:58 -08:00
mission-liao
40eb352909 Add SetReadDeadline to RTPSender
ReadDeadline is supported by RTPReceiver but not RTPSender. This
commit attempts to provide similar method for RTPSender.

If SetReadDeadine is called with:
- an empty time.Time: it will clear all previous set deadline.
- a non-empty time.Time: it will abort all pending "ReadRTCP" calls if
  the specified time is up.
2021-02-04 10:16:44 +08:00
Sean DuBois
67826b1914 Update Interceptors to use []byte based API
Also update test to assert Attributes get passed all the way through

Resolves pion/interceptor#14
2020-12-13 18:40:33 -08:00
Juliusz Chroboczek
0dea1f91e0 Fix RTPSendParameters
RTPSendParameters contains an array of encodings.
RTPSender.GetParameters returns RTPSendParameters.
2020-12-05 23:02:27 -08:00
Sean DuBois
9715626a0c Revert "Read/Write RTP/RTCP packets with context"
This change caused a ~24% performance decrease

Relates to pion/webrtc#1564

This reverts commit 47a7a64898.
2020-12-02 20:11:06 -08:00
Atsushi Watanabe
47a7a64898 Read/Write RTP/RTCP packets with context
Control cancel/timeout by context.
2020-12-01 11:08:48 +09:00
Sean DuBois
a218b857bd Implement RTPSender.ReplaceTrack
Resolves #1020
2020-11-18 21:50:27 -08:00