Commit Graph

2053 Commits

Author SHA1 Message Date
Sean Knight
f25b48d3de Fix typo in README
s/Leran/Learn/
2020-11-12 12:15:24 -08:00
Pion
ae5c0046da Update CI configs to v0.4.12
Update lint scripts and CI configs.
2020-11-06 20:33:59 -08:00
Artur Shellunts
c1824714dd Improve pkg/media/h264reader
* Use NalUnitType constants instead of numbers
* Remove excess tests (code coverage remains same)
* Use standard io.EOF instead of customer error on steam end
2020-11-05 20:43:40 -08:00
Artur Shellunts
ef0e79cd55 Add pkg/media/h264reader
H264Reader reads a stream of Annex B H264 and packetizes into a NAL at a
time. This then can easily be passed into pion/rtp
v3.0.0-beta.12
2020-11-04 23:26:16 -08:00
OrlandoCo
5104499373 Add RTPTransceiver.SetSender
This non-standard API allows us to re-use existing transceivers.
The WebRTC API causes SDP bloat right now since it doesn't allow
the re-use of existing media sections.
v3.0.0-beta.11
2020-11-04 12:47:29 -05:00
tarrencev
78f7c978fe Safely mutate local description
adding candidates races with negotiation check
2020-11-03 00:22:41 -05:00
tarrencev
0582c689dd Fix: only add ice candidates on first m section
The use of a BUNDLE transport allows the usage of a single set of
   Interactive Connectivity Establishment (ICE)
   [I-D.ietf-ice-rfc5245bis] candidates for the whole BUNDLE group.
   A given BUNDLE address:port MUST only be associated with a single
   BUNDLE group.  If an SDP offer or answer contains multiple BUNDLE
   groups, the procedures in this specification apply to each group
   independently.  All RTP-based bundled media associated with a given
   BUNDLE group belong to a single RTP session [RFC3550].
2020-11-03 00:22:41 -05:00
Renovate Bot
efbebb164f Update golang.org/x/net commit hash to ff519b6
Generated by renovateBot
2020-10-31 23:17:02 -07:00
tarrencev
60db5090fc Fix: onnegotiationneeded handler race
Setting and calling the handler can race
2020-10-30 16:56:02 -04:00
Pion
670edf752a Update CI configs to v0.4.10
Update lint scripts and CI configs.
2020-10-29 21:28:54 -07:00
tarrencev
69bfb5841d simple test 2020-10-25 00:33:08 -04:00
OrlandoCo
3412dc6d95 Add SessionDescription Unmarshal helper
This will allow to re-use the internally parsed sdp, and prevent parsing multiple times and save some cpu cycles.
2020-10-25 00:33:08 -04:00
Assad Obaid
a38b7a48e1 Fix usernameFragment string pointer to value 2020-10-24 11:42:13 -07:00
Pion
5b7732e52f Update CI configs to v0.4.9
Update lint scripts and CI configs.
2020-10-23 22:15:44 -07:00
tarrencev
ebf2648686 hold lock for checkNegotiationNeeded transceiver checks v3.0.0-beta.10 2020-10-23 17:47:50 -04:00
tarrencev
b97c9b436d fix(pc): set track on new transceiver 2020-10-23 17:47:50 -04:00
OrlandoCo
be1723bb9c Fix sender nil on negotiation check step 5.3.1 v3.0.0-beta.9 2020-10-20 18:26:54 -04:00
Sean DuBois
7fc6f5435b Stop discarding errors in setDescription
SetRemoteDescription was not properly returning errors. Fix and add test
to make sure we don't regress again in the future.

Resolves #1210
Resolves #1473
2020-10-15 22:23:09 -07:00
OrlandoCo
65400221ec Add methods to read Simulcast RTCP
Add ReadSimulcastRTCP and ReadSimulcast to RTPReceiver
2020-10-15 12:11:32 -07:00
Jamie Good
63112a4ed4 Use addTrack instead of addStream in examples
Logs: TypeError: pc.addStream is not a function.
Fixed js error when using safari due to deprecated
RTCPeerConnection.addStream() method.

Updated js fiddle examples to use the addTrack()
method instead.
2020-10-14 10:16:28 -07:00
Sean DuBois
fdbf5b5c90 Update pion/ice
v2.0.8 => v2.0.9
v3.0.0-beta.8
2020-10-12 13:16:47 -07:00
Assad Obaid
6e72493517 Set the proxy dialer
Sets the proxy dialer in the ice package.

Relates to pion/ice#284
2020-10-09 13:01:38 -07:00
OrlandoCo
3f53b70405 Fix receiver close stream race close
Add nil check in RTPReceiver.Stop()

Fixes #1471
2020-10-09 09:27:31 -07:00
Sean DuBois
7b72d684e5 Handle Remote offer with inactive media section
If a remote Offer stops a mid make sure we
also stop the corresponding mid locally.

Resolves #1470
2020-10-08 15:58:34 -07:00
Sean DuBois
6970c88e2b Add SCTPTransport getter to PeerConnection
This is needed so users can use OnSelectedCandidatePairChange
for DataChannel use cases.

Resolves #713
2020-10-07 08:13:22 -07:00
rahulnakre
4c1440c04c Make getCodecSDP case insensitive
EqualFold to compare codec names in a case
insensitive manner

Fixes #1442
2020-10-06 19:23:18 -07:00
Juliusz Chroboczek
a952829951 Don't lose packet for OnTrack PayloadType probe
Dropping a packet at the beginning of every track is bad, since
it corrupts the first keyframe of each video track.  This works
by adding a peek method to Track, and using it in NewTrack.

