Commit Graph

15 Commits

Author SHA1 Message Date
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
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
Pion
c1467e4871 Update CI configs to v0.7.2
Update lint scripts and CI configs.
2022-04-27 23:00:19 -04: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
157220e800 Run gofmt to add new build constraints
Also remove some 1.13 specific WASM code
2022-01-17 22:36:01 -05:00
cnderrauber
c1fa55d5ef Fix RtpSender: may block infinite in Read
In RtpSender, if Read has been called and wait for srtpReady,
then if we call Close() immediately after
rtpSender.trasport.srtpReady, that means srtpWriterFuture's Close
may be called when it's init method is executing.

In Read -> init, goroutine may run at:
	rtpWriteStream, err := srtpSession.OpenWriteStream()
	if err != nil {
		return err
	}

	s.rtcpReadStream.Store(rtcpReadStream)
	s.rtpWriteStream.Store(rtpWriteStream)

In Close, goroutine may run at
	if value := s.rtcpReadStream.Load(); value != nil {
		return value.(*srtp.ReadStreamSRTCP).Close()
	}

	return nil

s.rtcpReadStream could be nil in the check at Close, so it
will not be closed.

And in Read method, the init method initiates the stream and
return. Then read at the stream's buffer, and blocked infinite
because the buffer is not closed. And it will not be closed
if you call RtpSender's close method because it is already
closed.
2021-09-05 22:01:31 -04:00
Sean DuBois
cffa6afc34 Rollback pion/rtp to v0
Resolves #1908
2021-08-02 18:05:45 -04:00
Sean DuBois
a67c66a0c5 Upgrade pion/rtp to v2
Also updates interceptor and srtp
2021-07-29 11:18:41 -04: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
7c2352003b Update pion/srtp and pion/transport
Removes context usage
2020-12-02 20:20:03 -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
Sean DuBois
3da29b7c0c Write/WriteRTP shouldn't block before SRTP
A Track shouldn't block until a PeerConnection is connected. It should
only send to PeerConnections that are fully established. v3 Track API
changed this behavior by mistake.

Related to pion/transport#116
2020-12-02 19:25:43 -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
e32d766199 Improve TrackLocal error handling
* Return error to user when remote doesn't support codecs
* Assert that bindings are properly incremented/decremented
* Assert that a added track doesn't error even when disconnected

Relates to #1526
2020-11-27 23:07:29 -08:00