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
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
Adam Kiss
5bbc84e404
Implement Interceptors
...
Provide API so that handling around RTP can be easily defined by the
user. See the design doc here[0]
[0] https://github.com/pion/webrtc-v3-design/issues/34
2020-11-26 11:23:19 -08:00
Sean DuBois
00ec48af63
Don't run OnNegotiationNeeded if handler not set
...
Reduce the amount of code that is running if we don't need this.
Relates to #1494
2020-11-23 10:06:04 -08:00
Sidney San Martín
e1efa5d6f4
Compute an MSID to compare with the SDP
...
The MSID won't match the track's StreamID() on its own.
2020-11-22 22:35:51 -08:00
OrlandoCo
3333b65c01
Make WithMediaEngine to receive a pointer
...
These change will allow to use the MediaEngine outside Pion context
2020-11-18 10:56:29 -08:00
Sean DuBois
5498e93083
Fix dataChannelsRequested race
...
Take pc.sctpTransport lock before accessing
2020-11-16 14:27:51 -08:00
Sean DuBois
7edfb701e0
New Track API
...
The Pion WebRTC API has been dramatically redesigned. The design docs
are located here [0]
You can also read the release notes [1] on how to migrate your
application.
[0] https://github.com/pion/webrtc-v3-design
[1] https://github.com/pion/webrtc/wiki/Release-WebRTC@v3.0.0
2020-11-15 09:20:47 -08:00
tarrencev
78f7c978fe
Safely mutate local description
...
adding candidates races with negotiation check
2020-11-03 00:22:41 -05:00
tarrencev
60db5090fc
Fix: onnegotiationneeded handler race
...
Setting and calling the handler can race
2020-10-30 16:56:02 -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
tarrencev
ebf2648686
hold lock for checkNegotiationNeeded transceiver checks
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
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
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
Sean DuBois
804a12fed3
Update CI configs to v0.4.7
...
Update lint scripts and CI configs.
2020-09-30 09:06:34 -07:00
tarrencev
a0cc7bda99
Fix: Flakey OnNegotiationNeeded tests
2020-09-27 16:54:04 -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
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
tarrencev
611e675862
Fix(peerconnection): fix negotiation needed race
...
safely access transceivers and signaling state
2020-09-08 10:38:13 -04:00
Sean DuBois
69883c5d5a
Fix renegotation race
...
checkNegotiationNeeded accessed RtpSender field with taking lock
Resolves #1384
2020-09-07 22:52:44 -07:00
soolaugust
c01b447517
Add signaling state case in CreateAnswer()
...
According to
https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-createanswer .
If connection's signaling state is neither "have-remote-offer" nor
"have-local-pranswer", return a newly created InvalidStateError.
2020-09-03 13:46:46 -07:00
Roman Romanenko
c0b9c12b11
Use named return value from GetReceivers
...
Makes function a shorter and makes GoDoc a little better!
2020-08-23 23:20:05 -07:00
Kuzmin Vladimir
2c5819d521
Implement OnNegotiationNeeded
...
This event is fired when a change has occurred
which requires session negotiation.
Resolves #817
2020-08-19 14:37:18 -05:00
soolaugust
6f6de25b24
Modify all hdlr to handler for better reading
...
change hdlr -> handler, Hdlr -> Handler for better reading.
Since this is first commit, add myself to contributors
2020-08-17 22:04:29 -07:00
Sean DuBois
cbbede4bee
Remove some invalid RTC Prefix comments
...
These were renamed after v1, but never updated
2020-08-13 22:33:35 -07:00
JooYoung
23d7b23563
Update AddTransceiverFromTrack comment
...
Improve comment and fix typo
2020-08-13 22:26:45 -07:00
Sean DuBois
9f1417347a
Support creating a DataChannel during renegotation
...
Before when creating an offer during renegotation we didn't support
adding a DataChannel.
Resolves #1361
2020-08-12 21:43:34 -07:00
Woodrow Douglass
abd6a35654
Create data media sections for each requested
...
Don't create data media sections unless we're asked to
Fixes #1349
2020-07-29 12:57:37 -07:00
Sean DuBois
d893dcf4c7
Simplify startRTPReceivers
...
pc.startReceiver will set the receive flag for Transceivers so
no reason to do extra filtering here.
Relates to #1016
2020-07-25 02:39:51 -07:00
Jason
6ee528d349
Add Simulcast support
...
Resolves #1016
2020-07-24 01:01:43 -07:00
Atsushi Watanabe
fe63deaeb5
Fix JSEP SDP Session ID
...
Fix to use crypto random and add error handling.
Update github.com/pion/sdp/v2 to v2.4.0.
2020-07-14 12:38:19 +09:00
Sean DuBois
addb9594f2
Assert SDPType in setDescription
...
Before users could pass a SessionDescription with a 0 type. This would
be discarded silently. Now we return an error that matches browser
behavior.
Resolves #1297
2020-07-13 14:38:09 -07:00
Atsushi Watanabe
0157f347e4
Fix randoms
...
Use seeded mathematical random where uniqueness is needed
but not required to be cryptographic.
2020-07-13 14:42:53 +09:00
Jason
58956684f8
Implement answering to RIDs
...
When responding to a remote description
with RIDs we now properly respond
2020-07-10 15:14:44 -07:00
Sean DuBois
ef1d5a4a8b
Add extmap support
...
Extmaps are configured via the SettingEngine. This allows a user
to set arbitrary values, and when answering ids and entries are
properly excluded.
Co-authored-by: Gabor Pongracz <gabor.pongracz@proemergotech.com >
2020-07-03 01:01:56 -07:00
Jerko Steiner
e3cda91a59
Get a list of transceivers before starting RTP
...
Related to #1290
2020-06-30 11:48:24 -07:00
Woodrow Douglass
baf14a9af4
Media Level Fingerprints Configuration Option
...
This commit adds an option to put DTLS Fingerprint specification
at the media description level rather then the session description
level. This enhances compatibility with some 3rd party webrtc
implementations (notably Kurento).
2020-06-30 01:37:15 -07:00
Sean DuBois
f2941469f4
Implement ICE Restarts
...
Resolves #1251
2020-06-29 23:09:18 -07:00
Sean DuBois
bb3aa9717f
Move to pion/ice@v2
...
Removed support for trickle ice
Resolves #1274
2020-06-28 00:01:47 -07:00
Sean DuBois
89d7de1787
Start /v3
...
See #9 for the features we have planned, and the breaking changes that
may occur.
2020-06-25 09:45:27 -07:00
Sean DuBois
1cbdd5f45a
Fix single track PlanB offers
...
We had an off-by-one when generating PlanB offers. Fix and add a test
2020-06-02 12:10:36 -07:00
Sean DuBois
f78334d9d4
Only start SCTP if RemoteDescription requests
...
Relates to #346
2020-05-18 00:05:40 -07:00