The peeked data is protected by the RWLock already associated
with the track.  We check for its presence with the reader lock
taken, which avoids taking the writer lock (or doing an atomic read)
in the common case (no peeked data).

Fixes #1001
v3.0.0-beta.7
2020-10-05 19:05:27 -07:00
Sean DuBois
89c51a156c Rename SettingEngine mDNS Config option
GenerateMulticastDNSCandidates -> SetICEMulticastDNSMode.
Before a user wasn't able to disable mDNS. By changing it we can
do more with this API.
2020-10-05 16:52:21 -07:00
Sean DuBois
4c280289af Update CI configs to v0.4.8
Update lint scripts and CI configs.
2020-10-04 18:14:45 -07:00
Sean DuBois
f3d42e0120 Fix typo Quick -> Quic
Fix typo made when updating golangci-lint
2020-10-03 22:44:07 -07:00
Sean DuBois
804a12fed3 Update CI configs to v0.4.7
Update lint scripts and CI configs.
v3.0.0-beta.6
2020-09-30 09:06:34 -07:00
mission-liao
0786371c1e Keep sessions in atomic.Value
This modification attempts to fix a deadlock happens when closing a
peer-connection.

The deadlock scenario is:
- routine-1: DTLSTransport.Stop is called during closing, which holds
  the writer-lock of DTLSTransport, and it blocked by accepting from
  session.closed channel when trying to close SRTPSession.
- routine-2: its stacks located in the routine launched in
  srtp.session.start(...), this routine should close the session.closed
  channel, however, it blocked when sending to
  srtp.SessionSRTP.session.newStream
- routine-3: this routine should call strp.SessionSRTP.AcceptStream
  to release routine-2. However, it blocked when calling
  DTLSTransport.getSRTPSession(), it requires the reader-lock.

To resolve this issue, the instance of SessionSRTP is kept in
atomic.Value and avoid the requirement of reader-lock in
DTLSTransport.

Fixes #1430
2020-09-27 22:23:09 -07:00
tarrencev
a0cc7bda99 Fix: Flakey OnNegotiationNeeded tests 2020-09-27 16:54:04 -07:00
Hanjun Kim
051a10edf3 add Unwrap method for error types
Fixes #1443
2020-09-25 18:48:25 -07:00
obasajujoshua31
7d79c766c9 Add GetMediaStats to StatsReport
Add an API to get basic stats around media.

Relates to #610

mend
2020-09-22 14:05:06 -04:00
obasajujoshua31
9d393905c1 Add GetMediaStats to StatsReport
Add an API to get basic stats around certificate

Relates to #610
2020-09-22 12:03:52 -04:00
mission-liao
062e55d769 Avoid acquiring two reader privilege of a lock
It's an anti-pattern when using sync.RWMutex in golang.
After acquiring two reader privilege of a rwlock, it will deadlock if
another routine tries to acquire a writer lock.

In pion/webrtc, this calling sequence might happen when calling
GetTransceivers during track events.

Resolves #1425
2020-09-19 13:26:03 -07:00
Renovate Bot
a21278ca39 Update module pion/sdp/v3 to v3.0.1
Generated by renovateBot
v3.0.0-beta.5
2020-09-18 15:56:25 -07:00
Sean DuBois
a49f98f0c7 Add STUN server to all examples
Just to reduces friction for users

Resolves #1432
2020-09-18 15:08:13 -07:00
Renovate Bot
8ba0e35d58 Update module pion/datachannel to v1.4.21
Generated by renovateBot
2020-09-17 22:15:44 -07:00
Sean DuBois
ae5c1224ba Add note around memory ownership for SampleBuilder
The SampleBuilder doesn't copy. If you wish to modify the memory that
was passed you should copy it first.

Relates to pion/rtp#88
2020-09-16 20:18:15 -07:00
obasajujoshua31
78cda933e3 Fix issue 1211
return io.ErrClosedPipe instead of default error coming from ensureOpened

wrote test for attempting to send when close
2020-09-14 13:51:37 -04:00
Renovate Bot
66ca9ed130 Update module pion/sctp to v1.7.10
Generated by renovateBot
2020-09-13 14:18:02 -07:00
Sean DuBois
842b859097 Update CI configs to v0.4.6
Update lint scripts and CI configs.
2020-09-13 13:48:52 -07:00
Sean DuBois
2155a7d703 Move candidate parsing to pion/ice
Instead of having logic in pion/webrtc and pion/sdp move all logic to
pion/ice. Users of pion/ice don't want to import these packages to use
basic pion/ice functionality.
2020-09-13 00:05:09 -07:00
tarrencev
81cfadaf06 Fix: CreateOffer race condition
Fixes a race condition that occurs when the local media (transceivers)
are mutated during the offer generation process.
2020-09-11 14:05:19 -04:00
tarrencev
fc11e7c66c Fix: negotiation state race conditions
Adds a few locks to solve a few race conditions with renegotiations
2020-09-10 22:58:32 -07:00
q191201771
c2ed6ee835 Fix error checking
Wrong error variable was checked and redundant parentheses in
play-from-disk example.
2020-09-10 09:10:25 -04:00
Pion
0466659207 Update CI configs to v0.4.5
Update lint scripts and CI configs.
2020-09-09 22:09:23 -07:00
tarrencev
611e675862 Fix(peerconnection): fix negotiation needed race
safely access transceivers and signaling state
2020-09-08 10:38:13 -04:00